Initial commit

Initial commit.  Updated release archive.
This commit is contained in:
Jaysyn904
2024-06-13 15:08:33 -04:00
parent c0bd67a6a7
commit a6f6db7303
5236 changed files with 4203994 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
void main()
{
object oClicker = GetClickingObject();
object oTarget = GetTransitionTarget(OBJECT_SELF);
SetAreaTransitionBMP(AREA_TRANSITION_RANDOM);
AssignCommand(oClicker,JumpToObject(oTarget));
}

View File

@@ -0,0 +1,10 @@
void main()
{
object oClicker = GetClickingObject();
object oTarget = GetTransitionTarget(OBJECT_SELF);
SetAreaTransitionBMP(AREA_TRANSITION_RANDOM);
AssignCommand(oClicker,JumpToObject(oTarget));
}

View File

@@ -0,0 +1,31 @@
#include "en5_misc"
int StartingConditional()
{
int iResult;
string sTalk;
string sResponse;
string sTalk2;
string sAccomplishment;
sTalk = GetLocalString(OBJECT_SELF,"QUEST_Talk");
sResponse = GetLocalString(OBJECT_SELF,"QUEST_Response");
sTalk2 = GetLocalString(OBJECT_SELF,"QUEST_Talk2");
SetCustomToken(301,sTalk);
SetCustomToken(302,sResponse);
SetCustomToken(303,sTalk2);
sAccomplishment = GetLocalString(GetPCSpeaker(),GetMyZone()+ "_Accomplishment");
if (sAccomplishment == "" || GetLocalInt(OBJECT_SELF,"Accomplishment") == 1)
SetCustomToken(201,"What can I do for you?");
else
{
SetCustomToken(201,"Chren told me you " + sAccomplishment + ". That is fantastic! What can I do for you?");
SetLocalInt(OBJECT_SELF,"Accomplishment",1);
}
iResult = FALSE;
return iResult;
}

View File

@@ -0,0 +1,57 @@
#include "en5_misc"
int StartingConditional()
{
int iResult;
int iRandom;
string sText;
string sAccomplishment;
iResult = FALSE;
if (GetLocalInt(OBJECT_SELF,"Talk") == 0)
{
iRandom = Random(5)+1;
switch (iRandom)
{
case 1: sText = "What ya want?"; break;
case 2: sText = "What ya need?"; break;
case 3: sText = "What can I do for ya?"; break;
case 4: sText = "How can I help you?"; break;
case 5: sText = "Is there something you need?"; break;
}
sAccomplishment = GetLocalString(GetPCSpeaker(),GetMyZone()+ "_Accomplishment");
if (sAccomplishment != "" && GetLocalInt(OBJECT_SELF,"Brag") == 0 && Random(3)==0)
{
sText = "I heard you " + sAccomplishment + ". You have my thanks. How can I help you?";
SetLocalInt(OBJECT_SELF,"Brag",1);
}
SetCustomToken(401,sText);
SetLocalString(OBJECT_SELF,"Talk1",sText);
iRandom = Random(8)+1;
switch (iRandom)
{
case 1: sText = "Not much to tell. We live. We eat. We come in here and drink, har har."; break;
case 2: sText = "We sure are getting a lot of adventurers traveling through here these days."; break;
case 3: sText = "The guards are beginning to look frayed with all the worry about creatures in the wilderness."; break;
case 4: sText = "I used to go fishing in the Adon Woods, but not anymore. It's just too dangerous these days."; break;
case 5: sText = "Used to be that you could come in here and get something to eat without a bunch of adventurer's bothering you."; break;
case 6: sText = "Tom Miller has been looking frazzled recently."; break;
case 7: sText = "The other day I saw a rat the size of my foot. And I have big feet."; break;
case 8: sText = "The ale here is the finest within a hundred leagues."; break;
}
if (sAccomplishment != "" && GetLocalInt(OBJECT_SELF,"Brag") == 0 && Random(5)==0)
{
sText = "Not much to tell, but I did hear you " + sAccomplishment + ". You have my thanks.";
SetLocalInt(OBJECT_SELF,"Brag",1);
}
SetCustomToken(402,sText);
SetLocalString(OBJECT_SELF,"Talk2",sText);
SetLocalInt(OBJECT_SELF,"Talk",1);
} else {
SetCustomToken(401,GetLocalString(OBJECT_SELF,"Talk1"));
SetCustomToken(402,GetLocalString(OBJECT_SELF,"Talk2"));
}
return iResult;
}

163
_module/nss/cc1_alter.nss Normal file
View File

@@ -0,0 +1,163 @@
#include "en5_treasure"
void GetPowers(object oPC);
void main()
{
object oPC;
object oMob;
effect eVis;
effect eDam;
int iRandom;
int iRandom2;
string sTag;
string sString;
oPC=GetPlaceableLastClickedBy();
if (GetDistanceBetween(oPC,OBJECT_SELF) > 5.0)
{
SendMessageToPC(oPC,"You are too far away to touch the alter.");
AssignCommand(oPC,ClearAllActions());
}
else
{
if (GetLocalInt(oPC,"EvilAlter") == 0)
{
SetLocalInt(oPC,"EvilAlter",1);
sString="You touch the alter.";
AssignCommand(oPC,ClearAllActions());
iRandom=GetLocalInt(oPC,"CC1_ALTER");
if (iRandom==0)
iRandom=Random(50);
if (GetLocalInt(oPC,"PCRacePower") > 0)
iRandom--;
if (iRandom<5)
{
eVis = EffectVisualEffect(VFX_FNF_SWINGING_BLADE);
DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oPC),3.0));
eDam = EffectDamage(d6(2), DAMAGE_TYPE_SLASHING);
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oPC));
}
else if (iRandom<10)
{
object oWP=GetObjectByTag("CC2_GP_Enter");
AssignCommand(oPC,JumpToLocation(GetLocation(oWP)));
sString="You touch the alter and a hole opens up under you which you fall through.";
eDam = EffectDamage(d6(2), DAMAGE_TYPE_BLUDGEONING);
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oPC));
if (Random(10)==0)
GetMagicItem(GetObjectByTag("CC1_Corpse"),1,0,oPC);
}
else if (iRandom<15)
{
eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oPC),3.0));
eDam = EffectDamage(d6(2), DAMAGE_TYPE_ELECTRICAL);
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oPC));
}
else if (iRandom<20)
{
ActionCastSpellAtObject(SPELL_INFESTATION_OF_MAGGOTS,oPC,METAMAGIC_ANY,TRUE);
}
else if (iRandom<25)
{
ActionCastSpellAtObject(SPELL_DARKFIRE,oPC,METAMAGIC_ANY,TRUE);
}
else if (iRandom<30)
{
AssignCommand(oPC,ActionCastSpellAtObject(SPELL_DIVINE_FAVOR,oPC,METAMAGIC_ANY,TRUE,0,PROJECTILE_PATH_TYPE_DEFAULT,TRUE));
}
else if (iRandom<35)
{
AssignCommand(oPC,ActionCastSpellAtObject(SPELL_SHADOW_CONJURATION_SUMMON_SHADOW,oPC,METAMAGIC_ANY,TRUE,0,PROJECTILE_PATH_TYPE_DEFAULT,TRUE));
}
else if (iRandom<40)
{
iRandom2=Random(4)+1;
switch (iRandom2)
{
case 1: sTag="EN5_SHADOW"; break;
case 2: sTag="EN5_IMP"; break;
case 3: sTag="en5_quasit"; break;
case 4: sTag="en6_xorax"; break;
}
oMob=CreateObject(OBJECT_TYPE_CREATURE,sTag,GetLocation(OBJECT_SELF));
if (Random(5)==0 || iRandom2==4)
GetMagicItem(oMob,1,0,oPC);
}
else if (iRandom<46)
{
sString="You touch the alter and your fingers come away stained with blood.";
}
else if (iRandom<48)
{
AssignCommand(oPC,ActionCastSpellAtObject(SPELL_DECK_AVATAR,oPC,METAMAGIC_ANY,TRUE,0,PROJECTILE_PATH_TYPE_DEFAULT,TRUE));
}
else if (iRandom<49)
{
ExecuteScript("en6_draw",oPC);
}
else if (iRandom<50)
{
GetPowers(oPC);
sString="You touch the alter and feel a demonic power fill your soul.";
}
SendMessageToPC(oPC,sString);
} else {
AssignCommand(oPC,ClearAllActions());
eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oPC),3.0));
eDam = EffectDamage(d6(2), DAMAGE_TYPE_ELECTRICAL);
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oPC));
DelayCommand(0.7,SendMessageToPC(oPC,"The powers frown upon your greed."));
}
}
}
void GetPowers(object oPC)
{
int iRandom;
int iRandom2;
string sString;
effect eVis;
sString="You have gained the ability to imbue your weapon with power.";
iRandom=Random(5)+1;
switch (iRandom)
{
case 1: SetLocalInt(oPC,"SpecialPowers",1); sString = "You are imbued with the powers of the abyss."; break;
case 2: SetLocalInt(oPC,"SpecialPowers",3); sString = "You are imbued with great strength."; break;
case 3: SetLocalInt(oPC,"WeaponBonus",Random(4)+1); break;
case 4: SetLocalInt(oPC,"SpecialWeapon",1); break;
case 5: SetLocalInt(oPC,"SpecialWeapon",2); break;
}
eVis = EffectVisualEffect(VFX_IMP_EVIL_HELP);
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oPC,3.0));
eVis = EffectVisualEffect(246);
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oPC,3.0));
DelayCommand(0.5,SendMessageToPC(oPC,sString));
if (iRandom == 1 || iRandom>3)
{
SetCreatureWingType(CREATURE_WING_TYPE_DEMON,oPC);
SetCreatureTailType(CREATURE_TAIL_TYPE_DEVIL,oPC);
iRandom2=Random(6)*5;
if (iRandom2>0)
AdjustAlignment(oPC,ALIGNMENT_EVIL,iRandom2);
}
ExecuteScript("en6_special",oPC);
}

