Ok here is what I did .Please look it over for me.Scrapped the original lol.
The inlcude script supposed to do timed save location,I tried removing that so lever onused saves.
///////////////////////////This is onuse lever in bedroom///////////////////////////////////////////////////////// -----------------------------------------------------------------------------
// MAIN - Example OnUsed of placeable script
// -----------------------------------------------------------------------------
#include "se_inc_pc_loc"
void main()
{
object oPC = GetLastUsedBy();
SE_SaveLocation(oPC);
ExecuteScript("x2_plc_used_act", OBJECT_SELF);
}
/////////////////////////////////////////////////////This is an include script///////////////////////////////////////////////////////////////////// // Timed Persistant Player Location Save(through a server reset)
// Written by Sir Elric
// 21st July, 2006
// script name - se_inc_pc_loc
// -----------------------------------------------------------------------------
// CONSTANTS
// -----------------------------------------------------------------------------
const int SEND_MESSAGE = FALSE; // << Send a save location message to player?
const string PC_MESSAGE = "Your location has been saved.";// << Player location message(if active)
const float SAVE_LOCATION_DELAY = 600.0;// << Save location delay
const float JUMP_DELAY = 0.0;
const string CAMPAIGN_NAME = "PERSISTANT_LOCATION";
const string CAMPAIGN_VAR = "PCLocation";
// -----------------------------------------------------------------------------
// FUNCTIONS
// -----------------------------------------------------------------------------
void SE_SaveLocation(object oPC)
{
SetCampaignLocation(CAMPAIGN_NAME, CAMPAIGN_VAR, GetLocation(oPC), oPC);
if(SEND_MESSAGE)
SendMessageToPC(oPC, PC_MESSAGE);
}
void SE_JumpToPersistantLocation(object oPC)
{
SetLocalInt(oPC, "ENTERED", TRUE);
location lLoc = GetCampaignLocation(CAMPAIGN_NAME, CAMPAIGN_VAR, oPC);
DelayCommand(JUMP_DELAY, AssignCommand(oPC, JumpToLocation(lLoc)));
}
void SE_SavePCLocation(object oPC)
{
if(GetLocalInt(oPC, "ENTERED") == FALSE)
{
SE_JumpToPersistantLocation(oPC);
}
else
{
SetCampaignLocation(CAMPAIGN_NAME, CAMPAIGN_VAR, GetLocation(oPC), oPC);
if(SEND_MESSAGE)
SendMessageToPC(oPC, PC_MESSAGE);
}
// DelayCommand(SAVE_LOCATION_DELAY, SE_SavePCLocation(oPC));
//ExportSingleCharacter(oPC);
}
////////////////////////////////////////////////////this is on a trigger in start area/////////////////////////////////////////////////////////// -----------------------------------------------------------------------------
// MAIN - Example OnClientEnter script
// -----------------------------------------------------------------------------
#include "se_inc_pc_loc"
void main()
{
object oPC = GetEnteringObject();
if(GetLocalInt(oPC, "ENTERED") == FALSE)
{
SE_JumpToPersistantLocation(oPC);
}
else
{
if (GetHitDice(oPC) < 2)
return;
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("winterkeepinn");
lTarget = GetLocation(oTarget);
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}}
Modifié par Knight_Shield, 13 mars 2013 - 06:47 .