Listing of New Script Stuff
Posted: Wed Jun 13, 2012 12:57 am
This list is a compilation of the stuff mit has posted in the numerous update topics in the general forum.
If there is a (?) before the description it is because I am taking a guess as to what it means. Mit would have to confirm
================================
- Events
"BuildingDemolished" - (?) Runs when the specified building is demolished
"UseSkill" - (?) Runs when the player uses the specified skill
"PlayerRespawn" - (?) Runs when the player respawns
"BattleSurrender" - (?) Runs when the player surrenders during battle
"BattleLeave" - (?) Runs when the player leavs a battle (log off maybe?)
"ItemAdded" - (?) Runs when the specified item is added to inventory
"ItemRemoved" - (?) Runs when the specified item is removed from inventory
"BuildingProductionRun" - (?) Runs when the building goes thre a production cycle
"TaskStart" - (?) Start of a task
"TaskComplete" - (?) Runs when a task is finished
"RobocrowKilled" - (?) Runs when somebody kills you in a crow
"RobocrowKill" - (?) Runs when you kill somebody in a crow
"PlayerBirthday" - (?) Runs on the anniversary days of the players joining or respawning after death
"PlayerDeath" - USed to run when your killed by another player, now means when you die naturally
"PlayerKilled" - Runs when your killed by another player
"AccessBuilding" - (?) Runs when a player hits Control at a building to access it
"NewPlayer" - Runs before PlayerLogin when a new user record is created
- Variables
$gBuildingNum - alternative to $gBuildingAccessNum
$gBuildingX, $gBuildingY - gets the current buildings map position
$gBuildingCode - Gets the current buildings type
$gNearestBuildingCode - Gets the nearest buildings type
$gBuildingOwnerID - gets the ID of the owner for the current building
$gPlayerNumSkills - (?) The number of skilsl the player has
$gPlayerUsage - (?) The players usage
$gPlayerVar and $gPlayerTimeVar for consistency. ($PlayerVar etc will be deprecated)
$gPlayerAuth - (?) Auth level of the player
$gPlayerIsMember - (?) equals 1 if the player is a paying member
$gPlayerNumDeaths - (?) number of deaths the player has had
$gBuildingVar[1-16] - 16 vars that are per building instance, are associated with the building that activates the script
$gBuildingTimeVar[1-16] - 16 vars that are per building instance, are associated with the building that activates the script
$gPlayerFollowing - (?) ID of the person who the player is following (ie, the tribe leader)
$gPlayerNumFollowing - (?) Number of people following the player (ie, they are a tribe leader)
$gBuildingAccessNum - (?) The map id of the building accessed
$gPlayerID - Gets the billing ID of the player
$gPlayerHunger - (?) Players hunger
$gPlayerThirst - (?) Players Thirst
$gPlayerMaxHealth - (?) Maximum health value for the player
$gPlayerAge - (?) Age of the player
$gTaskItem1 - (?) Item needed for a task
$gTaskItem2 - (?) Item needed for a task
$gTaskItem3 - (?) Item needed for a task
$gBuildingScriptParam - Returns the value set by *buildingparam [BuildingRecordNum] [Param (0-255)]
$gPlayerRobocrowKills - (?) Number of times the player has killed somebody else in a robocrow
$gPlayerRobocrowDeaths - (?) Number of times the player has been killed in a robocrow
$gParams[1-16]
$gPlayerX - Gets the players map coordinates (0-255)
$gPlayerY - Gets the players map coordinates (0-255)
$gPlayerWorldX - Gets the players world coordinates (1-1048k, 4096 per tile)
$gPlayerWorldY - Gets the players world coordinates (1-1048k, 4096 per tile)
- Variable Functions ( $variable = function )
sysIsInTown - (?) Town the player is in (name I assume)
sysRealTime - (?) Real time of the player
Rand renamed to sysRand - Sets a variable to a specified randum number and can now take variables as parameters
sysGetBuyPrice(item) - (?) Tells the buy price of the specified item in the building that activates the script
sysGetSellPrice(item) - (?) Tells the sell price of the specified item in the building that activates the script
sysAmountInStocks("ItemName") - (?) Tells the quantity of the specified item in the building that activates the script
sysIsBuildingPositionValid - Equals 1 if its possible to build in this position, 0 if not
sysGetTextEntry - returns the text entered into a OSDTEXTENTRY dialog
AddToInventory("ITEM_NAME") - Equals 0 if the item couldn't be added
- Names
%TARGET% - Name the player has highlighted in the player menu
If there is a (?) before the description it is because I am taking a guess as to what it means. Mit would have to confirm
================================
- Events
"BuildingDemolished" - (?) Runs when the specified building is demolished
"UseSkill" - (?) Runs when the player uses the specified skill
"PlayerRespawn" - (?) Runs when the player respawns
"BattleSurrender" - (?) Runs when the player surrenders during battle
"BattleLeave" - (?) Runs when the player leavs a battle (log off maybe?)
"ItemAdded" - (?) Runs when the specified item is added to inventory
"ItemRemoved" - (?) Runs when the specified item is removed from inventory
"BuildingProductionRun" - (?) Runs when the building goes thre a production cycle
"TaskStart" - (?) Start of a task
"TaskComplete" - (?) Runs when a task is finished
"RobocrowKilled" - (?) Runs when somebody kills you in a crow
"RobocrowKill" - (?) Runs when you kill somebody in a crow
"PlayerBirthday" - (?) Runs on the anniversary days of the players joining or respawning after death
"PlayerDeath" - USed to run when your killed by another player, now means when you die naturally
"PlayerKilled" - Runs when your killed by another player
"AccessBuilding" - (?) Runs when a player hits Control at a building to access it
"NewPlayer" - Runs before PlayerLogin when a new user record is created
- Variables
$gBuildingNum - alternative to $gBuildingAccessNum
$gBuildingX, $gBuildingY - gets the current buildings map position
$gBuildingCode - Gets the current buildings type
$gNearestBuildingCode - Gets the nearest buildings type
$gBuildingOwnerID - gets the ID of the owner for the current building
$gPlayerNumSkills - (?) The number of skilsl the player has
$gPlayerUsage - (?) The players usage
$gPlayerVar and $gPlayerTimeVar for consistency. ($PlayerVar etc will be deprecated)
$gPlayerAuth - (?) Auth level of the player
$gPlayerIsMember - (?) equals 1 if the player is a paying member
$gPlayerNumDeaths - (?) number of deaths the player has had
$gBuildingVar[1-16] - 16 vars that are per building instance, are associated with the building that activates the script
$gBuildingTimeVar[1-16] - 16 vars that are per building instance, are associated with the building that activates the script
$gPlayerFollowing - (?) ID of the person who the player is following (ie, the tribe leader)
$gPlayerNumFollowing - (?) Number of people following the player (ie, they are a tribe leader)
$gBuildingAccessNum - (?) The map id of the building accessed
$gPlayerID - Gets the billing ID of the player
$gPlayerHunger - (?) Players hunger
$gPlayerThirst - (?) Players Thirst
$gPlayerMaxHealth - (?) Maximum health value for the player
$gPlayerAge - (?) Age of the player
$gTaskItem1 - (?) Item needed for a task
$gTaskItem2 - (?) Item needed for a task
$gTaskItem3 - (?) Item needed for a task
$gBuildingScriptParam - Returns the value set by *buildingparam [BuildingRecordNum] [Param (0-255)]
$gPlayerRobocrowKills - (?) Number of times the player has killed somebody else in a robocrow
$gPlayerRobocrowDeaths - (?) Number of times the player has been killed in a robocrow
$gParams[1-16]
$gPlayerX - Gets the players map coordinates (0-255)
$gPlayerY - Gets the players map coordinates (0-255)
$gPlayerWorldX - Gets the players world coordinates (1-1048k, 4096 per tile)
$gPlayerWorldY - Gets the players world coordinates (1-1048k, 4096 per tile)
- Variable Functions ( $variable = function )
sysIsInTown - (?) Town the player is in (name I assume)
sysRealTime - (?) Real time of the player
Rand renamed to sysRand - Sets a variable to a specified randum number and can now take variables as parameters
sysGetBuyPrice(item) - (?) Tells the buy price of the specified item in the building that activates the script
sysGetSellPrice(item) - (?) Tells the sell price of the specified item in the building that activates the script
sysAmountInStocks("ItemName") - (?) Tells the quantity of the specified item in the building that activates the script
sysIsBuildingPositionValid - Equals 1 if its possible to build in this position, 0 if not
sysGetTextEntry - returns the text entered into a OSDTEXTENTRY dialog
AddToInventory("ITEM_NAME") - Equals 0 if the item couldn't be added
- Names
%TARGET% - Name the player has highlighted in the player menu