16
_module/nss/cm_aid_0.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "aidswitch") == 0))
return FALSE;
return TRUE;
}

16
_module/nss/cm_aid_1.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "aidswitch") == 1))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,6 @@
#include "cm_treat_include"
void main()
{
Aid(OBJECT_SELF);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "aidswitch", 0);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "aidswitch", 1);
}

View File

@@ -0,0 +1,6 @@
#include "cm_treat_include"
void main()
{
Anti(OBJECT_SELF);
}

16
_module/nss/cm_bar_0.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "barswitch") == 0))
return FALSE;
return TRUE;
}

16
_module/nss/cm_bar_1.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "barswitch") == 1))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "barswitch", 0);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "barswitch", 1);
}

View File

@@ -0,0 +1,6 @@
#include "cm_treat_include"
void main()
{
Barkskin(OBJECT_SELF);
}

View File

@@ -0,0 +1,6 @@
#include "cm_treat_include"
void main()
{
Bless(OBJECT_SELF);
}

16
_module/nss/cm_bls_0.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "blsswitch") == 0))
return FALSE;
return TRUE;
}

16
_module/nss/cm_bls_1.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "blsswitch") == 1))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "blsswitch", 0);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "blsswitch", 1);
}

View File

@@ -0,0 +1,29 @@
//::///////////////////////////////////////////////
//:: FileName buf_set_all
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 11:15:14 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "aidswitch", 0);
SetLocalInt(GetPCSpeaker(), "barswitch", 0);
SetLocalInt(GetPCSpeaker(), "bulswitch", 0);
SetLocalInt(GetPCSpeaker(), "catswitch", 0);
SetLocalInt(GetPCSpeaker(), "cleswitch", 0);
SetLocalInt(GetPCSpeaker(), "deaswitch", 0);
SetLocalInt(GetPCSpeaker(), "eagswitch", 0);
SetLocalInt(GetPCSpeaker(), "eliswitch", 0);
SetLocalInt(GetPCSpeaker(), "endswitch", 0);
SetLocalInt(GetPCSpeaker(), "foxswitch", 0);
SetLocalInt(GetPCSpeaker(), "iroswitch", 0);
SetLocalInt(GetPCSpeaker(), "lirswitch", 0);
SetLocalInt(GetPCSpeaker(), "lstswitch", 0);
SetLocalInt(GetPCSpeaker(), "owlswitch", 0);
SetLocalInt(GetPCSpeaker(), "phaswitch", 0);
SetLocalInt(GetPCSpeaker(), "speswitch", 0);
SetLocalInt(GetPCSpeaker(), "watswitch", 0);
}

View File

@@ -0,0 +1,29 @@
//::///////////////////////////////////////////////
//:: FileName buf_set_all
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 11:15:14 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "aidswitch", 1);
SetLocalInt(GetPCSpeaker(), "barswitch", 1);
SetLocalInt(GetPCSpeaker(), "bulswitch", 1);
SetLocalInt(GetPCSpeaker(), "catswitch", 1);
SetLocalInt(GetPCSpeaker(), "cleswitch", 1);
SetLocalInt(GetPCSpeaker(), "deaswitch", 1);
SetLocalInt(GetPCSpeaker(), "eagswitch", 1);
SetLocalInt(GetPCSpeaker(), "eliswitch", 1);
SetLocalInt(GetPCSpeaker(), "endswitch", 1);
SetLocalInt(GetPCSpeaker(), "foxswitch", 1);
SetLocalInt(GetPCSpeaker(), "iroswitch", 1);
SetLocalInt(GetPCSpeaker(), "lirswitch", 1);
SetLocalInt(GetPCSpeaker(), "lstswitch", 1);
SetLocalInt(GetPCSpeaker(), "owlswitch", 1);
SetLocalInt(GetPCSpeaker(), "phaswitch", 1);
SetLocalInt(GetPCSpeaker(), "speswitch", 1);
SetLocalInt(GetPCSpeaker(), "watswitch", 1);
}

View File

@@ -0,0 +1,236 @@
#include "cm_hench_include"
void main()
{
object oPC=GetModule();
object oPC1=GetPCSpeaker();
object oStar=OBJECT_SELF;
float oDelay = 120.0;
SetLocalInt(oStar, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oStar, "buffing", 0));
int i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14,i15,i16,i17,
s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16,s17;
i1=GetLocalInt(oPC, "aidtook");
i2=GetLocalInt(oPC, "bulltook");
i3=GetLocalInt(oPC, "speedtook");
i4=GetLocalInt(oPC, "cleartook");
i5=GetLocalInt(oPC, "barktook");
i6=GetLocalInt(oPC, "eagletook");
i7=GetLocalInt(oPC, "endtook");
i8=GetLocalInt(oPC, "cattook");
i9=GetLocalInt(oPC, "foxtook");
i10=GetLocalInt(oPC, "owltook");
i11=GetLocalInt(oPC, "irontook");
i12=GetLocalInt(oPC, "deathtook");
i13=GetLocalInt(oPC, "blesstook");
s1=GetLocalInt(oPC1, "aidswitch");
s2=GetLocalInt(oPC1, "bulswitch");
s3=GetLocalInt(oPC1, "speswitch");
s4=GetLocalInt(oPC1, "cleswitch");
s5=GetLocalInt(oPC1, "barswitch");
s6=GetLocalInt(oPC1, "eagswitch");
s7=GetLocalInt(oPC1, "endswitch");
s8=GetLocalInt(oPC1, "catswitch");
s9=GetLocalInt(oPC1, "foxswitch");
s10=GetLocalInt(oPC1, "owlswitch");
s11=GetLocalInt(oPC1, "iroswitch");
s12=GetLocalInt(oPC1, "deaswitch");
s13=GetLocalInt(oPC1, "blsswitch");
object oPot = GetItemPossessedBy(oStar, "NW_IT_MPOTION015"); //Bullstrength
object oPot1 = GetItemPossessedBy(oStar, "NW_IT_MPOTION004");//Speed
object oPot2 = GetItemPossessedBy(oStar, "NW_IT_MPOTION016");//Aid
object oPot3 = GetItemPossessedBy(oStar, "NW_IT_MPOTION005");//Barkskin
object oPot4 = GetItemPossessedBy(oStar, "NW_IT_MPOTION007");//Clarity
object oPot5 = GetItemPossessedBy(oStar, "NW_IT_MPOTION010");//Eagle's Splend
object oPot6 = GetItemPossessedBy(oStar, "NW_IT_MPOTION013");//Endurance
object oPot7 = GetItemPossessedBy(oStar, "NW_IT_MPOTION014");//Cat's Grace
object oPot8 = GetItemPossessedBy(oStar, "NW_IT_MPOTION017");// Fox's Cunning
object oPot9 = GetItemPossessedBy(oStar, "NW_IT_MPOTION018");// Owl's Wisdom
object oPot10 = GetItemPossessedBy(oStar, "X2_IT_MPOTION001");//Iron Guts
object oPot11 = GetItemPossessedBy(oStar, "NW_IT_MPOTION002");//Death Armor
object oPot12 = GetItemPossessedBy(oStar, "NW_IT_MPOTION009");//Bless
if ((oPot==OBJECT_INVALID)&&(oPot1==OBJECT_INVALID)
&&(oPot2==OBJECT_INVALID)&&(oPot3==OBJECT_INVALID)
&&(oPot4==OBJECT_INVALID)&&(oPot5==OBJECT_INVALID)
&&(oPot7==OBJECT_INVALID)&&(oPot7==OBJECT_INVALID)
&&(oPot8==OBJECT_INVALID)&&(oPot9==OBJECT_INVALID)
&&(oPot10==OBJECT_INVALID)&&(oPot11==OBJECT_INVALID)
&&(oPot12==OBJECT_INVALID))
{
ClearAllActions();
ActionSpeakString("I don't have any buff potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
else if ((i1!=1)||(i2!=1)||(i3!=1)||(i3!=1)||(i4!=1)||(i5!=1)||(i6!=1)
||(i7!=1)||(i8!=1)||(i9!=1)||(i10!=1)||(i11!=1)||(i12!=1)||(i13!=1))
{
if ((i1!=1)&&(s1==1)&&(oPot2!=OBJECT_INVALID))
{
TakeAid(OBJECT_SELF);
SetLocalInt(oPC, "aidtook", 1);
DelayCommand(oDelay, SetLocalInt(oPC, "aidtook", 0));
return;
}
if ((i2!=1)&&(s2==1)&&(oPot!=OBJECT_INVALID))
{
TakeBull(OBJECT_SELF);
SetLocalInt(oPC, "bulltook", 1);
DelayCommand(oDelay, SetLocalInt(oPC, "bulltook", 0));
return;
}
if ((i3!=1)&&(s3==1)&&(oPot1!=OBJECT_INVALID))
{
TakeSpeed(OBJECT_SELF);
SetLocalInt(oPC, "speedtook", 1);
DelayCommand(20.0, SetLocalInt(oPC, "speedtook", 0));
return;
}
if ((i4!=1)&&(s4==1)&&(oPot4!=OBJECT_INVALID))
{
TakeClear(OBJECT_SELF);
SetLocalInt(oPC, "cleartook", 1);
DelayCommand(oDelay, SetLocalInt(oPC, "cleartook", 0));
return;
}
if ((i5!=1)&&(s5==1)&&(oPot3!=OBJECT_INVALID))
{
TakeBark(OBJECT_SELF);
SetLocalInt(oPC, "barktook", 1);
DelayCommand(oDelay, SetLocalInt(oPC, "barktook", 0));
return;
}
if ((i6!=1)&&(s6==1)&&(oPot5!=OBJECT_INVALID))
{
TakeEag(OBJECT_SELF);
SetLocalInt(oPC, "eagletook", 1);
DelayCommand(oDelay, SetLocalInt(oPC, "eagletook", 0));
return;
}
if ((i7!=1)&&(s7==1)&&(oPot6!=OBJECT_INVALID))
{
TakeEnd(OBJECT_SELF);
SetLocalInt(oPC, "endtook", 1);
DelayCommand(oDelay, SetLocalInt(oPC, "endtook", 0));
return;
}
if ((i8!=1)&&(s8==1)&&(oPot7!=OBJECT_INVALID))
{
TakeCat(OBJECT_SELF);
SetLocalInt(oPC, "cattook", 1);
DelayCommand(oDelay, SetLocalInt(oPC, "cattook", 0));
return;
}
if ((i9!=1)&&(s9==1)&&(oPot8!=OBJECT_INVALID))
{
TakeFox(OBJECT_SELF);
SetLocalInt(oPC, "foxtook", 1);
DelayCommand(oDelay, SetLocalInt(oPC, "foxtook", 0));
return;
}
if ((i10!=1)&&(s10==1)&&(oPot9!=OBJECT_INVALID))
{
TakeOwl(OBJECT_SELF);
SetLocalInt(oPC, "owltook", 1);
DelayCommand(oDelay, SetLocalInt(oPC, "owltook", 0));
return;
}
if ((i11!=1)&&(s11==1)&&(oPot10!=OBJECT_INVALID))
{
TakeIron(OBJECT_SELF);
SetLocalInt(oPC, "irontook", 1);
DelayCommand(oDelay, SetLocalInt(oPC, "irontook", 0));
return;
}
if ((i12!=1)&&(s12==1)&&(oPot11!=OBJECT_INVALID))
{
TakeDeath(OBJECT_SELF);
SetLocalInt(oPC, "deathtook", 1);
DelayCommand(oDelay, SetLocalInt(oPC, "deathtook", 0));
return;
}
if ((i13!=1)&&(s13==1)&&(oPot12!=OBJECT_INVALID))
{
TakeBless(OBJECT_SELF);
SetLocalInt(oPC, "blesstook", 1);
DelayCommand(oDelay, SetLocalInt(oPC, "blesstook", 0));
return;
}
if ((i3!=1)&&(s3==1)&&(oPot1==OBJECT_INVALID))
{
SendMessageToPC(oPC1, "Starbright is out of Speed potions.");
}
if ((i1!=1)&&(s1==1)&&(oPot2==OBJECT_INVALID))
{
SendMessageToPC(oPC1, "Starbright is out of Aid potions.");
}
if ((i2!=1)&&(s2==1)&&(oPot==OBJECT_INVALID))
{
SendMessageToPC(oPC1, "Starbright is out of Bull's Strength potions.");
}
if ((i4!=1)&&(s4==1)&&(oPot4==OBJECT_INVALID))
{
SendMessageToPC(oPC1, "Starbright is out of Clarity potions.");
}
if ((i5!=1)&&(s5==1)&&(oPot3==OBJECT_INVALID))
{
SendMessageToPC(oPC1, "Starbright is out of Barkskin potions.");
}
if ((i6!=1)&&(s6==1)&&(oPot5==OBJECT_INVALID))
{
SendMessageToPC(oPC1, "Starbright is out of Eagle's Splendour potions.");
}
if ((i7!=1)&&(s7==1)&&(oPot6==OBJECT_INVALID))
{
SendMessageToPC(oPC1, "Starbright is out of Endurance potions.");
}
if ((i8!=1)&&(s8==1)&&(oPot7==OBJECT_INVALID))
{
SendMessageToPC(oPC1, "Starbright is out of Cat's Grace potions.");
}
if ((i9!=1)&&(s9==1)&&(oPot8==OBJECT_INVALID))
{
SendMessageToPC(oPC1, "Starbright is out of Fox's Cunning potions.");
}
if ((i10!=1)&&(s10==1)&&(oPot9==OBJECT_INVALID))
{
SendMessageToPC(oPC1, "Starbright is out of Owl's Wisdom potions.");
}
if ((i11!=1)&&(s11==1)&&(oPot10==OBJECT_INVALID))
{
SendMessageToPC(oPC1, "Starbright is out of Ironguts potions.");
}
if ((i12!=1)&&(s12==1)&&(oPot11==OBJECT_INVALID))
{
SendMessageToPC(oPC1, "Starbright is out of Death Armor potions.");
}
if ((i13!=1)&&(s13==1)&&(oPot12==OBJECT_INVALID))
{
SendMessageToPC(oPC1, "Starbright is out of Bless potions.");
}
if ((s1!=1)&&(s2!=1)&&(s3!=1)&&(s3!=1)&&(s4!=1)&&(s5!=1)&&(s6!=1)
&&(s7!=1)&&(s8!=1)&&(s9!=1)&&(s10!=1)&&(s11!=1)&&(s12!=1)&&(s13!=1))
{
ClearAllActions();
ActionSpeakString("Please tell me which potions I should drink");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
return;
}
ClearAllActions();
ActionSpeakString("I am ready for battle! Lets take em out!");
ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY2);
}
else if ((i1==1)&&(i2==1)&&(i3==1)&&(i3==1)&&(i4==1)&&(i5==1)&&(i6==1)
&&(i7==1)&&(i8==1)&&(i9==1)&&(i10==1)&&(i11==1)&&(i12==1)&&(i13==1))
{
ClearAllActions();
ActionSpeakString("I believe I'm fully buffed! Let's go!");
ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY1);
}
}

16
_module/nss/cm_bul_0.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "bulswitch") == 0))
return FALSE;
return TRUE;
}

16
_module/nss/cm_bul_1.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "bulswitch") == 1))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "bulswitch", 0);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "bulswitch", 1);
}

View File

@@ -0,0 +1,14 @@
#include "nw_i0_generic"
int StartingConditional()
{
if (GetCurrentHitPoints(OBJECT_SELF) < GetMaxHitPoints(OBJECT_SELF))
{
if (GetItemPossessedBy(OBJECT_SELF,"NW_IT_MPOTION001") != OBJECT_INVALID
|| GetItemPossessedBy(OBJECT_SELF,"NW_IT_MPOTION002") != OBJECT_INVALID
|| GetItemPossessedBy(OBJECT_SELF,"NW_IT_MPOTION003") != OBJECT_INVALID
|| GetItemPossessedBy(OBJECT_SELF,"NW_IT_MPOTION012") != OBJECT_INVALID
|| GetItemPossessedBy(OBJECT_SELF,"NW_IT_MPOTION020") != OBJECT_INVALID)
return TRUE;
}
return FALSE;
}

16
_module/nss/cm_cat_0.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "catswitch") == 0))
return FALSE;
return TRUE;
}

16
_module/nss/cm_cat_1.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "catswitch") == 1))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "catswitch", 0);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "catswitch", 1);
}

View File

@@ -0,0 +1,6 @@
#include "cm_treat_include"
void main()
{
Char(OBJECT_SELF);
}

View File

@@ -0,0 +1,6 @@
#include "cm_treat_include"
void main()
{
CureCrit(OBJECT_SELF);
}

16
_module/nss/cm_cla_0.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "cleswitch") == 0))
return FALSE;
return TRUE;
}

16
_module/nss/cm_cla_1.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "cleswitch") == 1))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "cleswitch", 0);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "cleswitch", 1);
}

View File

@@ -0,0 +1,6 @@
#include "cm_treat_include"
void main()
{
Clarity(OBJECT_SELF);
}

View File

@@ -0,0 +1,6 @@
#include "cm_treat_include"
void main()
{
Con(OBJECT_SELF);
}

16
_module/nss/cm_dea_0.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "deaswitch") == 0))
return FALSE;
return TRUE;
}

16
_module/nss/cm_dea_1.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "deaswitch") == 1))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "deaswitch", 0);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "deaswitch", 1);
}

View File

@@ -0,0 +1,6 @@
#include "cm_treat_include"
void main()
{
DeathArmour(OBJECT_SELF);
}

View File

@@ -0,0 +1,6 @@
#include "cm_treat_include"
void main()
{
Dex(OBJECT_SELF);
}

View File

@@ -0,0 +1,5 @@
#include "x0_i0_talent"
void main()
{
TalentHealingSelf(TRUE);
}

16
_module/nss/cm_eag_0.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "eagswitch") == 0))
return FALSE;
return TRUE;
}

16
_module/nss/cm_eag_1.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "eagswitch") == 1))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "eagswitch", 0);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "eagswitch", 1);
}

16
_module/nss/cm_end_0.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "endswitch") == 0))
return FALSE;
return TRUE;
}

16
_module/nss/cm_end_1.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "endswitch") == 1))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "endswitch", 0);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "endswitch", 1);
}

View File

@@ -0,0 +1,6 @@
#include "cm_treat_include"
void main()
{
Heal(OBJECT_SELF);
}

16
_module/nss/cm_fox_0.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "foxswitch") == 0))
return FALSE;
return TRUE;
}

16
_module/nss/cm_fox_1.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "foxswitch") == 1))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "foxswitch", 0);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "foxswitch", 1);
}

View File

@@ -0,0 +1,244 @@
#include "cm_treat_include"
void TakeSpeed(object oUser)
{
object oPC=GetModule();
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION004");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion004", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_HASTE, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
}
void TakeBless(object oUser)
{
object oPC=GetModule();
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION009");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion009", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_BLESS, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
}
void TakeClear(object oUser)
{
object oPC=GetModule();
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION007");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion007", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_CLARITY, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
}
void TakeAid(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION016");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion016", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_AID, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
}
void TakeBull(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION015");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion015", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_BULLS_STRENGTH, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
}
void TakeBark(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION005");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion005", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_BARKSKIN, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
}
void TakeEag(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION010");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion010", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_EAGLE_SPLEDOR, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
}
void TakeFox(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION017");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion017", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_FOXS_CUNNING, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
}
void TakeOwl(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION018");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion018", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_OWLS_WISDOM, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
}
void TakeCat(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION014");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion014", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_CATS_GRACE, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
}
void TakeEnd(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION013");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion013", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_ENDURANCE, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
}
void TakeIron(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "X2_IT_MPOTION001");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("x2_it_mpotion001", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_IRONGUTS, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
}
void TakeDeath(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "X2_IT_MPOTION002");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("x2_it_mpotion002", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_DEATH_ARMOR, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
}
//void main () {}

