141 lines
4.1 KiB
Plaintext
141 lines
4.1 KiB
Plaintext
//#include "rank"
|
|
#include "eradicate"
|
|
#include "spawner"
|
|
|
|
|
|
|
|
|
|
void main()
|
|
{
|
|
object oUsed = GetItemActivated();
|
|
object oPC = GetItemActivator();
|
|
object oMod = GetModule();
|
|
effect eEffect= EffectDeath();
|
|
effect eEffect2;
|
|
int iTime;
|
|
int iValidArea = GetLocalInt(oPC, "pvp_area");
|
|
float dWrathDelay = 5.0;
|
|
object oTarget = GetWaypointByTag("center_arena");
|
|
object oArea = GetArea(oPC);
|
|
|
|
|
|
|
|
if (GetTag(oUsed) == "debuggingrod")
|
|
{
|
|
|
|
SetLocalInt(oMod, "d1", 0);
|
|
SetLocalInt(oMod, "d2", 0);
|
|
SetLocalInt(oMod, "d2a", 0);
|
|
SetLocalInt(oMod, "d3", 0);
|
|
SetLocalInt(oMod, "d4", 0);
|
|
SetLocalInt(oMod, "d5", 0);
|
|
SetLocalInt(oMod, "sw_hw", 0);
|
|
SetLocalInt(oMod, "sw_dr", 0);
|
|
SetLocalInt(oMod, "sw_bl", 0);
|
|
SetLocalInt(oMod, "sw_pf", 0);
|
|
SetLocalInt(oMod, "sw_df", 0);
|
|
SetLocalInt(oMod, "sw_pm", 0);
|
|
SetLocalInt(oMod, "sw_bm", 0);
|
|
SetLocalInt(oMod, "sw_lm", 0);
|
|
SetLocalInt(oMod, "sw_ll", 0);
|
|
SetLocalInt(oMod, "sw_xx", 0);
|
|
SetLocalInt(oMod, "ch_hw", 0);
|
|
SetLocalInt(oMod, "ch_dr", 0);
|
|
SetLocalInt(oMod, "ch_bl", 0);
|
|
SetLocalInt(oMod, "ch_pf", 0);
|
|
SetLocalInt(oMod, "ch_df", 0);
|
|
SetLocalInt(oMod, "ch_pm", 0);
|
|
SetLocalInt(oMod, "ch_bm", 0);
|
|
SetLocalInt(oMod, "ch_lm", 0);
|
|
SetLocalInt(oMod, "ch_ll", 0);
|
|
SetLocalInt(oMod, "ch_xx", 0);
|
|
SetLocalInt(oMod, "gr_xx", 0);
|
|
SetLocalInt(oMod, "challenge", 0);
|
|
AssignCommand(oPC, PlaySound("sps_darkness"));
|
|
SetLocalInt(oPC, "doppledead", 1);
|
|
SetLocalInt(oPC, "pitfienddead", 1);
|
|
SetLocalInt(oPC, "wurmdead", 1);
|
|
SetLocalInt(oPC, "lorddead", 1);
|
|
SetLocalInt(oPC, "paledead", 1);
|
|
SetLocalInt(oPC, "luciferdead", 1);
|
|
SetLocalInt(oPC, "balrogdead", 1);
|
|
SetLocalInt(oPC, "hdfienddead", 1);
|
|
SetLocalInt(oPC, "bossdead", 1);
|
|
SetLocalInt(oPC, "marilithdead", 1);
|
|
//++iKilled;
|
|
//SetLocalInt (oPC,"iKilled", iKilled);
|
|
Eradicate(oPC);
|
|
//DelayCommand(3.0, GetRank(oPC));
|
|
|
|
}
|
|
if (GetTag(oUsed) == "deathpotion")
|
|
{
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC);
|
|
}
|
|
if (GetTag(oUsed) == "poisonpotion")
|
|
{
|
|
eEffect2 = EffectDamage(250, DAMAGE_TYPE_ACID, DAMAGE_POWER_NORMAL);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect2, oPC);
|
|
}
|
|
if (GetTag(oUsed) == "wrathrod")
|
|
{
|
|
iTime = GetLocalInt(oMod, "WrathTime");
|
|
if ((iTime!=1)&&(iValidArea==1)&&(GetName(oArea)=="The Arena of Champions"))
|
|
{
|
|
//SetLocalInt(oMod, "WrathTime", 1);
|
|
//DelayCommand(dWrathDelay+55.0, SetLocalInt(oMod, "WrathTime", 0));
|
|
//Wrath(oPC, dWrathDelay);
|
|
ExecuteScript("phoenix_rod", oPC);
|
|
}
|
|
else if (iTime==1)
|
|
{
|
|
if (GetItemCharges(oUsed)==0)
|
|
{
|
|
PlaySound("sim_cntresist");
|
|
FloatingTextStringOnCreature("** The rod disintegrates in your hand **", oPC);
|
|
DestroyObject(oUsed);
|
|
}
|
|
else
|
|
{
|
|
PlaySound("sim_cntresist");
|
|
FloatingTextStringOnCreature("** The rod's power is recharging **", oPC);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
PlaySound("sim_cntresist");
|
|
FloatingTextStringOnCreature("** You can't summon the Phoenix here **", oPC);
|
|
int iCharges = GetItemCharges(oUsed);
|
|
iCharges+=5;
|
|
SetItemCharges(oUsed, iCharges);
|
|
}
|
|
|
|
}
|
|
|
|
if (GetTag(oUsed) == "final_ring")
|
|
{
|
|
iTime = GetLocalInt(oMod, "WrathTime");
|
|
if ((iTime!=1)&&(iValidArea==1)&&(GetName(oArea)=="The Arena of Champions"))
|
|
{
|
|
SetLocalInt(oMod, "WrathTime", 1);
|
|
DelayCommand(dWrathDelay+12.0, SetLocalInt(oMod, "WrathTime", 0));
|
|
ExecuteScript("phoenix_rod", oPC);
|
|
}
|
|
else if (iTime==1)
|
|
{
|
|
PlaySound("sim_cntresist");
|
|
FloatingTextStringOnCreature("** The ring's power is recharging **", oPC);
|
|
}
|
|
else
|
|
{
|
|
PlaySound("sim_cntresist");
|
|
FloatingTextStringOnCreature("** You can't summon the Phoenix here **", oPC);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|