VTV2 Documentation/All Placeholders

Work In Progress

-

-

-

-

Place Holders

To Getting Started

Place Holders are representative of certain in game data. If you place one of these in your script, it will be replaced by the actual in game data that the place holder represents. Place Holders are lowercase and enclosed inside less than (<) greater than (>) symbols. The available place holders are as follows. Keep in mind that place holders are replaced with the value of what the data was at the moment the trigger was activated(walked on or clicked by a player or an Event ) and not what it may be at any moment in the script.

General Place Holders

<this>The trigger object itself converted to a name. Can be used as an object or variable name.

Potion Splash Related Place Holders

<thrower>Returns the type of entity that threw the potion.
player, witch, etc.
<throwername>Returns the name of the entity that threw the potion.
<potion:name>Returns the name of the potion that was thrown.
<potion:displayname>Returns the display name of the potion that was thrown.
<potion:lore:index>Returns the lore of the potion that splashed.
Replace index> with the lore line number you want the placeholder to return. Index starts at zero.
<potion:lore:amount>Returns the number of lines of lore the thrown potion had.
<potion:enchant:index>Returns the enchatment of the potion that splashed, in the format "name_level"
Replace index> with the enchant line number you want the placeholder to return. Index starts at zero.
<potion:enchant:amount>Returns the number of enchantments the thrown potion had.
<potion:effect:index:type>Returns the type of the effect of the potion that splashed. Strength, etc
Replace index> with the effect line number you want the placeholder to return. Index starts at zero.
<potion:effect:index:amplifier>Returns the level of the effect of the potion that splashed.
Replace index> with the effect line number you want the placeholder to return. Index starts at zero.
<potion:effect:index:duration>Returns theduration of the effect of the potion that splashed.
Replace index> with the effect line number you want the placeholder to return. Index starts at zero.
<potion:effect:amount>Returns the number of effects the potion that splashed had.
<affectedentity:index:location>Returns the location of the entity that was splashed.
Replace index> with the entity number you want the placeholder to return. Index starts at zero.
<affectedentity:index:name>Returns the name of the entity that was splashed.
Replace index> with the entity number you want the placeholder to return. Index starts at zero.
<affectedentity:index:type>Returns the type of the entity that was splashed.
Replace index> with the entity number you want the placeholder to return. Index starts at zero.
<affectedentity:amount>Returns the number of entities that were effected by the splash.

Block Related Place Holders

<blockid>Will be replaced with the block ID. As in Wool 35
<blockmaterial>Will be replaced with the block material name. As in Wool wool
<blockdata>Will be replaced with the block data. As in Blue Wool 35:11
<blocktype>Will be replaced with the block type. As in Blue Wool 35:11
<blocklocation>Will be replaced with the location of the block broken or placed.
<blockxp>Will be replaced with the amount of xp the broken block drops
<isblocktype:arg1:arg2:arg3>Replace arg1 with location to check and arg2 with the block id and arg3 with the data byte. Replaced with true | false - depending on if the block at location matches.
Examples: <isblocktype:33,65,122:2:0> or <isblocktype:$Obj.Var:<blocktype>> as long as $Obj.Var is a location or <isblocktype:<triggerloc>:$Obj.Var> as long as the $Obj.Var is of type str in the format of 76:5

Server Related Place Holders

<motd>Will be replaced with the server's MOTD.
<hostaddress>Will be replaced with the IP Address of the server.
<onlineplayers>Will be replaced with the number of players on the server.
<maxplayers>Will be replaced with the max number of players the server will allow.
<weather>Boolean - true for stormy, false for sunny. WeatherChange Event.
<hour:>Returns the hour. this is game time not real time and it is 0 to 23 no am or pm. 15 would be 3pm
<min:>Returns the minute. this is game time not real time and it is 00 to 59
<systemtime:default>Displays the date and time. You can change default to your preferred format.
See this page for help on formatting.
http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
The default is set at EEEEE, MMMMM dd, H:mm

Player Related Place Holders