View File

@@ -0,0 +1,6 @@
#include "cm_treat_include"
void main()
{
Int(OBJECT_SELF);
}

View File

@@ -0,0 +1,9 @@
#include "cm_treat_include"
void main()
{
Invisibility(OBJECT_SELF);
}

16
_module/nss/cm_iro_0.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "iroswitch") == 0))
return FALSE;
return TRUE;
}

16
_module/nss/cm_iro_1.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "iroswitch") == 1))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "iroswitch", 0);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "iroswitch", 1);
}

View File

@@ -0,0 +1,6 @@
#include "cm_treat_include"
void main()
{
IronGuts(OBJECT_SELF);
}

View File

@@ -0,0 +1,6 @@
#include "cm_treat_include"
void main()
{
CureLig(OBJECT_SELF);
}

View File

@@ -0,0 +1,6 @@
#include "cm_treat_include"
void main()
{
LesserRest(OBJECT_SELF);
}

View File

@@ -0,0 +1,6 @@
#include "cm_treat_include"
void main()
{
CureMod(OBJECT_SELF);
}

16
_module/nss/cm_owl_0.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "owlswitch") == 0))
return FALSE;
return TRUE;
}

16
_module/nss/cm_owl_1.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "owlswitch") == 1))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "owlswitch", 0);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "owlswitch", 1);
}

View File

@@ -0,0 +1,6 @@
#include "cm_treat_include"
void main()
{
CureSer(OBJECT_SELF);
}

16
_module/nss/cm_spe_0.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "speswitch") == 0))
return FALSE;
return TRUE;
}

16
_module/nss/cm_spe_1.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName aid_0
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 9:59:16 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetPCSpeaker(), "speswitch") == 1))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "speswitch", 0);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName aid_set_on
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/10/2004 10:02:24 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "speswitch", 1);
}

View File

@@ -0,0 +1,6 @@
#include "cm_treat_include"
void main()
{
Haste(OBJECT_SELF);
}

View File

@@ -0,0 +1,6 @@
#include "cm_treat_include"
void main()
{
Bullstrength(OBJECT_SELF);
}

View File

@@ -0,0 +1,36 @@
#include "cm_treat_include"
void main()
{
SetLocalInt(OBJECT_SELF, "buffing", 1);
DelayCommand(3.5, SetLocalInt(OBJECT_SELF, "buffing", 0));
CalcNegEff(OBJECT_SELF);
int nInt = GetLocalInt(OBJECT_SELF, "badeffects");
if (nInt==0)
{
ClearAllActions();
ActionSpeakString("There's nothing wrong with me right now...");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_LAUGHING, 1.0f, 2.0f);
}
else
{
if (GetItemPossessedBy(OBJECT_SELF,"NW_IT_MPOTION001") != OBJECT_INVALID
|| GetItemPossessedBy(OBJECT_SELF,"NW_IT_MPOTION006") != OBJECT_INVALID
|| GetItemPossessedBy(OBJECT_SELF,"NW_IT_MPOTION011") != OBJECT_INVALID
|| GetItemPossessedBy(OBJECT_SELF,"NW_IT_MPOTION004") != OBJECT_INVALID
|| GetItemPossessedBy(OBJECT_SELF,"greaterrest") != OBJECT_INVALID)
{
TreatSelf(OBJECT_SELF);
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any cleansing potions...");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
}

View File

@@ -0,0 +1,799 @@
// Check to see if afflicted
void CreatePotion(string ResRef, object oUser, int iStack)
{
CreateItemOnObject(ResRef, oUser, iStack);
}
void CalcNegEff(object oUser)
{
int eCount=0;
effect eBad = GetFirstEffect(oUser);//Search for negative effects
SetLocalInt(oUser, "badeffects", 0);
while(GetIsEffectValid(eBad))
{
if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS ||
GetEffectType(eBad) == EFFECT_TYPE_DEAF ||
GetEffectType(eBad) == EFFECT_TYPE_PARALYZE ||
GetEffectType(eBad) == EFFECT_TYPE_DISEASE ||
GetEffectType(eBad) == EFFECT_TYPE_POISON ||
GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL ||
GetEffectType(eBad) == EFFECT_TYPE_SLOW )
{
eCount=(eCount+1);
}
eBad = GetNextEffect(oUser);
}
SetLocalInt(oUser, "badeffects", eCount);
return;
}
// if need restoration
void Restoration(object oUser)
{
int iStack;
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION011");
object oScroll = GetItemPossessedBy(oUser, "NW_IT_SPDVSCR201");
object oScroll1 = GetItemPossessedBy(oUser, "NW_IT_SPDVSCR401");
object oScroll2 = GetItemPossessedBy(oUser, "NW_IT_SPDVSCR701");
if (oPot!= OBJECT_INVALID)
{
iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion0011", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_LESSER_RESTORATION,
oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
if (oScroll!= OBJECT_INVALID)
{
iStack = GetNumStackedItems(oScroll);
iStack--;
DestroyObject(oScroll, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_spdvscr201", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_READ);
AssignCommand(oUser, ActionCastSpellAtObject(SPELL_LESSER_RESTORATION, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
return;
}
else
if (oScroll1!= OBJECT_INVALID)
{
iStack = GetNumStackedItems(oScroll1);
iStack--;
DestroyObject(oScroll, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_spdvscr401", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_READ);
AssignCommand(oUser, ActionCastSpellAtObject(SPELL_RESTORATION, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
return;
}
else
if (oScroll2!= OBJECT_INVALID)
{
iStack = GetNumStackedItems(oScroll2);
iStack--;
DestroyObject(oScroll, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_spdvscr701", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_READ);
AssignCommand(oUser, ActionCastSpellAtObject(SPELL_GREATER_RESTORATION, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
return;
}
else
{
ClearAllActions();
ActionSpeakString("I need any Restoration potion or scroll.");
}
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
}
void Speedup(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION004");
object oScroll = GetItemPossessedBy(oUser, "NW_IT_SPDVSCR701");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion004", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_HASTE, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
if (oScroll!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oScroll);
iStack--;
DestroyObject(oScroll, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_spdvscr701", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_READ);
AssignCommand(oUser, ActionCastSpellAtObject(SPELL_GREATER_RESTORATION, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
return;
}
else
{
ClearAllActions();
ActionSpeakString("I need a Speed potion or a Greater Restoration scroll.");
}
}
void Antidote(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION006");
object oScroll = GetItemPossessedBy(oUser, "NW_IT_SPDVSCR701");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion006", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_NEUTRALIZE_POISON, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
if (oScroll!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oScroll);
iStack--;
DestroyObject(oScroll, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_spdvscr701", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_READ);
AssignCommand(oUser, ActionCastSpellAtObject(SPELL_GREATER_RESTORATION, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
return;
}
else
{
ClearAllActions();
ActionSpeakString("I need an Antedote potion.");
}
}
void GreaterRestoration(object oUser)
{
object oScroll = GetItemPossessedBy(oUser, "NW_IT_SPDVSCR701");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oScroll!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oScroll);
iStack--;
DestroyObject(oScroll, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_spdvscr701", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_READ);
AssignCommand(oUser, ActionCastSpellAtObject(SPELL_GREATER_RESTORATION, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
return;
}
else
{
ClearAllActions();
ActionSpeakString("I need a Greater Restoration Scroll .");
}
}
void Invisibility(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION008");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion008", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_INVISIBILITY, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Invisibility potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void Clarity(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION007");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion007", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_CLARITY, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Clarity potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void LesserRest(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION011");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion011", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_LESSER_RESTORATION, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Lesser Restoration potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void Anti(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION006");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion006", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_NEUTRALIZE_POISON, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Antidote potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void Haste(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION004");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion004", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_HASTE, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Speed potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void Bullstrength(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION015");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion015", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_BULLS_STRENGTH, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Bull's Strength potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void Aid(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION016");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion016", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_AID, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Aid potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void Barkskin(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION005");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion005", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_BARKSKIN, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Barkskin potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void Bless (object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION009");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion009", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_BLESS, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Bless potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void Heal(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION012");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion012", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_HEAL, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Full Heal potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void DeathArmour (object oUser)
{
object oPot = GetItemPossessedBy(oUser, "X2_IT_MPOTION002");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("x2_it_mpotion002", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_DEATH_ARMOR, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Death Armour potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void IronGuts(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "X2_IT_MPOTION001");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("x2_it_mpotion001", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_IRONGUTS, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Ironguts potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void Dex(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION014");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion014", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_CATS_GRACE, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Cat's Grace potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void Char(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION010");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion010", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_EAGLE_SPLEDOR, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Eagle's Splendour potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void Int(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION017");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion017", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_FOXS_CUNNING, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Fox's Cunning potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void Wis(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION018");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion018", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_OWLS_WISDOM, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Owl's Wisdom potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void Con(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION018");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion018", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_ENDURANCE, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Endurance potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void CureLig(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION001");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion001", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_CURE_LIGHT_WOUNDS, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Cure Light Wounds potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void CureMod(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION020");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion020", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_CURE_MODERATE_WOUNDS, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Cure Moderate Wounds potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void CureSer(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION002");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion002", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_CURE_SERIOUS_WOUNDS, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Cure Serious Wounds potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void CureCrit(object oUser)
{
object oPot = GetItemPossessedBy(oUser, "NW_IT_MPOTION003");
SetLocalInt(oUser, "buffing", 1);
DelayCommand(3.0, SetLocalInt(oUser, "buffing", 0));
if (oPot!= OBJECT_INVALID)
{
int iStack = GetNumStackedItems(oPot);
iStack--;
DestroyObject(oPot, 0.0);
if (iStack>0){DelayCommand(0.3, CreatePotion("nw_it_mpotion003", oUser, iStack));}
ClearAllActions();
ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK);
ActionCastSpellAtObject(SPELL_CURE_CRITICAL_WOUNDS, oUser, METAMAGIC_ANY, TRUE, 10, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
return;
}
else
{
ClearAllActions();
ActionSpeakString("I don't have any Cure Critical Wounds potions.");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 2.0f);
}
}
void TreatSelf(object oStar)
{
effect eBad=GetFirstEffect(oStar);
while(GetIsEffectValid(eBad))
{
if (GetEffectType(eBad) == EFFECT_TYPE_POISON ||
GetEffectType(eBad) == EFFECT_TYPE_DISEASE)
{
Antidote(oStar);
return;
}
eBad = GetNextEffect(oStar);
}
eBad=GetFirstEffect(oStar);
while(GetIsEffectValid(eBad))
{
if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE)
{
Restoration(oStar);
return;
}
eBad = GetNextEffect(oStar);
}
eBad=GetFirstEffect(oStar);
while(GetIsEffectValid(eBad))
{
if (GetEffectType(eBad) == EFFECT_TYPE_SLOW &&
GetEffectType(eBad) != EFFECT_TYPE_HASTE)
{
Speedup(oStar);
return;
}
else
{
ClearAllActions();
ActionSpeakString("There's nothing wrong with me right now...");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_LAUGHING, 1.0f, 2.0f);
return;
}
eBad = GetNextEffect(oStar);
}
eBad=GetFirstEffect(oStar);
while(GetIsEffectValid(eBad))
{
if (GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS ||
GetEffectType(eBad) == EFFECT_TYPE_DEAF ||
GetEffectType(eBad) == EFFECT_TYPE_PARALYZE ||
GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL)
{
GreaterRestoration(oStar);
return;
}
eBad = GetNextEffect(oStar);
}
}
//void main() {}

View File

@@ -0,0 +1,41 @@
void main()
{
object oPC=GetPCSpeaker();
int iGold;
int iGoldNow;
int iGoldTake;
ClearAllActions();
RemoveHenchman(oPC, OBJECT_SELF);
SetLocalString(oPC,"Henchman","");
SetLocalInt(oPC, "leave1", 1);
SetLocalInt(oPC, "back1", 0);
SetLocalInt(oPC, "a_hired", 0);
AssignCommand(OBJECT_SELF, ActionPlayAnimation(ANIMATION_FIREFORGET_SALUTE));
iGold = GetLocalInt(oPC,"RestGold");
if (iGold==GetGold(oPC))
{AssignCommand(OBJECT_SELF, ActionSpeakString("I'll be right here when you return"));}
else
{
AssignCommand(OBJECT_SELF, ActionSpeakString("I'd best take what you owe me in case you don't make it back. I'll be here when you return."));
iGoldNow = GetGold(oPC);
SetLocalInt(oPC,"RestGold",iGoldNow);
if (iGoldNow>iGold)
{
iGoldTake = (iGoldNow-iGold)/10;
SetLocalInt(oPC, "hench_deposit", iGoldTake);
if (iGoldTake>0)
{
SendMessageToPC(oPC,"Starbright takes " + IntToString(iGoldTake) + " gold pieces as her share of the spoils.");
DelayCommand(0.1f,AssignCommand(oPC,TakeGoldFromCreature(iGoldTake,oPC,TRUE)));
}
}
}
}

View File

@@ -0,0 +1,6 @@
#include "cm_treat_include"
void main()
{
Wis(OBJECT_SELF);
}

6
_module/nss/cnv_q_r1.nss Normal file
View File

@@ -0,0 +1,6 @@
#include "qst_convo"
void main()
{
AdvanceQuestConvo(1);
}

6
_module/nss/cnv_q_r2.nss Normal file
View File

@@ -0,0 +1,6 @@
#include "qst_convo"
void main()
{
AdvanceQuestConvo(2);
}

6
_module/nss/cnv_q_r3.nss Normal file
View File

@@ -0,0 +1,6 @@
#include "qst_convo"
void main()
{
AdvanceQuestConvo(3);
}

6
_module/nss/cnv_q_r4.nss Normal file
View File

@@ -0,0 +1,6 @@
#include "qst_convo"
void main()
{
AdvanceQuestConvo(4);
}

6
_module/nss/cnv_q_r5.nss Normal file
View File

@@ -0,0 +1,6 @@
#include "qst_convo"
void main()
{
AdvanceQuestConvo(5);
}

View File

@@ -0,0 +1,8 @@
void main()
{
int iQuestPoints;
iQuestPoints = GetLocalInt(GetPCSpeaker(),"QuestPoints");
SpeakString("You have " + IntToString(iQuestPoints) + " quest points available to spend.");
}

112
_module/nss/cw1_enter.nss Normal file
View File

@@ -0,0 +1,112 @@
#include "en5_spawnzone"
void GetUndeadTheme2(int iCamp);
void GetPlanarTheme(int iCamp);
void main()
{
int iLevel;
int iHeartbeat;
int iAdventure;
int iRandom;
string sZone;
object oPC;
object oWP;
oPC = GetEnteringObject();
sZone=GetLocalString(OBJECT_SELF,"Zone");
oWP=GetObjectByTag(sZone+"_INFO");
if (GetIsPC(oPC) && GetIsObjectValid(oWP) && GetLocalInt(oWP,"EN5_SpawnZone") == 0)
{
SetLocalInt(oWP,"EN5_SpawnZone",1);
//SpawnAreaCamp(sZone,iLevel,iSpawnType,iCamp,iAdventureZone);
SetLocalString(GetModule(),"SPAWN_CampType","C");
SetLocalInt(GetModule(),"MobWander",33);
SetLocalString(GetModule(),"SPAWN_Zone","CW1");
SetLocalInt(GetModule(),"SPAWN_Boss",1);
iRandom=Random(2)+1;
if (iRandom==1)
{
GetUndeadTheme2(1);
GetUndeadTheme2(2);
SetLocalInt(GetModule(),"SPAWN_Boss",3);
GetUndeadTheme2(3);
} else {
GetPlanarTheme(1);
GetPlanarTheme(2);
SetLocalInt(GetModule(),"SPAWN_Boss",3);
GetPlanarTheme(3);
}
SetLocalInt(GetModule(),"SPAWN_Boss",0);
SetLocalInt(GetModule(),"MobWander",50);
SpawnEncounters(oWP,0);
SetLocalInt(GetModule(),"MobWander",0);
CreateTraps("CW1",8,11);
LockDoorsAndChests("CW1",8,11);
}
}
void GetUndeadTheme2(int iCamp)
{
int iLevel;
int iRandom;
SetLocalInt(GetModule(),"SPAWN_Camp",iCamp);
if (iCamp==1)
iLevel=Random(2)+8;
else
iLevel=Random(3)+9;
if (iCamp<3)
iRandom=Random(3)+1;
else
iRandom=Random(3)+2;
if (iRandom==1)
GetShade(iLevel);
if (iRandom==2)
GetUndead(iLevel);
if (iRandom==3)
GetNecromancers(iLevel);
if (iRandom==4)
GetVampire(iLevel);
}
void GetPlanarTheme(int iCamp)
{
int iLevel;
int iRandom;
SetLocalInt(GetModule(),"SPAWN_Camp",iCamp);
if (iCamp==1)
iLevel=Random(2)+8;
else
iLevel=Random(3)+9;
if (iCamp<3)
iRandom=Random(4)+1;
else
iRandom=Random(4)+2;
if (iRandom==1)
GetOutsiders(iLevel);
if (iRandom==2)
GetFeyri(iLevel);
if (iRandom==3)
GetCultist(iLevel);
if (iRandom==4)
GetTiefling(iLevel);
if (iRandom==5)
GetRakasha(iLevel);
}

17
_module/nss/cw1_ft.nss Normal file
View File

@@ -0,0 +1,17 @@
void main()
{
object oPC;
effect eVis;
effect eDam;
oPC=GetEnteringObject();
if (GetIsPC(oPC) && GetLocalInt(OBJECT_SELF,"Active") == 1)
{
eVis = EffectVisualEffect(VFX_COM_HIT_FIRE);
DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oPC),3.0));
eDam = EffectDamage(d6(2), DAMAGE_TYPE_FIRE);
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oPC));
}
}

24
_module/nss/dm_oncnv.nss Normal file
View File

@@ -0,0 +1,24 @@
void main()
{
int nMatch = GetListenPatternNumber();
object oShouter = GetLastSpeaker();
object oIntruder;
if (nMatch == -1 && GetCommandable(OBJECT_SELF))
{
ClearAllActions();
BeginConversation();
}
else
if(nMatch == 777 && GetIsObjectValid(oShouter) && GetIsPC(oShouter))
// && GetIsFriend(oShouter)
{
if (oShouter == GetLocalObject(OBJECT_SELF, "Customer")) {
string sSaid = GetMatchedSubstring(0);
SetLocalString(OBJECT_SELF, "Stack", sSaid);
}
}
if (GetIsPC(GetLastSpeaker()))
SetLocalString(OBJECT_SELF, "Stack", GetMatchedSubstring(0));
// SendMessageToPC(GetFirstPC(),"Test = " + GetMatchedSubstring(0));
}

315
_module/nss/dm_onspwn.nss Normal file
View File

@@ -0,0 +1,315 @@
//:://////////////////////////////////////////////////
//:: NW_C2_DEFAULT9
/*
* Default OnSpawn handler with XP1 revisions.
* This corresponds to and produces the same results
* as the default OnSpawn handler in the OC.
*
* This can be used to customize creature behavior in three main ways:
*
* - Uncomment the existing lines of code to activate certain
* common desired behaviors from the moment when the creature
* spawns in.
*
* - Uncomment the user-defined event signals to cause the
* creature to fire events that you can then handle with
* a custom OnUserDefined event handler script.
*
* - Add new code _at the end_ to alter the initial
* behavior in a more customized way.
*/
//:://////////////////////////////////////////////////
//:: Copyright (c) 2002 Floodgate Entertainment
//:: Created By: Naomi Novik
//:: Created On: 12/11/2002
//:://////////////////////////////////////////////////
//:: Updated 2003-08-20 Georg Zoeller: Added check for variables to active spawn in conditions without changing the spawnscript
#include "x0_i0_anims"
// #include "x0_i0_walkway" - in x0_i0_anims
#include "x0_i0_treasure"
#include "x2_inc_switches"
void main()
{
// ***** Spawn-In Conditions ***** //
// * REMOVE COMMENTS (// ) before the "Set..." functions to activate
// * them. Do NOT touch lines commented out with // *, those are
// * real comments for information.
// * This causes the creature to say a one-line greeting in their
// * conversation file upon perceiving the player. Put [NW_D2_GenCheck]
// * in the "Text Seen When" field of the greeting in the conversation
// * file. Don't attach any player responses.
// *
// SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
// * Same as above, but for hostile creatures to make them say
// * a line before attacking.
// *
// SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
// * This NPC will attack when its allies call for help
// *
// SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
// * If the NPC has the Hide skill they will go into stealth mode
// * while doing WalkWayPoints().
// *
//SetSpawnInCondition(NW_FLAG_STEALTH);
//--------------------------------------------------------------------------
// Enable stealth mode by setting a variable on the creature
// Great for ambushes
// See x2_inc_switches for more information about this
//--------------------------------------------------------------------------
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_STEALTH) == TRUE)
{
SetSpawnInCondition(NW_FLAG_STEALTH);
}
// * Same, but for Search mode
// *
// SetSpawnInCondition(NW_FLAG_SEARCH);
//--------------------------------------------------------------------------
// Make creature enter search mode after spawning by setting a variable
// Great for guards, etc
// See x2_inc_switches for more information about this
//--------------------------------------------------------------------------
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_SEARCH) == TRUE)
{
SetSpawnInCondition(NW_FLAG_SEARCH);
}
// * This will set the NPC to give a warning to non-enemies
// * before attacking.
// * NN -- no clue what this really does yet
// *
// SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
// * Separate the NPC's waypoints into day & night.
// * See comment on WalkWayPoints() for use.
// *
// SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING);
// * If this is set, the NPC will appear using the "EffectAppear"
// * animation instead of fading in, *IF* SetListeningPatterns()
// * is called below.
// *
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
// * This will cause an NPC to use common animations it possesses,
// * and use social ones to any other nearby friendly NPCs.
// *
// SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
//--------------------------------------------------------------------------
// Enable immobile ambient animations by setting a variable
// See x2_inc_switches for more information about this
//--------------------------------------------------------------------------
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_AMBIENT_IMMOBILE) == TRUE)
{
SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
}
// * Same as above, except NPC will wander randomly around the
// * area.
// *
// SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
//--------------------------------------------------------------------------
// Enable mobile ambient animations by setting a variable
// See x2_inc_switches for more information about this
//--------------------------------------------------------------------------
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_AMBIENT) == TRUE)
{
SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
}
// **** Animation Conditions **** //
// * These are extra conditions you can put on creatures with ambient
// * animations.
// * Civilized creatures interact with placeables in
// * their area that have the tag "NW_INTERACTIVE"
// * and "talk" to each other.
// *
// * Humanoid races are civilized by default, so only
// * set this flag for monster races that you want to
// * behave the same way.
// SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED);
// * If this flag is set, this creature will constantly
// * be acting. Otherwise, creatures will only start
// * performing their ambient animations when they
// * first perceive a player, and they will stop when
// * the player moves away.
// SetAnimationCondition(NW_ANIM_FLAG_CONSTANT);
// * Civilized creatures with this flag set will
// * randomly use a few voicechats. It's a good
// * idea to avoid putting this on multiple
// * creatures using the same voiceset.
// SetAnimationCondition(NW_ANIM_FLAG_CHATTER);
// * Creatures with _immobile_ ambient animations
// * can have this flag set to make them mobile in a
// * close range. They will never leave their immediate
// * area, but will move around in it, frequently
// * returning to their starting point.
// *
// * Note that creatures spawned inside interior areas
// * that contain a waypoint with one of the tags
// * "NW_HOME", "NW_TAVERN", "NW_SHOP" will automatically
// * have this condition set.
// SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE);
// **** Special Combat Tactics *****//
// * These are special flags that can be set on creatures to
// * make them follow certain specialized combat tactics.
// * NOTE: ONLY ONE OF THESE SHOULD BE SET ON A SINGLE CREATURE.
// * Ranged attacker
// * Will attempt to stay at ranged distance from their
// * target.
// SetCombatCondition(X0_COMBAT_FLAG_RANGED);
// * Defensive attacker
// * Will use defensive combat feats and parry
// SetCombatCondition(X0_COMBAT_FLAG_DEFENSIVE);
// * Ambusher
// * Will go stealthy/invisible and attack, then
// * run away and try to go stealthy again before
// * attacking anew.
// SetCombatCondition(X0_COMBAT_FLAG_AMBUSHER);
// * Cowardly
// * Cowardly creatures will attempt to flee
// * attackers.
// SetCombatCondition(X0_COMBAT_FLAG_COWARDLY);
// **** Escape Commands ***** //
// * NOTE: ONLY ONE OF THE FOLLOWING SHOULD EVER BE SET AT ONE TIME.
// * NOTE2: Not clear that these actually work. -- NN
// * Flee to a way point and return a short time later.
// *
// SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN);
// * Flee to a way point and do not return.
// *
// SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE);
// * Teleport to safety and do not return.
// *
// SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE);
// * Teleport to safety and return a short time later.
// *
// SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN);
// ***** CUSTOM USER DEFINED EVENTS ***** /
/*
If you uncomment any of these conditions, the creature will fire
a specific user-defined event number on each event. That will then
allow you to write custom code in the "OnUserDefinedEvent" handler
script to go on top of the default NPC behaviors for that event.
Example: I want to add some custom behavior to my NPC when they
are damaged. I uncomment the "NW_FLAG_DAMAGED_EVENT", then create
a new user-defined script that has something like this in it:
if (GetUserDefinedEventNumber() == 1006) {
// Custom code for my NPC to execute when it's damaged
}
These user-defined events are in the range 1001-1007.
*/
// * Fire User Defined Event 1001 in the OnHeartbeat
// *
// SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT);
// * Fire User Defined Event 1002
// *
// SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT);
// * Fire User Defined Event 1005
// *
// SetSpawnInCondition(NW_FLAG_ATTACK_EVENT);
// * Fire User Defined Event 1006
// *
// SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT);
// * Fire User Defined Event 1008
// *
// SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT);
// * Fire User Defined Event 1003
// *
// SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT);
// * Fire User Defined Event 1004
// *
// SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT);
// ***** DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) ***** //
// * Goes through and sets up which shouts the NPC will listen to.
// *
SetListeningPatterns();
SetListenPattern(OBJECT_SELF, "**", 777); //listen to all text
SetListening(OBJECT_SELF, TRUE); //be sure NPC is listening
// * Walk among a set of waypoints.
// * 1. Find waypoints with the tag "WP_" + NPC TAG + "_##" and walk
// * among them in order.
// * 2. If the tag of the Way Point is "POST_" + NPC TAG, stay there
// * and return to it after combat.
//
// * Optional Parameters:
// * void WalkWayPoints(int nRun = FALSE, float fPause = 1.0)
//
// * If "NW_FLAG_DAY_NIGHT_POSTING" is set above, you can also
// * create waypoints with the tags "WN_" + NPC Tag + "_##"
// * and those will be walked at night. (The standard waypoints
// * will be walked during the day.)
// * The night "posting" waypoint tag is simply "NIGHT_" + NPC tag.
WalkWayPoints();
//* Create a small amount of treasure on the creature
/*
if ((GetLocalInt(GetModule(), "X2_L_NOTREASURE") == FALSE) &&
(GetLocalInt(OBJECT_SELF, "X2_L_NOTREASURE") == FALSE) )
{
CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF);
}
*/
// ***** ADD ANY SPECIAL ON-SPAWN CODE HERE ***** //
// * If Incorporeal, apply changes
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_IS_INCORPOREAL) == TRUE)
{
effect eConceal = EffectConcealment(50, MISS_CHANCE_TYPE_NORMAL);
eConceal = ExtraordinaryEffect(eConceal);
effect eGhost = EffectCutsceneGhost();
eGhost = ExtraordinaryEffect(eGhost);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eConceal, OBJECT_SELF);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGhost, OBJECT_SELF);
}
//DelayCommand(2.0f,ExecuteScript("en5_onspawn",OBJECT_SELF));
}

View File

@@ -0,0 +1,57 @@
#include "en5_misc"
int StartingConditional()
{
int iResult;
int iRandom;
string sText;
string sAccomplishment;
iResult = FALSE;
if (GetLocalInt(OBJECT_SELF,"Talk") == 0)
{
iRandom = Random(5)+1;
switch (iRandom)
{
case 1: sText = "What ya want?"; break;
case 2: sText = "What ya need?"; break;
case 3: sText = "What can I do for ya?"; break;
case 4: sText = "How can I help you?"; break;
case 5: sText = "Is there something you need?"; break;
}
sAccomplishment = GetLocalString(GetPCSpeaker(),GetMyZone()+ "_Accomplishment");
if (sAccomplishment != "" && GetLocalInt(OBJECT_SELF,"Brag") == 0 && Random(3)==0)
{
sText = "I heard you " + sAccomplishment + ". You have my thanks. How can I help you?";
SetLocalInt(OBJECT_SELF,"Brag",1);
}
SetCustomToken(401,sText);
SetLocalString(OBJECT_SELF,"Talk1",sText);
iRandom = Random(8)+1;
switch (iRandom)
{
case 1: sText = "Not much to tell. We live. We eat. We come in here and drink, har har."; break;
case 2: sText = "I saw a giant beetle in the forest yesterday. Darned thing was as big as a wolf."; break;
case 3: sText = "The woodland creatures seem unusually quiet here of late."; break;
case 4: sText = "Things sure are dangerous here lately."; break;
case 5: sText = "Used to be that you could come in here and get something to eat without a bunch of adventurer's bothering you."; break;
case 6: sText = "All the hunters were tracking some strange creature in the forest earlier this morning."; break;
case 7: sText = "My cousin in Nova said that the merchants were too scared to travel through Evari these days."; break;
case 8: sText = "The ale here isn't as fine as you'd find in a city, but it's smooth and good."; break;
}
if (sAccomplishment != "" && GetLocalInt(OBJECT_SELF,"Brag") == 0 && Random(5)==0)
{
sText = "Not much to tell, but I did hear you " + sAccomplishment + ". You have my thanks.";
SetLocalInt(OBJECT_SELF,"Brag",1);
}
SetCustomToken(402,sText);
SetLocalString(OBJECT_SELF,"Talk2",sText);
SetLocalInt(OBJECT_SELF,"Talk",1);
} else {
SetCustomToken(401,GetLocalString(OBJECT_SELF,"Talk1"));
SetCustomToken(402,GetLocalString(OBJECT_SELF,"Talk2"));
}
return iResult;
}

View File

@@ -0,0 +1,342 @@
//:://////////////////////////////////////////////////
//:: NW_C2_DEFAULT9
/*
* Default OnSpawn handler with XP1 revisions.
* This corresponds to and produces the same results
* as the default OnSpawn handler in the OC.
*
* This can be used to customize creature behavior in three main ways:
*
* - Uncomment the existing lines of code to activate certain
* common desired behaviors from the moment when the creature
* spawns in.
*
* - Uncomment the user-defined event signals to cause the
* creature to fire events that you can then handle with
* a custom OnUserDefined event handler script.
*
* - Add new code _at the end_ to alter the initial
* behavior in a more customized way.
*/
//:://////////////////////////////////////////////////
//:: Copyright (c) 2002 Floodgate Entertainment
//:: Created By: Naomi Novik
//:: Created On: 12/11/2002
//:://////////////////////////////////////////////////
//:: Updated 2003-08-20 Georg Zoeller: Added check for variables to active spawn in conditions without changing the spawnscript
#include "x0_i0_anims"
// #include "x0_i0_walkway" - in x0_i0_anims
#include "x0_i0_treasure"
#include "x2_inc_switches"
#include "rd_treasure"
void main()
{
// ***** Spawn-In Conditions ***** //
// * REMOVE COMMENTS (// ) before the "Set..." functions to activate
// * them. Do NOT touch lines commented out with // *, those are
// * real comments for information.
// * This causes the creature to say a one-line greeting in their
// * conversation file upon perceiving the player. Put [NW_D2_GenCheck]
// * in the "Text Seen When" field of the greeting in the conversation
// * file. Don't attach any player responses.
// *
SetSpawnInCondition(NW_FLAG_FAST_BUFF_ENEMY);
SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
// * Same as above, but for hostile creatures to make them say
// * a line before attacking.
// *
SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
// * This NPC will attack when its allies call for help
// *
// SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
// * If the NPC has the Hide skill they will go into stealth mode
// * while doing WalkWayPoints().
// *
// SetSpawnInCondition(NW_FLAG_STEALTH);
//--------------------------------------------------------------------------
// Enable stealth mode by setting a variable on the creature
// Great for ambushes
// See x2_inc_switches for more information about this
//--------------------------------------------------------------------------
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_STEALTH) == TRUE)
{
SetSpawnInCondition(NW_FLAG_STEALTH);
}
// * Same, but for Search mode
// *
// SetSpawnInCondition(NW_FLAG_SEARCH);
//--------------------------------------------------------------------------
// Make creature enter search mode after spawning by setting a variable
// Great for guards, etc
// See x2_inc_switches for more information about this
//--------------------------------------------------------------------------
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_SEARCH) == TRUE)
{
SetSpawnInCondition(NW_FLAG_SEARCH);
}
// * This will set the NPC to give a warning to non-enemies
// * before attacking.
// * NN -- no clue what this really does yet
// *
// SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
// * Separate the NPC's waypoints into day & night.
// * See comment on WalkWayPoints() for use.
// *
// SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING);
// * If this is set, the NPC will appear using the "EffectAppear"
// * animation instead of fading in, *IF* SetListeningPatterns()
// * is called below.
// *
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
// * This will cause an NPC to use common animations it possesses,
// * and use social ones to any other nearby friendly NPCs.
// *
// SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
//--------------------------------------------------------------------------
// Enable immobile ambient animations by setting a variable
// See x2_inc_switches for more information about this
//--------------------------------------------------------------------------
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_AMBIENT_IMMOBILE) == TRUE)
{
SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
}
// * Same as above, except NPC will wander randomly around the
// * area.
// *
// SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
//--------------------------------------------------------------------------
// Enable mobile ambient animations by setting a variable
// See x2_inc_switches for more information about this
//--------------------------------------------------------------------------
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_AMBIENT) == TRUE)
{
SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
}
// **** Animation Conditions **** //
// * These are extra conditions you can put on creatures with ambient
// * animations.
// * Civilized creatures interact with placeables in
// * their area that have the tag "NW_INTERACTIVE"
// * and "talk" to each other.
// *
// * Humanoid races are civilized by default, so only
// * set this flag for monster races that you want to
// * behave the same way.
// SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED);
// * If this flag is set, this creature will constantly
// * be acting. Otherwise, creatures will only start
// * performing their ambient animations when they
// * first perceive a player, and they will stop when
// * the player moves away.
// SetAnimationCondition(NW_ANIM_FLAG_CONSTANT);
// * Civilized creatures with this flag set will
// * randomly use a few voicechats. It's a good
// * idea to avoid putting this on multiple
// * creatures using the same voiceset.
SetAnimationCondition(NW_ANIM_FLAG_CHATTER);
// * Creatures with _immobile_ ambient animations
// * can have this flag set to make them mobile in a
// * close range. They will never leave their immediate
// * area, but will move around in it, frequently
// * returning to their starting point.
// *
// * Note that creatures spawned inside interior areas
// * that contain a waypoint with one of the tags
// * "NW_HOME", "NW_TAVERN", "NW_SHOP" will automatically
// * have this condition set.
// SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE);
// **** Special Combat Tactics *****//
// * These are special flags that can be set on creatures to
// * make them follow certain specialized combat tactics.
// * NOTE: ONLY ONE OF THESE SHOULD BE SET ON A SINGLE CREATURE.
// * Ranged attacker
// * Will attempt to stay at ranged distance from their
// * target.
// SetCombatCondition(X0_COMBAT_FLAG_RANGED);
// * Defensive attacker
// * Will use defensive combat feats and parry
// SetCombatCondition(X0_COMBAT_FLAG_DEFENSIVE);
// * Ambusher
// * Will go stealthy/invisible and attack, then
// * run away and try to go stealthy again before
// * attacking anew.
// SetCombatCondition(X0_COMBAT_FLAG_AMBUSHER);
// * Cowardly
// * Cowardly creatures will attempt to flee
// * attackers.
// SetCombatCondition(X0_COMBAT_FLAG_COWARDLY);
// **** Escape Commands ***** //
// * NOTE: ONLY ONE OF THE FOLLOWING SHOULD EVER BE SET AT ONE TIME.
// * NOTE2: Not clear that these actually work. -- NN
// * Flee to a way point and return a short time later.
// *
// SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN);
// * Flee to a way point and do not return.
// *
// SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE);
// * Teleport to safety and do not return.
// *
// SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE);
// * Teleport to safety and return a short time later.
// *
// SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN);
// ***** CUSTOM USER DEFINED EVENTS ***** /
/*
If you uncomment any of these conditions, the creature will fire
a specific user-defined event number on each event. That will then
allow you to write custom code in the "OnUserDefinedEvent" handler
script to go on top of the default NPC behaviors for that event.
Example: I want to add some custom behavior to my NPC when they
are damaged. I uncomment the "NW_FLAG_DAMAGED_EVENT", then create
a new user-defined script that has something like this in it:
if (GetUserDefinedEventNumber() == 1006) {
// Custom code for my NPC to execute when it's damaged
}
These user-defined events are in the range 1001-1007.
*/
// * Fire User Defined Event 1001 in the OnHeartbeat
// *
// SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT);
// * Fire User Defined Event 1002
// *
// SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT);
// * Fire User Defined Event 1005
// *
// SetSpawnInCondition(NW_FLAG_ATTACK_EVENT);
// * Fire User Defined Event 1006
// *
// SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT);
// * Fire User Defined Event 1008
// *
// SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT);
// * Fire User Defined Event 1003
// *
// SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT);
// * Fire User Defined Event 1004
// *
// SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT);
// ***** DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) ***** //
// * Goes through and sets up which shouts the NPC will listen to.
// *
SetListeningPatterns();
// * Walk among a set of waypoints.
// * 1. Find waypoints with the tag "WP_" + NPC TAG + "_##" and walk
// * among them in order.
// * 2. If the tag of the Way Point is "POST_" + NPC TAG, stay there
// * and return to it after combat.
//
// * Optional Parameters:
// * void WalkWayPoints(int nRun = FALSE, float fPause = 1.0)
//
// * If "NW_FLAG_DAY_NIGHT_POSTING" is set above, you can also
// * create waypoints with the tags "WN_" + NPC Tag + "_##"
// * and those will be walked at night. (The standard waypoints
// * will be walked during the day.)
// * The night "posting" waypoint tag is simply "NIGHT_" + NPC tag.
//WalkWayPoints();
//* Create a small amount of treasure on the creature
if ((GetLocalInt(GetModule(), "X2_L_NOTREASURE") == FALSE) &&
(GetLocalInt(OBJECT_SELF, "X2_L_NOTREASURE") == FALSE) )
{
CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF);
}
// ***** ADD ANY SPECIAL ON-SPAWN CODE HERE ***** //
// * If Incorporeal, apply changes
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_IS_INCORPOREAL) == TRUE)
{
effect eConceal = EffectConcealment(50, MISS_CHANCE_TYPE_NORMAL);
eConceal = ExtraordinaryEffect(eConceal);
effect eGhost = EffectCutsceneGhost();
eGhost = ExtraordinaryEffect(eGhost);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eConceal, OBJECT_SELF);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGhost, OBJECT_SELF);
}
int iChance;
int iRandom;
//iChance = GetHitDice(OBJECT_SELF)*2 + 50;
//iRandom = Random(100);
if (GetHitDice(OBJECT_SELF) < 6)
{
iRandom = Random(100);
if (iRandom<50)
GetMinorMagicItem(OBJECT_SELF);
else if (iRandom<99)
GetMagicItem(OBJECT_SELF);
else
GetArtifact(OBJECT_SELF);
}
else
{
iRandom = Random(100);
if (iRandom<10)
GetMinorMagicItem(OBJECT_SELF);
else if (iRandom<97)
GetMagicItem(OBJECT_SELF);
else
GetArtifact(OBJECT_SELF);
}
}

View File

@@ -0,0 +1,314 @@
//:://////////////////////////////////////////////////
//:: NW_C2_DEFAULT9
/*
* Default OnSpawn handler with XP1 revisions.
* This corresponds to and produces the same results
* as the default OnSpawn handler in the OC.
*
* This can be used to customize creature behavior in three main ways:
*
* - Uncomment the existing lines of code to activate certain
* common desired behaviors from the moment when the creature
* spawns in.
*
* - Uncomment the user-defined event signals to cause the
* creature to fire events that you can then handle with
* a custom OnUserDefined event handler script.
*
* - Add new code _at the end_ to alter the initial
* behavior in a more customized way.
*/
//:://////////////////////////////////////////////////
//:: Copyright (c) 2002 Floodgate Entertainment
//:: Created By: Naomi Novik
//:: Created On: 12/11/2002
//:://////////////////////////////////////////////////
//:: Updated 2003-08-20 Georg Zoeller: Added check for variables to active spawn in conditions without changing the spawnscript
#include "x0_i0_anims"
// #include "x0_i0_walkway" - in x0_i0_anims
#include "x0_i0_treasure"
#include "x2_inc_switches"
void main()
{
SetSpawnInCondition(NW_FLAG_FAST_BUFF_ENEMY);
// ***** Spawn-In Conditions ***** //
// * REMOVE COMMENTS (// ) before the "Set..." functions to activate
// * them. Do NOT touch lines commented out with // *, those are
// * real comments for information.
// * This causes the creature to say a one-line greeting in their
// * conversation file upon perceiving the player. Put [NW_D2_GenCheck]
// * in the "Text Seen When" field of the greeting in the conversation
// * file. Don't attach any player responses.
// *
// SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
// * Same as above, but for hostile creatures to make them say
// * a line before attacking.
// *
// SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
// * This NPC will attack when its allies call for help
// *
// SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
// * If the NPC has the Hide skill they will go into stealth mode
// * while doing WalkWayPoints().
// *
// SetSpawnInCondition(NW_FLAG_STEALTH);
//--------------------------------------------------------------------------
// Enable stealth mode by setting a variable on the creature
// Great for ambushes
// See x2_inc_switches for more information about this
//--------------------------------------------------------------------------
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_STEALTH) == TRUE)
{
SetSpawnInCondition(NW_FLAG_STEALTH);
}
// * Same, but for Search mode
// *
// SetSpawnInCondition(NW_FLAG_SEARCH);
//--------------------------------------------------------------------------
// Make creature enter search mode after spawning by setting a variable
// Great for guards, etc
// See x2_inc_switches for more information about this
//--------------------------------------------------------------------------
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_SEARCH) == TRUE)
{
SetSpawnInCondition(NW_FLAG_SEARCH);
}
// * This will set the NPC to give a warning to non-enemies
// * before attacking.
// * NN -- no clue what this really does yet
// *
// SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
// * Separate the NPC's waypoints into day & night.
// * See comment on WalkWayPoints() for use.
// *
// SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING);
// * If this is set, the NPC will appear using the "EffectAppear"
// * animation instead of fading in, *IF* SetListeningPatterns()
// * is called below.
// *
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
// * This will cause an NPC to use common animations it possesses,
// * and use social ones to any other nearby friendly NPCs.
// *
// SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
//--------------------------------------------------------------------------
// Enable immobile ambient animations by setting a variable
// See x2_inc_switches for more information about this
//--------------------------------------------------------------------------
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_AMBIENT_IMMOBILE) == TRUE)
{
SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
}
// * Same as above, except NPC will wander randomly around the
// * area.
// *
// SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
//--------------------------------------------------------------------------
// Enable mobile ambient animations by setting a variable
// See x2_inc_switches for more information about this
//--------------------------------------------------------------------------
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_AMBIENT) == TRUE)
{
SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
}
// **** Animation Conditions **** //
// * These are extra conditions you can put on creatures with ambient
// * animations.
// * Civilized creatures interact with placeables in
// * their area that have the tag "NW_INTERACTIVE"
// * and "talk" to each other.
// *
// * Humanoid races are civilized by default, so only
// * set this flag for monster races that you want to
// * behave the same way.
// SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED);
// * If this flag is set, this creature will constantly
// * be acting. Otherwise, creatures will only start
// * performing their ambient animations when they
// * first perceive a player, and they will stop when
// * the player moves away.
// SetAnimationCondition(NW_ANIM_FLAG_CONSTANT);
// * Civilized creatures with this flag set will
// * randomly use a few voicechats. It's a good
// * idea to avoid putting this on multiple
// * creatures using the same voiceset.
// SetAnimationCondition(NW_ANIM_FLAG_CHATTER);
// * Creatures with _immobile_ ambient animations
// * can have this flag set to make them mobile in a
// * close range. They will never leave their immediate
// * area, but will move around in it, frequently
// * returning to their starting point.
// *
// * Note that creatures spawned inside interior areas
// * that contain a waypoint with one of the tags
// * "NW_HOME", "NW_TAVERN", "NW_SHOP" will automatically
// * have this condition set.
// SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE);
// **** Special Combat Tactics *****//
// * These are special flags that can be set on creatures to
// * make them follow certain specialized combat tactics.
// * NOTE: ONLY ONE OF THESE SHOULD BE SET ON A SINGLE CREATURE.
// * Ranged attacker
// * Will attempt to stay at ranged distance from their
// * target.
// SetCombatCondition(X0_COMBAT_FLAG_RANGED);
// * Defensive attacker
// * Will use defensive combat feats and parry
// SetCombatCondition(X0_COMBAT_FLAG_DEFENSIVE);
// * Ambusher
// * Will go stealthy/invisible and attack, then
// * run away and try to go stealthy again before
// * attacking anew.
// SetCombatCondition(X0_COMBAT_FLAG_AMBUSHER);
// * Cowardly
// * Cowardly creatures will attempt to flee
// * attackers.
// SetCombatCondition(X0_COMBAT_FLAG_COWARDLY);
// **** Escape Commands ***** //
// * NOTE: ONLY ONE OF THE FOLLOWING SHOULD EVER BE SET AT ONE TIME.
// * NOTE2: Not clear that these actually work. -- NN
// * Flee to a way point and return a short time later.
// *
// SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN);
// * Flee to a way point and do not return.
// *
// SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE);
// * Teleport to safety and do not return.
// *
// SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE);
// * Teleport to safety and return a short time later.
// *
// SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN);
// ***** CUSTOM USER DEFINED EVENTS ***** /
/*
If you uncomment any of these conditions, the creature will fire
a specific user-defined event number on each event. That will then
allow you to write custom code in the "OnUserDefinedEvent" handler
script to go on top of the default NPC behaviors for that event.
Example: I want to add some custom behavior to my NPC when they
are damaged. I uncomment the "NW_FLAG_DAMAGED_EVENT", then create
a new user-defined script that has something like this in it:
if (GetUserDefinedEventNumber() == 1006) {
// Custom code for my NPC to execute when it's damaged
}
These user-defined events are in the range 1001-1007.
*/
// * Fire User Defined Event 1001 in the OnHeartbeat
// *
// SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT);
// * Fire User Defined Event 1002
// *
// SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT);
// * Fire User Defined Event 1005
// *
// SetSpawnInCondition(NW_FLAG_ATTACK_EVENT);
// * Fire User Defined Event 1006
// *
// SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT);
// * Fire User Defined Event 1008
// *
// SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT);
// * Fire User Defined Event 1003
// *
// SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT);
// * Fire User Defined Event 1004
// *
// SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT);
// ***** DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) ***** //
// * Goes through and sets up which shouts the NPC will listen to.
// *
SetListeningPatterns();
// * Walk among a set of waypoints.
// * 1. Find waypoints with the tag "WP_" + NPC TAG + "_##" and walk
// * among them in order.
// * 2. If the tag of the Way Point is "POST_" + NPC TAG, stay there
// * and return to it after combat.
//
// * Optional Parameters:
// * void WalkWayPoints(int nRun = FALSE, float fPause = 1.0)
//
// * If "NW_FLAG_DAY_NIGHT_POSTING" is set above, you can also
// * create waypoints with the tags "WN_" + NPC Tag + "_##"
// * and those will be walked at night. (The standard waypoints
// * will be walked during the day.)
// * The night "posting" waypoint tag is simply "NIGHT_" + NPC tag.
WalkWayPoints();
//* Create a small amount of treasure on the creature
if ((GetLocalInt(GetModule(), "X2_L_NOTREASURE") == FALSE) &&
(GetLocalInt(OBJECT_SELF, "X2_L_NOTREASURE") == FALSE) )
{
CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF);
}
// ***** ADD ANY SPECIAL ON-SPAWN CODE HERE ***** //
// * If Incorporeal, apply changes
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_IS_INCORPOREAL) == TRUE)
{
effect eConceal = EffectConcealment(50, MISS_CHANCE_TYPE_NORMAL);
eConceal = ExtraordinaryEffect(eConceal);
effect eGhost = EffectCutsceneGhost();
eGhost = ExtraordinaryEffect(eGhost);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eConceal, OBJECT_SELF);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGhost, OBJECT_SELF);
}
}

Some files were not shown because too many files have changed in this diff Show More