generated from Jaysyn/ModuleTemplate
103 lines
4.3 KiB
Plaintext
103 lines
4.3 KiB
Plaintext
void main()
|
|
{
|
|
object oUser=OBJECT_SELF;
|
|
object oOther=GetLocalObject(oUser,"OTHER");
|
|
object oItem=GetLocalObject(oUser,"ITEM");
|
|
string sItemTag=GetLocalString(oUser,"TAG");
|
|
DeleteLocalString(oUser,"TAG");
|
|
DeleteLocalObject(oUser,"ITEM");
|
|
DeleteLocalObject(oUser,"OTHER");
|
|
int nToHeal;
|
|
effect eHeal;
|
|
effect eVis = EffectVisualEffect(VFX_IMP_HEALING_S);
|
|
string sType=GetSubString(sItemTag,8,3);
|
|
AssignCommand(oUser,ActionMoveToLocation(GetLocation(oOther)));
|
|
DelayCommand(1.0,AssignCommand(oUser,ActionPlayAnimation(
|
|
ANIMATION_LOOPING_GET_LOW)));
|
|
if(sType=="CLW") nToHeal=d8(1)+1;
|
|
if(sType=="CMW") nToHeal=d8(2)+3;
|
|
if(sType=="CSW") nToHeal=d8(3)+5;
|
|
if(sType=="CCW") nToHeal=d8(4)+7;
|
|
//Fire cast spell at event for the specified target
|
|
SignalEvent(oOther, EventSpellCastAt(OBJECT_SELF, SPELL_CURE_LIGHT_WOUNDS, FALSE));
|
|
//Apply VFX impact and heal effect
|
|
eHeal = EffectHeal(nToHeal);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oOther);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oOther);
|
|
//werewolf belladonna
|
|
if(sType=="BEL")
|
|
{
|
|
int iWolfDays = GetLocalInt(oOther,"WOLF_DAYS");
|
|
int iWolfPerm = GetLocalInt(oOther,"WOLF_PERM");
|
|
//int iBelWorks;
|
|
if((iWolfPerm)&&(iWolfDays >1))
|
|
{
|
|
//AssignCommand(oOther,ActionSpeakString("Bell False."));
|
|
int iBCure=0;
|
|
}
|
|
else
|
|
{
|
|
//AssignCommand(oOther,ActionSpeakString("Bell True."));
|
|
int iBCure=1;
|
|
|
|
int iWereWolf = GetLocalInt(oOther,"AFF_WEREWOLF");
|
|
int iWolfSave = FortitudeSave(oOther,20);
|
|
int nHeal = GetSkillRank(SKILL_HEAL, oUser);
|
|
int nRandom = d20(1);
|
|
int nResult = nRandom + nHeal;
|
|
int iBelWorks = iBCure;
|
|
if((iWolfSave) && (iWereWolf)&& (iBelWorks))
|
|
{
|
|
object oTool = GetFirstItemInInventory(oOther);
|
|
string sTool = ("ControlShapeTool");
|
|
while(GetIsObjectValid(oTool))
|
|
{
|
|
string sDestroy=GetTag(oTool);
|
|
if(sDestroy==sTool)
|
|
{
|
|
DestroyObject(oTool);
|
|
}
|
|
oTool = GetNextItemInInventory(oOther);
|
|
}
|
|
SetLocalInt(oOther,"AFF_WEREWOLF",0);
|
|
//AssignCommand(oOther,ActionSpeakString("Belladonna Worked."));
|
|
SendMessageToPC(oOther,"The Curse of Lycanthropy has been lifted.");
|
|
}
|
|
if((nResult >= 20) && (iWereWolf)&& (iBelWorks))
|
|
{
|
|
object oTool = GetFirstItemInInventory(oOther);
|
|
string sTool = ("ControlShapeTool");
|
|
while(GetIsObjectValid(oTool))
|
|
{
|
|
string sDestroy=GetTag(oTool);
|
|
if(sDestroy==sTool)
|
|
{
|
|
DestroyObject(oTool);
|
|
}
|
|
oTool = GetNextItemInInventory(oOther);
|
|
}
|
|
//AssignCommand(oOther,ActionSpeakString("Belladonna Worked."));
|
|
SetLocalInt(oOther,"AFF_WEREWOLF",0);
|
|
SendMessageToPC(oOther,"The Curse of Lycanthropy has been lifted.");
|
|
}
|
|
}
|
|
int iBelSave = FortitudeSave(oOther,13);
|
|
int iBelSave2 = FortitudeSave(oOther,13);
|
|
if(!(iBelSave))
|
|
{
|
|
int iBelAmt = d6();
|
|
effect eBelPoison = EffectAbilityDecrease(ABILITY_STRENGTH,iBelAmt);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eBelPoison,oOther);
|
|
if(!(iBelSave2))
|
|
{
|
|
int iBelAmt = d6(2);
|
|
effect eBelPoison = EffectAbilityDecrease(ABILITY_STRENGTH,iBelAmt);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eBelPoison,oOther);
|
|
}
|
|
}
|
|
|
|
}
|
|
//end werewolf belladonna
|
|
DestroyObject(oItem);
|
|
}
|