Author | Message | Time |
---|---|---|
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 | July 14, 2003, 3:22 PM |
Soul Taker | 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' | July 14, 2003, 3:26 PM |
WiLD | Oyea srr im using CSB -.- Also an example would be great | July 14, 2003, 3:28 PM |
Soul Taker | This is off the top of my head so use at your own risk. [code] 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 [/code] Hope that gives you the idea. | July 14, 2003, 3:33 PM |
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? | July 14, 2003, 4:12 PM |
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. | July 14, 2003, 4:14 PM |
WiLD | k lol almost 4got wat int meant.... :/ csb.send "/join " & strChannel thats correct isnt it? | July 14, 2003, 4:16 PM |
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 | July 14, 2003, 4:19 PM |
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? | July 14, 2003, 4:24 PM |
Grok | [quote author=WiLD link=board=17;threadid=1909;start=0#msg14788 date=1058199895] oyea u no how u can creat DHTML pages with vb6, is it the same as normal vb or is it different? [/quote] Rephrase that in English, and ask it in a new thread. | July 14, 2003, 4:51 PM |
WiLD | Ok iv jus tried it, [code] 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 [/code] Says theres an error with strChannel do i Dim strChannel or what? | July 15, 2003, 5:49 AM |
Soul Taker | Dim strChannel as String, intStart as Integer | July 15, 2003, 5:50 AM |
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 | July 15, 2003, 5:54 AM |
Grok | [quote author=WiLD link=board=17;threadid=1909;start=0#msg14872 date=1058248449]soul taker you have proberly provided me with the most help ever in the on topic[/quote] Oh Fear Ye Not, For Thoust Benefactor Soul Taker Will Be Punished Accord To His Deeds. j/k | July 15, 2003, 6:05 AM |