Special KeyWords to your Statements

@npc (<x> <y> | /regexp/i | "<name>")
Return NPC's ID which location is <x> <y> or NPC's name match regexp or NPC's name is equal to <name> . Returns -1 if no NPC was found.
@inventory (<item>)
Returns Inventory Item ID of <item>. If <item> doesn't exist, it returns -1.
@Inventory (<item>)
Same as @inventory but returns all matching IDs as a comma-separated list or -1 if the item was not found.
@invamount (<item>)
Returns the amount of the given <item> in inventory.
@cart (<item>)
Returns cart item ID of <item>. If <item> doesn't exist, it returns -1.
@Cart (<item>)
Same as @cart but returns all matching IDs as a comma-separated list or -1 if the item was not found.
@cartamount (<item>)
Returns the amount of the given <item> in cart.
@storage (<item>)
Returns storage item ID of <item>. If <item> doesn't exist, it returns -1.
@Storage (<item>)
Same as @storage but returns all matching IDs as a comma-separated list or -1 if the item was not found.
@storamount (<item>)
Returns the amount of the given <item> in storage.
@player (<name>)
Returns player ID of player <name>. If player <name> is not found, it returns -1.
@vender (<name>)
Returns vender ID of vender <name>. If vender <name> is not found, it returns -1.
@store (<name>)
Looks for an item in a store and returns ID or -1 if the item was not found.
@shopamount (<item>)
Returns the amount of the given <item> in shop.
@random ("<argument1>", "<argument2>", ...)
Returns randomly one of the given arguments .
@rand (<n>, <m>)
Returns a random number between (and including) <n> and <m>.
@eval (<argument>)
Evaluates the given <argument>. Contents of @eval is Perl and does NOT have macro plugin syntax, except for variables and @() substitution.
@arg ("<argument>", <n>)
Returns the <n>th word of <argument> or an empty string if the word index is out of range.
Note: <n> could also be a variable that contains a round number/s greater than zero.
@config (<variable>)
Returns the value of <variable> specified in config.txt.
@venderitem (<name>)
Looks for an item in a player's shop and returns ID or -1 if the item was not found.
@venderprice (<indexID>)
Looks for an item in a player's shop and returns its price.
@nick (<word>)
Escapes all the regexp metacharacters and some of the perl special characters with \ (a backslash). Especially for player's name.

0 comments:

Post a Comment