SCRIPTING FUNCTIONS

Sort alphabetically | Sort by category

All | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | R | S | T | U | V | Z


RandomNumber

Returns a random value from the designated range.

math number = Rnd 0 100 ;


RandomNumberPrefix

Returns the same number with a random prefix (+/-).
Works with integers and floats.

int number = 2 ;
math number = RndSign ;


RegionId

Get Id of current region (Region.wdt).

int regionId ;
region GetId regionId ;


RemoveContraband

Remove a commodity from the illegal commodities list of a region.

int regionId = 1 ; [->regions.wdt]
int commodityId = 2 ; [->commodities.wdt]
game RemoveContraband regionId commodityId ;


ResetShipEnemyList

Resets (or recalculates) enemy list for every active ship. Use this function (in the same script) after using SetAIQuestStatus or SetFriendFoe functions!

game ResetShipEnemyList 1 ; The [ 1 ] is a standardized parameter and must NEVER change