<playername>The triggering players name. Can be used as an object or variable name.
<playerdisplayname>The triggering players display name.
<playerlistname>The triggering players tab list name.
<playeruuid>Returns the unique identifier of the triggering player.
<uuid:PLAYER>Obtain an offline player UUID
Example: <uuid:WinneonSword>
<playerprefix>The triggering players prefix.
<playersuffix>The triggering players suffix.
<playerloc>The triggering players location at the time they set off the trigger.
<playerloc:x>Returns the X coord of the triggering player.
<playerloc:y>Returns the Y coord of the triggering player.
<playerloc:z>Returns the Z coord of the triggering player.
<playerloc:world>Returns the world of the triggering player.
<currentloc:PLAYER>This place holder now takes an optional argument of playername
If no argument is provided it will return the triggering players current location x,y,z. If a player name is provided it will return the current location of the player provided if player is found online. If player is not online will return null
<direction:returntype>returns the current direction of the triggering player.
ReturnType is the type you want returned. Replace with INT or TEXT
INT will return direction as an integer 0-15. 0 = NORTH, 1 = NORTH_NORTH_EAST, 2 = NORTH_EAST and so on...
TEXT will return a string NORTH, NORTH_NORTH_EAST and so on...
<getblocklos:proc:range>This is a Line Of Sight function It usses the line of sight of the triggering player. proc can be LOC, NAME, TYPE, ID, DATA and range is the max range in blocks to test and returns the first block found. Not only is this useful for dealing with blocks but it is a great way to get the location the player is looking at.
This returns different values depending on the :proc argument
LOC - returns the location as x,y,z
NAME - returns the Name of the block
TYPE - returns id:data as in 36:1
ID - returns the block id
DATA - returns the data byte of the block
Returns null text if no block is reached within the range so besure you test for null before using the return.
<health>Will replace with an integer of the triggering players health at the time they set off the trigger.
<health:PLAYER>Obtain a player's current health
<maxhealth:PLAYER>Obtain a player's max health
<food:PLAYER>Obtain a player's food level
<saturation:PLAYER>Obtain a player's saturation level
<isop:player>Returns true or false based on player's OP status.
<haspermission:PLAYER>Replace argument with a permission node as in some.node
Will replace with a boolean true or false depending on if the triggering player has the supplied permission.
<gamemode>Is replaced with the gamemode of the triggering player at the time the trigger was activated.
<haspotioneffect:PLAYER>Replace argument with the name of a Potion Effect
Will replace with a boolean true or false depending on if the triggering player has the supplied Potion Effect.
<issneaking>Will replace with boolean true or false depending on if the player is sneaking at the time they set off the trigger.
<issneaking:>No argument
Will replace with a boolean true or false depending on if the player is currently sneaking at this moment in the script.
<issprinting>Will replace with boolean true or false depending on if the triggering player is sprinting at the time they set off the trigger.
<issprinting:>No argument
Will replace with a boolean true or false depending on if the player is currently sprinting at this moment in the script.
<isflying>Will replace with boolean true or false depending on if the triggering player is flying at the time they set off the trigger.
<worldto>World the player is going to. WorldChange Event.
<worldfrom>World the player is comming from. WorldChange Event.
<totalexp:optionalarg>Gets a players Total Experience earned so far. Replace optionalarg with the name of a player. If player is not found a 'null' text is returned. If playername is not provided then the triggering players total exp is returned.
<hasmoney:arg1:arg2>Replace arg1 with the name of the player and arg2 with a the amount of money you want to see if player has. Replaces with true | false - depending on success
Requires Vault with Economy support
<givemoney:arg1:arg2>Replace arg1 with name of player and arg2 with a the amount of money you want to give player. Replaced with true | false - depending on success
Requires Vault with Economy support
<takemoney:arg1:arg2>Replace arg1 with name of player and arg2 with a the amount of money you want to take from player. Replaced with true | false - depending on success. If player does not have enough money this returns false and does not take any.
Requires Vault with Economy support
<hasitem:PLAYER:ITEMID>This will search the PLAYER's Inventory for ITEMID and return the total quantity found. If item is not found will return 0
<giveitem:PLAYER:ITEMID:QUANTITY>This will give PLAYER QUANTITY of ITEMID's. This returns the amount accually given. Player nay not have enough room in inventory for full quntity.
If you need to specify an ID such as Blue Wool 35:3 then you will need to do it with a variable like @SETSTR $obj.var 35:3 and then <hasitem:<playername>:$obj.var> or <takeitem:<playername>:$obj.var:20>
<takeitem:PLAYER:ITEMID:QUANTITY>This will search the PLAYER's Inventory for QUANTITY of ITEMIDs and take them if QUANTITY is avalible, If PLAYER does not have enough, ITEMID's are not removed and false is returnd.
<holdingitem:[player]:[material]>Returns true or false if [player] is holding [material]
Example: @IF b <holdingitem:<playername>:cobblestone> = true
<helditemname>The triggering players held item material name.
<helditemdisplayname>The triggering players held item display name, if it has one.
<itemid>ID of the item in the triggering players hand at the time they set off the trigger.

