Added CCOH and missing areas Changed some areas to be craftable, Fixed some on death issues, Fixed the Gaurd
40 lines
1.7 KiB
Plaintext
40 lines
1.7 KiB
Plaintext
// Called from convo from emote wand or whatever object you use to do the saving of locations.
|
|
|
|
void main()
|
|
{
|
|
object oPC=GetLastSpeaker();
|
|
object oArea = GetArea(oPC);
|
|
string sPCName = GetName(oPC); // Gets the name of the PC
|
|
string CDKey = GetPCPublicCDKey(oPC); // Gets the public CD Key of the player . . . adds to quality of check
|
|
string sID = GetStringLeft(sPCName,10); // Indivudual Character Used
|
|
string sHID = sID+CDKey; // HCR Style;
|
|
string sAreaName = GetName(oArea); // Sets up a string using the name of the Area
|
|
string sAreaTag = GetTag(oArea); // Sets up a string using the Tag of the Area
|
|
|
|
if(GetIsPC(oPC)||(GetIsDM(oPC) && !GetIsDMPossessed(oPC))) // Script will fire for PCs and DMs
|
|
{
|
|
vector vPosition = GetPositionFromLocation(GetLocation(oPC));
|
|
float nX = vPosition.x;
|
|
float nY = vPosition.y;
|
|
float nZ = vPosition.z;
|
|
int nAreaX = FloatToInt(nX);
|
|
int nAreaY = FloatToInt(nY);
|
|
int nAreaZ = FloatToInt(nZ);
|
|
string sAreaX = IntToString(nAreaX);
|
|
string sAreaY = IntToString(nAreaY);
|
|
string sAreaZ = IntToString(nAreaZ);
|
|
|
|
// Set an Int so we can check for a saved location in the portal or trigger
|
|
SetCampaignInt("PlayerStartLoc", "StartLocSet_" + sHID, 1, oPC);
|
|
|
|
// Create Persistent Location Data
|
|
SetCampaignInt("PlayerStartLoc", "AreaX_" + sHID, nAreaX, oPC);
|
|
SetCampaignInt("PlayerStartLoc", "AreaY_" + sHID, nAreaY, oPC);
|
|
SetCampaignInt("PlayerStartLoc", "AreaZ_" + sHID, nAreaZ, oPC);
|
|
SetCampaignString("PlayerStartLoc", "AreaTag_"+ sHID, sAreaTag, oPC);
|
|
|
|
// Tell the player what the Saved Area will be for verification
|
|
SendMessageToPC(oPC, "Persistent Saved Location is " + sAreaName);
|
|
}
|
|
}
|