ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
Need help figuring out how to finish a bot (Bots)
Need help figuring out how to finish a bot // BotsjeidenJun 10, 2000, 3:51am
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01BFD27C.5D28DD00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hey all again, basically I am writing because of Xelag's bankingbot script (the one = missing the chat commands). well this is my problem after reading all = the files on programming the xelagots (printing the whole thing too) I = still cannot make heads nor tails of it (the only thing I can make of = any bot script is where to put the id and pass). I have no clue on how to add the chat lines (the parts Xelag left out = due to limited time and space I guess) or any of the command lines for = that matter. if someone would be kind and help me learn to read what looks to me a = like gobbly-gook (no offense meant just have no clue on how to read let = alone write in the language) it would be greatly appreciated. A totally clueless, Jeiden ------=_NextPart_000_0008_01BFD27C.5D28DD00 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2919.6307" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3D"Comic Sans MS">Hey all again,</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">basically I am writing because of = Xelag's=20 bankingbot script (the one missing the chat commands). well this is my = problem=20 after reading all the files on programming the xelagots (printing the = whole=20 thing too) I still cannot make heads nor tails of it (the only = thing I can=20 make of any bot script is where to put the id and pass).</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">I have no clue on how to add the chat = lines (the=20 parts Xelag left out due to limited time and space I guess) or any of = the=20 command lines for that matter.</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">if someone would be kind and help me = learn to=20 read what looks to me a like gobbly-gook (no offense meant just have no = clue on=20 how to read let alone write in the language) it would be greatly=20 appreciated.</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">A totally clueless,</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">Jeiden</FONT></DIV></BODY></HTML> ------=_NextPart_000_0008_01BFD27C.5D28DD00-- xelagJun 11, 2000, 2:59pm
--------------465F87F28297B58FCE32E269
Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi Jeiden, The scripting language is meant for people who have some programming background. Have a look at the working examples I posted, for instance, the DoubleWarps script: it intercepts the chatlines using an OnChatEvent handler. That is probably what you need to figure out if your bot is to act on commands sent thruogh chatlines. The main script part of this DoubleWarps example: [Main] var at bot, %alpha, %beta, %ns1, %we1, %ns2, %we2 var $ns1, $we1, $ns2, $we2, $ac1, $ac2 var ~w1, ~w2 var %dist, %ds, %repeat, %re, %done var $panel, %faces # distance between 2 warps in meters # 2 meters will be added to the warp %dist = 10 # panel must be a one sided panel $panel = "sign4.rwx" # repeat times %repeat = 1 %faces = 0 Add %ds %dist 2 Div %ds %ds 10 Stop Gosub SayState Gosub SayHelp Label Wait OnChatEvent Chat Label WaitLoop Goto WaitLoop Label Build OnChatEvent %re = %repeat %done = 0 Add %ds %dist 2 Div %ds %ds 10 # %ds has the distance of the warp in aw units Label BuildNow Gosub Pos GetLocation at bot LocMove3d at bot %dist 0 0 WarpLocal at bot Dec %re Inc %done Concat $a "Warp " %done Say $a IfInt %re > 0 Goto BuildNow Say Done Goto Wait End Notice the two lines: OnChatEvent Chat and OnChatEvent. The first one activates an event handler, the second one de-activates it. The event handler is: Event Chat GetChatPerson &p IfPerson &p IsNotBoss EndEvent GetChatLine $a IfString "model" IsIn $a Gosub SetModel Else IfString "faces you" IsIn $a Gosub SetFacesYou Else IfString "faces away" IsIn $a Gosub SetFacesAway Else IfString "distance" IsIn $a Gosub SetDistance Else IfString "repeat" IsIn $a Gosub SetRepeat Else IfString "state" IsIn $a Gosub SayState Else IfString "action" IsIn $a Gosub SayAction Else IfString "help" IsIn $a Gosub SayHelp Else IfString "menu" IsIn $a Gosub SayHelp Else IfString "build" IsIn $a Gosub SetBuild EndEvent It is quite straightforward. Each line with IfString tests if a certain word or group of words appears in the chatline, and if so calls a Sub to handle the case. Hope this helps. Alex. [View Quote] > Hey all again, basically I am writing because of Xelag's bankingbot > script (the one missing the chat commands). well this is my problem > after reading all the files on programming the xelagots (printing the > whole thing too) I still cannot make heads nor tails of it (the only > thing I can make of any bot script is where to put the id and pass). I > have no clue on how to add the chat lines (the parts Xelag left out > due to limited time and space I guess) or any of the command lines for > that matter. if someone would be kind and help me learn to read what > looks to me a like gobbly-gook (no offense meant just have no clue on > how to read let alone write in the language) it would be greatly > appreciated. A totally clueless, Jeiden --------------465F87F28297B58FCE32E269 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <body bgcolor="#FFFFFF"> Hi Jeiden, <p>The scripting language is meant for people who have some programming background. Have a look at the working examples I posted, for instance, the DoubleWarps script: it intercepts the chatlines using an OnChatEvent handler. That is probably what you need to figure out if your bot is to act on commands sent thruogh chatlines. <p>The main script part of this DoubleWarps example: <p>[Main] <br>var at bot, %alpha, %beta, %ns1, %we1, %ns2, %we2 <br>var $ns1, $we1, $ns2, $we2, $ac1, $ac2 <br>var ~w1, ~w2 <br>var %dist, %ds, %repeat, %re, %done <br>var $panel, %faces <br> # distance between 2 warps in meters <br> # 2 meters will be added to the warp <br> %dist = 10 <br> # panel must be a one sided panel <br> $panel = "sign4.rwx" <br> # repeat times <br> %repeat = 1 <br> %faces = 0 <br> Add %ds %dist 2 <br> Div %ds %ds 10 <br> Stop <br> Gosub SayState <br> Gosub SayHelp <br>Label Wait <br> <font color="#3333FF">OnChatEvent Chat</font> <br>Label WaitLoop <br> Goto WaitLoop <br>Label Build <br> <font color="#3333FF">OnChatEvent</font> <br> %re = %repeat <br> %done = 0 <br> Add %ds %dist 2 <br> Div %ds %ds 10 <br> # %ds has the distance of the warp in aw units <br>Label BuildNow <br> Gosub Pos <br> GetLocation at bot <br> LocMove3d at bot %dist 0 0 <br> WarpLocal at bot <br> Dec %re <br> Inc %done <br> Concat $a "Warp " %done <br> Say $a <br> IfInt %re > 0 Goto BuildNow <br> Say Done <br> Goto Wait <br>End <p>Notice the two lines: <b>OnChatEvent Chat</b> and <b>OnChatEvent</b>. <br>The first one activates an event handler, the second one de-activates it. The event handler is: <p>Event Chat <br> GetChatPerson &p <br> IfPerson &p IsNotBoss EndEvent <br> GetChatLine $a <br> IfString "model" IsIn $a Gosub SetModel <br> Else IfString "faces you" IsIn $a Gosub SetFacesYou <br> Else IfString "faces away" IsIn $a Gosub SetFacesAway <br> Else IfString "distance" IsIn $a Gosub SetDistance <br> Else IfString "repeat" IsIn $a Gosub SetRepeat <br> Else IfString "state" IsIn $a Gosub SayState <br> Else IfString "action" IsIn $a Gosub SayAction <br> Else IfString "help" IsIn $a Gosub SayHelp <br> Else IfString "menu" IsIn $a Gosub SayHelp <br> Else IfString "build" IsIn $a Gosub SetBuild <br>EndEvent <p>It is quite straightforward. Each line with <b>IfString</b> tests if a certain word or group of words appears in the chatline, and if so calls a Sub to handle the case. <p>Hope this helps. Alex. <br> [View Quote] </body> </html> --------------465F87F28297B58FCE32E269-- |