Place Holders Specific to PlaterDeath & EntityDeath Events

<whodied>Will be replaced with a the name of the player that died or the type of entity if not a player, such as Zombie, Spider, Pig...
<killedbyplayer>Will be replaced with a boolean true | false. Use this before using <killername>.
<killername>Will be replaced with a the name of the player that did the killing or blank if not killed by a player.
<drops:index>Will be replaced with the name of the drop. Index selects which drop.
Replace index> with the drop number you want the placeholder to return. Index starts at zero.
<droppedexp>Will be replaced with the amount of XP dropped by the killed entity.
<isprojectile>Boolean. Returns true/false based on if the killing blow was delivered by a projectile.
<killerentitytype>Will be replaced by the type of entity that killed the entity.
<deathcause>Will be replaced with the cause of the player's death.

Place Holders Specific to Interact & EntitySpawn Events

<entitytype>Will be replaced with a the type of entity, such as PLAYER, ZOMBIE, VILLAGER... To be used with Interact & EntitySpawn Events
<entityname>Will be replaced with a the name of the entity, if type is PLAYER then the Players name. For Interact, if type is VILLAGER then name will be their profession (FARMER, BUTCHER...), otherwise name will be the same as type. To be used with Interact & EntitySpawn Events
<damagedbyplayer>Boolean. Returns true/false based on if the damage done to the entity was done by a player.
<damageamount>Will be replaced by the amount of damage done to the entity.
<damagecause>Will return with how the damage was done to the player.

Item Spawn & Despawn

<spawneditem:name>Will be replaced with a the name of the spawned item.
<spawneditem:displayname>Will be replaced with a the display name of the spawned item.
<spawneditem:amount>Will be replaced with the amount items spawned.
<spawneditem:lore:index>Will be replaced with the lore of the spawned item. Index selects which line of lore.
Replace index> with the drop number you want the placeholder to return. Index starts at zero.
<spawneditem:lore:amount>Will be replaced with the number of lines of lore the spawned item has.
<spawneditem:enchant:index>Will be replaced with the enchantment of the spawned item. Index selects which enchantment.
Replace index> with the drop number you want the placeholder to return. Index starts at zero.
<spawneditem:enchant:amount>Will be replaced with the number of enchantments the spawned item has.
<despawneditem:name>Will be replaced with a the name of the despawned item.
<despawneditem:displayname>Will be replaced with a the display name of the despawned item.
<despawneditem:amount>Will be replaced with the amount items despawned.
<despawneditem:lore:index>Will be replaced with the lore of the despawned item. Index selects which line of lore.
Replace index> with the drop number you want the placeholder to return. Index starts at zero.
<despawneditem:lore:amount>Will be replaced with the number of lines of lore the despawned item has.
<despawneditem:enchant:index>Will be replaced with the enchantment of the despawned item. Index selects which enchantment.
Replace index> with the drop number you want the placeholder to return. Index starts at zero.
<despawneditem:enchant:amount>Will be replaced with the number of enchantments the despawned item has.

Player Enchanting

<enchanteditem:name>Will be replaced with a the name of the despawned item.
<enchanteditem:displayname>Will be replaced with the display name of the enchanted item.
<enchanteditem:amount>Will be replaced with the number of enchanted items.
<enchanteditem:lore:index>Will be replaced with a the display name of the despawned item.
Replace index> with the drop number you want the placeholder to return. Index starts at zero.
<enchanteditem:lore:amount>Will be replaced with the number of lines of lore on the enchanted item.
<enchanteditem:enchant:index>Will be replaced with the enchantment of the enchanted item Index selects which line of lore.
Replace index> with the drop number you want the placeholder to return. Index starts at zero.