PSUnreal Guildhouses: Difference between revisions

From PSwiki
Jump to navigation Jump to search
Created page with " 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>..."
 
No edit summary
Line 1: Line 1:




=== Entrance ===
To define a guild house entrance. We use [[Action locationsTable|actionlocations]].triggertype  == SELECT and [[Action locationsTable|actionlocations]].responsetype == EXAMINE, then in the [[Action locationsTable|actionlocations]].response we specify the entrance, example:
To define a guild house entrance. We use [[Action locationsTable|actionlocations]].triggertype  == SELECT and [[Action locationsTable|actionlocations]].responsetype == EXAMINE, then in the [[Action locationsTable|actionlocations]].response we specify the entrance, example:
<br />
<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>




<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 instancesTable|item_instances.]]<nowiki/>id == LockID specified in the XML.


We check if there is a guildhouse with [[GuildsTable|guilds.]]<nowiki/>houselockid == LockID specified above. If found then we use the  [[GuildsTable|guilds.]]<nowiki/>houseid to teleport the player to the right guildhouse instance.


We check if the action location has a real item associated, which is the lock. This is done by finding an [[Item instancesTable|item_instances.]]<nowiki/>id == LockID specified in the XML.
=== '''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.


We check if there is a guildhouse with [[GuildsTable|guilds.]]<nowiki/>houselockid == LockID specified above. If found then we use the [[GuildsTable|guilds.]]<nowiki/>houseid to teleport the player to the right guildhouse instance.
In the Entrance AL, there are the <Return> coordinates.

Revision as of 17:21, 30 October 2022


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.