etc
set [x] 1/0
eg
set [30] 1
this will set the variable number with either a 1 or a 0
check [x] 1/0
eg
#IF
check [30] 1
#ACT
goto @talk
this will check the character variable number 30, if it is 1, then it will goto the sub named @talk
goto <sub procedure>
eg
goto @nextone
this will move the script on to the specified sub procedure
checkjob warrior/taoist/wizard
eg
#IF
checkjob warrior
#ACT
goto @hesawarrior
this checks the current characters job
checklevel x
eg
#IF
checklevel 30
#ACT
goto @heslevel30
this checks the current characters level
checkitem <item> <ammount>
eg
#IF
checkitem GoldBar 1
#ACT
goto @gotgoldbar
this will check if the user has got the specified ammount of the speicifed item
checkgold <ammount>
eg
#IF
checkgold 1000
#ACT
goto @gotthegold
this will check if the user has got the specified ammount of gold or not
give <item> <ammount>
eg
give GoldBar 3
this will give the user the specified ammount of the specified item
take <item> <ammount>
eg
take GoldBar 3
this will take away from the user the specified ammount of the specified item
map <map id>
eg
map B101
this will move the user to the specified map at a random coord
mapmove <map id> <x coord> <y coord>
eg
map 0 300 300
this will move the user to the speicifed map and coords
Param1 <map name>
Param2 <target x loc>
Param3 <target y loc>
MonGen <mob name> <ammount> <?>
eg
Param1 0102
Param2 7
Param3 7
MonGen Woomataurus 1 1
this will spawn the specified number of the specified mob on the specified map, at the specified loc(random?)
monclear <map name>
eg
monclear 0102
this will clear all the MOBS from the specified map, all NPCs will remain
daytime <time of day>
eg
#IF
daytime day
#SAY
Its daytime!
this will check what time it is, choices are day/night/sunraise/sunset
random <number>
eg
#IF
random 10
#SAY
A one out of ten chance, and you got it!
#ELSESAY
Rofl, joo sook
this will give the user a 1/x chance for the script to move on to the next command, x being the number entered
timerecall <time in minutes>
eg
#IF
checklevel 30
#SAY
In you go, ill fetch you out after five minutes!
#ACT
map g004 5 5
timerecall 5
this will recall the user from the map he was sent from in the specified number of minutes
breaktimerecall
eg
breaktimerecall
this will stop all timerecall timers for this character
checkbaggage
eg
#IF
checkbaggage
#SAY
you have room, here you go!
#ACT
give Woomahorn
#ELSESAY
you have no room! heres some gold instead.
#ELSEACT
give gold 1000000
this will check to see if you have room in your bag or not for an item
movr <variable name> <number>
eg
#ACT
movr d0 6
inc d0 1
#SAY
you have rolled the number <$STR(D0)>!
this will roll a number between 0 and the specified number, and store it in the specified variable
to access the stored number, look up <$STR(x)> below
inc <variable> <number>
eg
#ACT
movr d0 6
inc d0 1
this will increase the specified variable by the specified ammount
equal <variable> <number>
eg
#ACT
movr d0 6
inc d0 1
#IF
equal d0 1
#SAY
you rolled a one!
this will check to see if the variable specified is the number specified or not
playdice <number of dice> <target sub>
eg
[@main]
<Roll the dice!/@roll>
[@roll]
#ACT
movr d0 6
inc d0 1
playdice 1 @cube
[@cube]
#SAY
You rolled a <$STR(D0)>!
this will show the specified number of dice rolling(values stored in d0-9), after they have stopped rolling
they will move onto the specified sub-procedure
batchDelay <time in seconds>
addbatch <map name>
batchmove
eg
batchDelay 1
addbatch 0101
addbatch 0102
addbatch 0103
addbatch 0104
batchmove
this will move the player through each of the specified maps, at an interval of the specified seconds.
checkhum <map> <number>
eg
#IF
checkhum 0101 5
#SAY
Im afraid there are already two people in the room, come back later!
#ELSESAY
In you go!
#ELSEACT
map 0101
close
eg
close
this will close the current dialog box that is open
break
eg
break
this will stop the script. ie, it will not continue with the next #IF #ACT functions.
Example scripts using #SAY
[@main]
#IF
checkgold 3000
#SAY
You have 3000 gold, do you want to buy my uberthing?
<Yes/@buyit>
<No/@nothanks>
[@buyit]
#IF
checkgold 3000
#ACT
take gl 3000
give uberthing 1
#SAY
Heres your uberthing!
<Close/@exit>
[@nothanks]
#ACT
give notsouberthing 1
#SAY
Fine
heres a notsouberthing, on the house
Enjoy!
gender <gender>
Check if the character is male or female
For use with gender specific items (armour)
#IF
gender man
#SAY
You are male
#ELSESAY
You are female
(There is no Gender woman, for woman use #elseact )
DAYOFWEEK <3 letter day> ( MON TUE WED THU FRI SAT SUN )
eg
#if
DAYOFWEEK MON
#say
it is monday
#elsesay
It is not monday
Script Identifiers:
<$USERNAME> = current character name
<$USERWEAPON> = current characters weapon
<$STR(x)> = returns the value of the variable x
<$CASTLEWARDATE> = returns the date of the next sabuk war
<$LISTOFWAR> = lists all the upcomming subak wars
checkitemw <item>
Check's that the item is being worn by player.
takew <item>
Takes item being worn
in better detail