generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit.
This commit is contained in:
37
_module/nss/tp_custom1.nss
Normal file
37
_module/nss/tp_custom1.nss
Normal file
@@ -0,0 +1,37 @@
|
||||
/* tp_custom1
|
||||
* by dluan on jan 2003 */
|
||||
|
||||
void main()
|
||||
{
|
||||
object oObject = GetLocalObject(OBJECT_SELF, "TP_CUSTOM1");
|
||||
object oTarget = GetLocalObject(OBJECT_SELF, "TP_TARGET");
|
||||
effect eVisual = EffectVisualEffect(VFX_IMP_UNSUMMON);
|
||||
|
||||
ActionCastFakeSpellAtObject(SPELL_TIME_STOP, oTarget);
|
||||
if (GetLocalInt(OBJECT_SELF, "TP_TYPE")) {
|
||||
object oWayPoint = GetFirstObjectInArea(oObject);
|
||||
while (GetIsObjectValid(oWayPoint) && GetTag(oWayPoint) != "TP_WAYPOINT")
|
||||
oWayPoint = GetNextObjectInArea(oObject);
|
||||
if (GetIsObjectValid(oWayPoint)) oObject = oWayPoint;
|
||||
else {
|
||||
SendMessageToPC(OBJECT_SELF, "Something prevents you from teleporting to this location.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (GetLocalInt(OBJECT_SELF, "TP_PARTY")) {
|
||||
|
||||
object oPlayer = GetFirstFactionMember(oTarget);
|
||||
while (GetIsObjectValid(oPlayer)) {
|
||||
DelayCommand(3.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oPlayer));
|
||||
DelayCommand(4.0, AssignCommand(oPlayer, JumpToObject(oObject)));
|
||||
oPlayer = GetNextFactionMember(oTarget);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
DelayCommand(3.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oTarget));
|
||||
DelayCommand(4.0, AssignCommand(oTarget, JumpToObject(oObject)));
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user