Scripting Guide - Tile of Truth Script


This script will broadcast to all players, what level the player that steps on the tile currently is




First, you will have to lay a script attribute tile (the orange box with a S) where you want the tile to be.

Then, you will need to enter the coding for the script you want to load when a player touches that location

ex - "/god editscript map1_5_5"....that will open the event that runs when you step on Map #1, X-5, Y-5 (assuming that is where you placed your attribute tile)

Once you get the trigger event opened, enter this code:

Sub Main(Player as Long)
'Tile of Truth

If GetPlayerFlag(Player, 0) = 0 Then
     SetPlayerFlag(Player, 0, 1)
     GlobalMessage(GetPlayerName(Player) + " has stepped on the Tile of Truth and is Level " + str(GetPlayerLevel(Player)), BrightGreen)
     Timer(Player, 5, "COOLDOWN")
Else
     PlayerMessage(Player, "Tile of Truth is cooling down.", DarkGrey)
End If

End Sub