Thread

Need help figuring out how to finish a bot (Bots)

Need help figuring out how to finish a bot // Bots

1  |  

jeiden

Jun 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>&nbsp;</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&nbsp;(the only =
thing I can=20
make of any bot script is where to put the id and pass).</FONT></DIV>
<DIV>&nbsp;</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>&nbsp;</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&nbsp;in the language) it would be greatly=20
appreciated.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"Comic Sans MS">A totally clueless,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"Comic Sans MS">Jeiden</FONT></DIV></BODY></HTML>

------=_NextPart_000_0008_01BFD27C.5D28DD00--

xelag

Jun 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.&nbsp; Have a look at the working examples I posted, for instance,
the DoubleWarps script: it intercepts the chatlines using an OnChatEvent
handler.&nbsp; 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>&nbsp;&nbsp; # distance between 2 warps in meters
<br>&nbsp; # 2 meters will be added to the warp
<br>&nbsp;&nbsp; %dist = 10
<br>&nbsp; # panel must be a one sided panel
<br>&nbsp; $panel = "sign4.rwx"
<br>&nbsp;&nbsp; # repeat times
<br>&nbsp; %repeat = 1
<br>&nbsp; %faces = 0
<br>&nbsp; Add %ds %dist 2
<br>&nbsp; Div %ds %ds 10
<br>&nbsp;&nbsp; Stop
<br>&nbsp; Gosub SayState
<br>&nbsp; Gosub SayHelp
<br>Label Wait
<br>&nbsp;<font color="#3333FF">OnChatEvent Chat</font>
<br>Label WaitLoop
<br>&nbsp; Goto WaitLoop
<br>Label Build
<br>&nbsp; <font color="#3333FF">OnChatEvent</font>
<br>&nbsp; %re = %repeat
<br>&nbsp;&nbsp; %done = 0
<br>&nbsp; Add %ds %dist 2
<br>&nbsp; Div %ds %ds 10
<br>&nbsp;&nbsp; # %ds has the distance of the warp in aw units
<br>Label BuildNow
<br>&nbsp; Gosub Pos
<br>&nbsp; GetLocation at bot
<br>&nbsp; LocMove3d at bot %dist 0 0
<br>&nbsp; WarpLocal at bot
<br>&nbsp; Dec %re
<br>&nbsp; Inc %done
<br>&nbsp; Concat $a "Warp " %done
<br>&nbsp; Say $a
<br>&nbsp; IfInt %re > 0 Goto BuildNow
<br>&nbsp;&nbsp; Say Done
<br>&nbsp; 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.&nbsp; The event handler is:
<p>Event Chat
<br>&nbsp; GetChatPerson &amp;p
<br>&nbsp; IfPerson &amp;p IsNotBoss EndEvent
<br>&nbsp; GetChatLine $a
<br>&nbsp;&nbsp; IfString "model" IsIn $a Gosub SetModel
<br>&nbsp;&nbsp; Else IfString "faces you" IsIn $a Gosub SetFacesYou
<br>&nbsp;&nbsp; Else IfString "faces away" IsIn $a Gosub SetFacesAway
<br>&nbsp;&nbsp; Else IfString "distance" IsIn $a Gosub SetDistance
<br>&nbsp;&nbsp; Else IfString "repeat" IsIn $a Gosub SetRepeat
<br>&nbsp;&nbsp; Else IfString "state" IsIn $a Gosub SayState
<br>&nbsp;&nbsp; Else IfString "action" IsIn $a Gosub SayAction
<br>&nbsp;&nbsp; Else IfString "help" IsIn $a Gosub SayHelp
<br>&nbsp;&nbsp; Else IfString "menu" IsIn $a Gosub SayHelp
<br>&nbsp;&nbsp; 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.&nbsp; Alex.
<br>&nbsp;
[View Quote] </body>
</html>

--------------465F87F28297B58FCE32E269--

1  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn