Added CCOH and missing areas Changed some areas to be craftable, Fixed some on death issues, Fixed the Gaurd
124 lines
5.1 KiB
Plaintext
124 lines
5.1 KiB
Plaintext
void main()
|
|
{
|
|
|
|
object oItem = GetItemActivated();
|
|
object oPC = GetItemActivator();
|
|
|
|
string sItemTag=GetTag(oItem);
|
|
|
|
int nToHeal;
|
|
effect eHeal;
|
|
effect eVis = EffectVisualEffect(VFX_IMP_HEALING_S);
|
|
|
|
DelayCommand(1.0,AssignCommand(oPC,ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW)));
|
|
//AssignCommand(oPC,ActionSpeakString("DEBUG: Belladonna Script Fired."));
|
|
|
|
//werewolf belladonna
|
|
if(sItemTag=="PotionOfBEL")
|
|
{
|
|
int iWolfDays = GetLocalInt(oPC,"WOLF_DAYS");
|
|
int iWolfPerm = GetLocalInt(oPC,"WOLF_PERM");
|
|
int iBellUsed = GetLocalInt(oPC,"Bell_Used");
|
|
int iBCure = GetLocalInt(oPC,"iBCure");
|
|
|
|
if(((iWolfPerm == 1)&&(iWolfDays >1))||(iBCure ==1))
|
|
{
|
|
AssignCommand(oPC,ActionSpeakString("This Belledonna is bitter to taste!"));
|
|
}
|
|
else
|
|
{
|
|
AssignCommand(oPC,ActionSpeakString("This Belledonna is bitter to taste!"));
|
|
SetCampaignInt("WWData","iBCure",1,oPC);
|
|
SetLocalInt(oPC, "iBCure", 1);
|
|
|
|
int iWereWolf = GetLocalInt(oPC,"AFF_WEREWOLF");
|
|
int iWolfSave = FortitudeSave(oPC,20);
|
|
int nHeal = GetSkillRank(SKILL_HEAL, oPC);
|
|
int nRandom = d20(1);
|
|
int nResult = nRandom + nHeal;
|
|
int iBelWorks = iBCure;
|
|
if((iWolfSave) && (iWereWolf == 1) && (iBelWorks == 1))
|
|
{
|
|
object oTool = GetFirstItemInInventory(oPC);
|
|
object oWolfTool = GetFirstItemInInventory(oPC);
|
|
string sTool = ("controlshapetool");
|
|
string sWolfTool = ("wolfformtool");
|
|
while(GetIsObjectValid(oTool))
|
|
{
|
|
string sDestroy=GetTag(oTool);
|
|
if(sDestroy==sTool)
|
|
{
|
|
DestroyObject(oTool);
|
|
}
|
|
oTool = GetNextItemInInventory(oPC);
|
|
}
|
|
while(GetIsObjectValid(oWolfTool))
|
|
{
|
|
string sDestroy=GetTag(oWolfTool);
|
|
if(sDestroy==sWolfTool)
|
|
{
|
|
DestroyObject(oWolfTool);
|
|
}
|
|
oWolfTool = GetNextItemInInventory(oPC);
|
|
}
|
|
SetCampaignInt("WWData","AFF_WEREWOLF",0,oPC);
|
|
SetLocalInt(oPC,"AFF_WEREWOLF",0);
|
|
AssignCommand(oPC,ActionSpeakString("I don't feel very well . . ."));
|
|
}
|
|
|
|
if((nResult >= 20) && (iWereWolf == 1) && (iBelWorks == 1))
|
|
{
|
|
object oTool = GetFirstItemInInventory(oPC);
|
|
object oWolfTool = GetFirstItemInInventory(oPC);
|
|
string sTool = ("controlshapetool");
|
|
string sWolfTool = ("wolfformtool");
|
|
while(GetIsObjectValid(oTool))
|
|
{
|
|
string sDestroy=GetTag(oTool);
|
|
if(sDestroy==sTool)
|
|
{
|
|
DestroyObject(oTool);
|
|
}
|
|
oTool = GetNextItemInInventory(oPC);
|
|
}
|
|
while(GetIsObjectValid(oWolfTool))
|
|
{
|
|
string sDestroy=GetTag(oWolfTool);
|
|
if(sDestroy==sWolfTool)
|
|
{
|
|
DestroyObject(oWolfTool);
|
|
}
|
|
oWolfTool = GetNextItemInInventory(oPC);
|
|
}
|
|
SetCampaignInt("WWData","AFF_WEREWOLF",0,oPC);
|
|
SetLocalInt(oPC,"AFF_WEREWOLF",0);
|
|
AssignCommand(oPC,ActionSpeakString("I don't feel very well . . ."));
|
|
}
|
|
|
|
}
|
|
|
|
//SendMessageToPC(oPC,""DEBUG: Bell Toxin Save.");
|
|
int iBelSave = FortitudeSave(oPC,13);
|
|
int iBelSave2 = FortitudeSave(oPC,13);
|
|
if(!(iBelSave))
|
|
{
|
|
int iBelAmt = d6();
|
|
effect eBelPoison = EffectAbilityDecrease(ABILITY_STRENGTH,iBelAmt);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eBelPoison,oPC);
|
|
SendMessageToPC(oPC,"The Belladonna Has Poisoned You.");
|
|
if(!(iBelSave2))
|
|
{
|
|
int iBelAmt = d6(2);
|
|
effect eBelPoison = EffectAbilityDecrease(ABILITY_STRENGTH,iBelAmt);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eBelPoison,oPC);
|
|
//SendMessageToPC(oPC,"DEBUG: The Belladona Was Very Harsh To Your System.");
|
|
}
|
|
PlayVoiceChat(VOICE_CHAT_POISONED,oPC);
|
|
}
|
|
//SendMessageToPC(oPC,"DEBUG: You have saved from the Toxic Affects of Belladona");
|
|
|
|
}
|
|
//end werewolf belladonna
|
|
DestroyObject(oItem);
|
|
}
|