Initial upload
Initial upload
This commit is contained in:
91
_module/nss/warfront_port.nss
Normal file
91
_module/nss/warfront_port.nss
Normal file
@@ -0,0 +1,91 @@
|
||||
int nInt;
|
||||
location lTarget;
|
||||
object oTarget;
|
||||
string sDeny;
|
||||
|
||||
//Created by Guile 02/02/07
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetLastUsedBy();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
if (GetHitDice(oPC) < 21)
|
||||
{
|
||||
sDeny="You are not experienced enough to enter the War Front.";
|
||||
|
||||
SendMessageToPC(oPC, sDeny);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetAlignmentGoodEvil(oPC) == ALIGNMENT_GOOD)
|
||||
{
|
||||
oTarget = GetWaypointByTag("goodway1");
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
|
||||
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||||
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
|
||||
DelayCommand(3.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
||||
|
||||
oTarget = oPC;
|
||||
|
||||
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget));
|
||||
|
||||
}
|
||||
else if (GetAlignmentGoodEvil(oPC) == ALIGNMENT_EVIL)
|
||||
{
|
||||
oTarget = GetWaypointByTag("evilway1");
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
|
||||
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||||
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
|
||||
DelayCommand(3.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
||||
|
||||
oTarget = oPC;
|
||||
|
||||
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget));
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
oTarget = GetWaypointByTag("nuetralway1");
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
|
||||
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||||
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
|
||||
DelayCommand(3.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
||||
|
||||
oTarget = oPC;
|
||||
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget));
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user