• Welcome to Valhalla Legends Archive.
 

Stalking.....

Started by WiLD, July 14, 2003, 10:22 AM

Previous topic - Next topic

WiLD

Ok im working on a new bot. But i cant figure out how do do this 1 thing. I want it so when some1 leaves it checks whether its its master and if it is it does "/f l" (i have the bot on my friends list) and it sees what channel im in and joins it. I cant extract the name of the channel.

Plz post nething that may help thx
=_=  &&  g0dFraY  &&  -=Templar=-  @USWest

Soul Taker

#1
If the bot is using War3, just use the binary friend list to easily grab the channel.  If not, (assuming you use VB) just InStr() to 'in the channel', then do a Mid() offset by the length of 'in the channel ' and remove the trailing period.

Edit - whoops, it's 'in THE channel'

WiLD

Oyea srr im using CSB -.-
Also an example would be great
=_=  &&  g0dFraY  &&  -=Templar=-  @USWest

Soul Taker

This is off the top of my head so use at your own risk.

intStart = InStr(1, strData, "in the channel") 'strData being the incoming message
intStart = intStart + len("in the channel ") + 1 'Should offset this enough to start at the channel in the message, if not tweak it =P
strChannel = Mid(strdata, intStart) 'Grabs channel
strChannel = Mid(strChannel, 1, Len(strChannel - 1)) 'Should remove the period

Hope that gives you the idea.

WiLD

ok thx
ill give that a try.
even though im not good at vb i think i should:
csb.send "/join " & intStart
is that correct?
=_=  &&  g0dFraY  &&  -=Templar=-  @USWest

Soul Taker

No.  intStart should be an integer that simply directs the Mid() statement.  strChannel should be a string which the channel is assigned to.

WiLD

k
lol almost 4got wat int meant.... :/

csb.send "/join " & strChannel
thats correct isnt it?
=_=  &&  g0dFraY  &&  -=Templar=-  @USWest

Soul Taker

Try it and find out.  If not, debug it and see why it's not correct.  You can't learn unless you try =P

WiLD

lol srr Nub we musta posted near da same time :/
I would try it but im very tired trying 2 finish my clan site :/

Ill try it tomorrow but thx neways

oyea u no how u can creat DHTML pages with vb6, is it the same as normal vb or is it different?
=_=  &&  g0dFraY  &&  -=Templar=-  @USWest

Grok

Quote from: WiLD on July 14, 2003, 11:24 AM
oyea u no how u can creat DHTML pages with vb6, is it the same as normal vb or is it different?

Rephrase that in English, and ask it in a new thread.

WiLD

Ok iv jus tried it,

intStart = InStr(1, strData, "in the channel") 'strData being the incoming message
intStart = intStart + len("in the channel ") + 1 'Should offset this enough to start at the channel in the message, if not tweak it =P
strChannel = Mid(strdata, intStart) 'Grabs channel
strChannel = Mid(strChannel, 1, Len(strChannel - 1)) 'Should remove the period
csb.send "/join " & strChannel


Says theres an error with strChannel do i Dim strChannel or what?
=_=  &&  g0dFraY  &&  -=Templar=-  @USWest

Soul Taker

Dim strChannel as String, intStart as Integer

WiLD

ic, asfter i posted it i tried dim strchannel  kinda got it wrong didnt i lol

soul taker you have proberly provided me with the most help ever in the on topic
=_=  &&  g0dFraY  &&  -=Templar=-  @USWest

Grok

Quote from: WiLD on July 15, 2003, 12:54 AMsoul taker you have proberly provided me with the most help ever in the on topic

Oh Fear Ye Not, For Thoust Benefactor Soul Taker Will Be Punished Accord To His Deeds.


j/k