Recall portal and or the stone of recall

Recall Portal and / or the Stone of Recall

 * First I must say that neither one of these were designed to just be dropped in any mod and work. They were built for the OC and left in the toolset for example. However, that don't mean they can't be use with a bit of altering.

First the Stone of Recall
.
 * Locate the Stone of Recall in the standard Item palett under Plot Items, select "Edit Copy".
 * Change the TAG of the item to something else, like "Recall_Stone".
 * Now, the standard script is longer than needed because of all the OC stuff, so here is a modified one. Incorperate it into your own OnActivateItem script or use the following methode.
 * Copy the script and save it with the name that matches your Item TAG. i.e., above I changed the Stones TAG to "Recall_Stone", so I would copy this script and name it "recall_stone" (don't worry about the case). This script must be in your mod, but not attached to any script node.

void main {   object oPortal = GetObjectByTag("NW_RECALL_PORTAL"); if(GetIsObjectValid(oPortal) == TRUE) {       SetLocalInt(GetItemActivator, "NW_L_USED_RECALL", 1); SetLocalLocation(GetItemActivator, "NW_L_LOC_RECALL", GetLocation(GetItemActivator)); object oClicker = GetItemActivator; AssignCommand(oClicker, ClearAllActions); AssignCommand(oClicker, PlaySound("as_mg_telepout1")); AssignCommand(oClicker,JumpToObject(oPortal)); AssignCommand(oClicker, ActionDoCommand(ClearAllActions)); } }


 * Now we must have a script to activate it. Copy the following script and save it named "gb_item_activate" and attach it to the Module OnActivateItem script node.

/////////////////////////////////////////////////// //: FILE NAME: gb_item_activate //: EVENT HANDLE: Module OnActivateItem //: FUNCTION: Runs a script with a name that matches the Item Tag /////////////////////////////////////////////////// //: CREATED BY: Glenn J. Berden aka Jassper //: CREATED ON: 02/08/02 //: MODIFIED BY: //: MODIFIED ON: /////////////////////////////////////////////////// void main {   ExecuteScript(GetTag(GetItemActivated),OBJECT_SELF); } This btw, is how I handle all my Unique Items. I make the Item, write the script and name the script the same as the Items TAG.


 * If useing this together with the Recall Portal, simply place down a Recall Portal from the Standard Placeables palett under "Visual Effects", make sure the tag is "NW_RECALL_PORTAL". OR If you simply wish them to go to a special spot, place a Waypoint and give it the TAG of "NW_RECALL_PORTAL".

When the Item is used, your PC should now port to the Recall Portal or the Waypoint you placed.

The Recall Portal
The Recall Portal is a bit more tricky, so I'll be as clear as I can.


 * Place a Recall portal in your desired location from the Standard Placeables Palett under "Visual Effects". Make sure the tag is "NW_RECALL_PORTAL".
 * Right click on the portal and select "Properties". Click the Advanced TAB and then "Edit" next to the Conversation box.
 * Alter the conversation so it reads as follows (or however you desired).

+Root line 1 - Owner: This magical portal will transport you to the last place you used your Stone of Recall. You will be charged a tithe of 50 gold for this service. There is no charge to return to the last place you were last killed. line 2 - PC: Use the portal to teleport to your party leader at no cost. line 3 - PC: Return to the last place you used the Stone of Recall. Pay 50 gold. line 4 - PC: Return to the place you were last killed line 5 - PC: Leave.

Click "Save" but don't close the file just yet.
 * Select Line 2 and in the "Text Appears When" script node, make sure this script is attached, "nw_all_feedbackf".
 * Now click the "Actions Taken" TAB. In that script node, make sure this script is attached, "nw_all_feedbackg".
 * Select Line 3 and in the "Text Appears When" script node, make sure this script is attached "nw_all_feedbackc".
 * Now click "Actions Taken" TAB and copy this script to that script node. Save it any name you like.

int CanAffordIt {   int nCost = 50; // * remove the gold from the player // * I'm having the player remove it from himself // * but since I'm also destroying it, this will work if (GetGold(GetPCSpeaker) >= nCost) {       TakeGold(nCost, GetPCSpeaker); return TRUE; }   return FALSE; } void main {  CanAffordIt; location lLoc = GetLocalLocation(GetPCSpeaker, "NW_L_LOC_RECALL"); DelayCommand(2.0,ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_IMP_UNSUMMON), lLoc)); AssignCommand(GetPCSpeaker, JumpToLocation(lLoc)); }
 * 1) include "nw_i0_plot"


 * Select line 4 and Past this script into the script node under "Text Appears When".

int StartingConditional {   int iResult; iResult = GetLocalInt(GetPCSpeaker,"NW_L_I_DIED"); SetLocalInt(GetPCSpeaker,"NW_L_I_DIED",0); return iResult; }


 * Now click the "Actions Taken" tab and copy this script to it's script node. again, name it whatever.

void main {  location lLoc = GetLocalLocation(GetPCSpeaker, "NW_L_I_DIED_HERE"); DelayCommand(2.0,ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_IMP_UNSUMMON), lLoc)); AssignCommand(GetPCSpeaker, JumpToLocation(lLoc)); }


 * Click on Line 5 and make sure there are NO scripts in the "Text Appears When" node OR the "Actions Taken" node.


 * Save the file again and exit.


 * Make sure the conversation you just saved appears in the "Conversations" box of the Portal placeable.


 * Click the "Scripts" TAB of the portal and make sure this script is in it's OnUsed script node. "nw_recall_portal".


 * Click OK.

NOTE: If your also useing the Stone of Recall, you won't need a Waypoint with the TAG "NW_RECALL_PORTAL". You only need one or the other.

Now if you also want to be ported to the Recall Portal when you die, or any place else, place a Waypoint with the TAG "NW_DEATH_TEMPLE" if your useing the default OnPlayerRespawn script "nw_o0_respawn". If your useing the SoU respawn script, "xo_o0_respawn" then you will need to TAG the waypoint "X0_RESPAWN_LOC" instead.