Reference Guide/Variables
Variables
The following variables can be used in any line of a CommandSign. Just insert the variable into any part of a line, and it will be substituted with the appropriate values when the sign is run.
<x> - Player's x coordinate <y> - Player's y coordinate <z> - Player's z coordinate <blockx> - CommandSign's x coordinate <blocky> - CommandSign's y coordinate <blockz> - CommandSign's z coordinate <world> - Player's current world <name> - Player's user name <randomname> - The name of a random player on the server <near> - Name of the nearest player to CommandSign <display> - Player's display name <money> - Player's current money balance <formatted> - Player's current money balance formatted. (Ex. "10.00 dollars") <ip> - Player's IP address
Want more variables? Please write a ticket saying what you want and what the variable should be called. (I really just need the ideas. Adding them is easy).
Where's the variable <near>? Are there other existing variables not listed here? When can we have them all added here?
Thanks!
A <random> variable would be very nice ;)
Idea for new variable
<random 5-100> will generate random number between 5 and 100
<random abcdklgt> will generate random word (a or b or c etc)
<random name> will generate random online player name
<random abc+5-100> will generate random number or word
A good one could be a variable that could read how much money you have in the bank.
I would love a variable, that would be saved (maybe in a sepperate file) and read/changed using command signs.
Example: You have Worldguard regions named 1, 2, 3, 4, 5, ...
You want to assign users a plot by them clicking the sign. The first user getting plot 1, the second plot 2, ...
It would be grate if I could write a sign something like this:
line1 <variable> +1
line2 /region addowner <variable> <name>
with factions: - <name of faction> - <rank in the faction> - <title in the faction> - <enemy> - <ally> etc...
permissions (as to the conditions, but by posting): - <name rank>
<group> show player primary group.
maybe can determine the number of items?
Idea: <timestamp> ;)
Idea: <randomname:groupname>
idea: date
idea: <item-id-on-hand> id of the item the player is currently holding. <item-quantity> the number of item(s) the player is currently holding
idea: We can make custom variables.
idea : player level
== Idea:::: ==
== Group name linked into all the popular perm systems! ==
Idea: The player's rank! I want to be able to change player's ranks with signs.
Idea: User input variable.
Useful for some commands, e.g. to challenge a specific player to a minigame /commandsigns line1 /battlesheep request <userprompt> The player would then type in the other player's name, and the command would run
<randomint:min:max> • Returns a random integrer between min and max.
Add functional math in the conditions
Example: ?<money>>500 • Is money more than 500?
Complex Example: ?cuberoot[(<x>-<blockx>)^2+(<y>-<blocky>)^2+(<z>-<blockz>)^2]<10
• Is distance to cmdsign less than 10 meters?
<Item> - conditional response depending on item in hand when sign clicked.
can be used to enchant items using /enchant command, with the correct enchant or only allow access once you have retrieved a certain item.