Notes on various bits of random script functionality
Posted: Sat Sep 29, 2007 2:58 am
Heres a collection of various recent CVS notes regarding EventScripts on the server since v0.51.0.. (These will be collected and documented further in the world owners manual soon, along with bongz nice lil startup guide)..
-
returns the amount of the item the player has in their inventory
returns the level to which the player has learnt the particular skill
- parsing of has beed added
- command to put delays in an event script. ( <TIME> is the delay in 1/10ths of a second )
%BUILDINGOWNER% to get the name of the building owner during the events script (when applicable)
added array syntax to playervar etc - i.e. you can use $GlobalVar1 or $GlobalVar[1]
(or.. more interestingly... $GlobalVar[$PlayerVar1 + 1] = 0 , for instance)
added called when the player types text beginning with &.. i.e. if the player types &help the event
would be triggered if present
added function - e.g. Rand(5) would return a random value between 1 and 5
function for event scripts (specifically, atm, for the UseItem event). Including this call means the use 'transaction' is not called (i.e items are not removed from the inventory or have their normal (non-script) effects applied)
- Added various new commands (that can be accessed by script) to the servers. Including..
' to return the number of players currently online and on the specified team number
- added various global variables for retrieving info about the player, specifically..
-
Code: Select all
PlayerInventory( "ItemName" )
returns the amount of the item the player has in their inventory
Code: Select all
'PlayerSkillLevel( "SkillName" )
returns the level to which the player has learnt the particular skill
- parsing of
Code: Select all
else if ( CONDITION ) { ...
-
Code: Select all
Sleep( <TIME> )
Code: Select all
Event( "PlayerLogin", 0 )
added array syntax to playervar etc - i.e. you can use $GlobalVar1 or $GlobalVar[1]
(or.. more interestingly... $GlobalVar[$PlayerVar1 + 1] = 0 , for instance)
added
Code: Select all
Event ( "&command", "<COMMAND>" )
Code: Select all
Event( "&command", "help" )
added
Code: Select all
Rand( NUM )
Code: Select all
CancelTransaction()
- Added various new commands (that can be accessed by script) to the servers. Including..
Code: Select all
*resetallglobalvars
*resetallplayervars
*resetplayervars [NAME]
*setplayervar [NAME] [VARIABLE_NUM] [VALUE]
*setglobalvar [VARIABLE_NUM] [VALUE]
Code: Select all
NumPlayersOnTeam( TeamNum )
- added various global variables for retrieving info about the player, specifically..
Code: Select all
$gPlayerKills
$gPlayerDeaths
$gPlayerTeam
$gPlayerLevel
$gPlayerKudos
$gPlayerFamily
$gPlayerCash
$gPlayerHealth