ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
Remote eject (Bots)
Remote eject // Botsdaniel whatleyAug 7, 1999, 8:47pm
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html> How can I make my xelagot remote eject using avatar click like the preston?</html> decastro@cable.a2000.nl (xelag)Aug 8, 1999, 1:28am
On Sat, 07 Aug 1999 15:47:39 -0700, Daniel Whatley
[View Quote] ><!doctype html public "-//w3c//dtd html 4.0 transitional//en"> ><html> >How can I make my xelagot remote eject using avatar click like the preston?</html> I don't know how preston works, Whatdog, but here is a script you can use with Xelagot (latest version). Copy this script (between the ----- lines), save it as a text file in the Script directory. Load this script when the bot is running (see online helpfiles), and start it. XelaG ----------- [Head] Type=Script Version=2.0 [Settings] Origin=0.000n 0.000w 0.00a 0.0 [Script] # example of eject script with avatar click # only works for the owner of the boss # if the bot has eject right # define time-out list and $chatline var /t_eject, $chatline # set default time-out in seconds %t = 30 # install chat event handler OnChatEvent Chat1 # install avatar click event handler OnAvatarClickEvent AvatarClick1 # loop Label Loop1 # loop back (no exit here) Goto Loop1 Label End End Event AvatarClick1 # get event data GetSourcePerson &p GetTargetPerson &t # if source is the boss gosub... IfPerson &p IsBoss1 Gosub PreEject EndEvent Sub PreEject # get name and session number of victim GetName $n &t GetSession %s &t $s = %s # get bot's session number GetSession %b # if sessions are equal, exit IfInt %b = %s EndSub # keep session number and name in time-out list TItemSet /t_eject $s $n %t # whisper to boss what he should do next Concat $a "Boss, you have" %t Concat $a $a " secs. to tell me the number of minutes to eject " $n Whisper &p $a EndSub Event Chat1 # get chat person and line GetChatPerson &c GetChatLine $chatline # if it's the boss, proceed IfPerson &c IsBoss1 Gosub Eject1 EndSub Sub Eject1 # get the first number in chatline, store it in $y SplitAtNumber $x $y $z $chatline # test that $y is not empty, store as integer IfString $y <> "" %y = $y Else %y = 0 # reteive the victim's data # $s session number as string # $n name # %t time-out left, 0 means expires or non-existant TItemGet /t_eject $s $n %r $a = "?" # if number of eject minutes > 0 and time-out is valid # eject the victim (Sub Eject2) # else whisper a question mark to boss IfInt %y > 0 IfInt %r > 0 Gosub Eject2 Else Whisper &p $a EndSub Sub Eject2 # eject code # prepare what to say to boss Concat $a "Ejecting " $n " for " %y " minutes" # change session number from string to integer %s = $s # whisper to boss, eject victim Whisper &c $a Eject %s $n %y EndSub ------------- decastro@cable.a2000.nl (xelag)Aug 8, 1999, 1:39am
On Sun, 08 Aug 1999 03:28:25 GMT, decastro at cable.a2000.nl (XelaG)
[View Quote] a slight error in the script (wonder how it worked when i tested it?) Event Chat1 # get chat person and line GetChatPerson &c GetChatLine $chatline # if it's the boss, proceed IfPerson &c IsBoss1 Gosub Eject1 EndSub should be: Event Chat1 # get chat person and line GetChatPerson &c GetChatLine $chatline # if it's the boss, proceed IfPerson &c IsBoss1 Gosub Eject1 EndEvent The last line was wrong :) XelaG daniel whatleyAug 8, 1999, 1:57am
decastro@cable.a2000.nl (xelag)Aug 8, 1999, 3:55am
LOL, this late night coding... second mistake in the script:
Sub Eject2 # eject code # prepare what to say to boss Concat $a "Ejecting " $n " for " %y " minutes" # change session number from string to integer %s = $s # whisper to boss, eject victim Whisper &c $a Eject %s $n %y EndSub must read, to eject for %y minutes and not seconds: Sub Eject2 # eject code # prepare what to say to boss Concat $a "Ejecting " $n " for " %y " minutes" # change session number from string to integer %s = $s # multiply %y by 60 IntMul %y %y 60 # whisper to boss, eject victim Whisper &c $a Eject %s $n %y EndSub XelaG. daniel whatleyAug 8, 1999, 4:20am
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html> It works ok but I actually want the bot to automatically eject the person that is clicked on for a minute and be able to let any one to do this not just the boss.</html> decastro@cable.a2000.nl (xelag)Aug 8, 1999, 11:47am
On Sat, 07 Aug 1999 23:20:50 -0700, Daniel Whatley
[View Quote] ><!doctype html public "-//w3c//dtd html 4.0 transitional//en"> ><html> >It works ok but I actually want the bot to automatically eject the person >that is clicked on for a minute and be able to let any one to do this not >just the boss.</html> try this script, i haven't tested it. XelaG ------- [Head] Type=Script Version=2.0 [Settings] Origin=0.000n 0.000w 0.00a 0.0 [Script] # example of eject script with avatar click # works for anyone who clicks on a victim # if the bot has eject right # ejects automatically for one minute # set eject period in minutes %e = 1 # multiply %e by 60 IntMul %y %e 60 # install avatar click event handler OnAvatarClickEvent AvatarClickEject # loop Label Loop1 # loop back (no exit here) Goto Loop1 End Event AvatarClickEject # get ejector data GetSourcePerson &p # get target (= victim) data GetTargetPerson &t GetSession %s &t GetName $n &t # bot's session number GetSession %b # if target <> bot himself, gosub... IfInt %b <> %s Gosub Eject EndEvent Sub Eject # eject code # whisper to ejector Concat $a "Ejecting " $n " for " %e " minutes" Whisper &p $a # eject Eject &t %y EndSub ------- daniel whatleyAug 8, 1999, 1:42pm
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html> it worked but the person did not get ejected. [View Quote] decastro@cable.a2000.nl (xelag)Aug 8, 1999, 10:08pm
On Sun, 08 Aug 1999 08:42:57 -0700, Daniel Whatley
[View Quote] ><!doctype html public "-//w3c//dtd html 4.0 transitional//en"> ><html> >it worked but the person did not get ejected. You are right, Whatdog, there is a bug in IntMul, it does not do the multiplication. This will be fixed in the next version 2.78, I'll upload it in a few minutes. The script should then work ok. XelaG. [View Quote] john viperAug 9, 1999, 8:13pm
This is a multi-part message in MIME format.
------=_NextPart_000_007C_01BEE292.D5E96D20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Are you trying to make, like, a game of Paint Ball or some shooter-type = thing? If so, I am almost done making the Beta version of PaintBallBot. = All information on that will be posted in ViperBot Labs in Bots world. -John Viper [View Quote] ------=_NextPart_000_007C_01BEE292.D5E96D20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN"> <HTML> <HEAD> <META content=3Dtext/html;charset=3Diso-8859-1 = http-equiv=3DContent-Type><!doctype html public "-//w3c//dtd html 4.0 = transitional//en"> <META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT color=3D#000000 size=3D2>Are you trying to make, like, a game = of Paint=20 Ball or some shooter-type thing? If so, I am almost done making = the Beta=20 version of PaintBallBot. All information on that will be posted in = ViperBot Labs in Bots world.</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT size=3D2>-John Viper</FONT></DIV> <BLOCKQUOTE=20 style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: = 5px"> [View Quote] ------=_NextPart_000_007C_01BEE292.D5E96D20-- |