PSUnreal Guildhouses
Entrance
To define a guild house entrance. We use actionlocations.triggertype == SELECT and actionlocations.responsetype == EXAMINE, then in the actionlocations.response we specify the entrance, example:
<Examine><Entrance Type="ActionID" LockID="95" X="197765" Y="-314194" Z="10738.65" Rot="280" Sector="NPCroom" /><Return X="198233" Y="-314282" Z="10599.1" Rot="130" Sector="NPCroom" /><Description>A lovely residence</Description></Examine>
We check if the action location has a real item associated, which is the lock. This is done by finding an item_instances.id == LockID specified in the XML.
We check if there is a guildhouse with guilds.houselockid == LockID specified above. If found then we use the guilds.houseid to teleport the player to the right guildhouse instance.
Exit
To exit a guildhouse, you need a action location defined as this:
<Examine><Entrance Type='ExitActionID' /><Description>Way back home</Description></Examine>
The code will look at the current instance the player is in, and find the corresponding guildhouse, then from the lock ID is finding the original Action Location that was used as Entrance.
In the Entrance AL, there are the <Return> coordinates.
How to add a guildhouse
1) Spawn a simple lock (under quest items category) with:
- Pickupable false
- Collision Detection false
- Locked true
- Lockable true
If the house is not owned by players and we need the house to be always open, the use:
- Locked false
- Securitylockable true (to set this one you need to use /key securitylockable)