Scripting Guide - Guild Vault for Founders and Lords Script


This script will allow you to create guild vaults that only Lords and Founders of the Guild can enter




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)

If GetPlayerGuild(Player) > 0 Then
     If GetGuildHall(GetPlayerGuild(Player)) = 35 Then
         If GetPlayerGuildRank(Player) = 2 | GetPlayerGuildRank(Player) = 3 Then
             OpenDoor(1034, 9, 4)
         Else
             PlayerMessage(Player, "Only leaders may open this vault.", White)
         End If
     End If
End If

End Sub


If the players guild hall is Hall #35, and player is a Lord/Founder, then door at location Map #1034, X-9, Y-4 will open...If not, then player will get a message in color "White"