Initial Upload
Initial Upload
This commit is contained in:
21
_module/nss/backportal_use.nss
Normal file
21
_module/nss/backportal_use.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
//:: Back portal script.
|
||||
//:: Created by: Helge "DarkFame" Ingvoldstad
|
||||
//::
|
||||
//:: Purpose: Teleport PC back to the portal he once created
|
||||
void main()
|
||||
{
|
||||
location lLoc = GetLocalLocation(GetPCSpeaker(),"Portal"); // gets the location of the town portal the PC once created
|
||||
object oPC = GetPCSpeaker(); // gets the PC
|
||||
if(GetIsPC(oPC) == 1)
|
||||
{
|
||||
// Remove the effects if you don't want it
|
||||
// Effects start
|
||||
object oTarget = oPC;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DISPEL, FALSE);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget, 6.0);
|
||||
// Effects stop
|
||||
AssignCommand(oPC, ActionJumpToLocation(lLoc)); // Teleports PC to the correct location
|
||||
SetLocalLocation(oPC,"Portal",GetLocation(GetObjectByTag("WP_Townportal"))); // resets the variable
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user