AOC_PRC8/_module/nss/spawner_m3.nss
Jaysyn904 5e558169a0 Initial Commit
Initial Commit
2025-04-03 11:24:16 -04:00

144 lines
4.8 KiB
Plaintext

/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.6
(and modified by chris meggitt)
For download info, please visit:
http://www.lilacsoul.revility.com */
//Put this OnUsed
void Unsum(object oPC)
{
object oTarget1, oTarget2;
effect eEffect = EffectVisualEffect(VFX_IMP_UNSUMMON);
oTarget1 = GetObjectByTag("starfall2");
RemoveHenchman(oPC, oTarget1);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect, GetLocation(oTarget1));
DestroyObject(GetObjectByTag("starfall2"));
oTarget2 = GetObjectByTag("diablo");
RemoveHenchman(oPC, oTarget2);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect, GetLocation(oTarget2));
DestroyObject(GetObjectByTag("diablo"));
}
void main()
{
object oMod = GetModule();
object oPC = GetLastUsedBy();
object oArea = GetArea(OBJECT_SELF);
if (!GetIsPC(oPC)) return;
int oS0 = GetLocalInt(oMod, "challenge");
int oS1 = GetLocalInt(oMod, "sw_hw");
int oS2 = GetLocalInt(oMod, "sw_dr");
int oS3 = GetLocalInt(oMod, "sw_bl");
int oS4 = GetLocalInt(oMod, "sw_pf");
int oS5 = GetLocalInt(oMod, "sw_df");
int oS6 = GetLocalInt(oMod, "sw_pm");
int oS7 = GetLocalInt(oMod, "sw_bm");
int oS8 = GetLocalInt(oMod, "sw_lm");
int oS9 = GetLocalInt(oMod, "sw_ll");
int oS10 = GetLocalInt(oMod, "sw_xx");
int nInt = GetLocalInt(oMod, "challenge");
int nInt2 = GetLocalInt(oMod, "duel_on");
int oChest = GetLocalInt(oMod, "chest_here");
int oGameMode = GetLocalInt(oMod, "gamemode");
int oModMode = GetLocalInt(oMod, "mod_mode");
int iHwar = GetLocalInt(oMod, "hwar_on");
int iStatus = GetLocalInt(oMod, "war_won");
if (oModMode!=1)
{
if (iHwar==1)
{
if (iStatus!=1)
{
PlaySound("sim_cntresist");
FloatingTextStringOnCreature("** Holy War in progress **", oPC);
SetLocalInt(oPC, "conv_switch", 0);
return;
}
else if (iStatus==1)
{
PlaySound("sim_cntresist");
FloatingTextStringOnCreature("You must clear the arena first.", oPC);
SetLocalInt(oPC, "conv_switch", 0);
return;
}
}
if (oChest!=1)
{
//FloatingTextStringOnCreature(IntToString(nInt), oPC);
//FloatingTextStringOnCreature(IntToString(nInt2), oPC);
// FloatingTextStringOnCreature(IntToString(oS1), oPC);
// FloatingTextStringOnCreature(IntToString(oS2), oPC);
// FloatingTextStringOnCreature(IntToString(oS3), oPC);
// FloatingTextStringOnCreature(IntToString(oS4), oPC);
// FloatingTextStringOnCreature(IntToString(oS5), oPC);
// FloatingTextStringOnCreature(IntToString(oS6), oPC);
// FloatingTextStringOnCreature(IntToString(oS7), oPC);
// FloatingTextStringOnCreature(IntToString(oS8), oPC);
// FloatingTextStringOnCreature(IntToString(oS9), oPC);
// FloatingTextStringOnCreature(IntToString(oS10), oPC);
// FloatingTextStringOnCreature(IntToString(oS0), oPC);
if ((nInt!=1)&&(nInt2!=1)&&(oS1!=1)&&(oS2!=1)&&(oS3!=1)
&&(oS4!=1)&&(oS5!=1)&&(oS6!=1)/*&&(oS7!=1)*/&&(oS8!=1)
&&(oS9!=1)&&(oS0!=1)&&(oS10!=1))
{
object oMonster = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oPC);
if ((!GetIsEnemy(oPC, oMonster))||(oMonster==OBJECT_INVALID))
{
if (oGameMode==1)
{
MusicBackgroundStop(oArea);
PlaySound("gui_select");
AssignCommand(OBJECT_SELF, ActionStartConversation(oPC, "spawner3"));
}
else
{
MusicBackgroundStop(oArea);
PlaySound("gui_select");
AssignCommand(OBJECT_SELF, ActionStartConversation(oPC, "spawner"));
}
}
else
{
PlaySound("sim_cntresist");
FloatingTextStringOnCreature("You must finish your battle first.", oPC);
return;
}
}
else
{
if (nInt==1)
{
PlaySound("sim_cntresist");
FloatingTextStringOnCreature("You must finish the super challenge first.", oPC);
}
else if (nInt2==1)
{
PlaySound("sim_cntresist");
FloatingTextStringOnCreature("You must finish your duel first.", oPC);
}
else
{
PlaySound("sim_cntresist");
FloatingTextStringOnCreature("You must finish your battle first.", oPC);
}
}
}
else
{
PlaySound("sim_cntresist");
FloatingTextStringOnCreature("You must loot your reward chest first.", oPC);
}
}
else
{
PlaySound("sim_cntresist");
FloatingTextStringOnCreature("Arena challenges are unavailable in campaign manager mode.", oPC);
}
}