mirror of
http://prc.nwn.ee:3000/Jaysyn/PRC8.git
synced 2025-12-17 01:37:15 -05:00
Initial upload.
Adding base PRC 4.19a files to repository.
This commit is contained in:
47
trunk/scripts/prc_ccc_app_lspw.nss
Normal file
47
trunk/scripts/prc_ccc_app_lspw.nss
Normal file
@@ -0,0 +1,47 @@
|
||||
//:://////////////////////////////////////////////
|
||||
//:: change the PC clone using letoscript
|
||||
//:: prc_ccc_app_lspw.nss
|
||||
//:://////////////////////////////////////////////
|
||||
/** @file
|
||||
Destroys the existing PC clone and replaces it
|
||||
with a new one, modified by letoscript.
|
||||
|
||||
Note: the letoscript modifications are done elsewhere
|
||||
this script simply uses the modified object
|
||||
|
||||
@author Primogenitor (commented by fluffyamoeba)
|
||||
@date Created - 2006.10.10
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "prc_alterations"
|
||||
#include "ccc_inc_misc"
|
||||
|
||||
void main()
|
||||
{
|
||||
string sThreadID = GetLocalString(GetModule(), "LetoResultThread");
|
||||
object oPC = GetLocalObject(GetModule(), "PCForThread"+sThreadID);
|
||||
object oClone = GetLocalObject(oPC, "Clone");
|
||||
object oNewClone = GetLocalObject(GetModule(), "LetoResultObject");
|
||||
//for debugging
|
||||
PrintString("oPC is "+GetName(oPC)+" "+ObjectToString(oPC));
|
||||
PrintString("oClone is "+GetName(oClone)+" "+ObjectToString(oClone));
|
||||
PrintString("oNewClone is "+GetName(oNewClone)+" "+ObjectToString(oNewClone));
|
||||
//destroy the old clone
|
||||
AssignCommand(oClone, SetIsDestroyable(TRUE));
|
||||
DestroyObject(oClone);
|
||||
oClone = oNewClone;
|
||||
//reset the locals linking master and clone
|
||||
SetLocalObject(oPC, "Clone", oClone);
|
||||
SetLocalObject(oClone, "Master", oPC);
|
||||
//restart the pseudohb checking that the master is still logged on
|
||||
AssignCommand(oClone, CloneMasterCheck());
|
||||
//add the new clone to the PC so that you can see there portrait
|
||||
ChangeToStandardFaction(oClone, STANDARD_FACTION_MERCHANT);
|
||||
//apply a vfx to cover the swap
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oPC));
|
||||
//stop the waiting
|
||||
DeleteLocalInt(oPC, "DynConv_Waiting");
|
||||
}
|
||||
Reference in New Issue
Block a user