Thread

Xelag script (Bots)

Xelag script // Bots

1  |  

prozak

Oct 7, 2000, 9:16pm
This is a multi-part message in MIME format.
--------------3156265F0EDF10B59CF231BC
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Here is a sign for VRT places when you have all these confused people.
It's not much, but works really good. It is for Xelags.
I have lots of people in my place that can't tell time anyway, so this
has helped. And yes, I know it is on the browser. ))-


--------------3156265F0EDF10B59CF231BC
Content-Type: text/plain; charset=iso-8859-1;
name="timebot.txt"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline;
filename="timebot.txt"

[Head]
Type=Script
Version=2.2

# Update VRT time sign by Prozak
# from a script by Alex
#
# put this in the action field for a beautiful sign:
# create sign color=C0C0C0 bcolor=black; name time
#
#
#
#
#

[Settings]
Origin=0.000n 0.000w 0.00a 0.0
Run

[Script]




OnWorldReconnectEvent Reconnect

#the avatar to use
var %DefAv, %done
%DefAv = 3
Avatar %DefAv
%done = 0


#declare your variables for querying
var at QueryPos, %IsQuerying, at Seat
at Seat = 1.230s 0.081e 5.85a 0.0

# declare your variables for the search and modify
var $BoardName, ~Board, %Board
var ~Boarda, $BoardDes
WarpLocal at Seat
#say starting program

$BoardName = "name time"
# the bot is not yet querying
%IsQuerying = 0
GetLocation at QueryPos
# install the event handlers for the query
OnQueryCompleteEvent Complete
OnWorldReconnectEvent Reconnect
# start your query
%IsQuerying = 1
QueryAt at QueryPos
# loop until QueryComplete
Label WaitForQuery
IfInt %IsQuerying = 1 Goto WaitForQuery
Label Jump00
Gosub Update
# Change the board sign
Gosub MakeBoard

~Board = ~Boarda

Goto Jump00

Sub Update
wait 5
GetDateTime $a
concat $b "VRT time is " $a
$BoardDes = $b
EndSub




Event Complete
#say completed
%IsQuerying = 0
EndEvent

Event Reconnect
IfInt %IsQuerying = 1 QueryAt at QueryPos
EndEvent

# this Sub finds the first instance of your object
# IfGetResObjectItem ~Board 1

Sub FindBoard
#say finding board
FilterClear
ResClear
FilterAction $BoardName
ResFromSurveyFilter
IfGetResObjectItem ~Board 1 %Board = 1
Else %Board = 0
%done = 1
EndSub

# To modify the description on ~Board and change it to $BoardDes:

Sub MakeBoard
IfInt %done = 0 Gosub FindBoard
IfInt %Board = 0 Goto MakeBoardError
~Boarda = ~Board
GetDescription ~Boarda $BoardDes
ObjectModify ~Board ~Boarda
EndSub
Label MakeBoardError
Say Can't find my VRT Timeboard :(
EndSub




Event Reconnect
# reload and run the script after disconnection
Say Disconnected. System Spiked. Programming Resumed.
Run
EndEvent

--------------3156265F0EDF10B59CF231BC--

xelag

Oct 9, 2000, 6:17am
Nice script :)

XelaG

[View Quote]
----------------------------------------------------------------------------
----


> [Head]
> Type=Script
> Version=2.2
>
> # Update VRT time sign by Prozak
> # from a script by Alex
> #
> # put this in the action field for a beautiful sign:
> # create sign color=C0C0C0 bcolor=black; name time
> #
> #
> #
> #
> #
>
> [Settings]
> Origin=0.000n 0.000w 0.00a 0.0
> Run
>
> [Script]
>
>
>
>
> OnWorldReconnectEvent Reconnect
>
> #the avatar to use
> var %DefAv, %done
> %DefAv = 3
> Avatar %DefAv
> %done = 0
>
>
> #declare your variables for querying
> var at QueryPos, %IsQuerying, at Seat
> at Seat = 1.230s 0.081e 5.85a 0.0
>
> # declare your variables for the search and modify
> var $BoardName, ~Board, %Board
> var ~Boarda, $BoardDes
> WarpLocal at Seat
> #say starting program
>
> $BoardName = "name time"
> # the bot is not yet querying
> %IsQuerying = 0
> GetLocation at QueryPos
> # install the event handlers for the query
> OnQueryCompleteEvent Complete
> OnWorldReconnectEvent Reconnect
> # start your query
> %IsQuerying = 1
> QueryAt at QueryPos
> # loop until QueryComplete
> Label WaitForQuery
> IfInt %IsQuerying = 1 Goto WaitForQuery
> Label Jump00
> Gosub Update
> # Change the board sign
> Gosub MakeBoard
>
> ~Board = ~Boarda
>
> Goto Jump00
>
> Sub Update
> wait 5
> GetDateTime $a
> concat $b "VRT time is " $a
> $BoardDes = $b
> EndSub
>
>
>
>
> Event Complete
> #say completed
> %IsQuerying = 0
> EndEvent
>
> Event Reconnect
> IfInt %IsQuerying = 1 QueryAt at QueryPos
> EndEvent
>
> # this Sub finds the first instance of your object
> # IfGetResObjectItem ~Board 1
>
> Sub FindBoard
> #say finding board
> FilterClear
> ResClear
> FilterAction $BoardName
> ResFromSurveyFilter
> IfGetResObjectItem ~Board 1 %Board = 1
> Else %Board = 0
> %done = 1
> EndSub
>
> # To modify the description on ~Board and change it to $BoardDes:
>
> Sub MakeBoard
> IfInt %done = 0 Gosub FindBoard
> IfInt %Board = 0 Goto MakeBoardError
> ~Boarda = ~Board
> GetDescription ~Boarda $BoardDes
> ObjectModify ~Board ~Boarda
> EndSub
> Label MakeBoardError
> Say Can't find my VRT Timeboard :(
> EndSub
>
>
>
>
> Event Reconnect
> # reload and run the script after disconnection
> Say Disconnected. System Spiked. Programming Resumed.
> Run
> EndEvent
>

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