Initial commit. Updated release archive.
This commit is contained in:
41
_module/nss/wiztp_use_portal.nss
Normal file
41
_module/nss/wiztp_use_portal.nss
Normal file
@@ -0,0 +1,41 @@
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void ClearEffects(object oPC)
|
||||
{
|
||||
effect token = GetFirstEffect(oPC);
|
||||
|
||||
while (GetIsEffectValid(token))
|
||||
{
|
||||
RemoveEffect(oPC,token);
|
||||
|
||||
token = GetNextEffect(oPC);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
object oOwner = GetLocalObject(OBJECT_SELF,"wizTPOwner");
|
||||
|
||||
float cLevel = IntToFloat(PRCGetCasterLevel(oOwner));
|
||||
|
||||
object wizTP = GetLocalObject(OBJECT_SELF,"wizTP");
|
||||
|
||||
AssignCommand(oPC,ActionJumpToObject(wizTP));
|
||||
|
||||
effect stun = EffectStunned();
|
||||
effect blind = EffectBlindness();
|
||||
|
||||
ClearEffects(oPC);
|
||||
|
||||
float time = IntToFloat(Random(15));
|
||||
|
||||
DelayCommand(2.0,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,blind,oPC,cLevel));
|
||||
DelayCommand(2.0,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,stun,oPC,cLevel+time));
|
||||
|
||||
DelayCommand(cLevel+time,ClearEffects(oPC));
|
||||
|
||||
return;
|
||||
}
|
||||
Reference in New Issue
Block a user