Added CCOH and missing areas Changed some areas to be craftable, Fixed some on death issues, Fixed the Gaurd
153 lines
4.7 KiB
Plaintext
153 lines
4.7 KiB
Plaintext
#include "prc_inc_spells"
|
|
|
|
void werewolf()
|
|
{
|
|
object oTarget = PRCGetSpellTargetObject();
|
|
object oCaster = OBJECT_SELF;
|
|
//SendMessageToPC(oTarget,"DEBUG: Cure Script fired.");
|
|
int iWolfDays = GetLocalInt(oTarget,"WOLF_PERM");
|
|
int iYesWolf = GetLocalInt(oTarget,"AFF_WEREWOLF");
|
|
int iCureSpell = PRCGetSpellId();
|
|
int iCasterLevel = GetLevelByClass(CLASS_TYPE_CLERIC,oCaster);
|
|
|
|
if((iCureSpell == SPELL_HEAL) && (!(iWolfDays)) && (iCasterLevel >= 12))
|
|
{
|
|
if(iYesWolf)
|
|
{
|
|
object oTool = GetFirstItemInInventory(oTarget);
|
|
object oWolfTool = GetFirstItemInInventory(oTarget);
|
|
string sTool = ("controlshapetool");
|
|
string sWolfTool = ("wolfformtool");
|
|
|
|
while(GetIsObjectValid(oTool))
|
|
{
|
|
string sDestroy=GetTag(oTool);
|
|
if(sDestroy==sTool)
|
|
{
|
|
DestroyObject(oTool);
|
|
}
|
|
oTool = GetNextItemInInventory(oTarget);
|
|
}
|
|
|
|
while(GetIsObjectValid(oWolfTool))
|
|
{
|
|
string sDestroy=GetTag(oWolfTool);
|
|
if(sDestroy==sWolfTool)
|
|
{
|
|
DestroyObject(oWolfTool);
|
|
}
|
|
oWolfTool = GetNextItemInInventory(oTarget);
|
|
}
|
|
SendMessageToPC(oTarget,"You feel refreshed; the curse was lifted.");
|
|
SetCampaignInt("WWData", "AFF_WEREWOLF",0, oTarget);
|
|
SetLocalInt(oTarget, "AFF_WEREWOLF",0);
|
|
}
|
|
}
|
|
if((iCureSpell == SPELL_MASS_HEAL) && (!(iWolfDays)) && (iCasterLevel >= 12))
|
|
{
|
|
if(iYesWolf)
|
|
{
|
|
object oTool = GetFirstItemInInventory(oTarget);
|
|
object oWolfTool = GetFirstItemInInventory(oTarget);
|
|
string sTool = ("controlshapetool");
|
|
string sWolfTool = ("wolfformtool");
|
|
|
|
while(GetIsObjectValid(oTool))
|
|
{
|
|
string sDestroy=GetTag(oTool);
|
|
if(sDestroy==sTool)
|
|
{
|
|
DestroyObject(oTool);
|
|
}
|
|
oTool = GetNextItemInInventory(oTarget);
|
|
}
|
|
|
|
while(GetIsObjectValid(oWolfTool))
|
|
{
|
|
string sDestroy=GetTag(oWolfTool);
|
|
if(sDestroy==sWolfTool)
|
|
{
|
|
DestroyObject(oWolfTool);
|
|
}
|
|
oWolfTool = GetNextItemInInventory(oTarget);
|
|
}
|
|
SendMessageToPC(oTarget,"You feel refreshed; the curse was lifted.");
|
|
SetCampaignInt("WWData", "AFF_WEREWOLF",0, oTarget);
|
|
SetLocalInt(oTarget, "AFF_WEREWOLF",0);
|
|
}
|
|
}
|
|
if((iCureSpell == SPELL_REMOVE_DISEASE) && (!(iWolfDays)) && (iCasterLevel >= 12) && (iYesWolf))
|
|
{
|
|
if(iYesWolf)
|
|
{
|
|
object oTool = GetFirstItemInInventory(oTarget);
|
|
object oWolfTool = GetFirstItemInInventory(oTarget);
|
|
string sTool = ("controlshapetool");
|
|
string sWolfTool = ("wolfformtool");
|
|
|
|
while(GetIsObjectValid(oTool))
|
|
{
|
|
string sDestroy=GetTag(oTool);
|
|
if(sDestroy==sTool)
|
|
{
|
|
DestroyObject(oTool);
|
|
}
|
|
oTool = GetNextItemInInventory(oTarget);
|
|
}
|
|
|
|
while(GetIsObjectValid(oWolfTool))
|
|
{
|
|
string sDestroy=GetTag(oWolfTool);
|
|
if(sDestroy==sWolfTool)
|
|
{
|
|
DestroyObject(oWolfTool);
|
|
}
|
|
oWolfTool = GetNextItemInInventory(oTarget);
|
|
}
|
|
SendMessageToPC(oTarget,"You feel refreshed; the curse was lifted.");
|
|
SetCampaignInt("WWData", "AFF_WEREWOLF",0, oTarget);
|
|
SetLocalInt(oTarget, "AFF_WEREWOLF",0);
|
|
}
|
|
}
|
|
object oMod = GetModule();
|
|
int iFullMoon1 = GetLocalInt(oMod,"FullMoon1");
|
|
int iFullMoon2 = GetLocalInt(oMod,"FullMoon2");
|
|
int iFullMoon3 = GetLocalInt(oMod,"FullMoon3");
|
|
int iCurrentDay = GetCalendarDay();
|
|
|
|
if((iCureSpell == SPELL_REMOVE_CURSE) && ((iCurrentDay == iFullMoon1) || (iCurrentDay == iFullMoon2) || (iCurrentDay == iFullMoon3)))
|
|
{
|
|
int iWillSave = WillSave(oTarget,20);
|
|
if((iWillSave)&& (iYesWolf))
|
|
{
|
|
object oTool = GetFirstItemInInventory(oTarget);
|
|
object oWolfTool = GetFirstItemInInventory(oTarget);
|
|
string sTool = ("controlshapetool");
|
|
string sWolfTool = ("wolfformtool");
|
|
|
|
while(GetIsObjectValid(oTool))
|
|
{
|
|
string sDestroy=GetTag(oTool);
|
|
if(sDestroy==sTool)
|
|
{
|
|
DestroyObject(oTool);
|
|
}
|
|
oTool = GetNextItemInInventory(oTarget);
|
|
}
|
|
|
|
while(GetIsObjectValid(oWolfTool))
|
|
{
|
|
string sDestroy=GetTag(oWolfTool);
|
|
if(sDestroy==sWolfTool)
|
|
{
|
|
DestroyObject(oWolfTool);
|
|
}
|
|
oWolfTool = GetNextItemInInventory(oTarget);
|
|
}
|
|
SendMessageToPC(oTarget,"You feel refreshed; the curse was lifted.");
|
|
SetCampaignInt("WWData", "AFF_WEREWOLF",0, oTarget);
|
|
SetLocalInt(oTarget, "AFF_WEREWOLF",0);
|
|
}
|
|
}
|
|
}
|