Initial upload
Initial upload.
This commit is contained in:
34
_module/nss/removebuffs.nss
Normal file
34
_module/nss/removebuffs.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
#include "NW_O2_CONINCLUDE"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
if (GetLocalInt(OBJECT_SELF,"NW_DO_ONCE") != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
object oPC = GetLastUsedBy();
|
||||
// object oPC = GetLastOpener();
|
||||
// if ( GetIsPC( oPC ) )
|
||||
// {
|
||||
// effect epolymorph = EffectPolymorph( POLYMORPH_TYPE_PENGUIN );
|
||||
effect eLoseBuffs = EffectDispelMagicAll( 200 );
|
||||
ActionWait(0.5);
|
||||
// ActionCastSpellAtObject(POLYMORPH_TYPE_PENGUIN,oPC);
|
||||
ActionCastSpellAtObject(SPELL_DISPEL_MAGIC, oPC);
|
||||
// ApplyEffectToObject(DURATION_TYPE_TEMPORARY, epolymorph, oPC, 20.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eLoseBuffs, oPC, 0.0);
|
||||
SendMessageToPC(oPC, "As you open the chest, all your buffs are dispelled!");
|
||||
// }
|
||||
|
||||
// Set respawntime float to the number of seconds.
|
||||
float respawntime = 12.00;
|
||||
// object oLastOpener = GetLastOpener();
|
||||
GenerateHighTreasure(oPC, OBJECT_SELF);
|
||||
SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",1);
|
||||
ShoutDisturbed();
|
||||
// Command added to delay the <span class="highlight">respawn</span>
|
||||
AssignCommand( OBJECT_SELF, DelayCommand (respawntime, SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",0) ) );
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user