Major update
Fixed CCOH, Fixed starting GP, Fixed DMFI languages, Fix cep weapon appearances, Fixed new player start up system. Added PC deleter. Added ACP 4.1. Full compile. Updated release archive.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
//Copyright (c) 2002 by Coldblade
|
||||
//V2.0.0
|
||||
//-------------------------------------------------
|
||||
//This is also in the Client Enter, to setup the varriables for first level untill
|
||||
//This is also in the Client Enter, to setup the variables for first level until
|
||||
//the player levelup atleast onice in the game. This is for the half-dragon, as we know
|
||||
//the half-dragon increase the player hitdice, aka a thief with d6 would become d8
|
||||
//to a maxminum of d12. so that means barbarns are out. This version has quite a
|
||||
|
@@ -26,7 +26,7 @@ int hitdicebonus(object cbObject)
|
||||
int cbOld1 = GetLocalInt(cbObject, "CB_OLD1");
|
||||
int cbOld2 = GetLocalInt(cbObject, "CB_OLD2");
|
||||
int cbOld3 = GetLocalInt(cbObject, "CB_OLD3");
|
||||
int cbNew1 = d2(GetLevelByPosition(1, cbObject));
|
||||
int cbNew1 = d2(GetLevelByPosition(1, cbObject)); //:: I'm not going to encourage this stupidity.
|
||||
int cbNew2 = d2(GetLevelByPosition(2, cbObject));
|
||||
int cbNew3 = d2(GetLevelByPosition(3, cbObject));
|
||||
int cbClass1 = GetClassByPosition(1, cbObject);
|
||||
@@ -34,7 +34,7 @@ int hitdicebonus(object cbObject)
|
||||
int cbClass3 = GetClassByPosition(3, cbObject);
|
||||
|
||||
//Due to the random nature of the randomizer and dice roll i'm going to setup
|
||||
//a while that won't quit untill the new hitdice bonus is higher than the old
|
||||
//a while that won't quit untill the new hitdice bonus is higher than the old
|
||||
//by at minum 1 hp. Also check to make sure there's atleast one level in that
|
||||
//class slot, if its zero then don't do it cos well it would just get stuck
|
||||
//in a infine loop, not good!
|
||||
|
@@ -1,6 +1,5 @@
|
||||
//#include "_persist_01a"
|
||||
#include "nw_i0_plot"
|
||||
#include "aps_include"
|
||||
|
||||
void GetNextItemPossessedBy(object oPC, string sItemTag);
|
||||
object CreatePlaceable(string sObject, location lPlace, float fDuration);
|
||||
@@ -28,13 +27,7 @@ void main()
|
||||
string sOldTag = sItemTag;
|
||||
//int iAlchemyChance = GetTokenPair(oPC,14,12);
|
||||
//int iAlchemySkill = iAlchemyChance;
|
||||
|
||||
//Stores on NWN database
|
||||
//int iAlchemySkill = GetCampaignInt("UOACraft","iAlchemySkill",oPC);
|
||||
|
||||
//Stores on external database (defined in NWNX.ini)
|
||||
int iAlchemySkill = GetPersistentInt(oPC,"iAlchemySkill","UOACraft");
|
||||
|
||||
int iAlchemySkill = GetCampaignInt("UOACraft","iAlchemySkill",oPC);
|
||||
int iAlchemyChance = iAlchemySkill;
|
||||
int iSuccess = 0;
|
||||
int iSkillGain = 0;
|
||||
@@ -114,182 +107,176 @@ void main()
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye001";
|
||||
sSuccess = "You boil the iris, and extract the light-blue aqua pigment.";
|
||||
sFail = "You fail to extract any pigment from this iris.";
|
||||
}
|
||||
if (sItemTag == "FLOWER_BLUEIRIRS")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye001";
|
||||
sSuccess = "You boil the iris, and extract the light-blue aqua pigment.";
|
||||
sSuccess = "You boil the iris and extract the light-blue aqua pigment.";
|
||||
sFail = "You fail to extract any pigment from this iris.";
|
||||
}
|
||||
|
||||
if (sItemTag == "FLOWER_BLACKTULIP")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye002";
|
||||
sSuccess = "You boil the tulip, and extract the dark pigment.";
|
||||
sSuccess = "You boil the tulip and extract the dark pigment.";
|
||||
sFail = "You fail to extract any pigment from this tulip.";
|
||||
}
|
||||
if (sItemTag == "FLOWER_BLUETULIP")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye003";
|
||||
sSuccess = "You boil the tulip, and extract the blue pigment.";
|
||||
sSuccess = "You boil the tulip and extract the dark-blue pigment.";
|
||||
sFail = "You fail to extract any pigment from this tulip.";
|
||||
}
|
||||
if (sItemTag == "FLOWER_YELLOWTULIP")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye004";
|
||||
sSuccess = "You boil the tulip, and extract the yellow pigment.";
|
||||
sSuccess = "You boil the tulip and extract the yellow pigment.";
|
||||
sFail = "You fail to extract any pigment from this tulip.";
|
||||
}
|
||||
if (sItemTag == "SEED_GOOSEBERRY")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye005";
|
||||
sSuccess = "You boil the gooseberries, and extract the green pigment.";
|
||||
sSuccess = "You boil the gooseberries and extract the green pigment.";
|
||||
sFail = "You fail to extract any pigment from these gooseberries.";
|
||||
}
|
||||
if (sItemTag == "ITEM_PINECONE")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye006";
|
||||
sSuccess = "You boil the pinecone, and extract the greenish-brown pigment.";
|
||||
sSuccess = "You boil the pinecone and extract the greenish-brown pigment.";
|
||||
sFail = "You fail to extract any pigment from this pinecone.";
|
||||
}
|
||||
if (sItemTag == "SEED_MARIGOLD")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye007";
|
||||
sSuccess = "You boil the marigold, and extract the golden pigment.";
|
||||
sSuccess = "You boil the marigold and extract the golden pigment.";
|
||||
sFail = "You fail to extract any pigment from this marigold.";
|
||||
}
|
||||
if (sItemTag == "SEED_SNAPDRAGON")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye008";
|
||||
sSuccess = "You boil the snapdragon, and extract a bronze-toned pigment.";
|
||||
sSuccess = "You boil the snapdragon and extract a bronze-toned pigment.";
|
||||
sFail = "You fail to extract any pigment from this snapdragon.";
|
||||
}
|
||||
if (sItemTag == "SEED_TARRAGON")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye009";
|
||||
sSuccess = "You boil the tarragon, and extract a silvery pigment.";
|
||||
sSuccess = "You boil the tarragon and extract a silvery pigment.";
|
||||
sFail = "You fail to extract any pigment from the tarragon.";
|
||||
}
|
||||
if (sItemTag == "FLOWER_WHITEIRIS")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye010";
|
||||
sSuccess = "You boil the iris, and extract a greyish pigment.";
|
||||
sSuccess = "You boil the iris and extract a greyish pigment.";
|
||||
sFail = "You fail to extract any pigment from this iris.";
|
||||
}
|
||||
if (sItemTag == "SEED_LAVENDER")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye011";
|
||||
sSuccess = "You boil the lavender, and extract a pink pigment.";
|
||||
sSuccess = "You boil the lavender and extract a pink pigment.";
|
||||
sFail = "You fail to extract any pigment from the lavender.";
|
||||
}
|
||||
if (sItemTag == "SEED_NASTURTIUM")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye012";
|
||||
sSuccess = "You boil the nasturtium, and extract an orange pigment.";
|
||||
sSuccess = "You boil the nasturtium and extract a greyish pigment.";
|
||||
sFail = "You fail to extract any pigment from this nasturtium.";
|
||||
}
|
||||
if (sItemTag == "SEED_SAGE")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye013";
|
||||
sSuccess = "You boil the sage, and extract a tan pigment.";
|
||||
sSuccess = "You boil the sage and extract a tan pigment.";
|
||||
sFail = "You fail to extract any pigment from the sage.";
|
||||
}
|
||||
if (sItemTag == "SEED_CHIVES")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye014";
|
||||
sSuccess = "You boil the chives, and extract a coppery pigment.";
|
||||
sSuccess = "You boil the chives and extract a coppery pigment.";
|
||||
sFail = "You fail to extract any pigment from these chives.";
|
||||
}
|
||||
if (sItemTag == "FLOWER_WHITETULIP")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye015";
|
||||
sSuccess = "You boil the tulip, and extract the white pigment.";
|
||||
sSuccess = "You boil the tulip and extract the white pigment.";
|
||||
sFail = "You fail to extract any pigment from this tulip.";
|
||||
}
|
||||
if (sItemTag == "FLOWER_YELLOWIRIS")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye016";
|
||||
sSuccess = "You boil the iris, and extract a platinum-hued pigment.";
|
||||
sSuccess = "You boil the iris and extract a platinum-hued pigment.";
|
||||
sFail = "You fail to extract any pigment from this iris.";
|
||||
}
|
||||
if (sItemTag == "SEED_PERIWINKLE")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye017";
|
||||
sSuccess = "You boil the periwinkle, and extract a purple pigment.";
|
||||
sSuccess = "You boil the periwinkle and extract a purple pigment.";
|
||||
sFail = "You fail to extract any pigment from this periwinkle.";
|
||||
}
|
||||
if (sItemTag == "FLOWER_BLACKIRIS")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye018";
|
||||
sSuccess = "You boil the iris, and extract a dark grey pigment.";
|
||||
sSuccess = "You boil the iris and extract a dark grey pigment.";
|
||||
sFail = "You fail to extract any pigment from this iris.";
|
||||
}
|
||||
if (sItemTag == "SEED_SPEARMINT")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye019";
|
||||
sSuccess = "You boil the spearmint, and extract a minty green pigment.";
|
||||
sSuccess = "You boil the spearmint and extract a minty green pigment.";
|
||||
sFail = "You fail to extract any pigment from this spearmint.";
|
||||
}
|
||||
if (sItemTag == "SEED_BEETS")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye020";
|
||||
sSuccess = "You boil the beets, and extract a deep red pigment.";
|
||||
sSuccess = "You boil the beets and extract a deep red pigment.";
|
||||
sFail = "You fail to extract any pigment from these beets.";
|
||||
}
|
||||
if (sItemTag == "SEED_PEPPERMINT")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye021";
|
||||
sSuccess = "You boil the peppermint, and extract a deep green pigment.";
|
||||
sSuccess = "You boil the peppermint and extract a deep green pigment.";
|
||||
sFail = "You fail to extract any pigment from this peppermint.";
|
||||
}
|
||||
if (sItemTag == "SEED_BLUEBERRY")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye022";
|
||||
sSuccess = "You boil the blueberries, and extract a deep blue pigment.";
|
||||
sSuccess = "You boil the blueberries and extract a deep blue pigment.";
|
||||
sFail = "You fail to extract any pigment from these blueberries.";
|
||||
}
|
||||
if (sItemTag == "SEED_ORIENTALPOPPY")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye023";
|
||||
sSuccess = "You boil the oriental poppy, and extract a peach-hued pigment.";
|
||||
sSuccess = "You boil the oriental poppy and extract a peach-hued pigment.";
|
||||
sFail = "You fail to extract any pigment from this oriental poppy.";
|
||||
}
|
||||
if (sItemTag == "SEED_MAYAPPLE")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye024";
|
||||
sSuccess = "You boil the mayapple, and extract a smokey pigment.";
|
||||
sSuccess = "You boil the mayapple and extract a greyish pigment.";
|
||||
sFail = "You fail to extract any pigment from this mayapple.";
|
||||
}
|
||||
if (sItemTag == "SEED_TURNIP")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye025";
|
||||
sSuccess = "You boil the turnip, and extract a fuschia pigment.";
|
||||
sSuccess = "You boil the turnip and extract a fuschia pigment.";
|
||||
sFail = "You fail to extract any pigment from this turnip.";
|
||||
}
|
||||
if (sItemTag == "ITEM_OLIVE")
|
||||
@@ -303,28 +290,28 @@ void main()
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye027";
|
||||
sSuccess = "You boil the catnip, and extract a yellowish-green pigment.";
|
||||
sSuccess = "You boil the catnip and extract a yellowish-green pigment.";
|
||||
sFail = "You fail to extract any pigment from this catnip.";
|
||||
}
|
||||
if (sItemTag == "ITEM_FIG")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye028";
|
||||
sSuccess = "You boil the figs, and extract a rusty pigment.";
|
||||
sSuccess = "You boil the figs and extract a rusty pigment.";
|
||||
sFail = "You fail to extract any pigment from these figs.";
|
||||
}
|
||||
if (sItemTag == "ITEM_KIWI")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye029";
|
||||
sSuccess = "You boil the kiwi, and extract a chromatic pigment.";
|
||||
sSuccess = "You boil the kiwi and extract a chromatic pigment.";
|
||||
sFail = "You fail to extract any pigment from this kiwi.";
|
||||
}
|
||||
if (sItemTag == "SEED_ARTICHOKE")
|
||||
{
|
||||
iSuccessNumber = 3;
|
||||
sItemResRef = "dye030";
|
||||
sSuccess = "You boil the artichoke, and extract a metallic pigment.";
|
||||
sSuccess = "You boil the artichoke and extract a metallic pigment.";
|
||||
sFail = "You fail to extract any pigment from the artichoke.";
|
||||
}
|
||||
if (sItemTag == "FISH_BLUESHARK") // 80 lbs
|
||||
@@ -566,7 +553,7 @@ void main()
|
||||
}
|
||||
//End code for fixing stackables issue
|
||||
|
||||
if (sDItemResRef == "pattern013") // Tanning Oil
|
||||
if (GetStringRight(sDItemResRef,3)=="013") // Tanning Oil
|
||||
{
|
||||
FloatingTextStringOnCreature("To create tanning oil you need to drop a fish into this container.",oPC,FALSE);
|
||||
CopyObject(oItem,GetLocation(OBJECT_SELF),OBJECT_SELF,GetTag(oItem));
|
||||
@@ -580,7 +567,7 @@ void main()
|
||||
sComponent1Name = "oaken logs";
|
||||
iSuccessNumber = 10;
|
||||
iStackable = 1;
|
||||
sSuccess = "You strip the bark, and produce enough tannic acid for 10 uses.";
|
||||
sSuccess = "You strip the bark and produce enough tannic acid for 10 uses.";
|
||||
sFail = "You strip the bark, but the tannic acid produced is impure and unuseable.";
|
||||
iFailNumber = 4;
|
||||
iFailFlag = 1;
|
||||
@@ -701,8 +688,8 @@ void main()
|
||||
sComponent3 = "DYE_BLACK";
|
||||
iComponent3 = 1;
|
||||
iComponent3Stackable=1;
|
||||
sSuccess = "You carefully powder the wooly ink cap, and combine it with the black dye.";
|
||||
sFail = "The ink turns milky, and is ruined by impurities.";
|
||||
sSuccess = "You carefully powder the wooly ink cap and combine it with the black dye.";
|
||||
sFail = "The ink turns milky and is ruined by impurities..";
|
||||
sItemResRef = "ink_black";
|
||||
sFailResRef = "glassvial";
|
||||
sComponent1Name = "wooly ink caps";
|
||||
@@ -723,7 +710,7 @@ void main()
|
||||
iComponent2 = 1;
|
||||
sComponent3 = "ITEM_GLASSVIAL";
|
||||
iComponent3 = 1;
|
||||
sSuccess = "You carefully powder the ginger roots and stone fungus, and brew the potion.";
|
||||
sSuccess = "You carefully powder the ginger roots and stone fungus and brew the potion.";
|
||||
sFail = "The potion coagulates into a smelly, useless sludge.";
|
||||
sItemResRef = "nw_it_mpotion001"; //Replace this with custom potion resref, if available
|
||||
sFailResRef = "glassvial";
|
||||
@@ -741,7 +728,7 @@ void main()
|
||||
iComponent2 = 1;
|
||||
sComponent3 = "ITEM_GLASSVIAL";
|
||||
iComponent3 = 1;
|
||||
sSuccess = "You carefully powder the mandrake roots and violet pouch fungus, and brew the potion.";
|
||||
sSuccess = "You carefully powder the mandrake roots and violet pouch fungus and brew the potion.";
|
||||
sFail = "The potion coagulates into a smelly, useless sludge.";
|
||||
sItemResRef = "nw_it_mpotion020"; //Replace this with custom potion resref, if available
|
||||
sFailResRef = "glassvial";
|
||||
@@ -760,7 +747,7 @@ void main()
|
||||
iComponent2 = 2;
|
||||
sComponent3 = "ITEM_GLASSVIAL";
|
||||
iComponent3 = 1;
|
||||
sSuccess = "You carefully powder the witches butter, mixing in the powdered amethyst, and brew the potion.";
|
||||
sSuccess = "You carefully powder the witches butter, mixing in the powdered amethyst and brew the potion.";
|
||||
sFail = "The potion coagulates into a smelly, useless sludge.";
|
||||
sItemResRef = "nw_it_mpotion002"; //Replace this with custom potion resref, if available
|
||||
sFailResRef = "glassvial";
|
||||
@@ -780,7 +767,7 @@ void main()
|
||||
iComponent2Stackable=1;
|
||||
sComponent3 = "ITEM_GLASSVIAL";
|
||||
iComponent3 = 1;
|
||||
sSuccess = "You carefully combine the powdered bloodstone with the essence of nature, and brew the potion.";
|
||||
sSuccess = "You carefully combine the powdered bloodstone with the essence of nature and brew the potion.";
|
||||
sFail = "The potion coagulates into a smelly, useless sludge.";
|
||||
sItemResRef = "nw_it_mpotion003"; //Replace this with custom potion resref, if available
|
||||
sFailResRef = "glassvial";
|
||||
@@ -799,8 +786,8 @@ void main()
|
||||
sComponent3 = "DYE_CHARCOAL";
|
||||
iComponent3 = 1;
|
||||
iComponent3Stackable=1;
|
||||
sSuccess = "You carefully powder the shaggy ink cap, and combine it with the charcoal dye.";
|
||||
sFail = "The ink turns milky, and is ruined by impurities.";
|
||||
sSuccess = "You carefully powder the shaggy ink cap and combine it with the charcoal dye.";
|
||||
sFail = "The ink turns milky and is ruined by impurities..";
|
||||
sItemResRef = "ink_mapmaker";
|
||||
sFailResRef = "glassvial";
|
||||
sComponent1Name = "shaggy ink caps";
|
||||
@@ -822,7 +809,7 @@ void main()
|
||||
iFailFlag=1;
|
||||
iFailNumber=1;
|
||||
sSuccess = "You carefully powder the sulphur and coal, mixing it with the tar.";
|
||||
sFail = "The tar hardens as you mix the coal and sulphur improperly, rendering this batch useless.";
|
||||
sFail = "The tar hardens as you mix the coal and sulpher improperly, rending this batch useless.";
|
||||
sItemResRef = "_uoa_alch_fire";
|
||||
sFailResRef = "glassbottle";
|
||||
sComponent1Name = "bottles of tar";
|
||||
@@ -900,7 +887,7 @@ void main()
|
||||
iFailFlag=1;
|
||||
iFailNumber=1;
|
||||
sSuccess = "The yeast culture grows within the vial, feeding on the powdered kindling.";
|
||||
sFail = "The powdered kindling is contaminated, and the yeast fails to grow.";
|
||||
sFail = "The powdered kindling is contaminated and the yeast fails to grow.";
|
||||
sItemResRef = "item_yeast001";
|
||||
sFailResRef = "yeastvial001";
|
||||
sComponent1Name = "yeast vials";
|
||||
@@ -916,7 +903,7 @@ void main()
|
||||
iFailFlag=1;
|
||||
iFailNumber=1;
|
||||
sSuccess = "The yeast culture grows within the vial, feeding on the powdered kindling.";
|
||||
sFail = "The powdered kindling is contaminated, and the yeast fails to grow.";
|
||||
sFail = "The powdered kindling is contaminated and the yeast fails to grow.";
|
||||
sItemResRef = "item_yeast002";
|
||||
sFailResRef = "yeastvial001";
|
||||
sComponent1Name = "yeast vials";
|
||||
@@ -932,7 +919,7 @@ void main()
|
||||
iFailFlag=1;
|
||||
iFailNumber=1;
|
||||
sSuccess = "The yeast culture grows within the vial, feeding on the powdered kindling.";
|
||||
sFail = "The powdered kindling is contaminated, and the yeast fails to grow.";
|
||||
sFail = "The powdered kindling is contaminated and the yeast fails to grow.";
|
||||
sItemResRef = "item_yeast003";
|
||||
sFailResRef = "yeastvial001";
|
||||
sComponent1Name = "yeast vials";
|
||||
@@ -945,7 +932,7 @@ void main()
|
||||
iStackable=1;
|
||||
iComponent1Stackable =1;
|
||||
sItemResRef = "essence"+GetStringRight(sDItemResRef,3);
|
||||
sFail = "The essence evaporates away as you fail to extract it properly.";
|
||||
sFail = "The essence evaporates away as you fail to extract it properly...";
|
||||
sSuccess = "You carefully extract the ";
|
||||
iAlchemyChance=iAlchemyChance-150;
|
||||
switch (StringToInt(GetStringRight(sDItemResRef,3)))
|
||||
@@ -1177,7 +1164,7 @@ void main()
|
||||
case 17:
|
||||
{
|
||||
sSuccess=sSuccess+"Essence of Cold";
|
||||
sComponent1 = "GEM_POWDERED_JADE";
|
||||
sComponent1 = "GEM_POWDER_JADE";
|
||||
iComponent1 = 3;
|
||||
sComponent2 = "SEED_SPEARMINT";
|
||||
iComponent2 = 5;
|
||||
@@ -1534,13 +1521,7 @@ void main()
|
||||
if (iAlchemySkill <= 1000)
|
||||
{
|
||||
//DelayCommand(6.0,SetTokenPair(oPC,14,12,iAlchemySkill));
|
||||
|
||||
// Uses NWN Database
|
||||
//DelayCommand(6.0,SetCampaignInt("UOACraft","iAlchemySkill",iAlchemySkill,oPC));
|
||||
|
||||
// Uses External Database
|
||||
DelayCommand(6.0,SetPersistentInt(oPC,"iAlchemySkill",iAlchemySkill,0,"UOACraft"));
|
||||
|
||||
DelayCommand(6.0,SetCampaignInt("UOACraft","iAlchemySkill",iAlchemySkill,oPC));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"=================================="));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"Your skill in alchemy has gone up!"));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"Current alchemy skill : "+ sOldSkill+"%"));
|
||||
|
@@ -1,6 +1,5 @@
|
||||
//#include "_persist_01a"
|
||||
#include "nw_i0_plot"
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC, int iStackSize);
|
||||
void GetNextStackedItem(object oPC, string sItemTag, int iCount, int iMode, string sStackResRef);
|
||||
@@ -105,33 +104,21 @@ void main()
|
||||
|
||||
if (GetLocalInt(OBJECT_SELF,"iAmInUse") != 0)
|
||||
{
|
||||
SendMessageToPC(oPC,"You must wait until the current weapon or armor is completed before starting another.");
|
||||
SendMessageToPC(oPC,"You must wait till the current weapon or armor is completed before starting another.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetTag(oTool) != "ITEM_SMITHHAMMER_NORMAL")
|
||||
{
|
||||
FloatingTextStringOnCreature("You must have a blacksmith hammer equipped in order to attempt this craft.",oPC,FALSE);
|
||||
FloatingTextStringOnCreature("You must have a smithy hammer equipped in order to attempt this craft...",oPC,FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
//int iSmithSkill = GetTokenPair(oPC,13,4); // Weaponsmith
|
||||
|
||||
// uses NWN Database
|
||||
//int iSmithSkill = GetCampaignInt("UOACraft","iSmithSkill",oPC);
|
||||
|
||||
// uses external database
|
||||
int iSmithSkill = GetPersistentInt(oPC,"iSmithSkill","UOACraft");
|
||||
|
||||
int iSmithSkill = GetCampaignInt("UOACraft","iSmithSkill",oPC);
|
||||
int iSmithChance = iSmithSkill;
|
||||
//int iArmorSkill = GetTokenPair(oPC,13,5); // ArmorCraft
|
||||
|
||||
// uses NWN database
|
||||
//int iArmorSkill = GetCampaignInt("UOACraft","iArmorSkill",oPC);
|
||||
|
||||
// external database
|
||||
int iArmorSkill = GetPersistentInt(oPC,"iArmorSkill","UOACraft");
|
||||
|
||||
int iArmorSkill = GetCampaignInt("UOACraft","iArmorSkill",oPC);
|
||||
int iArmorChance = iArmorSkill;
|
||||
|
||||
if (iSmithChance < 350)
|
||||
@@ -163,7 +150,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance - 100;
|
||||
sSuccess = "You carefully heat, fold, and pound the metal into the form of a dagger.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the dagger useless.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rending the dagger useless.";
|
||||
sItemResRefPoor = CraftLookup("wswdg002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wswdg001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wswdg003",iIngotType);
|
||||
@@ -176,7 +163,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-150;
|
||||
sSuccess = "You carefully heat, fold, and pound the metal into the form of a shortsword.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the shortsword useless.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rending the shortsword useless.";
|
||||
sItemResRefPoor = CraftLookup("wswss002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wswss001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wswss003",iIngotType);
|
||||
@@ -190,7 +177,7 @@ void main()
|
||||
iCraftType=1;
|
||||
iArmorChance = iArmorChance - 100;
|
||||
sSuccess = "You carefully forge the rings and sew them into the leather backing to make ringmail armor.";
|
||||
sFail = "The rings fail to link properly, and the leather backing is ruined.";
|
||||
sFail = "The rings fail to link properly and the leather backing is ruined.";
|
||||
sItemResRefPoor = CraftLookup("ringmail001",iIngotType);
|
||||
sItemResRef = CraftLookup("ringmail",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("ringmail002",iIngotType);
|
||||
@@ -238,7 +225,7 @@ void main()
|
||||
iCraftType=1;
|
||||
iArmorChance = iArmorChance - 300;
|
||||
sSuccess = "You carefully forge the small metal scales and hook them into the leather to make scale mail armor.";
|
||||
sFail = "The scales do not hook together properly, and the scale mail armor is ruined.";
|
||||
sFail = "The scales do not hook properly, and the scale mail armor is ruined.";
|
||||
sItemResRefPoor = CraftLookup("aarcl006",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_aarcl003",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("aarcl007",iIngotType);
|
||||
@@ -269,7 +256,7 @@ void main()
|
||||
iCraftType=1;
|
||||
iArmorChance = iArmorChance - 400;
|
||||
sSuccess = "You carefully forge the small metal bands and fix them into the leather to make banded mail armor.";
|
||||
sFail = "The bands do not fix together properly, and the banded mail armor is ruined.";
|
||||
sFail = "The bands do not fix properly, and the banded mail armor is ruined.";
|
||||
sItemResRefPoor = CraftLookup("aarcl014",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_aarcl011",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("aarcl015",iIngotType);
|
||||
@@ -286,7 +273,7 @@ void main()
|
||||
iCraftType=1;
|
||||
iArmorChance = iArmorChance - 400;
|
||||
sSuccess = "You carefully forge the small metal plates and fix them into the leather to make splint mail armor.";
|
||||
sFail = "The small metal plates are too brittle to fix together properly, and the splint mail armor is ruined.";
|
||||
sFail = "The small metal plates are too brittle to fix properly, and the splint mail armor is ruined.";
|
||||
sItemResRefPoor = CraftLookup("aarcl018",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_aarcl005",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("aarcl019",iIngotType);
|
||||
@@ -336,7 +323,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-250;
|
||||
sSuccess = "You carefully heat, fold, and pound the metal into the form of a longsword.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the longsword useless.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rending the longsword useless.";
|
||||
sItemResRefPoor = CraftLookup("wswls002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wswls001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wswls003",iIngotType);
|
||||
@@ -349,7 +336,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-350;
|
||||
sSuccess = "You carefully heat, fold, and pound the metal into the form of a bastard sword.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the bastard sword useless.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rending the bastard sword useless.";
|
||||
sItemResRefPoor = CraftLookup("wswbs002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wswbs001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wswbs003",iIngotType);
|
||||
@@ -362,7 +349,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-400;
|
||||
sSuccess = "You carefully heat, fold, and pound the metal into the form of a greatsword.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the greatsword useless.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rending the greatsword useless.";
|
||||
sItemResRefPoor = CraftLookup("wswgs002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wswgs001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wswgs003",iIngotType);
|
||||
@@ -494,7 +481,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-200;
|
||||
sSuccess = "You carefully heat, fold, and pound the metal into the form of a mace.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the mace useless.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rending the mace useless.";
|
||||
sItemResRefPoor = CraftLookup("wblml002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wblml001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wblml003",iIngotType);
|
||||
@@ -507,7 +494,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-300;
|
||||
sSuccess = "You carefully heat, fold, and pound the metal into the form of a maorning star.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the morning star useless.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rending the morning star useless.";
|
||||
sItemResRefPoor = CraftLookup("wblms002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wblms001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wblms003",iIngotType);
|
||||
@@ -523,7 +510,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-250;
|
||||
sSuccess = "You carefully heat, fold, and pound the metal into the form of a light flail.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the light flail useless.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rending the light flail useless.";
|
||||
sItemResRefPoor = CraftLookup("wblfl002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wblfl001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wblfl003",iIngotType);
|
||||
@@ -536,7 +523,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-350;
|
||||
sSuccess = "You carefully heat, fold, and pound the metal into the form of a heavy flail.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the heavy flail useless.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rending the heavy flail useless.";
|
||||
sItemResRefPoor = CraftLookup("wblfh002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wblfh001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wblfh003",iIngotType);
|
||||
@@ -549,7 +536,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-250;
|
||||
sSuccess = "You carefully heat, fold, and pound the metal into the form of a light hammer.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the light hammer useless.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rending the light hammer useless.";
|
||||
sItemResRefPoor = CraftLookup("wblhl002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wblhl001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wblhl003",iIngotType);
|
||||
@@ -562,7 +549,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-350;
|
||||
sSuccess = "You carefully heat, fold, and pound the metal into the form of a warhammer.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the warhammer useless.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rending the warhammer useless.";
|
||||
sItemResRefPoor = CraftLookup("wblhw002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wblhw001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wblhw003",iIngotType);
|
||||
@@ -575,7 +562,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-150;
|
||||
sSuccess = "You carefully heat, fold, and pound the metal into the form of a handaxe.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the handaxe useless.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rending the handaxe useless.";
|
||||
sItemResRefPoor = CraftLookup("waxhn002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_waxhn001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("waxhn003",iIngotType);
|
||||
@@ -588,7 +575,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-150;
|
||||
sSuccess = "You carefully heat, fold, and pound the metal into the form of a battleaxe.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the battleaxe useless.";
|
||||
sFail = "The metal turns brittle as you heat, fold, and pound it, rending the battleaxe useless.";
|
||||
sItemResRefPoor = CraftLookup("waxbt002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_waxbt001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("waxbt003",iIngotType);
|
||||
@@ -602,7 +589,7 @@ void main()
|
||||
iCraftStackSize = 50;
|
||||
iSmithChance = iSmithChance-50;
|
||||
sSuccess = "You carefully forge the throwing darts.";
|
||||
sFail = "The metal fails to cool properly, and the throwing darts are ruined.";
|
||||
sFail = "The metal fails to cool properly and the throwing darts are ruined.";
|
||||
sItemResRefPoor = CraftLookup("wthdt002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wthdt001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wthdt003",iIngotType);
|
||||
@@ -616,7 +603,7 @@ void main()
|
||||
iCraftStackSize = 50;
|
||||
iSmithChance = iSmithChance-50;
|
||||
sSuccess = "You carefully forge the shuriken.";
|
||||
sFail = "The metal fails to cool properly, and the shuriken are ruined.";
|
||||
sFail = "The metal fails to cool properly and the shuriken are ruined.";
|
||||
sItemResRefPoor = CraftLookup("wthsh002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wthsh001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wthsh003",iIngotType);
|
||||
@@ -630,7 +617,7 @@ void main()
|
||||
iCraftStackSize = 50;
|
||||
iSmithChance = iSmithChance-150;
|
||||
sSuccess = "You carefully forge the throwing axes.";
|
||||
sFail = "The metal fails to cool properly, and the throwing axes are ruined.";
|
||||
sFail = "The metal fails to cool properly and the throwing axes are ruined.";
|
||||
sItemResRefPoor = CraftLookup("wthax002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wthax001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wthax003",iIngotType);
|
||||
@@ -642,8 +629,8 @@ void main()
|
||||
if (sTag == "P_HALBERD")
|
||||
{
|
||||
iSmithChance = iSmithChance-400;
|
||||
sSuccess = "You carefully forge the halberd blade, and affix it to the shaft.";
|
||||
sFail = "The metal turns brittle as you attempt to forge it, and the halberd is ruined.";
|
||||
sSuccess = "You carefully forge the halberd blade and affix it to the shaft.";
|
||||
sFail = "The metal turns brittle as you attempt to forge and the halberd is ruined.";
|
||||
sItemResRefPoor = CraftLookup("wplhb002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wplhb001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wplhb003",iIngotType);
|
||||
@@ -658,8 +645,8 @@ void main()
|
||||
if (sTag == "P_SCYTHE")
|
||||
{
|
||||
iSmithChance = iSmithChance-400;
|
||||
sSuccess = "You carefully forge the scythe blade, and affix it to the shaft.";
|
||||
sFail = "The metal turns brittle as you attempt to forge it, and the scythe is ruined.";
|
||||
sSuccess = "You carefully forge the scythe blade and affix it to the shaft.";
|
||||
sFail = "The metal turns brittle as you attempt to forge and the scythe is ruined.";
|
||||
sItemResRefPoor = CraftLookup("wplsc002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wplsc001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wplsc003",iIngotType);
|
||||
@@ -674,8 +661,8 @@ void main()
|
||||
if (sTag == "P_SPEAR")
|
||||
{
|
||||
iSmithChance = iSmithChance-300;
|
||||
sSuccess = "You carefully forge the spear tip, and affix it to the shaft.";
|
||||
sFail = "The metal turns brittle as you attempt to forge it, and the spear is ruined.";
|
||||
sSuccess = "You carefully forge the spear tip and affix it to the shaft.";
|
||||
sFail = "The metal turns brittle as you attempt to forge and the spear is ruined.";
|
||||
sItemResRefPoor = CraftLookup("wplss002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wplss001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wplss003",iIngotType);
|
||||
@@ -704,7 +691,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-100;
|
||||
sSuccess = "You carefully fold and pound the metal into the form of a kukri.";
|
||||
sFail = "The metal turns brittle as you attempt to forge it, and the kukri is ruined.";
|
||||
sFail = "The metal turns brittle as you attempt to forge and the kukri is ruined.";
|
||||
sItemResRefPoor = CraftLookup("wspku002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wspku001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wspku003",iIngotType);
|
||||
@@ -717,7 +704,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-150;
|
||||
sSuccess = "You carefully fold and pound the metal into the form of a sickle.";
|
||||
sFail = "The metal turns brittle as you attempt to forge it, and the sickle is ruined.";
|
||||
sFail = "The metal turns brittle as you attempt to forge and the sickle is ruined.";
|
||||
sItemResRefPoor = CraftLookup("wspsc002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wspsc001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wspsc003",iIngotType);
|
||||
@@ -730,7 +717,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-450;
|
||||
sSuccess = "You carefully fold and pound the metal into the form of a dire mace.";
|
||||
sFail = "The metal turns brittle as you attempt to forge it, and the dire mace is ruined.";
|
||||
sFail = "The metal turns brittle as you attempt to forge and the dire mace is ruined.";
|
||||
sItemResRefPoor = CraftLookup("wdbma002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wdbma001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wdbma003",iIngotType);
|
||||
@@ -743,7 +730,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-450;
|
||||
sSuccess = "You carefully fold and pound the metal into the form of a double axe.";
|
||||
sFail = "The metal turns brittle as you attempt to forge it, and the double axe is ruined.";
|
||||
sFail = "The metal turns brittle as you attempt to forge and the double axe is ruined.";
|
||||
sItemResRefPoor = CraftLookup("wdbax002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wdbax001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wdbax003",iIngotType);
|
||||
@@ -756,7 +743,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-500;
|
||||
sSuccess = "You carefully fold and pound the metal into the form of a two-bladed sword.";
|
||||
sFail = "The metal turns brittle as you attempt to forge it, and the two-bladed sword is ruined.";
|
||||
sFail = "The metal turns brittle as you attempt to forge and the two-bladed sword is ruined.";
|
||||
sItemResRefPoor = CraftLookup("wdbsw002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wdbsw001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wdbsw003",iIngotType);
|
||||
@@ -770,7 +757,7 @@ void main()
|
||||
iSmithChance = iSmithChance+50; //Bullets are easy to make
|
||||
iCraftStackSize = 99;
|
||||
sSuccess = "You carefully forge the bullets.";
|
||||
sFail = "The metal fails to cool properly, and the bullets are ruined.";
|
||||
sFail = "The metal fails to cool properly and the bullets are ruined.";
|
||||
sItemResRefPoor = CraftLookup("wambu002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wambu001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wambu003",iIngotType);
|
||||
@@ -784,7 +771,7 @@ void main()
|
||||
iSmithChance = iSmithChance - 50;
|
||||
iCraftStackSize = 50;
|
||||
sSuccess = "You carefully forge the arrowheads.";
|
||||
sFail = "The metal fails to cool properly, and the arrowheads are ruined.";
|
||||
sFail = "The metal fails to cool properly and the arrowheads are ruined.";
|
||||
sItemResRefPoor = CraftLookup("arrowhead001",iIngotType);
|
||||
sItemResRef = CraftLookup("arrowhead",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("arrowhead002",iIngotType);
|
||||
@@ -798,7 +785,7 @@ void main()
|
||||
iSmithChance = iSmithChance - 50;
|
||||
iCraftStackSize = 50;
|
||||
sSuccess = "You carefully forge the bolt tips.";
|
||||
sFail = "The metal fails to cool properly, and the bolt tips are ruined.";
|
||||
sFail = "The metal fails to cool properly and the bolt tips are ruined.";
|
||||
sItemResRefPoor = CraftLookup("arrowhead004",iIngotType);
|
||||
sItemResRef = CraftLookup("arrowhead003",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("arrowhead005",iIngotType);
|
||||
@@ -813,7 +800,7 @@ void main()
|
||||
iArmorChance = iArmorChance + 100; // metal studs are super-easy
|
||||
iCraftStackSize = 99;
|
||||
sSuccess = "You carefully forge the metal studs.";
|
||||
sFail = "The metal fails to cool properly, and the metal studs are ruined.";
|
||||
sFail = "The metal fails to cool properly and the metal studs are ruined.";
|
||||
sItemResRefPoor = CraftLookup("metalstud001",iIngotType);
|
||||
sItemResRef = CraftLookup("metalstud",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("metalstud002",iIngotType);
|
||||
@@ -826,7 +813,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-350;
|
||||
sSuccess = "You carefully fold and pound the metal into the form of a katana.";
|
||||
sFail = "The metal turns brittle as you attempt to forge it, and the katana is ruined.";
|
||||
sFail = "The metal turns brittle as you attempt to forge and the katana is ruined.";
|
||||
sItemResRefPoor = CraftLookup("wswka002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wswka001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wswka003",iIngotType);
|
||||
@@ -839,7 +826,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-250;
|
||||
sSuccess = "You carefully fold and pound the metal into the form of a rapier.";
|
||||
sFail = "The metal turns brittle as you attempt to forge it, and the rapier is ruined.";
|
||||
sFail = "The metal turns brittle as you attempt to forge and the rapier is ruined.";
|
||||
sItemResRefPoor = CraftLookup("wswrp002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wswrp001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wswrp003",iIngotType);
|
||||
@@ -852,7 +839,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-300;
|
||||
sSuccess = "You carefully fold and pound the metal into the form of a scimitar.";
|
||||
sFail = "The metal turns brittle as you attempt to forge it, and the scimitar is ruined.";
|
||||
sFail = "The metal turns brittle as you attempt to forge and the scimitar is ruined.";
|
||||
sItemResRefPoor = CraftLookup("wswsc002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_wswsc001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wswsc003",iIngotType);
|
||||
@@ -865,7 +852,7 @@ void main()
|
||||
{
|
||||
iSmithChance = iSmithChance-400;
|
||||
sSuccess = "You carefully fold and pound the metal into the form of a great axe.";
|
||||
sFail = "The metal turns brittle as you attempt to forge it, and the great axe is ruined.";
|
||||
sFail = "The metal turns brittle as you attempt to forge and the great axe is ruined.";
|
||||
sItemResRefPoor = CraftLookup("waxgr002",iIngotType);
|
||||
sItemResRef = CraftLookup("nw_waxgr001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("waxgr003",iIngotType);
|
||||
@@ -878,12 +865,12 @@ void main()
|
||||
{
|
||||
if (GetRacialType(oPC)!=RACIAL_TYPE_DWARF)
|
||||
{
|
||||
FloatingTextStringOnCreature("You are not a dwarf! You will be unable to craft a Dwarven Waraxe!",oPC,FALSE);
|
||||
FloatingTextStringOnCreature("You are not a dwarf! You cannot craft a Dwarven Waraxe!",oPC,FALSE);
|
||||
return;
|
||||
}
|
||||
iSmithChance = iSmithChance-400;
|
||||
sSuccess = "You carefully fold and pound the metal into the form of a dwarven waraxe.";
|
||||
sFail = "The metal turns brittle as you attempt to forge it, and the dwarven waraxe is ruined.";
|
||||
sFail = "The metal turns brittle as you attempt to forge and the dwarven waraxe is ruined.";
|
||||
sItemResRefPoor = CraftLookup("wdwraxe002",iIngotType);
|
||||
sItemResRef = CraftLookup("x2_wdwraxe001",iIngotType);
|
||||
sItemResRefExceptional = CraftLookup("wdwraxe003",iIngotType);
|
||||
@@ -1259,13 +1246,7 @@ void main()
|
||||
if (iSmithSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(13.0,SetTokenPair(oPC,13,4,iSmithSkill));
|
||||
|
||||
// uses NWN database
|
||||
DelayCommand(13.0,SetCampaignInt("UOACraft","iSmithSkill",iSmithSkill,oPC));
|
||||
|
||||
// uses external database
|
||||
DelayCommand(13.0,SetPersistentInt(oPC,"iSmithSkill",iSmithSkill,0,"UOACraft"));
|
||||
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"========================================="));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"Your skill in weaponsmithing has gone up!"));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"Current weaponsmithing skill : "+ sOldSkill+"%"));
|
||||
@@ -1289,13 +1270,7 @@ void main()
|
||||
if (iArmorSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(13.0,SetTokenPair(oPC,13,5,iArmorSkill));
|
||||
|
||||
//uses NWN database
|
||||
DelayCommand(13.0,SetCampaignInt("UOACraft","iArmorSkill",iArmorSkill,oPC));
|
||||
|
||||
//uses external database
|
||||
DelayCommand(13.0,SetPersistentInt(oPC,"iArmorSkill",iArmorSkill,0,"UOACraft"));
|
||||
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"====================================="));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"Your skill in armorcraft has gone up!"));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"Current armorcraft skill : "+ sOldSkill+"%"));
|
||||
|
@@ -1,6 +1,5 @@
|
||||
//#include "_persist_01a"
|
||||
#include "nw_i0_plot"
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC, int iStackSize);
|
||||
void GetNextStackedItem(object oPC, string sItemTag, int iCount, int iMode, string sStackResRef);
|
||||
@@ -103,13 +102,7 @@ void main()
|
||||
}
|
||||
|
||||
//int iBowSkill = GetTokenPair(oPC,13,3);
|
||||
|
||||
// uses NWN database
|
||||
//int iBowSkill = GetCampaignInt("UOACraft","iBowSkill",oPC);
|
||||
|
||||
//external database
|
||||
int iBowSkill = GetPersistentInt(oPC,"iBowSkill","UOACraft");
|
||||
|
||||
int iBowSkill = GetCampaignInt("UOACraft","iBowSkill",oPC);
|
||||
int iBowChance = iBowSkill;
|
||||
if (iBowChance < 350)
|
||||
{
|
||||
@@ -368,13 +361,7 @@ void main()
|
||||
if (iBowSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(13.0,SetTokenPair(oPC,13,3,iBowSkill));
|
||||
|
||||
//NWN database
|
||||
//DelayCommand(13.0,SetCampaignInt("UOACraft","iBowSkill",iBowSkill,oPC));
|
||||
|
||||
//external database
|
||||
DelayCommand(13.0,SetPersistentInt(oPC,"iBowSkill",iBowSkill,0,"UOACraft"));
|
||||
|
||||
DelayCommand(13.0,SetCampaignInt("UOACraft","iBowSkill",iBowSkill,oPC));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"==================================="));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"Your skill in bowcraft has gone up!"));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"Current bowcraft skill : "+ sOldSkill+"%"));
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#include "nw_i0_plot"
|
||||
#include "aps_include"
|
||||
|
||||
int CheckComponent(object oPC, string sTag, int iMinimum);
|
||||
void RemoveComponent(object oPC, string sTag, int iMinimum);
|
||||
@@ -93,8 +92,8 @@ void main()
|
||||
RemoveComponent(oPC,"item_juice_001",1);
|
||||
RemoveComponent(oPC,"item_yeast003",1);
|
||||
RemoveComponent(oPC,"item_cask_006",1);
|
||||
sSuccess="You carefully combine the ingredients, and seal the jug.";
|
||||
sFail = "The yeast fails to ferment the ingredients and the cider is ruined.";
|
||||
sSuccess="You carefully combine the ingredients and seal the jug.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The cider is ruined.";
|
||||
sProduct = "item_fullkeg_001";
|
||||
sByproduct1 = "glassbottle";
|
||||
iByproduct1 = 1;
|
||||
@@ -112,8 +111,8 @@ void main()
|
||||
RemoveComponent(oPC,"item_yeast003",1);
|
||||
RemoveComponent(oPC,"item_cask_006",1);
|
||||
RemoveComponent(oPC,"item_syrup_003",1);
|
||||
sSuccess="You carefully combine the ingredients, and seal the jug.";
|
||||
sFail = "The yeast fails to ferment the ingredients, and the cider is ruined.";
|
||||
sSuccess="You carefully combine the ingredients and seal the jug.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The cider is ruined.";
|
||||
sProduct = "item_fullkeg_002";
|
||||
sByproduct1 = "glassbottle";
|
||||
iByproduct1 = 1;
|
||||
@@ -132,7 +131,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_juice_022",1);
|
||||
RemoveComponent(oPC,"item_yeast003",1);
|
||||
RemoveComponent(oPC,"item_cask_006",1);
|
||||
sSuccess="You carefully combine the ingredients, and seal the jug.";
|
||||
sSuccess="You carefully combine the ingredients and seal the jug.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The scrumpy is ruined.";
|
||||
sProduct = "item_fullkeg_003";
|
||||
sByproduct1 = "glassbottle";
|
||||
@@ -152,7 +151,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_yeast003",1);
|
||||
RemoveComponent(oPC,"item_cask_006",1);
|
||||
RemoveComponent(oPC,"ITEM_HONEY",1);
|
||||
sSuccess="You carefully combine the ingredients, and seal the jug.";
|
||||
sSuccess="You carefully combine the ingredients and seal the jug.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The cyser is ruined.";
|
||||
sProduct = "item_fullkeg_004";
|
||||
sByproduct1 = "glassbottle";
|
||||
@@ -216,8 +215,8 @@ void main()
|
||||
if (iMissing==1){SendMissingMessage(oPC);return;}
|
||||
RemoveComponent(oPC,"item_fullkeg_001",1);
|
||||
RemoveComponent(oPC,"item_yeast002",1);
|
||||
sSuccess="You carefully combine the top yeast with the cider.";
|
||||
sFail = "The mixture is contaminated as you attempt to add the top yeast.";
|
||||
sSuccess="You carefully combine the topyeast with the cider.";
|
||||
sFail = "The mixture is contaminated as you attempt to add the topyeast.";
|
||||
sProduct = "item_fullkeg_008";
|
||||
sFailKeg = "item_cask_006";
|
||||
}
|
||||
@@ -234,8 +233,8 @@ void main()
|
||||
RemoveComponent(oPC,"item_yeast002",1);
|
||||
RemoveComponent(oPC,"item_cask_001",1);
|
||||
RemoveComponent(oPC,"item_syrup_003",1);
|
||||
sSuccess="You carefully combine the ingredients, and seal the cask.";
|
||||
sFail = "The yeast fails to ferment the ingredients, and the wine is ruined.";
|
||||
sSuccess="You carefully combine the ingredients and seal the cask.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The wine is ruined.";
|
||||
sProduct = "item_fullkeg_009";
|
||||
sByproduct1 = "glassbottle";
|
||||
iByproduct1 = 3;
|
||||
@@ -253,7 +252,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_yeast002",1);
|
||||
RemoveComponent(oPC,"item_cask_001",1);
|
||||
RemoveComponent(oPC,"item_syrup_003",1);
|
||||
sSuccess="You carefully combine the ingredients, and seal the cask.";
|
||||
sSuccess="You carefully combine the ingredients and seal the cask.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The wine is ruined.";
|
||||
sProduct = "item_fullkeg_010";
|
||||
sByproduct1 = "glassbottle";
|
||||
@@ -271,7 +270,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_fullkeg_009",1);
|
||||
RemoveComponent(oPC,"item_yeast003",1);
|
||||
RemoveComponent(oPC,"item_syrup_003",1);
|
||||
sSuccess="You carefully combine the bottom yeast, sugar, and red wine and seal the cask.";
|
||||
sSuccess="You carefully combine the bottomyeast, sugar, and red wine and seal the cask.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The sherry is ruined.";
|
||||
sProduct = "item_fullkeg_012";
|
||||
sFailKeg = "item_cask_001";
|
||||
@@ -288,7 +287,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_yeast002",1);
|
||||
RemoveComponent(oPC,"item_cask_001",1);
|
||||
RemoveComponent(oPC,"item_syrup_003",1);
|
||||
sSuccess="You carefully combine the ingredients, and seal the cask.";
|
||||
sSuccess="You carefully combine the ingredients and seal the cask.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The wine is ruined.";
|
||||
sProduct = "item_fullkeg_011";
|
||||
sByproduct1 = "glassbottle";
|
||||
@@ -310,7 +309,7 @@ void main()
|
||||
RemoveComponent(oPC,"SEED_HOPS",3);
|
||||
RemoveComponent(oPC,"ITEM_BUCKETOFWATER",5);
|
||||
RemoveComponent(oPC,"item_cask_002",1);
|
||||
sSuccess="You combine the water, hops, barley wort, and bottom yeast and seal the barrel.";
|
||||
sSuccess="You combine the water, hops, barley wort, and bottomyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The lager is ruined.";
|
||||
sProduct = "item_fullkeg_013";
|
||||
sByproduct1 = "item001";
|
||||
@@ -331,7 +330,7 @@ void main()
|
||||
RemoveComponent(oPC,"SEED_HOPS",4);
|
||||
RemoveComponent(oPC,"ITEM_BUCKETOFWATER",5);
|
||||
RemoveComponent(oPC,"item_cask_002",1);
|
||||
sSuccess="You combine the water, hops, barley wort, and bottom yeast and seal the barrel.";
|
||||
sSuccess="You combine the water, hops, barley wort, and bottomyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The lager is ruined.";
|
||||
sProduct = "item_fullkeg_014";
|
||||
sByproduct1 = "item001";
|
||||
@@ -353,7 +352,7 @@ void main()
|
||||
RemoveComponent(oPC,"SEED_HOPS",3);
|
||||
RemoveComponent(oPC,"ITEM_BUCKETOFWATER",6);
|
||||
RemoveComponent(oPC,"item_cask_002",1);
|
||||
sSuccess="You combine the water, hops, barley wort, and bottom yeast and seal the barrel.";
|
||||
sSuccess="You combine the water, hops, barley wort, and bottomyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The lager is ruined.";
|
||||
sProduct = "item_fullkeg_015";
|
||||
sByproduct1 = "item001";
|
||||
@@ -377,7 +376,7 @@ void main()
|
||||
RemoveComponent(oPC,"ITEM_BUCKETOFWATER",4);
|
||||
RemoveComponent(oPC,"item_cask_002",1);
|
||||
RemoveComponent(oPC,"item_syrup_004",1);
|
||||
sSuccess="You combine the water, hops, barley wort, caramel, and bottom yeast then seal the barrel.";
|
||||
sSuccess="You combine the water, hops, barley wort, caramel, and bottomyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The draught is ruined.";
|
||||
sProduct = "item_fullkeg_016";
|
||||
sByproduct1 = "item001";
|
||||
@@ -399,7 +398,7 @@ void main()
|
||||
RemoveComponent(oPC,"SEED_HOPS",6);
|
||||
RemoveComponent(oPC,"ITEM_BUCKETOFWATER",4);
|
||||
RemoveComponent(oPC,"item_cask_002",1);
|
||||
sSuccess="You combine the water, hops, barley wort, and bottom yeast then seal the barrel.";
|
||||
sSuccess="You combine the water, hops, barley wort, and bottomyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The red malt lager is ruined.";
|
||||
sProduct = "item_fullkeg_017";
|
||||
sByproduct1 = "item001";
|
||||
@@ -423,7 +422,7 @@ void main()
|
||||
RemoveComponent(oPC,"ITEM_BUCKETOFWATER",4);
|
||||
RemoveComponent(oPC,"item_cask_002",1);
|
||||
RemoveComponent(oPC,"item_syrup_004",2);
|
||||
sSuccess="You combine the water, hops, barley wort, caramel, and bottom yeast then seal the barrel.";
|
||||
sSuccess="You combine the water, hops, barley wort, caramel, and bottomyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The gold malt lager is ruined.";
|
||||
sProduct = "item_fullkeg_018";
|
||||
sByproduct1 = "item001";
|
||||
@@ -447,7 +446,7 @@ void main()
|
||||
RemoveComponent(oPC,"ITEM_BUCKETOFWATER",4);
|
||||
RemoveComponent(oPC,"item_cask_002",1);
|
||||
RemoveComponent(oPC,"item_syrup_002",3);
|
||||
sSuccess="You combine the water, hops, barley wort, molasses, and bottom yeast then seal the barrel.";
|
||||
sSuccess="You combine the water, hops, barley wort, molasses, and bottomyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The ice lager is ruined.";
|
||||
sProduct = "item_fullkeg_019";
|
||||
sByproduct1 = "item001";
|
||||
@@ -471,7 +470,7 @@ void main()
|
||||
RemoveComponent(oPC,"ITEM_BUCKETOFWATER",4);
|
||||
RemoveComponent(oPC,"item_cask_002",1);
|
||||
RemoveComponent(oPC,"item_syrup_004",3);
|
||||
sSuccess="You combine the water, hops, barley wort, caramel, and bottom yeast then seal the barrel.";
|
||||
sSuccess="You combine the water, hops, barley wort, caramel, and bottomyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The stout lager is ruined.";
|
||||
sProduct = "item_fullkeg_020";
|
||||
sByproduct1 = "item001";
|
||||
@@ -494,7 +493,7 @@ void main()
|
||||
RemoveComponent(oPC,"SEED_HOPS",4);
|
||||
RemoveComponent(oPC,"ITEM_BUCKETOFWATER",5);
|
||||
RemoveComponent(oPC,"item_cask_002",1);
|
||||
sSuccess="You combine the water, hops, barley wort, and top yeast then seal the barrel.";
|
||||
sSuccess="You combine the water, hops, barley wort, and topyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The ale is ruined.";
|
||||
sProduct = "item_fullkeg_021";
|
||||
sByproduct1 = "item001";
|
||||
@@ -518,7 +517,7 @@ void main()
|
||||
RemoveComponent(oPC,"ITEM_BUCKETOFWATER",4);
|
||||
RemoveComponent(oPC,"item_cask_002",1);
|
||||
RemoveComponent(oPC,"item_syrup_004",2);
|
||||
sSuccess="You combine the water, hops, barley wort, caramel, and top yeast then seal the barrel.";
|
||||
sSuccess="You combine the water, hops, barley wort, caramel, and topyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The stout ale is ruined.";
|
||||
sProduct = "item_fullkeg_022";
|
||||
sByproduct1 = "item001";
|
||||
@@ -544,7 +543,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_cask_002",1);
|
||||
RemoveComponent(oPC,"item_syrup_004",2);
|
||||
RemoveComponent(oPC,"item_syrup_004",1);
|
||||
sSuccess="You combine the water, hops, barley wort, caramel, molasses, and top yeast then seal the barrel.";
|
||||
sSuccess="You combine the water, hops, barley wort, caramel, molasses, and topyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The porter ale is ruined.";
|
||||
sProduct = "item_fullkeg_023";
|
||||
sByproduct1 = "item001";
|
||||
@@ -570,7 +569,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_cask_002",1);
|
||||
RemoveComponent(oPC,"item_syrup_004",2);
|
||||
RemoveComponent(oPC,"item_juice_003",1);
|
||||
sSuccess="You combine the water, hops, barley wort, caramel, grape juice, and top yeast then seal the barrel.";
|
||||
sSuccess="You combine the water, hops, barley wort, caramel, grape juice, and topyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The barleywine ale is ruined.";
|
||||
sProduct = "item_fullkeg_024";
|
||||
sByproduct1 = "item001";
|
||||
@@ -596,7 +595,7 @@ void main()
|
||||
RemoveComponent(oPC,"ITEM_BUCKETOFWATER",4);
|
||||
RemoveComponent(oPC,"item_cask_002",1);
|
||||
RemoveComponent(oPC,"item_syrup_004",3);
|
||||
sSuccess="You combine the water, hops, barley wort, caramel, and top yeast then seal the barrel.";
|
||||
sSuccess="You combine the water, hops, barley wort, caramel, and topyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The kolsch ale is ruined.";
|
||||
sProduct = "item_fullkeg_025";
|
||||
sByproduct1 = "item001";
|
||||
@@ -620,7 +619,7 @@ void main()
|
||||
RemoveComponent(oPC,"ITEM_BUCKETOFWATER",2);
|
||||
RemoveComponent(oPC,"item_cask_003",1);
|
||||
RemoveComponent(oPC,"item_syrup_004",1);
|
||||
sSuccess="You combine the water, honey, caramel, and top yeast then seal the barrel.";
|
||||
sSuccess="You combine the water, honey, caramel, and topyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The honeymead is ruined.";
|
||||
sProduct = "item_fullkeg_026";
|
||||
sByproduct1 = "item001";
|
||||
@@ -641,7 +640,7 @@ void main()
|
||||
RemoveComponent(oPC,"ITEM_BUCKETOFWATER",2);
|
||||
RemoveComponent(oPC,"item_cask_003",1);
|
||||
RemoveComponent(oPC,"item_syrup_004",1);
|
||||
sSuccess="You combine the water, honey, caramel, and top yeast then seal the barrel.";
|
||||
sSuccess="You combine the water, honey, caramel, and topyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The sackmead is ruined.";
|
||||
sProduct = "item_fullkeg_027";
|
||||
sByproduct1 = "item001";
|
||||
@@ -665,7 +664,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_cask_003",1);
|
||||
RemoveComponent(oPC,"item_syrup_004",1);
|
||||
RemoveComponent(oPC,"ITEM_REDAPPLE",3);
|
||||
sSuccess="You combine the water, honey, caramel, apples, and top yeast then seal the barrel.";
|
||||
sSuccess="You combine the water, honey, caramel, apples, and topyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The apple muslin mead is ruined.";
|
||||
sProduct = "item_fullkeg_028";
|
||||
sByproduct1 = "item001";
|
||||
@@ -691,7 +690,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_syrup_004",1);
|
||||
RemoveComponent(oPC,"SEED_SPEARMINT",2);
|
||||
RemoveComponent(oPC,"SEED_PEPPERMINT",2);
|
||||
sSuccess="You combine the water, honey, caramel, mint leaves, and top yeast then seal the barrel.";
|
||||
sSuccess="You combine the water, honey, caramel, mint leaves, and topyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The metheglin is ruined.";
|
||||
sProduct = "item_fullkeg_029";
|
||||
sByproduct1 = "item001";
|
||||
@@ -715,7 +714,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_cask_003",1);
|
||||
RemoveComponent(oPC,"item_syrup_004",1);
|
||||
RemoveComponent(oPC,"SEED_BLUEBERRY",4);
|
||||
sSuccess="You combine the water, honey, caramel, blueberries, and top yeast then seal the barrel.";
|
||||
sSuccess="You combine the water, honey, caramel, blueberries, and topyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The morat is ruined.";
|
||||
sProduct = "item_fullkeg_030";
|
||||
sByproduct1 = "item001";
|
||||
@@ -741,7 +740,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_syrup_004",1);
|
||||
RemoveComponent(oPC,"SEED_GRAPE1",4);
|
||||
RemoveComponent(oPC,"SEED_GINGER",2);
|
||||
sSuccess="You combine the water, honey, caramel, grapes, ginger, and top yeast then seal the barrel.";
|
||||
sSuccess="You combine the water, honey, caramel, grapes, ginger, and topyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The hippocras is ruined.";
|
||||
sProduct = "item_fullkeg_031";
|
||||
sByproduct1 = "item001";
|
||||
@@ -765,7 +764,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_cask_003",1);
|
||||
RemoveComponent(oPC,"item_syrup_004",1);
|
||||
RemoveComponent(oPC,"SEED_GRAPE3",4);
|
||||
sSuccess="You combine the water, honey, caramel, grapes, and top yeast then seal the barrel.";
|
||||
sSuccess="You combine the water, honey, caramel, grapes, and topyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The pyment is ruined.";
|
||||
sProduct = "item_fullkeg_032";
|
||||
sByproduct1 = "item001";
|
||||
@@ -789,7 +788,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_cask_003",1);
|
||||
RemoveComponent(oPC,"item_syrup_004",1);
|
||||
RemoveComponent(oPC,"item_wort_001",2);
|
||||
sSuccess="You combine the water, honey, caramel, corn wort, and top yeast then seal the barrel.";
|
||||
sSuccess="You combine the water, honey, caramel, corn wort, and topyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The braggot is ruined.";
|
||||
sProduct = "item_fullkeg_033";
|
||||
sByproduct1 = "item001";
|
||||
@@ -813,7 +812,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_cask_003",1);
|
||||
RemoveComponent(oPC,"item_syrup_004",1);
|
||||
RemoveComponent(oPC,"item_juice_041",1);
|
||||
sSuccess="You combine the water, honey, caramel, vinegar, and top yeast then seal the barrel.";
|
||||
sSuccess="You combine the water, honey, caramel, vinegar, and topyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The oxymel is ruined.";
|
||||
sProduct = "item_fullkeg_034";
|
||||
sByproduct1 = "item001";
|
||||
@@ -839,7 +838,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_cask_003",1);
|
||||
RemoveComponent(oPC,"item_syrup_004",1);
|
||||
RemoveComponent(oPC,"SEED_ORIENTALPOPPY",2);
|
||||
sSuccess="You combine the water, honey, caramel, poppies, and top yeast then seal the barrel.";
|
||||
sSuccess="You combine the water, honey, caramel, poppies, and topyeast and seal the barrel.";
|
||||
sFail = "The yeast fails to ferment the ingredients. The rhodomel is ruined.";
|
||||
sProduct = "item_fullkeg_035";
|
||||
sByproduct1 = "item001";
|
||||
@@ -858,7 +857,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_wort_010",2);
|
||||
RemoveComponent(oPC,"item_cask_004",1);
|
||||
RemoveComponent(oPC,"item_syrup_004",1);
|
||||
sSuccess="You combine the distilled corn wort and caramel then seal the barrel.";
|
||||
sSuccess="You combine the distilled corn wort and caramel and seal the barrel.";
|
||||
sFail = "The whiskey fails to age properly and is ruined.";
|
||||
sProduct = "item_fullkeg_036";
|
||||
sFailKeg = "item_cask_004";
|
||||
@@ -874,7 +873,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_wort_013",2);
|
||||
RemoveComponent(oPC,"item_cask_004",1);
|
||||
RemoveComponent(oPC,"item_syrup_004",2);
|
||||
sSuccess="You combine the distilled acorn wort and caramel then seal the barrel.";
|
||||
sSuccess="You combine the distilled acorn wort and caramel and seal the barrel.";
|
||||
sFail = "The whiskey fails to age properly and is ruined.";
|
||||
sProduct = "item_fullkeg_037";
|
||||
sFailKeg = "item_cask_004";
|
||||
@@ -890,7 +889,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_wort_016",2);
|
||||
RemoveComponent(oPC,"item_cask_004",1);
|
||||
RemoveComponent(oPC,"item_syrup_002",1);
|
||||
sSuccess="You combine the distilled rice wort and molasses then seal the barrel.";
|
||||
sSuccess="You combine the distilled rice wort and molasses and seal the barrel.";
|
||||
sFail = "The sake fails to age properly and is ruined.";
|
||||
sProduct = "item_fullkeg_038";
|
||||
sFailKeg = "item_cask_004";
|
||||
@@ -909,7 +908,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_cask_004",1);
|
||||
RemoveComponent(oPC,"item_syrup_002",2);
|
||||
RemoveComponent(oPC,"item_yeast003",1);
|
||||
sSuccess="You combine the sugarcane, molasses, and yeast then seal the barrel.";
|
||||
sSuccess="You combine the sugarcane, molasses, and yeast and seal the barrel.";
|
||||
sFail = "The rum fails to age properly and is ruined.";
|
||||
sProduct = "item_fullkeg_039";
|
||||
sByproduct1 = "glassbottle";
|
||||
@@ -931,7 +930,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_syrup_002",2);
|
||||
RemoveComponent(oPC,"item_yeast003",2);
|
||||
RemoveComponent(oPC,"drink_cup_010",1);
|
||||
sSuccess="You combine the sugarcane, molasses, wine, and yeast then seal the barrel.";
|
||||
sSuccess="You combine the sugarcane, molasses, wine, and yeast and seal the barrel.";
|
||||
sFail = "The rum fails to age properly and is ruined.";
|
||||
sProduct = "item_fullkeg_040";
|
||||
sByproduct1 = "glassbottle";
|
||||
@@ -953,7 +952,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_syrup_002",2);
|
||||
RemoveComponent(oPC,"item_yeast003",2);
|
||||
RemoveComponent(oPC,"item_syrup_004",2);
|
||||
sSuccess="You combine the sugarcane, molasses, caramel, and yeast then seal the barrel.";
|
||||
sSuccess="You combine the sugarcane, molasses, caramel, and yeast and seal the barrel.";
|
||||
sFail = "The rum fails to age properly and is ruined.";
|
||||
sProduct = "item_fullkeg_041";
|
||||
sByproduct1 = "glassbottle";
|
||||
@@ -977,7 +976,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_yeast003",2);
|
||||
RemoveComponent(oPC,"ITEM_HONEY",2);
|
||||
RemoveComponent(oPC,"item_syrup_001",1);
|
||||
sSuccess="You combine the sugarcane, molasses, honey, syrup, and yeast then seal the barrel.";
|
||||
sSuccess="You combine the sugarcane, molasses, honey, syrup, and yeast and seal the barrel.";
|
||||
sFail = "The rum fails to age properly and is ruined.";
|
||||
sProduct = "item_fullkeg_042";
|
||||
sByproduct1 = "glassbottle";
|
||||
@@ -999,7 +998,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_syrup_002",4);
|
||||
RemoveComponent(oPC,"item_yeast003",2);
|
||||
RemoveComponent(oPC,"ITEM_BUCKETOFWATER",3);
|
||||
sSuccess="You combine the sugar, molasses, water, molasses, and yeast then seal the barrel.";
|
||||
sSuccess="You combine the sugar, molasses, water, molasses, and yeast and seal the barrel.";
|
||||
sFail = "The rum fails to age properly and is ruined.";
|
||||
sProduct = "item_fullkeg_043";
|
||||
sByproduct1 = "glassbottle";
|
||||
@@ -1010,7 +1009,7 @@ void main()
|
||||
}
|
||||
|
||||
//Other
|
||||
if (iBrew==74) // Vodka
|
||||
if (iBrew==73) // Vodka
|
||||
{
|
||||
iDifficulty = 100;
|
||||
if (CheckComponent(oPC,"item_wort_019",2)==FALSE) iMissing=1;
|
||||
@@ -1022,7 +1021,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_cask_006",1);
|
||||
RemoveComponent(oPC,"item_syrup_003",1);
|
||||
RemoveComponent(oPC,"ITEM_BUCKETOFWATER",2);
|
||||
sSuccess="You combine the distilled vodka base and sugar then seal the jug.";
|
||||
sSuccess="You combine the distilled vodka base snd sugar and seal the jug.";
|
||||
sFail = "The vodka fails to mature properly and is ruined.";
|
||||
sProduct = "item_fullkeg_045";
|
||||
sByproduct1= "item001";
|
||||
@@ -1030,7 +1029,7 @@ void main()
|
||||
sFailKeg = "item_cask_006";
|
||||
}
|
||||
|
||||
if (iBrew==75) // Gin
|
||||
if (iBrew==74) // Gin
|
||||
{
|
||||
iDifficulty = 100;
|
||||
if (CheckComponent(oPC,"item_fullkeg_045",1)==FALSE) iMissing=1;
|
||||
@@ -1040,7 +1039,7 @@ void main()
|
||||
RemoveComponent(oPC,"item_fullkeg_045",1);
|
||||
RemoveComponent(oPC,"item_juice_017",1);
|
||||
RemoveComponent(oPC,"item_juice_031",1);
|
||||
sSuccess="You combine the vodka, juniper berry juice, and sugarcane extract then seal the jug.";
|
||||
sSuccess="You combine the vodka, juniper berry juice, snd sugarcane extract and seal the jug.";
|
||||
sFail = "The gin fails to mature properly and is ruined.";
|
||||
sProduct = "item_fullkeg_046";
|
||||
sFailKeg = "item_cask_006";
|
||||
@@ -1054,12 +1053,7 @@ void main()
|
||||
return;
|
||||
}
|
||||
|
||||
//nwn database
|
||||
//int iBrewSkill = GetCampaignInt("UOACraft","iBrewSkill",oPC);
|
||||
|
||||
//external database
|
||||
int iBrewSkill = GetPersistentInt(oPC,"iBrewSkill","UOACraft");
|
||||
|
||||
int iBrewSkill = GetCampaignInt("UOACraft","iBrewSkill",oPC);
|
||||
int iBrewChance = iBrewSkill;
|
||||
|
||||
if (iBrewChance<350)
|
||||
@@ -1143,15 +1137,9 @@ void main()
|
||||
if (iBrewSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(13.0,SetTokenPair(oPC,13,3,iBrewSkill));
|
||||
|
||||
//nwn database
|
||||
//DelayCommand(12.5,SetCampaignInt("UOACraft","iBrewSkill",iBrewSkill,oPC));
|
||||
|
||||
//external database
|
||||
DelayCommand(12.5,SetPersistentInt(oPC,"iBrewSkill",iBrewSkill,0,"UOACraft"));
|
||||
|
||||
DelayCommand(12.5,SetCampaignInt("UOACraft","iBrewSkill",iBrewSkill,oPC));
|
||||
DelayCommand(12.5,SendMessageToPC(oPC,"=================================="));
|
||||
DelayCommand(12.5,SendMessageToPC(oPC,"Your skill in brewing has gone up!"));
|
||||
DelayCommand(12.5,SendMessageToPC(oPC,"Your skill in nrewing has gone up!"));
|
||||
DelayCommand(12.5,SendMessageToPC(oPC,"Current brewing skill : "+ sOldSkill+"%"));
|
||||
DelayCommand(12.5,SendMessageToPC(oPC,"=================================="));
|
||||
if (GetLocalInt(GetModule(),"_UOACraft_XP")!=0) DelayCommand(12.4,GiveXPToCreature(oPC,GetLocalInt(GetModule(),"_UOACraft_XP")));
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#include "nw_i0_plot"
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC, int iStackSize);
|
||||
void GetNextStackedItem(object oPC, string sItemTag, int iCount, int iMode, string sStackResRef);
|
||||
@@ -107,12 +106,7 @@ void main()
|
||||
return;
|
||||
}
|
||||
|
||||
// nwn database
|
||||
//int iCarpentrySkill = GetCampaignInt("UOACraft","iCarpentrySkill",oPC);
|
||||
|
||||
//external database
|
||||
int iCarpentrySkill = GetPersistentInt(oPC,"iCarpentrySkill","UOACraft");
|
||||
|
||||
int iCarpentrySkill = GetCampaignInt("UOACraft","iCarpentrySkill",oPC);
|
||||
int iCarpentryChance = iCarpentrySkill;
|
||||
|
||||
|
||||
@@ -185,7 +179,7 @@ void main()
|
||||
sItemResRefPoor = sItemResRef;
|
||||
sItemResRefExceptional = sItemResRef;
|
||||
sComponent1 = "WOOD_NORMAL"; //Normal Wood
|
||||
iComponent1 = 6;
|
||||
iComponent1 = 8;
|
||||
sComponent1Name="normal wood";
|
||||
}
|
||||
if (sTag == "pattern118") //Beer barrel
|
||||
@@ -439,13 +433,7 @@ void main()
|
||||
}
|
||||
if (iCarpentrySkill <= 1000)
|
||||
{
|
||||
|
||||
//nwn database
|
||||
//DelayCommand(13.0,SetCampaignInt("UOACraft","iCarpentrySkill",iCarpentrySkill,oPC));
|
||||
|
||||
//external database
|
||||
DelayCommand(13.0,SetPersistentInt(oPC,"iCarpentrySkill",iCarpentrySkill,0,"UOACraft"));
|
||||
|
||||
DelayCommand(13.0,SetCampaignInt("UOACraft","iCarpentrySkill",iCarpentrySkill,oPC));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"==================================="));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"Your skill in carpentry has gone up!"));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"Current carpentry skill : "+ sOldSkill+"%"));
|
||||
|
@@ -1,6 +1,4 @@
|
||||
#include "nw_i0_plot"
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC, int iStackSize);
|
||||
void GetNextStackedItem(object oPC, string sItemTag, int iCount, int iMode, string sStackResRef);
|
||||
void GetNextItemPossessedBy(object oPC, string sItemTag);
|
||||
@@ -14,13 +12,7 @@ void main()
|
||||
string sItemTag = GetTag(oItem);
|
||||
string sTagSelf = GetTag(oSelf);
|
||||
string sItemResRef;
|
||||
|
||||
//nwn database
|
||||
//int iCookSkill = GetCampaignInt("UOACraft","iCookSkill",oPC);
|
||||
|
||||
//external database
|
||||
int iCookSkill = GetPersistentInt(oPC,"iCookSkill","UOACraft");
|
||||
|
||||
int iCookSkill = GetCampaignInt("UOACraft","iCookSkill",oPC);
|
||||
int iCookChance = iCookSkill;
|
||||
int iDifficulty;
|
||||
string sComponent1;
|
||||
@@ -71,7 +63,7 @@ void main()
|
||||
// End of compatability portion.
|
||||
CopyItem(oItem,oPC,TRUE);
|
||||
DestroyObject(oItem);
|
||||
FloatingTextStringOnCreature("You can only cook by selecting a recipe!",oPC,FALSE);
|
||||
FloatingTextStringOnCreature("You can only cook by selecting a recipe.",oPC,FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -291,7 +283,7 @@ void main()
|
||||
}
|
||||
case 30:
|
||||
{
|
||||
sComponent1 = "MEAT_WOOLYRAZORBACK";
|
||||
sComponent1 = "MEAT_WOLLYRAZORBACK";
|
||||
sComponent1Name = "wooly razorback meat";
|
||||
break;
|
||||
}
|
||||
@@ -548,13 +540,7 @@ void main()
|
||||
if (iCookSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(13.0,SetTokenPair(oPC,13,3,iCookSkill));
|
||||
|
||||
//nwn database
|
||||
//DelayCommand(14.5,SetCampaignInt("UOACraft","iCookSkill",iCookSkill,oPC));
|
||||
|
||||
//external database
|
||||
DelayCommand(14.5,SetPersistentInt(oPC,"iCookSkill",iCookSkill,0,"UOACraft"));
|
||||
|
||||
DelayCommand(14.5,SetCampaignInt("UOACraft","iCookSkill",iCookSkill,oPC));
|
||||
DelayCommand(14.5,SendMessageToPC(oPC,"=================================="));
|
||||
DelayCommand(14.5,SendMessageToPC(oPC,"Your skill in cooking has gone up!"));
|
||||
DelayCommand(14.5,SendMessageToPC(oPC,"Current cooking skill : "+ sOldSkill+"%"));
|
||||
|
@@ -1,5 +1,4 @@
|
||||
//#include "_persist_01a"
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC, int iStackSize);
|
||||
|
||||
@@ -60,13 +59,7 @@ void main()
|
||||
}
|
||||
|
||||
//int iPaperSkill = GetTokenPair(oPC,13,13);
|
||||
|
||||
//nwn database
|
||||
//int iPaperSkill = GetCampaignInt("UOACraft","iPaperSkill",oPC);
|
||||
|
||||
//external database
|
||||
int iPaperSkill = GetPersistentInt(oPC,"iPaperSkill","UOACraft");
|
||||
|
||||
int iPaperSkill = GetCampaignInt("UOACraft","iPaperSkill",oPC);
|
||||
int iPaperChance = iPaperSkill;
|
||||
if (iPaperSkill <350)
|
||||
{
|
||||
@@ -346,7 +339,7 @@ void main()
|
||||
float fDelay = 29.0;
|
||||
for (iProduct; iProduct>0; iProduct=iProduct-10)
|
||||
{
|
||||
// SendMessageToPC(oPC,"iProduct = "+IntToString(iProduct));
|
||||
SendMessageToPC(oPC,"iProduct = "+IntToString(iProduct));
|
||||
fDelay=fDelay+1.0;
|
||||
if (iProduct>10)
|
||||
{
|
||||
@@ -401,13 +394,7 @@ void main()
|
||||
if (iPaperSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(30.0,SetTokenPair(oPC,13,13,iPaperSkill));
|
||||
|
||||
//nwn database
|
||||
//DelayCommand(30.0,SetCampaignInt("UOACraft","iPaperSkill",iPaperSkill,oPC));
|
||||
|
||||
//external database
|
||||
DelayCommand(30.0,SetPersistentInt(oPC,"iPaperSkill",iPaperSkill,0,"UOACraft"));
|
||||
|
||||
DelayCommand(30.0,SetCampaignInt("UOACraft","iPaperSkill",iPaperSkill,oPC));
|
||||
DelayCommand(30.0,SendMessageToPC(oPC,"======================================"));
|
||||
DelayCommand(30.0,SendMessageToPC(oPC,"Your skill in papermaking has gone up!"));
|
||||
DelayCommand(30.0,SendMessageToPC(oPC,"Current papermaking skill : "+ sOldSkill+"%"));
|
||||
|
@@ -1,5 +1,4 @@
|
||||
//#include "_persist_01a"
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC, int iStackSize);
|
||||
|
||||
@@ -132,13 +131,7 @@ void main()
|
||||
if (iDye>9) sDyeResRef = sDyeResRef+IntToString(iDye);
|
||||
|
||||
//int iDyeSkill = GetTokenPair(oPC,13,12); //Cloth Dyeing Skill
|
||||
|
||||
//nwn database
|
||||
//int iDyeSkill = GetCampaignInt("UOACraft","iDyeSkill",oPC);
|
||||
|
||||
//external database
|
||||
int iDyeSkill = GetPersistentInt(oPC,"iDyeSkill","UOACraft");
|
||||
|
||||
int iDyeSkill = GetCampaignInt("UOACraft","iDyeSkill",oPC);
|
||||
int iDyeChance = iDyeSkill;
|
||||
if (iDyeChance < 350)
|
||||
{
|
||||
@@ -236,13 +229,7 @@ void main()
|
||||
if (iDyeSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(13.0,SetTokenPair(oPC,13,12,iDyeSkill));
|
||||
|
||||
//nwn database
|
||||
//DelayCommand(13.0,SetCampaignInt("UOACraft","iDyeSkill",iDyeSkill,oPC));
|
||||
|
||||
//external database
|
||||
DelayCommand(13.0,SetPersistentInt(oPC,"iDyeSkill",iDyeSkill,0,"UOACraft"));
|
||||
|
||||
DelayCommand(13.0,SetCampaignInt("UOACraft","iDyeSkill",iDyeSkill,oPC));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"======================================="));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"Your skill in cloth dyeing has gone up!"));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"Current cloth dyeing skill : "+ sOldSkill+"%"));
|
||||
|
@@ -1,6 +1,5 @@
|
||||
//#include "_persist_01a"
|
||||
#include "nw_i0_plot"
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC, int iStackSize);
|
||||
string CraftLookup(string sResRef, int iIngotType);
|
||||
@@ -80,7 +79,7 @@ void main()
|
||||
int iItemStack2;
|
||||
object oItem2;
|
||||
|
||||
int iFletchingSkill = GetPersistentInt(oPC,"iFletchingSkill","UOACraft");
|
||||
int iFletchingSkill = GetCampaignInt("UOACraft","iFletchingSkill",oPC);
|
||||
int iFletchingChance = iFletchingSkill;
|
||||
|
||||
if (iFletchingChance <350)
|
||||
@@ -339,8 +338,8 @@ void main()
|
||||
DelayCommand(3.0,PlaySound("as_na_grassmove2"));
|
||||
DelayCommand(6.0,PlaySound("as_na_bushmove1"));
|
||||
DelayCommand(9.0,PlaySound("as_na_branchsnp2"));
|
||||
if (iShaftType==1) AssignCommand(oPC,DelayCommand(9.5,FloatingTextStringOnCreature("You create "+IntToString(iItemStack)+" arrows.",oPC,FALSE)));
|
||||
if (iShaftType==2) AssignCommand(oPC,DelayCommand(9.5,FloatingTextStringOnCreature("You create "+IntToString(iItemStack)+" bolts.",oPC,FALSE)));
|
||||
if (iShaftType==1) AssignCommand(oPC,DelayCommand(9.5,FloatingTextStringOnCreature("You careate "+IntToString(iItemStack)+" arrows.",oPC,FALSE)));
|
||||
if (iShaftType==2) AssignCommand(oPC,DelayCommand(9.5,FloatingTextStringOnCreature("You careate "+IntToString(iItemStack)+" bolts.",oPC,FALSE)));
|
||||
//create the product on the PC
|
||||
if (iQuality==1) DelayCommand(10.0,CreateAnObject(sItem1ResRef,oPC,iItemStack));
|
||||
if (iQuality==2) DelayCommand(10.0,CreateAnObject(sItem2ResRef,oPC,iItemStack));
|
||||
@@ -493,7 +492,7 @@ void main()
|
||||
if (iFletchingSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(12.0,SetTokenPair(oPC,13,2,iFletchingSkill));
|
||||
DelayCommand(12.0,SetPersistentInt(oPC,"iFletchingSkill",iFletchingSkill,0,"UOACraft"));
|
||||
DelayCommand(12.0,SetCampaignInt("UOACraft","iFletchingSkill",iFletchingSkill,oPC));
|
||||
DelayCommand(12.0,SendMessageToPC(oPC,"===================================="));
|
||||
DelayCommand(12.0,SendMessageToPC(oPC,"Your skill in fletching has gone up!"));
|
||||
DelayCommand(12.0,SendMessageToPC(oPC,"Current fletching skill : "+ sOldSkill+"%"));
|
||||
|
@@ -1,5 +1,4 @@
|
||||
//#include "_persist_01a"
|
||||
#include "aps_include"
|
||||
void CreateAnObject(string sResource, object oPC, int iStackSize);
|
||||
object CreatePlaceable(string sObject, location lPlace, float fDuration);
|
||||
string GetIngotType(object oItem, object oPC);
|
||||
@@ -153,7 +152,7 @@ void main()
|
||||
}
|
||||
|
||||
//int iSmeltChance = GetTokenPair(oPC,14,2);
|
||||
int iSmeltSkill = GetPersistentInt(oPC,"iSmeltSkill","UOACraft");
|
||||
int iSmeltSkill = GetCampaignInt("UOACraft","iSmeltSkill",oPC);
|
||||
int iSmeltChance = iSmeltSkill;
|
||||
//int iSmeltSkill = iSmeltChance;
|
||||
string sOre;
|
||||
@@ -510,7 +509,7 @@ void main()
|
||||
if (iSmeltSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(6.0,SetTokenPair(oPC,14,2,iSmeltSkill));
|
||||
DelayCommand(6.0,SetPersistentInt(oPC,"iSmeltSkill",iSmeltSkill,0,"UOACraft"));
|
||||
DelayCommand(6.0,SetCampaignInt("UOACraft","iSmeltSkill",iSmeltSkill,oPC));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"==================================="));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"Your skill in smelting has gone up!"));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"Current smelting skill : "+ sOldSkill+"%"));
|
||||
@@ -552,7 +551,6 @@ string GetIngotType(object oItem, object oPC)
|
||||
int iSmeltPenalty;
|
||||
int iSmeltMinimum;
|
||||
string sItemTag = GetTag(oItem);
|
||||
string sResRef = GetResRef(oItem);
|
||||
string sItemTagCut = GetStringRight(sItemTag,GetStringLength(sItemTag)-5);
|
||||
//SendMessageToPC(oPC,sItemTagCut);
|
||||
sIngotResRef = "INVALID";
|
||||
@@ -660,7 +658,7 @@ string GetIngotType(object oItem, object oPC)
|
||||
if (iBaseItem==BASE_ITEM_DAGGER) iMaxIngot=2;
|
||||
if (iBaseItem==BASE_ITEM_DIREMACE) iMaxIngot=15;
|
||||
if (iBaseItem==BASE_ITEM_DOUBLEAXE) iMaxIngot=15;
|
||||
if (iBaseItem==BASE_ITEM_GREATAXE) iMaxIngot=9;
|
||||
//if (iBaseItem==BASE_ITEM_GREATAXE) iMaxIngot=1;
|
||||
if (iBaseItem==BASE_ITEM_GREATSWORD) iMaxIngot=10;
|
||||
if (iBaseItem==BASE_ITEM_HALBERD) iMaxIngot=20;
|
||||
if (iBaseItem==BASE_ITEM_HANDAXE) iMaxIngot=3;
|
||||
@@ -764,18 +762,9 @@ string GetIngotType(object oItem, object oPC)
|
||||
}
|
||||
if (GetStringRight(sItemTag,11)=="_ADAMANTITE")
|
||||
{
|
||||
if ( (sResRef == "wblhl037") || (sResRef == "wblhl038") || (sResRef == "wblhl039") ) //platinum hammer
|
||||
{
|
||||
iSmeltPenalty=450;
|
||||
iSmeltMinimum=990;
|
||||
sIngotResRef= "ingot013";
|
||||
}
|
||||
else
|
||||
{
|
||||
iSmeltPenalty=450;
|
||||
iSmeltMinimum=990;
|
||||
sIngotResRef= "ingot012";
|
||||
}
|
||||
}
|
||||
|
||||
//Normal quality iron items have nwn default tags
|
||||
|
@@ -150,7 +150,7 @@ void main()
|
||||
}
|
||||
}
|
||||
|
||||
sSuccess = "The mineral bath reveals the gemstone to be "+sSuccess+".";
|
||||
sSuccess = "The mineral bath revelas the gemstone to be "+sSuccess+".";
|
||||
|
||||
// This snippet of code is cut-n-paste direct from ATS
|
||||
// Reason for this is because I had no clue how to assign an increase
|
||||
|
@@ -1,5 +1,4 @@
|
||||
//#include "_persist_01a"
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC, int iStackSize);
|
||||
|
||||
@@ -57,7 +56,7 @@ void main()
|
||||
}
|
||||
|
||||
//int iGemSkill = GetTokenPair(oPC,13,7);
|
||||
int iGemSkill = GetPersistentInt(oPC,"iGemSkill","UOACraft");
|
||||
int iGemSkill = GetCampaignInt("UOACraft","iGemSkill",oPC);
|
||||
int iGemChance = iGemSkill;
|
||||
if (iGemSkill <350)
|
||||
{
|
||||
@@ -210,12 +209,12 @@ void main()
|
||||
if (sItemResRef =="")
|
||||
{
|
||||
oItem = GetItemPossessedBy(OBJECT_SELF,sItemTag);
|
||||
sItemResRef = GetStringLeft(GetStringRight(sItemTag,GetStringLength(sItemTag)-13), 13) +"002";
|
||||
sItemResRef = GetStringRight(sItemTag,GetStringLength(sItemTag)-13)+"002";
|
||||
}
|
||||
|
||||
int iStackGems = GetNumStackedItems(oItem)-1;
|
||||
if (iStackGems>0) DelayCommand(1.0,CreateAnObject(sItemResRef,oPC,iStackGems));
|
||||
//SendMessageToPC(oPC,sItemResRef);
|
||||
SendMessageToPC(oPC,sItemResRef);
|
||||
int iSuccess = 0;
|
||||
if (Random(1000)<=iGemChance) iSuccess++;
|
||||
if (Random(1000)<=iGemChance) iSuccess++;
|
||||
@@ -234,7 +233,7 @@ void main()
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
DelayCommand(16.0,FloatingTextStringOnCreature("You barely manage to cut the gem, producing a poor quality cut gem.",oPC,FALSE));
|
||||
DelayCommand(16.0,FloatingTextStringOnCreature("You barely manage to cut the gem, produing a poor quality cut gem.",oPC,FALSE));
|
||||
sGemResRef = sGemResRef+"4";
|
||||
break;
|
||||
}
|
||||
@@ -242,17 +241,11 @@ void main()
|
||||
{
|
||||
DelayCommand(16.0,FloatingTextStringOnCreature("With an expert hand you produce the highest quality cut gem.",oPC,FALSE));
|
||||
sGemResRef = GetStringLeft(sItemResRef,GetStringLength(sItemResRef)-3);
|
||||
|
||||
if (GetStringLeft (sGemResRef, 11) == "starrosequa") sGemResRef = "starrosequartz";
|
||||
|
||||
if (GetStringLeft (sGemResRef, 11) == "orientalame") sGemResRef = "orientalamethyst";
|
||||
|
||||
if (GetStringLeft (sGemResRef, 11) == "orientaleme") sGemResRef = "orientalemerald";
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
DelayCommand(16.0,FloatingTextStringOnCreature("You successfully cut the gem, producing an average quality cut gem.",oPC,FALSE));
|
||||
DelayCommand(16.0,FloatingTextStringOnCreature("You successfully cut the gem, produing an average quality cut gem.",oPC,FALSE));
|
||||
sGemResRef = sGemResRef+"3";
|
||||
break;
|
||||
}
|
||||
@@ -307,7 +300,7 @@ void main()
|
||||
if (iGemSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(17.0,SetTokenPair(oPC,13,7,iGemSkill));
|
||||
DelayCommand(17.0,SetPersistentInt(oPC,"iGemSkill",iGemSkill,0,"UOACraft"));
|
||||
DelayCommand(17.0,SetCampaignInt("UOACraft","iGemSkill",iGemSkill,oPC));
|
||||
DelayCommand(17.0,SendMessageToPC(oPC,"======================================"));
|
||||
DelayCommand(17.0,SendMessageToPC(oPC,"Your skill in gem cutting has gone up!"));
|
||||
DelayCommand(17.0,SendMessageToPC(oPC,"Current gem cutting skill : "+ sOldSkill+"%"));
|
||||
|
@@ -1,5 +1,4 @@
|
||||
//#include "_persist_01a"
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC, int iStackSize);
|
||||
|
||||
@@ -204,7 +203,7 @@ void main()
|
||||
int iItem = GetNumStackedItems(oItem);
|
||||
|
||||
//int iPolishSkill = GetTokenPair(oPC,13,6);
|
||||
int iPolishSkill = GetPersistentInt(oPC,"iPolishSkill","UOACraft");
|
||||
int iPolishSkill = GetCampaignInt("UOACraft","iPolishSkill",oPC);
|
||||
int iPolishChance = iPolishSkill;
|
||||
if (iPolishChance <350)
|
||||
{
|
||||
@@ -293,7 +292,7 @@ void main()
|
||||
if (iPolishSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(31.0,SetTokenPair(oPC,13,6,iPolishSkill));
|
||||
DelayCommand(31.0,SetPersistentInt(oPC,"iPolishSkill",iPolishSkill,0,"UOACraft"));
|
||||
DelayCommand(31.0,SetCampaignInt("UOACraft","iPolishSkill",iPolishSkill,oPC));
|
||||
DelayCommand(31.0,SendMessageToPC(oPC,"======================================="));
|
||||
DelayCommand(31.0,SendMessageToPC(oPC,"Your skill in gem polishing has gone up!"));
|
||||
DelayCommand(31.0,SendMessageToPC(oPC,"Current gem polishing skill : "+ sOldSkill+"%"));
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,3 @@
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC);
|
||||
|
||||
void main()
|
||||
@@ -312,7 +310,7 @@ void main()
|
||||
oGlass = GetItemPossessedBy(oPC,"ITEM_GLASSVIAL");
|
||||
if (oGlass==OBJECT_INVALID)
|
||||
{
|
||||
FloatingTextStringOnCreature("You must have an empty glass vial to extract oils.",oPC,FALSE);
|
||||
FloatingTextStringOnCreature("You must have an empty glass bottle to extract oils.",oPC,FALSE);
|
||||
CopyItem(oItem,oPC,TRUE);
|
||||
DestroyObject(oItem,0.1);
|
||||
return;
|
||||
@@ -320,7 +318,7 @@ void main()
|
||||
}
|
||||
//DestroyObject(oGlass,0.1);
|
||||
|
||||
int iCookSkill = GetPersistentInt(oPC,"iCookSkill","UOACraft");
|
||||
int iCookSkill = GetCampaignInt("UOACraft","iCookSkill",oPC);
|
||||
int iCookChance = iCookSkill;
|
||||
|
||||
if (iCookChance<350)
|
||||
@@ -401,7 +399,7 @@ void main()
|
||||
if (iCookSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(13.0,SetTokenPair(oPC,13,3,iCookSkill));
|
||||
DelayCommand(6.5,SetPersistentInt(oPC,"iCookSkill",iCookSkill,0,"UOACraft"));
|
||||
DelayCommand(6.5,SetCampaignInt("UOACraft","iCookSkill",iCookSkill,oPC));
|
||||
DelayCommand(6.5,SendMessageToPC(oPC,"=================================="));
|
||||
DelayCommand(6.5,SendMessageToPC(oPC,"Your skill in cooking has gone up!"));
|
||||
DelayCommand(6.5,SendMessageToPC(oPC,"Current cooking skill : "+ sOldSkill+"%"));
|
||||
|
@@ -1,6 +1,5 @@
|
||||
//#include "_persist_01a"
|
||||
#include "nw_i0_plot"
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC);
|
||||
object CreatePlaceable(string sObject, location lPlace, float fDuration);
|
||||
@@ -38,7 +37,7 @@ void main()
|
||||
|
||||
if (GetLocalInt(OBJECT_SELF,"iAmInUse")!=0)
|
||||
{
|
||||
FloatingTextStringOnCreature("You must wait until the kiln is at the right temprature before starting any other item.",oPC,FALSE);
|
||||
FloatingTextStringOnCreature("You must wait until the kiln is cooled off before starting any other craft.",oPC,FALSE);
|
||||
if (iAdded != 99)CopyItem(oItem,oPC,TRUE);
|
||||
DestroyObject(oItem);
|
||||
return;
|
||||
@@ -194,7 +193,7 @@ void main()
|
||||
|
||||
|
||||
//int iGlassSkill = GetTokenPair(oPC,14,4);
|
||||
int iGlassSkill = GetPersistentInt(oPC,"iGlassSkill","UOACraft");
|
||||
int iGlassSkill = GetCampaignInt("UOACraft","iGlassSkill",oPC);
|
||||
int iGlassChance = iGlassSkill;
|
||||
object oFire = CreatePlaceable("plc_flamemedium", lFire, 6.0);
|
||||
|
||||
@@ -227,7 +226,7 @@ void main()
|
||||
if (iGlassChance < 250) iGlassChance = 0;
|
||||
sCraft = "glassingot";
|
||||
sSuccessString = "You melt the sand into a Glass Ingot";
|
||||
sFailString = "The glass turns murky, and the ingot shatters as it cools.";
|
||||
sFailString = "The glass turns murky and the ingot shatters as it cools.";
|
||||
sSoundFail = "as_cv_glasbreak2";
|
||||
sSoundSuccess = "as_cv_barglass2";
|
||||
eFail = EffectVisualEffect(VFX_COM_BLOOD_SPARK_LARGE,FALSE);
|
||||
@@ -243,7 +242,7 @@ void main()
|
||||
iGlassChance = iGlassChance - 50;
|
||||
sCraft = "smallcastmold";
|
||||
sSuccessString = "You successfully glaze the small cast mold.";
|
||||
sFailString = "The clay turns brittle, and the mold shatters as it cools.";
|
||||
sFailString = "The clay turns brittle and the mold shatters as it cools.";
|
||||
sSoundFail = "as_cv_claybreak3";
|
||||
sSoundSuccess = "as_cv_claybreak1";
|
||||
eFail = EffectVisualEffect(VFX_COM_BLOOD_SPARK_LARGE,FALSE);
|
||||
@@ -257,7 +256,7 @@ void main()
|
||||
iGlassChance = iGlassChance - 50;
|
||||
sCraft = "smallcastmold003";
|
||||
sSuccessString = "You successfully glaze the ring mold.";
|
||||
sFailString = "The clay turns brittle, and the mold shatters as it cools.";
|
||||
sFailString = "The clay turns brittle and the mold shatters as it cools.";
|
||||
sSoundFail = "as_cv_claybreak3";
|
||||
sSoundSuccess = "as_cv_claybreak1";
|
||||
eFail = EffectVisualEffect(VFX_COM_BLOOD_SPARK_LARGE,FALSE);
|
||||
@@ -270,7 +269,7 @@ void main()
|
||||
iGlassChance = iGlassChance - 250;
|
||||
sCraft = "smallcastmold004";
|
||||
sSuccessString = "You successfully glaze the necklace mold.";
|
||||
sFailString = "The clay turns brittle, and the mold shatters as it cools.";
|
||||
sFailString = "The clay turns brittle and the mold shatters as it cools.";
|
||||
sSoundFail = "as_cv_claybreak3";
|
||||
sSoundSuccess = "as_cv_claybreak1";
|
||||
eFail = EffectVisualEffect(VFX_COM_BLOOD_SPARK_LARGE,FALSE);
|
||||
@@ -283,7 +282,7 @@ void main()
|
||||
iGlassChance = iGlassChance - 350;
|
||||
sCraft = "smallcastmold005";
|
||||
sSuccessString = "You successfully glaze the amulet mold.";
|
||||
sFailString = "The clay turns brittle, and the mold shatters as it cools.";
|
||||
sFailString = "The clay turns brittle and the mold shatters as it cools.";
|
||||
sSoundFail = "as_cv_claybreak3";
|
||||
sSoundSuccess = "as_cv_claybreak1";
|
||||
eFail = EffectVisualEffect(VFX_COM_BLOOD_SPARK_LARGE,FALSE);
|
||||
@@ -296,7 +295,7 @@ void main()
|
||||
iGlassChance = iGlassChance - 150;
|
||||
sCraft = "smallcastmold001";
|
||||
sSuccessString = "You successfully glaze the medium cast mold.";
|
||||
sFailString = "The clay turns brittle, and the mold shatters as it cools.";
|
||||
sFailString = "The clay turns brittle and the mold shatters as it cools.";
|
||||
sSoundFail = "as_cv_claybreak3";
|
||||
sSoundSuccess = "as_cv_claybreak1";
|
||||
eFail = EffectVisualEffect(VFX_COM_BLOOD_SPARK_LARGE,FALSE);
|
||||
@@ -309,7 +308,7 @@ void main()
|
||||
iGlassChance = iGlassChance - 250;
|
||||
sCraft = "smallcastmold002";
|
||||
sSuccessString = "You successfully glaze the large cast mold.";
|
||||
sFailString = "The clay turns brittle, and the mold shatters as it cools.";
|
||||
sFailString = "The clay turns brittle and the mold shatters as it cools.";
|
||||
sSoundFail = "as_cv_claybreak3";
|
||||
sSoundSuccess = "as_cv_claybreak1";
|
||||
eFail = EffectVisualEffect(VFX_COM_BLOOD_SPARK_LARGE,FALSE);
|
||||
@@ -323,7 +322,7 @@ void main()
|
||||
iGlassChance = iGlassChance - 75;
|
||||
sCraft = "glassvial";
|
||||
sSuccessString = "You successfully blow and shape the glass vial.";
|
||||
sFailString = "The vial turns murky, and shatters as it cools.";
|
||||
sFailString = "The vial turns murky and shatters as it cools.";
|
||||
sSoundFail = "as_cv_glasbreak2";
|
||||
sSoundSuccess = "as_cv_barglass2";
|
||||
eFail = EffectVisualEffect(VFX_COM_BLOOD_SPARK_LARGE,FALSE);
|
||||
@@ -337,7 +336,7 @@ void main()
|
||||
iGlassChance = iGlassChance - 250;
|
||||
sCraft = "glassbottle";
|
||||
sSuccessString = "You successfully blow and shape the glass bottle.";
|
||||
sFailString = "The bottle turns murky, and shatters as it cools.";
|
||||
sFailString = "The bottle turns murky and shatters as it cools.";
|
||||
sSoundFail = "as_cv_glasbreak2";
|
||||
sSoundSuccess = "as_cv_barglass2";
|
||||
eFail = EffectVisualEffect(VFX_COM_BLOOD_SPARK_LARGE,FALSE);
|
||||
@@ -352,7 +351,7 @@ void main()
|
||||
iCreated=2;
|
||||
sCraft = "yeastvial001";
|
||||
sSuccessString = "You successfully blow and shape the yeast vials.";
|
||||
sFailString = "The vials turn murky, and shatter as they cool.";
|
||||
sFailString = "The vials turn murky and shatter as they cool.";
|
||||
sSoundFail = "as_cv_glasbreak2";
|
||||
sSoundSuccess = "as_cv_barglass2";
|
||||
eFail = EffectVisualEffect(VFX_COM_BLOOD_SPARK_LARGE,FALSE);
|
||||
@@ -366,7 +365,7 @@ void main()
|
||||
iGlassChance = iGlassChance - 400;
|
||||
sCraft = "item_cask_006";
|
||||
sSuccessString = "You successfully blow and shape the cider jug.";
|
||||
sFailString = "The jug turns murky, and shatters as it cools.";
|
||||
sFailString = "The jug turns murky and shatters as it cools.";
|
||||
sSoundFail = "as_cv_glasbreak2";
|
||||
sSoundSuccess = "as_cv_barglass2";
|
||||
eFail = EffectVisualEffect(VFX_COM_BLOOD_SPARK_LARGE,FALSE);
|
||||
@@ -457,7 +456,7 @@ void main()
|
||||
if (iGlassSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(5.0,SetTokenPair(oPC,14,4,iGlassSkill));
|
||||
DelayCommand(6.0,SetPersistentInt(oPC,"iGlassSkill",iGlassSkill,0,"UOACraft"));
|
||||
DelayCommand(6.0,SetCampaignInt("UOACraft","iGlassSkill",iGlassSkill,oPC));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"============================"));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"Your Kiln skill has gone up!"));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"Current Kiln skill : "+ sOldSkill+"%"));
|
||||
|
@@ -1,5 +1,3 @@
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC, int iProduct);
|
||||
|
||||
void main()
|
||||
@@ -116,7 +114,7 @@ void main()
|
||||
}
|
||||
DestroyObject(oSugar,0.2);
|
||||
|
||||
int iBrewSkill = GetPersistentInt(oPC,"iBrewSkill","UOACraft");
|
||||
int iBrewSkill = GetCampaignInt("UOACraft","iBrewSkill",oPC);
|
||||
int iBrewChance = iBrewSkill;
|
||||
|
||||
if (iBrewChance<350)
|
||||
@@ -209,7 +207,7 @@ void main()
|
||||
if (iBrewSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(13.0,SetTokenPair(oPC,13,3,iBrewSkill));
|
||||
DelayCommand(12.5,SetPersistentInt(oPC,"iBrewSkill",iBrewSkill,0,"UOACraft"));
|
||||
DelayCommand(12.5,SetCampaignInt("UOACraft","iBrewSkill",iBrewSkill,oPC));
|
||||
DelayCommand(12.5,SendMessageToPC(oPC,"=================================="));
|
||||
DelayCommand(12.5,SendMessageToPC(oPC,"Your skill in brewing has gone up!"));
|
||||
DelayCommand(12.5,SendMessageToPC(oPC,"Current brewing skill : "+ sOldSkill+"%"));
|
||||
|
@@ -1,6 +1,5 @@
|
||||
//#include "_persist_01a"
|
||||
#include "nw_i0_plot"
|
||||
#include "aps_include"
|
||||
|
||||
void GetNextItemPossessedBy(object oPC, string sItemTag);
|
||||
object CreatePlaceable(string sObject, location lPlace, float fDuration);
|
||||
@@ -42,7 +41,7 @@ void main()
|
||||
if (GetLocalInt(OBJECT_SELF,"iAmInUse") != 0)
|
||||
{
|
||||
CopyItem(oItem,oPC,TRUE);
|
||||
SendMessageToPC(oPC,"You must wait till the hide currently being worked is done before starting another.");
|
||||
SendMessageToPC(oPC,"You must wait till the hide in the tanning bath is done before starting another.");
|
||||
DestroyObject(oItem);
|
||||
return;
|
||||
}
|
||||
@@ -62,7 +61,7 @@ void main()
|
||||
int iTanMode = GetLocalInt(oPC,"iTanningMode");
|
||||
//int iTanChance = GetTokenPair(oPC,14,11);
|
||||
//int iTanSkill = iTanChance;
|
||||
int iTanSkill = GetPersistentInt(oPC,"iLeatherSkill","UOACraft");
|
||||
int iTanSkill = GetCampaignInt("UOACraft","iLeatherSkill",oPC);
|
||||
int iTanChance = iTanSkill;
|
||||
int iTanOil = 1;
|
||||
int iBeeswax = 1;
|
||||
@@ -414,7 +413,7 @@ void main()
|
||||
if (iTanSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(6.0,SetTokenPair(oPC,14,11,iTanSkill));
|
||||
DelayCommand(6.0,SetPersistentInt(oPC,"iLeatherSkill",iTanSkill,0,"UOACraft"));
|
||||
DelayCommand(6.0,SetCampaignInt("UOACraft","iLeatherSkill",iTanSkill,oPC));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"========================================="));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"Your skill in leatherworking has gone up!"));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"Current leatherworking skill : "+ sOldSkill+"%"));
|
||||
|
@@ -1,6 +1,5 @@
|
||||
//#include "_persist_01a"
|
||||
#include "nw_i0_plot"
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC, int iStackSize);
|
||||
void GetNextItemPossessedBy(object oPC, string sItemTag);
|
||||
@@ -41,7 +40,7 @@ void main()
|
||||
CopyObject(oItem,GetLocation(oSelf),oSelf,GetTag(oItem));
|
||||
|
||||
//int iClothSkill = GetTokenPair(oPC,13,4); // Clothmaking
|
||||
int iClothSkill = GetPersistentInt(oPC,"iClothSkill","UOACraft");
|
||||
int iClothSkill = GetCampaignInt("UOACraft","iClothSkill",oPC);
|
||||
int iClothChance = iClothSkill;
|
||||
if (iClothChance < 350)
|
||||
{
|
||||
@@ -195,7 +194,7 @@ void main()
|
||||
if (iClothSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(13.0,SetTokenPair(oPC,13,4,iClothSkill));
|
||||
DelayCommand(13.0,SetPersistentInt(oPC,"iClothSkill",iClothSkill,0,"UOACraft"));
|
||||
DelayCommand(13.0,SetCampaignInt("UOACraft","iClothSkill",iClothSkill,oPC));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"========================================="));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"Your skill in clothmaking has gone up!"));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"Current clothmaking skill : "+ sOldSkill+"%"));
|
||||
|
@@ -1,4 +1,3 @@
|
||||
#include "aps_include"
|
||||
void CreateAnObject(string sResource, object oPC, int iProduct);
|
||||
|
||||
void main()
|
||||
@@ -102,7 +101,7 @@ void main()
|
||||
}
|
||||
|
||||
|
||||
int iBrewSkill = GetPersistentInt(oPC,"iBrewSkill","UOACraft");
|
||||
int iBrewSkill = GetCampaignInt("UOACraft","iBrewSkill",oPC);
|
||||
int iBrewChance = iBrewSkill;
|
||||
|
||||
if (iBrewChance<350)
|
||||
@@ -198,9 +197,9 @@ void main()
|
||||
if (iBrewSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(13.0,SetTokenPair(oPC,13,3,iBrewSkill));
|
||||
DelayCommand(12.5,SetPersistentInt(oPC,"iBrewSkill",iBrewSkill,0,"UOACraft"));
|
||||
DelayCommand(12.5,SetCampaignInt("UOACraft","iBrewSkill",iBrewSkill,oPC));
|
||||
DelayCommand(12.5,SendMessageToPC(oPC,"=================================="));
|
||||
DelayCommand(12.5,SendMessageToPC(oPC,"Your skill in brewing has gone up!"));
|
||||
DelayCommand(12.5,SendMessageToPC(oPC,"Your skill in nrewing has gone up!"));
|
||||
DelayCommand(12.5,SendMessageToPC(oPC,"Current brewing skill : "+ sOldSkill+"%"));
|
||||
DelayCommand(12.5,SendMessageToPC(oPC,"=================================="));
|
||||
if (GetLocalInt(GetModule(),"_UOACraft_XP")!=0) DelayCommand(12.4,GiveXPToCreature(oPC,GetLocalInt(GetModule(),"_UOACraft_XP")));
|
||||
|
@@ -1,4 +1,3 @@
|
||||
#include "aps_include"
|
||||
void CreateAnObject(string sResource, object oPC);
|
||||
|
||||
void main()
|
||||
@@ -131,7 +130,7 @@ void main()
|
||||
return;
|
||||
}
|
||||
|
||||
int iCookSkill = GetPersistentInt(oPC,"iCookSkill","UOACraft");
|
||||
int iCookSkill = GetCampaignInt("UOACraft","iCookSkill",oPC);
|
||||
int iCookChance = iCookSkill;
|
||||
DestroyObject(oItem,0.1);
|
||||
|
||||
@@ -214,7 +213,7 @@ void main()
|
||||
if (iCookSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(13.0,SetTokenPair(oPC,13,3,iCookSkill));
|
||||
DelayCommand(14.5,SetPersistentInt(oPC,"iCookSkill",iCookSkill,0,"UOACraft"));
|
||||
DelayCommand(14.5,SetCampaignInt("UOACraft","iCookSkill",iCookSkill,oPC));
|
||||
DelayCommand(14.5,SendMessageToPC(oPC,"=================================="));
|
||||
DelayCommand(14.5,SendMessageToPC(oPC,"Your skill in cooking has gone up!"));
|
||||
DelayCommand(14.5,SendMessageToPC(oPC,"Current cooking skill : "+ sOldSkill+"%"));
|
||||
|
@@ -1,5 +1,4 @@
|
||||
//#include "_persist_01a"
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC, int iStackSize);
|
||||
|
||||
@@ -34,7 +33,7 @@ void main()
|
||||
if (GetStringLeft(sItemTag,5)!="pulp_")
|
||||
{
|
||||
CopyItem(oItem,oPC,TRUE);
|
||||
FloatingTextStringOnCreature("This is not bleached pulp.",oPC,FALSE);
|
||||
FloatingTextStringOnCreature("This is not bleached pulp...",oPC,FALSE);
|
||||
DestroyObject(oItem);
|
||||
return;
|
||||
}
|
||||
@@ -42,7 +41,7 @@ void main()
|
||||
if (GetStringRight(sItemTag,3)!="001") //pulp_wood_raw001, pulp_rice_raw001, pulp_silk_raw001
|
||||
{
|
||||
CopyItem(oItem,oPC,TRUE);
|
||||
FloatingTextStringOnCreature("You must first bleach this pulp before pressing and making it into paper.",oPC,FALSE);
|
||||
FloatingTextStringOnCreature("You must first bleach this pulp before pressing and baking it into paper.",oPC,FALSE);
|
||||
DestroyObject(oItem);
|
||||
return;
|
||||
}
|
||||
@@ -50,7 +49,7 @@ void main()
|
||||
if (GetLocalInt(OBJECT_SELF,"iAmInUse")!=0)
|
||||
{
|
||||
CopyItem(oItem,oPC,TRUE);
|
||||
FloatingTextStringOnCreature("The paper mill is not yet done with it's current task.",oPC,FALSE);
|
||||
FloatingTextStringOnCreature("The paper mill is not yet done with it's current task....",oPC,FALSE);
|
||||
DestroyObject(oItem);
|
||||
return;
|
||||
}
|
||||
@@ -83,7 +82,7 @@ void main()
|
||||
}
|
||||
|
||||
//int iPaperSkill = GetTokenPair(oPC,13,13);
|
||||
int iPaperSkill = GetPersistentInt(oPC,"iPaperSkill","UOACraft");
|
||||
int iPaperSkill = GetCampaignInt("UOACraft","iPaperSkill",oPC);
|
||||
int iPaperChance = iPaperSkill;
|
||||
if (iPaperSkill <350)
|
||||
{
|
||||
@@ -226,7 +225,7 @@ void main()
|
||||
if (iPaperSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(30.0,SetTokenPair(oPC,13,13,iPaperSkill));
|
||||
DelayCommand(30.0,SetPersistentInt(oPC,"iPaperSkill",iPaperSkill,0,"UOACraft"));
|
||||
DelayCommand(30.0,SetCampaignInt("UOACraft","iPaperSkill",iPaperSkill,oPC));
|
||||
DelayCommand(30.0,SendMessageToPC(oPC,"======================================"));
|
||||
DelayCommand(30.0,SendMessageToPC(oPC,"Your skill in papermaking has gone up!"));
|
||||
DelayCommand(30.0,SendMessageToPC(oPC,"Current papermaking skill : "+ sOldSkill+"%"));
|
||||
@@ -242,7 +241,7 @@ void main()
|
||||
if (iStackSize>1) iStackSize = Random(iStackSize)-1;
|
||||
if (iStackSize>0)
|
||||
{
|
||||
DelayCommand(31.0,FloatingTextStringOnCreature("You manage to recover some of the pulp.",oPC,FALSE));
|
||||
DelayCommand(31.0,FloatingTextStringOnCreature("You manage to recover some of the pulp..",oPC,FALSE));
|
||||
DelayCommand(31.0,CreateAnObject(sItemTag,oPC,iStackSize));
|
||||
DestroyObject(oItem);
|
||||
return;
|
||||
|
@@ -1,6 +1,5 @@
|
||||
//#include "_persist_01a"
|
||||
#include "nw_i0_plot"
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC, int iStackSize);
|
||||
void GetNextStackedItem(object oPC, string sItemTag, int iCount, int iMode, string sStackResRef);
|
||||
@@ -34,7 +33,7 @@ void main()
|
||||
{
|
||||
if (iUseMode!=99) CopyItem(oItem,oPC,TRUE);
|
||||
if (iUseMode==99) CopyObject(oItem,GetLocation(oSelf),oSelf,GetTag(oItem));
|
||||
FloatingTextStringOnCreature("The pulp basin is not yet ready for more materials.",oPC,FALSE);
|
||||
FloatingTextStringOnCreature("The pulp basin is not yet ready for more materials...",oPC,FALSE);
|
||||
DestroyObject(oItem);
|
||||
return;
|
||||
}
|
||||
@@ -50,7 +49,7 @@ void main()
|
||||
if (sItemTag=="P_PULP_BLEACHED_SILK")
|
||||
{
|
||||
SetLocalInt(oPC,"iPulpType",1);
|
||||
FloatingTextStringOnCreature("Setting up to bleach wood pulp with silk additive.",oPC,FALSE);
|
||||
FloatingTextStringOnCreature("Setting up to bleach wood pulp with silk addative.",oPC,FALSE);
|
||||
}
|
||||
string sTagSelf = GetTag(oSelf);
|
||||
AssignCommand(oPC,DoPlaceableObjectAction(oSelf,PLACEABLE_ACTION_USE));
|
||||
@@ -97,7 +96,7 @@ void main()
|
||||
|
||||
|
||||
//int iPaperSkill = GetTokenPair(oPC,13,7);
|
||||
int iPaperSkill = GetPersistentInt(oPC,"iPaperSkill","UOACraft");
|
||||
int iPaperSkill = GetCampaignInt("UOACraft","iPaperSkill",oPC);
|
||||
int iPaperChance = iPaperSkill;
|
||||
if (iPaperSkill <350)
|
||||
{
|
||||
@@ -155,7 +154,7 @@ void main()
|
||||
if (iPulpType==1)
|
||||
{
|
||||
sResRef = "pulp_silk_raw001";
|
||||
sSuccess = "You carefully stir in the silk strands, and process the silk and wood pulp with the pulp bleach.";
|
||||
sSuccess = "You carefully stir in the silk strands and process the silk and wood pulp with the pulp bleach.";
|
||||
}
|
||||
}
|
||||
if (sItemTag=="pulp_rice_raw")
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#include "nw_i0_plot"
|
||||
#include "aps_include"
|
||||
|
||||
string GetInk(object oItem);
|
||||
string GetComponent(object oItem);
|
||||
@@ -58,7 +57,7 @@ void main()
|
||||
int iDifficulty;
|
||||
int iRandom;
|
||||
int iSkillGain;
|
||||
int iScribeSkill = GetPersistentInt(oPC,"iScribeSkill","UOACraft");
|
||||
int iScribeSkill = GetCampaignInt("UOACraft","iScribeSkill",oPC);
|
||||
int iScribeChance = iScribeSkill;
|
||||
if (iScribeChance < 350)
|
||||
{
|
||||
@@ -184,7 +183,7 @@ void main()
|
||||
|
||||
if (iDifficulty>iScribeChance)
|
||||
{
|
||||
DelayCommand(1.0,FloatingTextStringOnCreature("You have no idea how to prepare this ink.",oPC,FALSE));
|
||||
DelayCommand(1.0,FloatingTextStringOnCreature("You have no idea how to prepare this ink...",oPC,FALSE));
|
||||
CopyObject(oItem,GetLocation(oSelf),oSelf,GetTag(oItem));
|
||||
DestroyObject(oItem);
|
||||
return;
|
||||
@@ -212,7 +211,7 @@ void main()
|
||||
//Check for components
|
||||
if (CheckComponent(oPC,sComponent1,sComponent2,sComponent3,1,1,1,1,1,2)==0)
|
||||
{
|
||||
DelayCommand(12.0,FloatingTextStringOnCreature("You do not have all of the components required to mix this ink.",oPC,FALSE));
|
||||
DelayCommand(12.0,FloatingTextStringOnCreature("You do not have all of the components required to mix this ink...",oPC,FALSE));
|
||||
//CopyObject(oItem,GetLocation(oSelf),oSelf,sOldTag);
|
||||
CreateItemOnObject(GetResRef(oItem),OBJECT_SELF,1);
|
||||
DestroyObject(oItem);
|
||||
@@ -270,7 +269,7 @@ void main()
|
||||
if (iScribeSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(13.0,SetTokenPair(oPC,13,12,iDyeSkill));
|
||||
DelayCommand(13.0,SetPersistentInt(oPC,"iScribeSkill",iScribeSkill,0,"UOACraft"));
|
||||
DelayCommand(13.0,SetCampaignInt("UOACraft","iScribeSkill",iScribeSkill,oPC));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"======================================"));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"Your skill in inscription has gone up!"));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"Current inscription skill : "+ sOldSkill+"%"));
|
||||
@@ -361,7 +360,7 @@ void main()
|
||||
|
||||
if (CheckComponent(oPC,sComponent1,sComponent2,sComponent3,1,1,1,1,1,2)==0)
|
||||
{
|
||||
DelayCommand(15.0,FloatingTextStringOnCreature("The magic fails to imbue the scroll. You may be missing a vital component.",oPC,FALSE));
|
||||
DelayCommand(15.0,FloatingTextStringOnCreature("The magic fails to imbue the scroll. You may be missing a vital component...",oPC,FALSE));
|
||||
//CopyObject(oItem,GetLocation(oSelf),oSelf,sOldTag);
|
||||
CreateItemOnObject(GetResRef(oItem),OBJECT_SELF,1);
|
||||
DestroyObject(oItem);
|
||||
|
@@ -1,5 +1,4 @@
|
||||
//#include "_persist_01a"
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC, int iStackSize);
|
||||
void SpinNextItemPossessedBy(object oSelf, object oPC, string sItemTag);
|
||||
@@ -92,7 +91,7 @@ void main()
|
||||
|
||||
|
||||
//int iSpindleSkill = GetTokenPair(oPC,13,10);
|
||||
int iSpindleSkill = GetPersistentInt(oPC,"iSpindleSkill","UOACraft");
|
||||
int iSpindleSkill = GetCampaignInt("UOACraft","iSpindleSkill",oPC);
|
||||
int iSpindleChance = iSpindleSkill;
|
||||
int iSuccess = 0;
|
||||
int iSuccess2 = 0;
|
||||
@@ -215,7 +214,7 @@ void main()
|
||||
if (iSpindleSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(10.0,SetTokenPair(oPC,13,10,iSpindleSkill));
|
||||
DelayCommand(10.0,SetPersistentInt(oPC,"iSpindleSkill",iSpindleSkill,0,"UOACraft"));
|
||||
DelayCommand(10.0,SetCampaignInt("UOACraft","iSpindleSkill",iSpindleSkill,oPC));
|
||||
DelayCommand(10.0,SendMessageToPC(oPC,"==================================="));
|
||||
DelayCommand(10.0,SendMessageToPC(oPC,"Your skill in spindling has gone up!"));
|
||||
DelayCommand(10.0,SendMessageToPC(oPC,"Current spindling skill : "+ sOldSkill+"%"));
|
||||
@@ -270,7 +269,7 @@ void SpinNextItemPossessedBy(object oSelf, object oPC, string sItemTag)
|
||||
|
||||
|
||||
//int iSpindleSkill = GetTokenPair(oPC,13,10);
|
||||
int iSpindleSkill = GetPersistentInt(oPC,"iSpindleSkill","UOACraft");
|
||||
int iSpindleSkill = GetCampaignInt("UOACraft","iSpindleSkill",oPC);
|
||||
int iSpindleChance = iSpindleSkill;
|
||||
int iSuccess = 0;
|
||||
int iSuccess2 = 0;
|
||||
@@ -393,7 +392,7 @@ void SpinNextItemPossessedBy(object oSelf, object oPC, string sItemTag)
|
||||
if (iSpindleSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(10.0,SetTokenPair(oPC,13,10,iSpindleSkill));
|
||||
DelayCommand(10.0,SetPersistentInt(oPC,"iSpindleSkill",iSpindleSkill,0,"UOACraft"));
|
||||
DelayCommand(10.0,SetCampaignInt("UOACraft","iSpindleSkill",iSpindleSkill,oPC));
|
||||
DelayCommand(10.0,SendMessageToPC(oPC,"==================================="));
|
||||
DelayCommand(10.0,SendMessageToPC(oPC,"Your skill in spindling has gone up!"));
|
||||
DelayCommand(10.0,SendMessageToPC(oPC,"Current spindling skill : "+ sOldSkill+"%"));
|
||||
|
@@ -1,5 +1,3 @@
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC, int iProduct);
|
||||
|
||||
void main()
|
||||
@@ -158,12 +156,13 @@ void main()
|
||||
if (sProduct1=="INVALID")
|
||||
{
|
||||
SendMessageToPC(oPC,"You may not distill this item!");
|
||||
CopyItem(oItem,oPC,TRUE);
|
||||
DestroyObject(oItem,0.1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int iBrewSkill = GetPersistentInt(oPC,"iBrewSkill","UOACraft");
|
||||
int iBrewSkill = GetCampaignInt("UOACraft","iBrewSkill",oPC);
|
||||
int iBrewChance = iBrewSkill;
|
||||
|
||||
if (iBrewChance<350)
|
||||
@@ -252,9 +251,9 @@ void main()
|
||||
if (iBrewSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(13.0,SetTokenPair(oPC,13,3,iBrewSkill));
|
||||
DelayCommand(12.5,SetPersistentInt(oPC,"iBrewSkill",iBrewSkill,0,"UOACraft"));
|
||||
DelayCommand(12.5,SetCampaignInt("UOACraft","iBrewSkill",iBrewSkill,oPC));
|
||||
DelayCommand(12.5,SendMessageToPC(oPC,"=================================="));
|
||||
DelayCommand(12.5,SendMessageToPC(oPC,"Your skill in brewing has gone up!"));
|
||||
DelayCommand(12.5,SendMessageToPC(oPC,"Your skill in nrewing has gone up!"));
|
||||
DelayCommand(12.5,SendMessageToPC(oPC,"Current brewing skill : "+ sOldSkill+"%"));
|
||||
DelayCommand(12.5,SendMessageToPC(oPC,"=================================="));
|
||||
if (GetLocalInt(GetModule(),"_UOACraft_XP")!=0) DelayCommand(12.4,GiveXPToCreature(oPC,GetLocalInt(GetModule(),"_UOACraft_XP")));
|
||||
|
@@ -1,6 +1,6 @@
|
||||
//#include "_persist_01a"
|
||||
#include "nw_i0_plot"
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC, int iStackSize);
|
||||
void GetNextStackedItem(object oPC, string sItemTag, int iCount, int iMode, string sStackResRef);
|
||||
void GetNextItemPossessedBy(object oPC, string sItemTag);
|
||||
@@ -98,7 +98,7 @@ void main()
|
||||
}
|
||||
|
||||
//int iTailorSkill = GetTokenPair(oPC,13,9);
|
||||
int iTailorSkill = GetPersistentInt(oPC,"iTailorSkill","UOACraft");
|
||||
int iTailorSkill = GetCampaignInt("UOACraft","iTailorSkill",oPC);
|
||||
int iTailorChance = iTailorSkill;
|
||||
if (iTailorChance < 350)
|
||||
{
|
||||
@@ -727,7 +727,7 @@ void main()
|
||||
if (iTailorSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(13.0,SetTokenPair(oPC,13,9,iTailorSkill));
|
||||
DelayCommand(13.0,SetPersistentInt(oPC,"iTailorSkill",iTailorSkill,0,"UOACraft"));
|
||||
DelayCommand(13.0,SetCampaignInt("UOACraft","iTailorSkill",iTailorSkill,oPC));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"===================================="));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"Your skill in tailoring has gone up!"));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"Current tailoring skill : "+ sOldSkill+"%"));
|
||||
|
@@ -1,6 +1,6 @@
|
||||
//#include "_persist_01a"
|
||||
#include "nw_i0_plot"
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC, int iStackSize);
|
||||
void GetNextStackedItem(object oPC, string sItemTag, int iCount, int iMode, string sStackResRef);
|
||||
void GetNextItemPossessedBy(object oPC, string sItemTag);
|
||||
@@ -104,7 +104,7 @@ void main()
|
||||
}
|
||||
|
||||
//int iTailorSkill = GetTokenPair(oPC,13,9);
|
||||
int iTailorSkill = GetPersistentInt(oPC,"iTailorSkill","UOACraft");
|
||||
int iTailorSkill = GetCampaignInt("UOACraft","iTailorSkill",oPC);
|
||||
int iTailorChance = iTailorSkill;
|
||||
if (iTailorChance < 350)
|
||||
{
|
||||
@@ -375,8 +375,8 @@ void main()
|
||||
{
|
||||
//iTailorChance = iTailorChance - 200;
|
||||
sItemResRefPoor = CraftLookup("cloth002",iClothType);
|
||||
sItemResRef = CraftLookup("cloth246",iClothType);
|
||||
sItemResRefExceptional = CraftLookup("cloth247",iClothType);
|
||||
sItemResRef = CraftLookup("cloth237",iClothType);
|
||||
sItemResRefExceptional = CraftLookup("cloth238",iClothType);
|
||||
sComponent1 = sComponentPre+"COPPER"; //
|
||||
sComponent1Name = "bolts of copper dyed cloth";
|
||||
}
|
||||
@@ -574,7 +574,7 @@ void main()
|
||||
if (iTailorSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(13.0,SetTokenPair(oPC,13,9,iTailorSkill));
|
||||
DelayCommand(13.0,SetPersistentInt(oPC,"iTailorSkill",iTailorSkill,0,"UOACraft"));
|
||||
DelayCommand(13.0,SetCampaignInt("UOACraft","iTailorSkill",iTailorSkill,oPC));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"===================================="));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"Your skill in tailoring has gone up!"));
|
||||
DelayCommand(13.0,SendMessageToPC(oPC,"Current tailoring skill : "+ sOldSkill+"%"));
|
||||
|
@@ -1,6 +1,6 @@
|
||||
//#include "_persist_01a"
|
||||
#include "nw_i0_plot"
|
||||
#include "aps_include"
|
||||
|
||||
void GetNextItemPossessedBy(object oPC, string sItemTag);
|
||||
object CreatePlaceable(string sObject, location lPlace, float fDuration);
|
||||
void CreateAnObject(string sResource, object oPC, int iStackSize);
|
||||
@@ -55,7 +55,7 @@ void main()
|
||||
}
|
||||
|
||||
//int iTanChance = GetTokenPair(oPC,14,10);
|
||||
int iTanSkill = GetPersistentInt(oPC,"iTanSkill","UOACraft");
|
||||
int iTanSkill = GetCampaignInt("UOACraft","iTanSkill",oPC);
|
||||
//int iTanSkill = iTanChance;
|
||||
int iTanChance = iTanSkill;
|
||||
int iTanAcid = 1;
|
||||
@@ -362,7 +362,7 @@ void main()
|
||||
if (iTanSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(6.0,SetTokenPair(oPC,14,10,iTanSkill));
|
||||
DelayCommand(6.0,SetPersistentInt(oPC,"iTanSkill",iTanSkill,0,"UOACraft"));
|
||||
DelayCommand(6.0,SetCampaignInt("UOACraft","iTanSkill",iTanSkill,oPC));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"=================================="));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"Your skill in tanning has gone up!"));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"Current tanning skill : "+ sOldSkill+"%"));
|
||||
|
@@ -1,6 +1,6 @@
|
||||
//#include "_persist_01a"
|
||||
#include "nw_i0_plot"
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC);
|
||||
void GetNextItemPossessedBy(object oPC, string sItemTag);
|
||||
object CreatePlaceable(string sObject, location lPlace, float fDuration);
|
||||
@@ -57,7 +57,7 @@ void main()
|
||||
|
||||
//int iTanChance = GetTokenPair(oPC,14,9);
|
||||
//int iTanSkill = iTanChance;
|
||||
int iTanSkill = GetPersistentInt(oPC,"iCureSkill","UOACraft");
|
||||
int iTanSkill = GetCampaignInt("UOACraft","iCureSkill",oPC);
|
||||
int iTanChance = iTanSkill;
|
||||
int iKindling = 1;
|
||||
int iSalt = 1;
|
||||
@@ -447,7 +447,7 @@ void main()
|
||||
if (iTanSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(6.0,SetTokenPair(oPC,14,9,iTanSkill));
|
||||
DelayCommand(6.0,SetPersistentInt(oPC,"iCureSkill",iTanSkill,0,"UOACraft"));
|
||||
DelayCommand(6.0,SetCampaignInt("UOACraft","iCureSkill",iTanSkill,oPC));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"================================="));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"Your skill in curing has gone up!"));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"Current curing skill : "+ sOldSkill+"%"));
|
||||
|
@@ -1,6 +1,6 @@
|
||||
//#include "_persist_01a"
|
||||
#include "nw_i0_plot"
|
||||
#include "aps_include"
|
||||
|
||||
void CreateAnObject(string sResource, object oPC, int iStackCount);
|
||||
object CreatePlaceable(string sObject, location lPlace, float fDuration);
|
||||
void GetNextItemPossessedBy(object oPC, string sItemTag);
|
||||
@@ -135,7 +135,7 @@ void main()
|
||||
//check for tool
|
||||
if (oTool==OBJECT_INVALID)
|
||||
{
|
||||
FloatingTextStringOnCreature("You do not have any tinker's toolset to work with.",oPC,FALSE);
|
||||
FloatingTextStringOnCreature("You do not have any tools to work with..",oPC,FALSE);
|
||||
if (iAdded==99)
|
||||
{
|
||||
CopyItem(oItem,oPC,TRUE); //Return stackable PC dropped into table
|
||||
@@ -147,7 +147,7 @@ void main()
|
||||
//Check for 'in use'
|
||||
if (GetLocalInt(oSelf,"iAmInUse")!=0)
|
||||
{
|
||||
FloatingTextStringOnCreature("Only one item at a time may be tinkered here.",oPC,FALSE);
|
||||
FloatingTextStringOnCreature("Only one item at a time may be tinkered here..",oPC,FALSE);
|
||||
if (iAdded==99)
|
||||
{
|
||||
CopyItem(oItem,oPC,TRUE); //Return stackable PC dropped into table
|
||||
@@ -160,7 +160,7 @@ void main()
|
||||
|
||||
|
||||
//int iGlassSkill = GetTokenPair(oPC,14,5);
|
||||
int iGlassSkill = GetPersistentInt(oPC,"iTinkerSkill","UOACraft");
|
||||
int iGlassSkill = GetCampaignInt("UOACraft","iTinkerSkill",oPC);
|
||||
int iGlassChance = iGlassSkill;
|
||||
if (iGlassChance <350)
|
||||
{
|
||||
@@ -174,14 +174,14 @@ void main()
|
||||
|
||||
if (iAdded==0)
|
||||
{
|
||||
if (GetStringRight(sItemResRef,3)=="001") // Tinkers toolset
|
||||
if (GetStringRight(sItemResRef,3)=="001") // Tinkers toolkit
|
||||
{
|
||||
iComponent1 =2;
|
||||
sComponent1 = "INGOT_IRON";
|
||||
sComponent1Name = "iron ingots";
|
||||
sCraft = "tinkerstoolset";
|
||||
sSuccessString = "You successfully create a new tinker toolset.";
|
||||
sFailString = "Your measurements are off, and as a result the toolset is unuseable.";
|
||||
sFailString = "Your measurements are off and as a result the toolset is unuseable.";
|
||||
}
|
||||
|
||||
if (GetStringRight(sItemResRef,3)=="008") //shovel
|
||||
@@ -192,7 +192,7 @@ void main()
|
||||
iGlassChance = iGlassChance - 50;
|
||||
sCraft = "shovel";
|
||||
sSuccessString = "You successfully create a new shovel.";
|
||||
sFailString = "The measurements are off, and as a result the shovel is unuseable.";
|
||||
sFailString = "The measurements are off and as a result the shovel is unuseable.";
|
||||
}
|
||||
|
||||
if (GetStringRight(sItemResRef,3)=="005") // sewing kit
|
||||
@@ -203,7 +203,7 @@ void main()
|
||||
iGlassChance = iGlassChance - 10;
|
||||
sCraft = "sewingkit";
|
||||
sSuccessString = "You successfully create a tailor's sewing kit.";
|
||||
sFailString = "Your measurements are off, and as a result the sewing kit is unuseable.";
|
||||
sFailString = "Your measurements are off and as a result the sewing kit is unuseable.";
|
||||
}
|
||||
|
||||
if (GetStringRight(sItemResRef,3)=="006") // miners pick
|
||||
@@ -214,7 +214,7 @@ void main()
|
||||
iGlassChance = iGlassChance - 50;
|
||||
sCraft = "minerspick";
|
||||
sSuccessString = "You successfully create a new miner's pick.";
|
||||
sFailString = "The measurements are off, and as a result the miner's pick is unuseable.";
|
||||
sFailString = "The measurements are off and as a result the miner's pick is unuseable.";
|
||||
}
|
||||
|
||||
if (GetStringRight(sItemResRef,3)=="007") // miners pickaxe
|
||||
@@ -225,7 +225,7 @@ void main()
|
||||
iGlassChance = iGlassChance - 50;
|
||||
sCraft = "minerspickaxe";
|
||||
sSuccessString = "You successfully create a new miner's pickaxe.";
|
||||
sFailString = "The measurements are off, and as a result the miner's pickaxe is unuseable.";
|
||||
sFailString = "The measurements are off and as a result the miner's pickaxe is unuseable.";
|
||||
}
|
||||
|
||||
if (GetStringRight(sItemResRef,3)=="009") // woodcutters axe
|
||||
@@ -236,7 +236,7 @@ void main()
|
||||
iGlassChance = iGlassChance - 250;
|
||||
sCraft = "woodsmansaxe";
|
||||
sSuccessString = "You successfully create a new woodcutting axe.";
|
||||
sFailString = "The measurements are off, and as a result the axe is unuseable.";
|
||||
sFailString = "The measurements are off and as a result the axe is unuseable.";
|
||||
}
|
||||
|
||||
if (GetStringRight(sItemResRef,3)=="012") // herbalist knife
|
||||
@@ -247,7 +247,7 @@ void main()
|
||||
iGlassChance = iGlassChance - 20;
|
||||
sCraft = "herbalistsknife";
|
||||
sSuccessString = "You successfully create a new herbalist's knife.";
|
||||
sFailString = "The measurements are off, and as a result the knife is unuseable.";
|
||||
sFailString = "The measurements are off and as a result the knife is unuseable.";
|
||||
}
|
||||
|
||||
if (GetStringRight(sItemResRef,3)=="079") // Orchard Blade
|
||||
@@ -257,8 +257,8 @@ void main()
|
||||
sComponent1Name = "iron ingots";
|
||||
iGlassChance = iGlassChance - 250;
|
||||
sCraft = "orchardblade";
|
||||
sSuccessString = "You successfully create a new orchard blade.";
|
||||
sFailString = "The measurements are off, and as a result the blade is unuseable.";
|
||||
sSuccessString = "You successfully create a new orchard blade..";
|
||||
sFailString = "The measurements are off and as a result the blade is unuseable.";
|
||||
}
|
||||
|
||||
if (GetStringRight(sItemResRef,3)=="080") // Fillet Knife
|
||||
@@ -268,8 +268,8 @@ void main()
|
||||
sComponent1Name = "iron ingots";
|
||||
iGlassChance = iGlassChance - 300;
|
||||
sCraft = "filletknife";
|
||||
sSuccessString = "You successfully create a new fillet knife.";
|
||||
sFailString = "The measurements are off, and as a result the knife is unuseable.";
|
||||
sSuccessString = "You successfully create a new fillet knife..";
|
||||
sFailString = "The measurements are off and as a result the knife is unuseable.";
|
||||
}
|
||||
|
||||
if (GetStringRight(sItemResRef,3)=="081") // Glass Arrowhead
|
||||
@@ -285,7 +285,7 @@ void main()
|
||||
iGlassChance = iGlassChance - 500;
|
||||
sCraft = "glassarrowhea";
|
||||
iTemp = 50; //50 max stack
|
||||
sFailString = "The measurements are off, and as a result the arrowheads shatter.";
|
||||
sFailString = "The measurements are off and as a result the arrowheads shatter.";
|
||||
}
|
||||
if (GetStringRight(sItemResRef,3)=="082") // Glass Bolt Tip
|
||||
{
|
||||
@@ -300,7 +300,7 @@ void main()
|
||||
iGlassChance = iGlassChance - 500;
|
||||
sCraft = "glassbolttip";
|
||||
iTemp = 50; //50 max stack
|
||||
sFailString = "The measurements are off, and as a result the bolt tips shatter.";
|
||||
sFailString = "The measurements are off and as a result the bolt tips shatter.";
|
||||
}
|
||||
if (GetStringRight(sItemResRef,3)=="083") // Glass Sling Bullets
|
||||
{
|
||||
@@ -315,19 +315,19 @@ void main()
|
||||
iGlassChance = iGlassChance - 600;
|
||||
sCraft = "glassbullet";
|
||||
iTemp = 99; //50 max stack
|
||||
sFailString = "The measurements are off, and as a result the glass bullets shatter.";
|
||||
sFailString = "The measurements are off and as a result the glass bullets shatter.";
|
||||
}
|
||||
if (GetStringRight(sItemResRef,3)=="089") // Smith Hammer
|
||||
if (GetStringRight(sItemResRef,3)=="089") // Excavation Tools
|
||||
{
|
||||
//iComponent1Stackable=0;
|
||||
//iStackable=1;
|
||||
iComponent1 =6;
|
||||
sComponent1 = "INGOT_IRON";
|
||||
sComponent1Name = "iron ingots";
|
||||
iGlassChance = iGlassChance - 10;
|
||||
sCraft = "blacksmithhammer";
|
||||
sFailString = "The measurements are off, and as a result the smith hammer is useless.";
|
||||
}
|
||||
iGlassChance = iGlassChance - 400;
|
||||
sCraft = "item_excavation";
|
||||
sFailString = "The measurements are off and as a result the excavation tools are useless.";
|
||||
}
|
||||
if (GetStringRight(sItemResRef,3)=="112") // Carpenters Tools
|
||||
{
|
||||
//iComponent1Stackable=0;
|
||||
@@ -337,7 +337,7 @@ void main()
|
||||
sComponent1Name = "iron ingots";
|
||||
//iGlassChance = iGlassChance - 400;
|
||||
sCraft = "carpenters_tools";
|
||||
sFailString = "The measurements are off, and as a result the carpenter's tools are useless.";
|
||||
sFailString = "The measurements are off and as a result the carpenters tools are useless.";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -794,7 +794,7 @@ void main()
|
||||
if (iGlassSkill <= 1000)
|
||||
{
|
||||
//DelayCommand(5.0,SetTokenPair(oPC,14,5,iGlassSkill));
|
||||
DelayCommand(6.0,SetPersistentInt(oPC,"iTinkerSkill",iGlassSkill,0,"UOACraft"));
|
||||
DelayCommand(6.0,SetCampaignInt("UOACraft","iTinkerSkill",iGlassSkill,oPC));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"================================="));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"Your Tinkering skill has gone up!"));
|
||||
DelayCommand(6.0,SendMessageToPC(oPC,"Current Tinkering skill : "+ sOldSkill+"%"));
|
||||
|
@@ -6,11 +6,10 @@ void GetNextItemPossessedBy(object oPC, string sItemTag);
|
||||
void GetNextStackedItem(object oPC, string sEssenceTag, int iCount);
|
||||
void CreateAnObject(string sResource, object oPC, int iStackSize);
|
||||
object CreatePlaceable(string sObject, location lPlace, float fDuration);
|
||||
object oTestValid=OBJECT_INVALID;
|
||||
object oTestValid = OBJECT_INVALID;
|
||||
void EnchantArmor(object oItem,int wBonus);
|
||||
void EnPowerArmor(object oItem,int DamageType,int DamageQty);
|
||||
void GiveToPC(object oItem, object oPC);
|
||||
void GetItemPossessedBy(object oPC,string sEssence);
|
||||
string sDialogResRef="";
|
||||
string sEssence;
|
||||
void main()
|
||||
@@ -606,7 +605,7 @@ int iEnchantChance = iEnchantSkill;
|
||||
case 1:
|
||||
{
|
||||
sEssence = "essence001";
|
||||
if(GetItemPossessedBy(oPC,sEssence) != oTestValid)
|
||||
if(GetItemPossessedBy(oPC,sEssence) != OBJECT_INVALID)
|
||||
{
|
||||
SetLocalInt(oPC,"DamageType",IP_CONST_DAMAGETYPE_ACID);
|
||||
SetLocalInt(oPC,"DamageQty",IP_CONST_DAMAGERESIST_10);
|
||||
@@ -616,7 +615,7 @@ int iEnchantChance = iEnchantSkill;
|
||||
case 2:
|
||||
{
|
||||
sEssence = "essence017";
|
||||
if(GetItemPossessedBy(oPC,sEssence) != oTestValid)
|
||||
if(GetItemPossessedBy(oPC,sEssence) != OBJECT_INVALID)
|
||||
{
|
||||
SetLocalInt(oPC,"DamageType",IP_CONST_DAMAGETYPE_COLD);
|
||||
SetLocalInt(oPC,"DamageQty",IP_CONST_DAMAGERESIST_10);
|
||||
@@ -626,7 +625,7 @@ int iEnchantChance = iEnchantSkill;
|
||||
case 3:
|
||||
{
|
||||
sEssence = "essence006";
|
||||
if(GetItemPossessedBy(oPC,sEssence) != oTestValid)
|
||||
if(GetItemPossessedBy(oPC,sEssence) != OBJECT_INVALID)
|
||||
{
|
||||
SetLocalInt(oPC,"DamageType",IP_CONST_DAMAGETYPE_ELECTRICAL);
|
||||
SetLocalInt(oPC,"DamageQty",IP_CONST_DAMAGERESIST_10);
|
||||
@@ -636,7 +635,7 @@ int iEnchantChance = iEnchantSkill;
|
||||
case 4:
|
||||
{
|
||||
sEssence = "essence011";
|
||||
if(GetItemPossessedBy(oPC,sEssence) != oTestValid)
|
||||
if(GetItemPossessedBy(oPC,sEssence) != OBJECT_INVALID)
|
||||
{
|
||||
SetLocalInt(oPC,"DamageType",IP_CONST_DAMAGETYPE_FIRE);
|
||||
SetLocalInt(oPC,"DamageQty",IP_CONST_DAMAGERESIST_10);
|
||||
@@ -646,7 +645,7 @@ int iEnchantChance = iEnchantSkill;
|
||||
case 5:
|
||||
{
|
||||
sEssence = "essence001";
|
||||
if(GetItemPossessedBy(oPC,sEssence) != oTestValid)
|
||||
if(GetItemPossessedBy(oPC,sEssence) != OBJECT_INVALID)
|
||||
{
|
||||
SetLocalInt(oPC,"DamageType",IP_CONST_DAMAGETYPE_ACID);
|
||||
SetLocalInt(oPC,"DamageQty",IP_CONST_DAMAGERESIST_15);
|
||||
@@ -656,7 +655,7 @@ int iEnchantChance = iEnchantSkill;
|
||||
case 6:
|
||||
{
|
||||
sEssence = "essence017";
|
||||
if(GetItemPossessedBy(oPC,sEssence) != oTestValid)
|
||||
if(GetItemPossessedBy(oPC,sEssence) != OBJECT_INVALID)
|
||||
{
|
||||
SetLocalInt(oPC,"DamageType",IP_CONST_DAMAGETYPE_COLD);
|
||||
SetLocalInt(oPC,"DamageQty",IP_CONST_DAMAGERESIST_15);
|
||||
@@ -666,7 +665,7 @@ int iEnchantChance = iEnchantSkill;
|
||||
case 7:
|
||||
{
|
||||
sEssence = "essence006";
|
||||
if(GetItemPossessedBy(oPC,sEssence) != oTestValid)
|
||||
if(GetItemPossessedBy(oPC,sEssence) != OBJECT_INVALID)
|
||||
{
|
||||
SetLocalInt(oPC,"DamageType",IP_CONST_DAMAGETYPE_ELECTRICAL);
|
||||
SetLocalInt(oPC,"DamageQty",IP_CONST_DAMAGERESIST_15);
|
||||
@@ -676,7 +675,7 @@ int iEnchantChance = iEnchantSkill;
|
||||
case 8:
|
||||
{
|
||||
sEssence = "essence011";
|
||||
if(GetItemPossessedBy(oPC,sEssence) != oTestValid)
|
||||
if(GetItemPossessedBy(oPC,sEssence) != OBJECT_INVALID)
|
||||
{
|
||||
SetLocalInt(oPC,"DamageType",IP_CONST_DAMAGETYPE_FIRE);
|
||||
SetLocalInt(oPC,"DamageQty",IP_CONST_DAMAGERESIST_15);
|
||||
@@ -686,7 +685,7 @@ int iEnchantChance = iEnchantSkill;
|
||||
case 9:
|
||||
{
|
||||
sEssence = "essence001";
|
||||
if(GetItemPossessedBy(oPC,sEssence) != oTestValid)
|
||||
if(GetItemPossessedBy(oPC,sEssence) != OBJECT_INVALID)
|
||||
{
|
||||
SetLocalInt(oPC,"DamageType",IP_CONST_DAMAGETYPE_ACID);
|
||||
SetLocalInt(oPC,"DamageQty",IP_CONST_DAMAGERESIST_20);
|
||||
@@ -696,7 +695,7 @@ int iEnchantChance = iEnchantSkill;
|
||||
case 10:
|
||||
{
|
||||
sEssence = "essence017";
|
||||
if(GetItemPossessedBy(oPC,sEssence) != oTestValid)
|
||||
if(GetItemPossessedBy(oPC,sEssence) != OBJECT_INVALID)
|
||||
{
|
||||
SetLocalInt(oPC,"DamageType",IP_CONST_DAMAGETYPE_COLD);
|
||||
SetLocalInt(oPC,"DamageQty",IP_CONST_DAMAGERESIST_20);
|
||||
@@ -706,7 +705,7 @@ int iEnchantChance = iEnchantSkill;
|
||||
case 11:
|
||||
{
|
||||
sEssence = "essence006";
|
||||
if(GetItemPossessedBy(oPC,sEssence) != oTestValid)
|
||||
if(GetItemPossessedBy(oPC,sEssence) != OBJECT_INVALID)
|
||||
{
|
||||
SetLocalInt(oPC,"DamageType",IP_CONST_DAMAGETYPE_ELECTRICAL);
|
||||
SetLocalInt(oPC,"DamageQty",IP_CONST_DAMAGERESIST_20);
|
||||
@@ -716,7 +715,7 @@ int iEnchantChance = iEnchantSkill;
|
||||
case 12:
|
||||
{
|
||||
sEssence = "essence011";
|
||||
if(GetItemPossessedBy(oPC,sEssence) != oTestValid)
|
||||
if(GetItemPossessedBy(oPC,sEssence) != OBJECT_INVALID)
|
||||
{
|
||||
SetLocalInt(oPC,"DamageType",IP_CONST_DAMAGETYPE_FIRE);
|
||||
SetLocalInt(oPC,"DamageQty",IP_CONST_DAMAGERESIST_20);
|
||||
@@ -726,7 +725,7 @@ int iEnchantChance = iEnchantSkill;
|
||||
case 13:
|
||||
{
|
||||
sEssence = "essence016";
|
||||
if(GetItemPossessedBy(oPC,sEssence) != oTestValid)
|
||||
if(GetItemPossessedBy(oPC,sEssence) != OBJECT_INVALID)
|
||||
{
|
||||
SetLocalInt(oPC,"DamageType",IP_CONST_DAMAGETYPE_SLASHING);
|
||||
SetLocalInt(oPC,"DamageQty",IP_CONST_DAMAGERESIST_15);
|
||||
@@ -736,7 +735,7 @@ int iEnchantChance = iEnchantSkill;
|
||||
case 14:
|
||||
{
|
||||
sEssence = "essence016";
|
||||
if(GetItemPossessedBy(oPC,sEssence) != oTestValid)
|
||||
if(GetItemPossessedBy(oPC,sEssence) != OBJECT_INVALID)
|
||||
{
|
||||
SetLocalInt(oPC,"DamageType",IP_CONST_DAMAGETYPE_PIERCING);
|
||||
SetLocalInt(oPC,"DamageQty",IP_CONST_DAMAGERESIST_15);
|
||||
@@ -746,7 +745,7 @@ int iEnchantChance = iEnchantSkill;
|
||||
case 15:
|
||||
{
|
||||
sEssence = "essence016";
|
||||
if(GetItemPossessedBy(oPC,sEssence) != oTestValid)
|
||||
if(GetItemPossessedBy(oPC,sEssence) != OBJECT_INVALID)
|
||||
{
|
||||
SetLocalInt(oPC,"DamageType",IP_CONST_DAMAGETYPE_BLUDGEONING);
|
||||
SetLocalInt(oPC,"DamageQty",IP_CONST_DAMAGERESIST_15);
|
||||
@@ -756,7 +755,7 @@ int iEnchantChance = iEnchantSkill;
|
||||
case 16:
|
||||
{
|
||||
sEssence = "essence016";
|
||||
if(GetItemPossessedBy(oPC,sEssence) != oTestValid)
|
||||
if(GetItemPossessedBy(oPC,sEssence) != OBJECT_INVALID)
|
||||
{
|
||||
SetLocalInt(oPC,"DamageType",IP_CONST_DAMAGETYPE_NEGATIVE);
|
||||
SetLocalInt(oPC,"DamageQty",IP_CONST_DAMAGERESIST_15);
|
||||
|
@@ -11,7 +11,6 @@ object oTestValid=OBJECT_INVALID;
|
||||
void EnchantArmor(object oItem,int wBonus);
|
||||
void EnPowerArmor(object oItem,int DamageType,int DamageQty);
|
||||
void GiveToPC(object oItem, object oPC);
|
||||
void GetItemPossessedBy(object oPC,string sEssence);
|
||||
string sDialogResRef="";
|
||||
string sEssence;
|
||||
void main()
|
||||
|
156
_module/nss/_kb_inc_invmgmt.nss
Normal file
156
_module/nss/_kb_inc_invmgmt.nss
Normal file
@@ -0,0 +1,156 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// // //
|
||||
// _kb_inc_invmgmt (include file) // VERSION 3.3 //
|
||||
// // //
|
||||
// by Scrotok on 9 Feb 03 ////////////////////////////
|
||||
// Thanks to Keron Blackfeld for 99% of the work! //
|
||||
// email Questions and Comments to: jnbplatte@intellisys.net //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// CAUTION: You MUST re-save/compile (or press F7 for "Save and Compile") //
|
||||
// the "_kb_corpse_death" and "_kb_corpse_distb" scripts if you make any //
|
||||
// changes to "_kb_inc_invmgmt" (for programmers only: because it is an //
|
||||
// #include file). //
|
||||
// //
|
||||
// CAUTION: You MUST re-save (not the F7 key!) "_kb_loot_corpse" if you make //
|
||||
// any changes to "_kb_inc_invmgmt" (for programmers only: because it is an //
|
||||
// #include file). To re-save it, make a change to the script, then UNDO //
|
||||
// the change, then re-save. //
|
||||
// //
|
||||
// NEWBIES: You don't need to place this script anywhere -- it's already //
|
||||
// taken care of for you. //
|
||||
// //
|
||||
// This script works in conjunction with the "_kb_loot_corpse" script. It //
|
||||
// contains common functions used in "_kb_corpse_death", "_kb_corpse_distb", //
|
||||
// and "_kb_loot_corpse". //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* Version 3.2 Change Log:
|
||||
- ClearInventory was 99% the same as DestroyInventory except for the
|
||||
dropped weapons, so they were consolidated.
|
||||
- DestroyInventory rewritten to use equipped item integers in a loop.
|
||||
- DestroyDroppedWeapons is a new function which does only that.
|
||||
- added TransferToBones function to move lootable corpse placeable inventory to bones
|
||||
- added BonesCleanup function to get rid of the bones after nBonesFade
|
||||
- changed comments to clarify weapons/shields/torches are affected by "weapons" parameters/functions
|
||||
*/
|
||||
|
||||
/************************************************************************
|
||||
** This function is used to clear the entire inventory of an object **
|
||||
** (except for Creature Slots, which have no bearing here), so that **
|
||||
** when the object is destroyed, no Lootbags are left behind to **
|
||||
** litter up the landscape & devour system resources. Plot items are **
|
||||
** not affected. **
|
||||
************************************************************************/
|
||||
void DestroyInventory(object oCorpse)
|
||||
{
|
||||
|
||||
/* Version 3.2 - function rewritten */
|
||||
|
||||
object oLoot; int x;
|
||||
|
||||
//Get any gold from the dead creature
|
||||
x = GetGold(oCorpse);
|
||||
if (x) TakeGoldFromCreature(x, oCorpse, TRUE);
|
||||
|
||||
// Destroy any loot the dead creature has equipped
|
||||
// 0=head, 1=chest, 2=boot, 3=arms, 4=rhand, 5=lhand, 6=cloak,
|
||||
// 7=lring, 8=rring, 9=neck, 10=belt, 11=arrow, 12=bullet, 13=bolt
|
||||
for (x = 0; x < 4; x++)
|
||||
{
|
||||
oLoot = GetItemInSlot(x, oCorpse);
|
||||
if (GetIsObjectValid(oLoot))
|
||||
{
|
||||
if (!GetPlotFlag(oLoot))
|
||||
DestroyObject(oLoot);
|
||||
}
|
||||
}
|
||||
// skipped 4 & 5 = equipped weapons (rhand & lhand)
|
||||
for (x = 6; x < 14; x++)
|
||||
{
|
||||
oLoot = GetItemInSlot(x, oCorpse);
|
||||
if (GetIsObjectValid(oLoot))
|
||||
{
|
||||
if (!GetPlotFlag(oLoot))
|
||||
DestroyObject(oLoot);
|
||||
}
|
||||
}
|
||||
|
||||
// Destroy remaining loot on creature
|
||||
oLoot = GetFirstItemInInventory(oCorpse);
|
||||
while (GetIsObjectValid(oLoot))
|
||||
{
|
||||
if (!GetPlotFlag(oLoot))
|
||||
DestroyObject(oLoot);
|
||||
oLoot = GetNextItemInInventory(oCorpse);
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
** This function is used to destroy unclaimed dropped weapons. **
|
||||
** Plot items are not affected. **
|
||||
** **
|
||||
** NOTE: Shields/torches are also considered "weapons" for the **
|
||||
** purposes of this script. **
|
||||
** **
|
||||
** NOTE: The lootable corpse placeable or the bones can call this **
|
||||
** script. **
|
||||
************************************************************************/
|
||||
void DestroyDroppedWeapons(object oLootCorpse)
|
||||
{
|
||||
//Check to see if anyone Possesses the Left Weapon
|
||||
object oLeftWpn = GetLocalObject(oLootCorpse, "oLeftWpn");
|
||||
// If Left Weapon is unclaimed...
|
||||
if (GetItemPossessor(oLeftWpn) == OBJECT_INVALID)
|
||||
{
|
||||
// If dropped weapon is not Plot
|
||||
if (!GetPlotFlag(oLeftWpn))
|
||||
DestroyObject(oLeftWpn);
|
||||
}
|
||||
//Check to see if anyone Possesses the Right Weapon
|
||||
object oRightWpn = GetLocalObject(oLootCorpse, "oRightWpn");
|
||||
// If Right Weapon is unclaimed...
|
||||
if (GetItemPossessor(oRightWpn) == OBJECT_INVALID)
|
||||
{
|
||||
// If dropped weapon is not Plot
|
||||
if (!GetPlotFlag(oRightWpn))
|
||||
DestroyObject(oRightWpn);
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
** This script gets rid of the bones after they fade **
|
||||
*********************************************************/
|
||||
void BonesCleanup(object oBones, int nKeepWeaponsBonesFade)
|
||||
{
|
||||
// Empty the bones inventory
|
||||
DestroyInventory(oBones);
|
||||
// Delete unclaimed, dropped, non-Plot weapons unless nKeepWeaponsBonesFade = 1
|
||||
if (!nKeepWeaponsBonesFade)
|
||||
DestroyDroppedWeapons(oBones);
|
||||
// Delete the bones
|
||||
DestroyObject(oBones);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
** This script moves all items from lootable corpse placeable to the bones **
|
||||
******************************************************************************/
|
||||
void TransferToBones(object oLootCorpse, object oBones)
|
||||
{
|
||||
// Move gold to the bones
|
||||
if (GetGold(oLootCorpse))
|
||||
{
|
||||
AssignCommand(oBones, TakeGoldFromCreature(GetGold(oLootCorpse), oLootCorpse, FALSE));
|
||||
}
|
||||
// Move inventory items to the bones
|
||||
object oLoot = GetFirstItemInInventory(oLootCorpse);
|
||||
while (GetIsObjectValid(oLoot))
|
||||
{
|
||||
AssignCommand(oBones, ActionTakeItem(oLoot, oLootCorpse));
|
||||
oLoot = GetNextItemInInventory(oLootCorpse);
|
||||
}
|
||||
}
|
||||
|
||||
//void main() {}
|
@@ -495,7 +495,7 @@ void LeaveCorpse()
|
||||
{
|
||||
//SET YOUR LOOTABLE CORPSES PREFERENCES HERE ///////////////
|
||||
//
|
||||
int nUseLootable = TRUE; // Set this to FALSE if you want disable the lootable corpse functionality //
|
||||
int nUseLootable = FALSE; // Set this to FALSE if you want disable the lootable corpse functionality //
|
||||
int nMoveEquipped = FALSE; // Set this to FALSE if you don't want to move Equipped items to the corpse //
|
||||
int nCopyArmour = FALSE; // This will use the ResRef to create a copy of the armour/helmet //
|
||||
int nMoveArmour = FALSE; // Setting this TRUE will just move the armour/helmet (Naked NPCs) //
|
||||
|
@@ -1,47 +1,39 @@
|
||||
///////////////////////////////////////
|
||||
// Door Script - Allows on Mages to enter
|
||||
// Door Script - Allows only Mages to enter
|
||||
//
|
||||
////////////////////////////////////////
|
||||
|
||||
#include "prc_class_const"
|
||||
|
||||
void main()
|
||||
|
||||
{
|
||||
DelayCommand(30.0, ActionCloseDoor(OBJECT_SELF));
|
||||
// Close the door after 30 seconds
|
||||
DelayCommand(30.0, ActionCloseDoor(OBJECT_SELF));
|
||||
|
||||
object oClicker = GetClickingObject();
|
||||
object oTarget = GetTransitionTarget(OBJECT_SELF);
|
||||
location lLoc = GetLocation(oTarget);
|
||||
location lLoc2 = GetLocation(GetObjectByTag("WP_Throw_out"));
|
||||
int oClass_1 = GetClassByPosition(1, oClicker);
|
||||
int oClass_2 = GetClassByPosition(2, oClicker);
|
||||
int oClass_3 = GetClassByPosition(3, oClicker);
|
||||
int iPassed = 0;
|
||||
|
||||
if ((oClass_1==CLASS_TYPE_BARD)||(oClass_1==CLASS_TYPE_SORCERER))
|
||||
iPassed = 1 ;
|
||||
if((iPassed == 0) && (oClass_1==CLASS_TYPE_WIZARD))
|
||||
iPassed = 1 ;
|
||||
if ((oClass_2==CLASS_TYPE_BARD)||(oClass_2==CLASS_TYPE_SORCERER))
|
||||
iPassed = 1 ;
|
||||
if((iPassed == 0) && (oClass_2==CLASS_TYPE_WIZARD))
|
||||
iPassed = 1 ;
|
||||
if ((oClass_3==CLASS_TYPE_BARD)||(oClass_3==CLASS_TYPE_SORCERER))
|
||||
iPassed = 1 ;
|
||||
if((iPassed == 0) && (oClass_3==CLASS_TYPE_WIZARD))
|
||||
iPassed = 1 ;
|
||||
|
||||
switch (iPassed)
|
||||
{
|
||||
case 0:
|
||||
AssignCommand(oClicker,JumpToLocation(lLoc2));
|
||||
break;
|
||||
|
||||
case 1:
|
||||
AssignCommand(oClicker,JumpToLocation(lLoc));
|
||||
break;
|
||||
|
||||
}
|
||||
object oClicker = GetClickingObject();
|
||||
object oTarget = GetTransitionTarget(OBJECT_SELF);
|
||||
location lLoc = GetLocation(oTarget);
|
||||
location lLoc2 = GetLocation(GetObjectByTag("WP_Throw_out"));
|
||||
|
||||
// Sum of arcane class levels
|
||||
int iArcane = GetLevelByClass(CLASS_TYPE_BARD, oClicker) +
|
||||
GetLevelByClass(CLASS_TYPE_BEGUILER, oClicker) +
|
||||
GetLevelByClass(CLASS_TYPE_DREAD_NECROMANCER, oClicker) +
|
||||
GetLevelByClass(CLASS_TYPE_KNIGHT_WEAVE, oClicker) +
|
||||
GetLevelByClass(CLASS_TYPE_SORCERER, oClicker) +
|
||||
GetLevelByClass(CLASS_TYPE_SUBLIME_CHORD, oClicker) +
|
||||
GetLevelByClass(CLASS_TYPE_WARMAGE, oClicker) +
|
||||
GetLevelByClass(CLASS_TYPE_WARLOCK, oClicker) +
|
||||
GetLevelByClass(CLASS_TYPE_WIZARD, oClicker);
|
||||
|
||||
// Determine action based on arcane class level sum
|
||||
if (iArcane > 0)
|
||||
{
|
||||
AssignCommand(oClicker, JumpToLocation(lLoc));
|
||||
}
|
||||
else
|
||||
{
|
||||
AssignCommand(oClicker, JumpToLocation(lLoc2));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,13 +1,11 @@
|
||||
//#include "_persist_01a"
|
||||
#include "aps_include"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastOpenedBy();
|
||||
SetLocalObject(oPC,"oLastOpened",OBJECT_SELF);
|
||||
//int iAlchemySkill = GetTokenPair(oPC,14,12);
|
||||
int iAlchemySkill = GetPersistentInt(oPC,"iAlchemySkill","UOACraft"
|
||||
);
|
||||
int iAlchemySkill = GetCampaignInt("UOACraft","iAlchemySkill",oPC);
|
||||
int iAlchemyChance = iAlchemySkill;
|
||||
|
||||
if (iAlchemyChance <350)
|
||||
|
@@ -1,16 +1,13 @@
|
||||
//#include "_persist_01a"
|
||||
#include "aps_include"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastOpenedBy();
|
||||
//int iSmithSkill = GetTokenPair(oPC,13,4); // Weaponsmith
|
||||
int iSmithSkill = GetPersistentInt(oPC,"iSmithSkill","UOACraft"
|
||||
);
|
||||
int iSmithSkill = GetCampaignInt("UOACraft","iSmithSkill",oPC);
|
||||
int iSmithChance = iSmithSkill;
|
||||
//int iArmorSkill = GetTokenPair(oPC,13,5); // ArmorCraft
|
||||
int iArmorSkill = GetPersistentInt(oPC,"iArmorSkill","UOACraft"
|
||||
);
|
||||
int iArmorSkill = GetCampaignInt("UOACraft","iArmorSkill",oPC);
|
||||
int iArmorChance = iArmorSkill;
|
||||
int iIngotType = GetLocalInt(oPC,"iUseIngotType");
|
||||
int iIngotMod = iIngotType*25;
|
||||
|
@@ -1,12 +1,10 @@
|
||||
//#include "_persist_01a"
|
||||
#include "aps_include"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastOpenedBy();
|
||||
//int iBowSkill = GetTokenPair(oPC,13,3);
|
||||
int iBowSkill = GetPersistentInt(oPC,"iBowSkill","UOACraft"
|
||||
);
|
||||
int iBowSkill = GetCampaignInt("UOACraft","iBowSkill",oPC);
|
||||
int iBowChance = iBowSkill;
|
||||
int iWoodType = GetLocalInt(oPC,"iUseThisWood");
|
||||
|
||||
|
@@ -1,11 +1,8 @@
|
||||
#include "aps_include"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastOpenedBy();
|
||||
//int iBrewSkill = GetTokenPair(oPC,13,9); // Brewing (Credit Tony Edwards for catching a mis-typed token value here.. was originally using weaponcraft skill to determine Brew patterns. Thx Tony ;)
|
||||
int iBrewSkill = GetPersistentInt(oPC,"iBrewSkill","UOACraft"
|
||||
);
|
||||
int iBrewSkill = GetCampaignInt("UOACraft","iBrewSkill",oPC);
|
||||
int iBrewChance = iBrewSkill;
|
||||
|
||||
if (GetItemPossessedBy(oPC,"NoDrop_SkillLogBook")==OBJECT_INVALID)
|
||||
|
@@ -1,12 +1,10 @@
|
||||
//#include "_persist_01a"
|
||||
#include "aps_include"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastOpenedBy();
|
||||
//int iCarpentrySkill = GetTokenPair(oPC,13,3);
|
||||
int iCarpentrySkill = GetPersistentInt(oPC,"iCarpentrySkill","UOACraft"
|
||||
);
|
||||
int iCarpentrySkill = GetCampaignInt("UOACraft","iCarpentrySkill",oPC);
|
||||
int iCarpentryChance = iCarpentrySkill;
|
||||
int iWoodType = GetLocalInt(oPC,"iUseThisWood");
|
||||
|
||||
|
@@ -1,5 +1,3 @@
|
||||
#include "aps_include"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastOpenedBy();
|
||||
@@ -7,8 +5,7 @@ void main()
|
||||
string sTagSelf = GetTag(oSelf);
|
||||
int iCookType = StringToInt(GetStringRight(sTagSelf,3));
|
||||
|
||||
int iCookSkill = GetPersistentInt(oPC,"iCookSkill","UOACraft"
|
||||
);
|
||||
int iCookSkill = GetCampaignInt("UOACraft","iCookSkill",oPC);
|
||||
int iCookChance = iCookSkill;
|
||||
|
||||
if (GetItemPossessedBy(oPC,"NoDrop_SkillLogBook")==OBJECT_INVALID)
|
||||
|
@@ -1,12 +1,10 @@
|
||||
//#include "_persist_01a"
|
||||
#include "aps_include"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastOpenedBy();
|
||||
//int iJewelSkill = GetTokenPair(oPC,12,4); // JewelCraft
|
||||
int iJewelSkill = GetPersistentInt(oPC,"iJewelSkill","UOACraft"
|
||||
);
|
||||
int iJewelSkill = GetCampaignInt("UOACraft","iJewelSkill",oPC);
|
||||
int iJewelChance = iJewelSkill;
|
||||
|
||||
int iIngotType = GetLocalInt(oPC,"iUseIngotType");
|
||||
|
@@ -1,12 +1,10 @@
|
||||
//#include "_persist_01a"
|
||||
#include "aps_include"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastOpenedBy();
|
||||
//int iGlassSkill = GetTokenPair(oPC,14,4);
|
||||
int iGlassSkill = GetPersistentInt(oPC,"iGlassSkill","UOACraft"
|
||||
);
|
||||
int iGlassSkill = GetCampaignInt("UOACraft","iGlassSkill",oPC);
|
||||
int iGlassChance = iGlassSkill;
|
||||
|
||||
if (GetItemPossessedBy(oPC,"NoDrop_SkillLogBook")==OBJECT_INVALID)
|
||||
|
@@ -1,12 +1,10 @@
|
||||
//#include "_persist_01a"
|
||||
#include "aps_include"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastOpenedBy();
|
||||
//int iWoodSkill = GetTokenPair(oPC,13,13);
|
||||
int iWoodSkill = GetPersistentInt(oPC,"iPaperSkill","UOACraft"
|
||||
);
|
||||
int iWoodSkill = GetCampaignInt("UOACraft","iPaperSkill",oPC);
|
||||
int iWoodChance = iWoodSkill;
|
||||
|
||||
if (GetItemPossessedBy(oPC,"NoDrop_SkillLogBook")==OBJECT_INVALID)
|
||||
|
@@ -1,12 +1,10 @@
|
||||
//#include "_persist_01a"
|
||||
#include "aps_include"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastOpenedBy();
|
||||
//int iTailorSkill = GetTokenPair(oPC,13,9); // Tailoring (Credit Tony Edwards for catching a mis-typed token value here.. was originally using weaponcraft skill to determine tailor patterns. Thx Tony ;)
|
||||
int iTailorSkill = GetPersistentInt(oPC,"iTailorSkill","UOACraft"
|
||||
);
|
||||
int iTailorSkill = GetCampaignInt("UOACraft","iTailorSkill",oPC);
|
||||
int iTailorChance = iTailorSkill;
|
||||
|
||||
if (GetItemPossessedBy(oPC,"NoDrop_SkillLogBook")==OBJECT_INVALID)
|
||||
|
@@ -1,12 +1,10 @@
|
||||
//#include "_persist_01a"
|
||||
#include "aps_include"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastOpenedBy();
|
||||
//int iTailorSkill = GetTokenPair(oPC,13,9); // Tailoring (Credit Tony Edwards for catching a mis-typed token value here.. was originally using weaponcraft skill to determine tailor patterns. Thx Tony ;)
|
||||
int iTailorSkill = GetPersistentInt(oPC,"iTailorSkill","UOACraft"
|
||||
);
|
||||
int iTailorSkill = GetCampaignInt("UOACraft","iTailorSkill",oPC);
|
||||
int iTailorChance = iTailorSkill;
|
||||
|
||||
if (GetItemPossessedBy(oPC,"NoDrop_SkillLogBook")==OBJECT_INVALID)
|
||||
|
@@ -1,11 +1,10 @@
|
||||
//#include "_persist_01a"
|
||||
#include "aps_include"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastOpenedBy();
|
||||
//int iGlassSkill = GetTokenPair(oPC,14,5);
|
||||
int iGlassSkill = GetPersistentInt(oPC,"iTinkerSkill","UOACraft");
|
||||
int iGlassSkill = GetCampaignInt("UOACraft","iTinkerSkill",oPC);
|
||||
int iGlassChance = iGlassSkill;
|
||||
|
||||
if (GetItemPossessedBy(oPC,"NoDrop_SkillLogBook")==OBJECT_INVALID)
|
||||
|
@@ -16,7 +16,9 @@ void CreatePlaceable2();
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
|
||||
ExecuteScript("prc_npc_death", OBJECT_SELF);
|
||||
|
||||
if (Random(1000)< (5*GetHitDice(OBJECT_SELF))+10 )
|
||||
{
|
||||
object oTemp = CreatePlaceable("temporaryplaceho",GetLocation(OBJECT_SELF),180.0);
|
||||
|
@@ -31,6 +31,6 @@ void main()
|
||||
void ItemCreate(object oPC)
|
||||
{
|
||||
object oWater = CreateItemOnObject("item002",oPC,1);
|
||||
SetLocalInt(oPC,"iWaterFull",100);
|
||||
SetLocalInt(oPC,"iWaterFull",5);
|
||||
return;
|
||||
}
|
||||
|
19
_module/nss/at_caplvlup.nss
Normal file
19
_module/nss/at_caplvlup.nss
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "nw_i0_tool"
|
||||
/* Script generated by
|
||||
Lilac Soul's NWN Script Generator, v. 1.6
|
||||
|
||||
For download info, please visit:
|
||||
http://www.lilacsoul.revility.com */
|
||||
|
||||
//Put this on action taken in the conversation editor
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
if (GetHitDice(oPC) <= 2)
|
||||
{
|
||||
RewardPartyXP(3000, oPC, FALSE);
|
||||
|
||||
}
|
||||
}
|
@@ -1,26 +1,50 @@
|
||||
// Place in the OnFailToOpen event for the <span class="highlight">door</span>
|
||||
// Place in the OnFailToOpen event for the door
|
||||
|
||||
#include "prc_class_const"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetClickingObject();
|
||||
int nPCClass1 = GetClassByPosition(1, oPC);
|
||||
int nPCClass2 = GetClassByPosition(2, oPC);
|
||||
int nPCClass3 = GetClassByPosition(3, oPC);
|
||||
int nCheck1 = CLASS_TYPE_ROGUE;
|
||||
int nCheck2 = CLASS_TYPE_ASSASSIN;
|
||||
if (!GetIsPC(oPC))
|
||||
object oPC = GetClickingObject();
|
||||
|
||||
int nPCClass1 = GetClassByPosition(1, oPC);
|
||||
int nPCClass2 = GetClassByPosition(2, oPC);
|
||||
int nPCClass3 = GetClassByPosition(3, oPC);
|
||||
int nPCClass4 = GetClassByPosition(4, oPC);
|
||||
int nPCClass5 = GetClassByPosition(5, oPC);
|
||||
int nPCClass6 = GetClassByPosition(6, oPC);
|
||||
int nPCClass7 = GetClassByPosition(7, oPC);
|
||||
int nPCClass8 = GetClassByPosition(8, oPC);
|
||||
|
||||
int iRogue = GetLevelByClass(CLASS_TYPE_ROGUE, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SCOUT, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_BEGUILER, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_NINJA, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_FACTOTUM, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_ASSASSIN, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_ARCTRICK, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_HANDOTWM, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_NIGHTSHADE, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_NINJA_SPY, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SHADOWLORD, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SHADOW_SUN_NINJA, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SHADOW_THIEF_AMN, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_UNSEEN_SEER, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_PSYCHIC_ROGUE, oPC);
|
||||
|
||||
if (!GetIsPC(oPC))
|
||||
{
|
||||
return;
|
||||
return;
|
||||
}
|
||||
else if ((nPCClass1 == nCheck1) || (nPCClass2 == nCheck1) || (nPCClass3 == nCheck1) || (nPCClass1 == nCheck2) || (nPCClass2 == nCheck2) || (nPCClass3 == nCheck2))
|
||||
else if (iRogue > 0)
|
||||
{
|
||||
//FloatingTextStringOnCreature("The <span class="highlight">door</span> unlocks itself and opens.", oPC);
|
||||
SetLocked(OBJECT_SELF, FALSE);
|
||||
ActionOpenDoor(OBJECT_SELF);
|
||||
DelayCommand(6.0f, ActionCloseDoor(OBJECT_SELF));
|
||||
DelayCommand(6.2f, SetLocked(OBJECT_SELF, TRUE));
|
||||
FloatingTextStringOnCreature("The door unlocks itself and opens.", oPC);
|
||||
SetLocked(OBJECT_SELF, FALSE);
|
||||
ActionOpenDoor(OBJECT_SELF);
|
||||
DelayCommand(6.0f, ActionCloseDoor(OBJECT_SELF));
|
||||
DelayCommand(6.2f, SetLocked(OBJECT_SELF, TRUE));
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
//FloatingTextStringOnCreature("The <span class="highlight">door</span> is locked. You must be a Rogue or Assassin to use this <span class="highlight">door</span>.", oPC);
|
||||
FloatingTextStringOnCreature("The door is locked. You must be a rogue to use this door.", oPC);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,23 +1,47 @@
|
||||
// Place in the OnAreaTransitionClick event for the <span class="highlight">door</span>
|
||||
|
||||
#include "prc_class_const"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetClickingObject();
|
||||
object oJump = GetTransitionTarget(OBJECT_SELF);
|
||||
int nPCClass1 = GetClassByPosition(1, oPC);
|
||||
int nPCClass2 = GetClassByPosition(2, oPC);
|
||||
int nPCClass3 = GetClassByPosition(3, oPC);
|
||||
int nCheck1 = CLASS_TYPE_ROGUE;
|
||||
int nCheck2 = CLASS_TYPE_ASSASSIN;
|
||||
if (!GetIsPC(oPC))
|
||||
object oPC = GetClickingObject();
|
||||
object oJump = GetTransitionTarget(OBJECT_SELF);
|
||||
|
||||
int nPCClass1 = GetClassByPosition(1, oPC);
|
||||
int nPCClass2 = GetClassByPosition(2, oPC);
|
||||
int nPCClass3 = GetClassByPosition(3, oPC);
|
||||
int nPCClass4 = GetClassByPosition(4, oPC);
|
||||
int nPCClass5 = GetClassByPosition(5, oPC);
|
||||
int nPCClass6 = GetClassByPosition(6, oPC);
|
||||
int nPCClass7 = GetClassByPosition(7, oPC);
|
||||
int nPCClass8 = GetClassByPosition(8, oPC);
|
||||
|
||||
int iRogue = GetLevelByClass(CLASS_TYPE_ROGUE, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SCOUT, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_BEGUILER, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_NINJA, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_FACTOTUM, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_ASSASSIN, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_ARCTRICK, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_HANDOTWM, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_NIGHTSHADE, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_NINJA_SPY, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SHADOWLORD, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SHADOW_SUN_NINJA, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SHADOW_THIEF_AMN, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_UNSEEN_SEER, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_PSYCHIC_ROGUE, oPC);
|
||||
|
||||
if (!GetIsPC(oPC))
|
||||
{
|
||||
return;
|
||||
return;
|
||||
}
|
||||
else if ((nPCClass1 == nCheck1) || (nPCClass2 == nCheck1) || (nPCClass3 == nCheck1) || (nPCClass1 == nCheck2) || (nPCClass2 == nCheck2) ||(nPCClass3 == nCheck2))
|
||||
else if (iRogue > 0)
|
||||
{
|
||||
AssignCommand(oPC, JumpToObject(oJump));
|
||||
AssignCommand(oPC, JumpToObject(oJump));
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
FloatingTextStringOnCreature("Only Rogues or Assassins may pass this way.", oPC);
|
||||
FloatingTextStringOnCreature("Only rogues may pass this way.", oPC);
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#include "NW_I0_GENERIC"
|
||||
void main()
|
||||
{
|
||||
ExecuteScript("prc_npc_death", OBJECT_SELF);
|
||||
|
||||
object oKiller = GetLastKiller();
|
||||
int noleech = 0;
|
||||
int nClass = GetLevelByClass(CLASS_TYPE_COMMONER);
|
||||
|
@@ -17,6 +17,9 @@ void main()
|
||||
location ourSpawnPoint = GetLocation(GetNearestObjectByTag(GetTag(OBJECT_SELF) + "Respawn"));
|
||||
CreateObject(OBJECT_TYPE_CREATURE, us, ourSpawnPoint);
|
||||
}
|
||||
|
||||
ExecuteScript("prc_npc_death", OBJECT_SELF);
|
||||
|
||||
object oKiller = GetLastKiller();
|
||||
int noleech = 0;
|
||||
int nClass = GetLevelByClass(CLASS_TYPE_COMMONER);
|
||||
|
@@ -1,7 +1,16 @@
|
||||
#include "prc_class_const"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
int iResult;
|
||||
|
||||
iResult = GetLevelByClass(CLASS_TYPE_CLERIC, GetPCSpeaker());
|
||||
return iResult;
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
int iDivine = GetLevelByClass(CLASS_TYPE_CLERIC, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_ARCHIVIST, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_FAVOURED_SOUL, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_HEALER, oPC);
|
||||
|
||||
if(iDivine > 0)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@@ -1,4 +1,11 @@
|
||||
#include "prc_class_const"
|
||||
|
||||
void main()
|
||||
{
|
||||
SetLocalInt(GetPCSpeaker(), "BarbarianLevel", GetLevelByClass(CLASS_TYPE_BARBARIAN,GetPCSpeaker()));
|
||||
}
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
int iTribal = GetLevelByClass(CLASS_TYPE_BARBARIAN, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_TOTEMIST, oPC);
|
||||
|
||||
SetLocalInt(oPC, "BarbarianLevel", iTribal);
|
||||
}
|
@@ -1,5 +1,14 @@
|
||||
#include "prc_class_const"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
int iResult = GetLevelByClass(CLASS_TYPE_BARBARIAN, GetPCSpeaker());
|
||||
return iResult;
|
||||
}
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
int iTribal = GetLevelByClass(CLASS_TYPE_BARBARIAN, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_TOTEMIST, oPC);
|
||||
|
||||
if(iTribal > 0)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
@@ -1,5 +1,15 @@
|
||||
#include "prc_class_const"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
int iResult = GetLevelByClass(CLASS_TYPE_BARD, GetPCSpeaker());
|
||||
return iResult;
|
||||
}
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
int iBardic = GetLevelByClass(CLASS_TYPE_BARD, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SUBLIME_CHORD, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_VIRTUOSO, oPC);
|
||||
|
||||
if(iBardic > 0)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
@@ -1,4 +1,16 @@
|
||||
#include "prc_class_const"
|
||||
|
||||
void main()
|
||||
{
|
||||
SetLocalInt(GetPCSpeaker(), "BardLevel", GetLevelByClass(CLASS_TYPE_BARD,GetPCSpeaker()));
|
||||
}
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
int iBardic = GetLevelByClass(CLASS_TYPE_BARD, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_HARPER, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_DIRGESINGER, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_DRAGONSONG_LYRIST, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_FOCHLUCAN_LYRIST, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SUBLIME_CHORD, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_VIRTUOSO, oPC);
|
||||
|
||||
SetLocalInt(oPC, "BardLevel", iBardic);
|
||||
}
|
@@ -1,8 +1,16 @@
|
||||
//::
|
||||
//:: deity_drow.nss
|
||||
//::
|
||||
//:: Returns true if you're a Drow
|
||||
|
||||
#include "prc_inc_racial"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
if (!((GetRacialType(oPC)==RACIAL_TYPE_ELF)&& ((GetSubRace(oPC)=="Drow")||(GetSubRace(oPC)=="drow")))) return FALSE;
|
||||
if (!((GetRacialType(oPC)==RACIAL_TYPE_DROW_MALE) || (GetRacialType(oPC)==RACIAL_TYPE_DROW_FEMALE)))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
@@ -1,5 +1,17 @@
|
||||
#include "prc_class_const"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
int iResult = GetLevelByClass(CLASS_TYPE_DRUID, GetPCSpeaker());
|
||||
return iResult;
|
||||
}
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
int iDruidic = GetLevelByClass(CLASS_TYPE_DRUID, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SHAMAN, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_HATHRAN, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_FOCHLUCAN_LYRIST, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_FORESTMASTER, oPC);
|
||||
|
||||
if(iDruidic > 0)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
@@ -1,4 +1,14 @@
|
||||
#include "prc_class_const"
|
||||
|
||||
void main()
|
||||
{
|
||||
SetLocalInt(GetPCSpeaker(), "DruidLevel", GetLevelByClass(CLASS_TYPE_DRUID,GetPCSpeaker()));
|
||||
}
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
int iDruidic = GetLevelByClass(CLASS_TYPE_DRUID, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SHAMAN, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_HATHRAN, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_FOCHLUCAN_LYRIST, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_FORESTMASTER, oPC);
|
||||
|
||||
SetLocalInt(oPC, "DruidLevel", iDruidic);
|
||||
}
|
@@ -1,8 +1,21 @@
|
||||
//::
|
||||
//:: deity_elf.nss
|
||||
//::
|
||||
//:: Returns true if you're an Elf but not a Drow
|
||||
|
||||
#include "prc_inc_racial"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
|
||||
if (GetSubRace(GetPCSpeaker()) == "drow") return FALSE;
|
||||
int iResult = GetRacialType(GetPCSpeaker())==RACIAL_TYPE_ELF;
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
int iRace = MyPRCGetRacialType(oPC);
|
||||
int iSubrace = GetRacialType(oPC);
|
||||
|
||||
if (iSubrace == RACIAL_TYPE_DROW_MALE || iSubrace == RACIAL_TYPE_DROW_FEMALE) return FALSE;
|
||||
|
||||
int iResult = iRace == RACIAL_TYPE_ELF;
|
||||
|
||||
return iResult;
|
||||
|
||||
}
|
||||
}
|
@@ -1,5 +1,25 @@
|
||||
#include "prc_class_const"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
int iResult = GetLevelByClass(CLASS_TYPE_FIGHTER, GetPCSpeaker());
|
||||
return iResult;
|
||||
}
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
int iWarrior = GetLevelByClass(CLASS_TYPE_FIGHTER, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_CW_SAMURAI, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_KNIGHT, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_MARSHAL, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SAMURAI, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SOULKNIFE, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SCOUT, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_INCARNATE, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SOULBORN, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_PSYWAR, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SWASHBUCKLER, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_WARBLADE, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_CRUSADER, oPC);
|
||||
|
||||
if(iWarrior > 0)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
@@ -1,3 +1,5 @@
|
||||
#include "prc_inc_racial"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// This block of code delevels a PC and sets them back to the same xp they had before deleveling
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -20,7 +22,7 @@ void Reset_Level(object oPC)
|
||||
void Race_Check(object oPC)
|
||||
{
|
||||
string sDeity = GetLocalString(oPC,"Deity");
|
||||
int iRace = GetRacialType(oPC);
|
||||
int iRace = MyPRCGetRacialType(oPC);
|
||||
|
||||
if (sDeity == "Bahamut")
|
||||
{
|
||||
@@ -116,11 +118,10 @@ if (sDeity == "Kord")
|
||||
}
|
||||
if (sDeity == "Lolth")
|
||||
{
|
||||
if (((iRace==RACIAL_TYPE_ELF)||(iRace==RACIAL_TYPE_HALFELF))
|
||||
&&((GetSubRace(oPC)=="Drow")||(GetSubRace(oPC)=="drow")))
|
||||
{
|
||||
SetLocalInt(oPC,"Race",1);
|
||||
}
|
||||
if ((iRace==RACIAL_TYPE_DROW_MALE) || (iRace==RACIAL_TYPE_DROW_FEMALE) || (iRace==RACIAL_TYPE_HALFDROW))
|
||||
{
|
||||
SetLocalInt(oPC,"Race",1);
|
||||
}
|
||||
}
|
||||
if (sDeity == "Moradin")
|
||||
{
|
||||
|
@@ -1,5 +1,17 @@
|
||||
#include "prc_class_const"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
int iResult = GetLevelByClass(CLASS_TYPE_MONK, GetPCSpeaker());
|
||||
return iResult;
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
int iMonk = GetLevelByClass(CLASS_TYPE_MONK, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SOHEI, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SWORDSAGE, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_PSION, oPC);
|
||||
|
||||
if(iMonk > 0)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,13 @@
|
||||
#include "prc_class_const"
|
||||
|
||||
void main()
|
||||
{
|
||||
SetLocalInt(GetPCSpeaker(), "MonkLevel", GetLevelByClass(CLASS_TYPE_MONK,GetPCSpeaker()));
|
||||
}
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
int iMonk = GetLevelByClass(CLASS_TYPE_MONK, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SOHEI, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SWORDSAGE, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_PSION, oPC);
|
||||
|
||||
SetLocalInt(oPC, "MonkLevel", iMonk);
|
||||
}
|
@@ -1,21 +1,53 @@
|
||||
#include "prc_inc_racial"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPlayer=GetPCSpeaker();
|
||||
object oSpawn=GetObjectByTag("Default_Start"); //set default respawn point
|
||||
int iRace = GetRacialType(oPlayer);
|
||||
|
||||
if (iRace==RACIAL_TYPE_DWARF) { oSpawn=GetObjectByTag("Dwarf_Start"); }
|
||||
if ((iRace==RACIAL_TYPE_ELF)&&
|
||||
((GetSubRace(oPlayer) != "drow")||
|
||||
(GetSubRace(oPlayer) != "Drow"))) { oSpawn=GetObjectByTag("Elf_Start"); }
|
||||
if (iRace==RACIAL_TYPE_GNOME) { oSpawn=GetObjectByTag("Gnome_Start"); }
|
||||
if (iRace==RACIAL_TYPE_HALFELF) { oSpawn=GetObjectByTag("HalfElf_Start"); }
|
||||
if (iRace==RACIAL_TYPE_HALFLING) { oSpawn=GetObjectByTag("Halfling_Start"); }
|
||||
if (iRace==RACIAL_TYPE_HALFORC) { oSpawn=GetObjectByTag("HalfOrc_Start"); }
|
||||
if (iRace==RACIAL_TYPE_HUMAN) { oSpawn=GetObjectByTag("Human_Start"); }
|
||||
if ((iRace==RACIAL_TYPE_ELF)&&
|
||||
((GetSubRace(oPlayer) == "drow")||
|
||||
(GetSubRace(oPlayer) == "Drow"))) { oSpawn=GetObjectByTag("Drow_Start"); }
|
||||
|
||||
AssignCommand(oPlayer, DelayCommand(1.0, JumpToObject(oSpawn)));
|
||||
object oPC = GetPCSpeaker();
|
||||
object oSpawn = GetObjectByTag("Default_Start"); //set default respawn point
|
||||
|
||||
int iRace = MyPRCGetRacialType(oPC);
|
||||
int iSubrace = GetRacialType(oPC);
|
||||
|
||||
if (iRace == RACIAL_TYPE_DWARF)
|
||||
{
|
||||
oSpawn = GetObjectByTag("Dwarf_Start");
|
||||
}
|
||||
if ((iRace == RACIAL_TYPE_ELF) && (!(iSubrace == RACIAL_TYPE_DROW_MALE || iSubrace == RACIAL_TYPE_DROW_FEMALE)))
|
||||
{
|
||||
oSpawn=GetObjectByTag("Elf_Start");
|
||||
}
|
||||
if (iRace == RACIAL_TYPE_GNOME)
|
||||
{
|
||||
oSpawn=GetObjectByTag("Gnome_Start");
|
||||
}
|
||||
if (iRace == RACIAL_TYPE_HALFELF && iSubrace != RACIAL_TYPE_HALFDROW)
|
||||
{
|
||||
oSpawn=GetObjectByTag("HalfElf_Start");
|
||||
}
|
||||
if (iRace == RACIAL_TYPE_HALFDROW && GetAlignmentGoodEvil(oPC) != ALIGNMENT_EVIL)
|
||||
{
|
||||
oSpawn=GetObjectByTag("HalfElf_Start");
|
||||
}
|
||||
else
|
||||
{
|
||||
oSpawn=GetObjectByTag("Drow_Start");
|
||||
}
|
||||
if (iRace == RACIAL_TYPE_HALFLING)
|
||||
{
|
||||
oSpawn=GetObjectByTag("Halfling_Start");
|
||||
}
|
||||
if (iRace==RACIAL_TYPE_HALFORC)
|
||||
{
|
||||
oSpawn=GetObjectByTag("HalfOrc_Start");
|
||||
}
|
||||
if (iRace == RACIAL_TYPE_HUMAN)
|
||||
{
|
||||
oSpawn=GetObjectByTag("Human_Start");
|
||||
}
|
||||
if ((iRace == RACIAL_TYPE_ELF) && (iSubrace == RACIAL_TYPE_DROW_MALE || iSubrace == RACIAL_TYPE_DROW_FEMALE))
|
||||
{
|
||||
oSpawn=GetObjectByTag("Drow_Start");
|
||||
}
|
||||
|
||||
AssignCommand(oPC, DelayCommand(1.0, JumpToObject(oSpawn)));
|
||||
}
|
||||
|
@@ -1,5 +1,18 @@
|
||||
#include "prc_class_const"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
int iResult = GetLevelByClass(CLASS_TYPE_ROGUE, GetPCSpeaker());
|
||||
return iResult;
|
||||
}
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
int iRogue = GetLevelByClass(CLASS_TYPE_ROGUE, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SCOUT, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_BEGUILER, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_NINJA, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_FACTOTUM, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_PSYCHIC_ROGUE, oPC);
|
||||
|
||||
if(iRogue > 0)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
@@ -1,5 +1,19 @@
|
||||
#include "prc_class_const"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
int iResult = GetLevelByClass(CLASS_TYPE_SORCERER, GetPCSpeaker());
|
||||
return iResult;
|
||||
}
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
int iArcane = GetLevelByClass(CLASS_TYPE_BEGUILER, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_DREAD_NECROMANCER, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SHADOWCASTER, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SORCERER, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_WARLOCK, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_WARMAGE, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_SUBLIME_CHORD, oPC);
|
||||
|
||||
if(iArcane > 0)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
177
_module/nss/dmfi_arrays_inc.nss
Normal file
177
_module/nss/dmfi_arrays_inc.nss
Normal file
@@ -0,0 +1,177 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: DMFI - array functions include
|
||||
//:: dmfi_arrays_inc
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Functions to use object-attached local variables as arrays.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Noel
|
||||
//:: Created On: November 17, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: 2007.12.24 tsunami282 - yanked most of these routines from Bioware's
|
||||
//:: nw_o0_itemmaker, then expanded for bounds management.
|
||||
|
||||
int GetLocalArrayLowerBound(object oidObject, string sVarName);
|
||||
int GetLocalArrayUpperBound(object oidObject, string sVarName);
|
||||
void SetLocalArrayLowerBound(object oidObject, string sVarName, int nMin);
|
||||
void SetLocalArrayUpperBound(object oidObject, string sVarName, int nMax);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
int GetLocalArrayInitialized(object oidObject, string sVarName)
|
||||
{
|
||||
string sFullVarName = sVarName + "_INIT";
|
||||
return GetLocalInt(oidObject, sFullVarName);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
void InitializeLocalArray(object oidObject, string sVarName)
|
||||
{
|
||||
int i, iBegin, iEnd;
|
||||
string sFullVarName;
|
||||
|
||||
if (GetLocalArrayInitialized(oidObject, sVarName))
|
||||
{
|
||||
// wipe current contents
|
||||
iBegin = GetLocalArrayLowerBound(oidObject, sVarName);
|
||||
iEnd = GetLocalArrayUpperBound(oidObject, sVarName);
|
||||
for (i = iEnd; i >= iBegin; i--)
|
||||
{
|
||||
sFullVarName = sVarName + IntToString(i);
|
||||
DeleteLocalInt(oidObject, sFullVarName);
|
||||
DeleteLocalFloat(oidObject, sFullVarName);
|
||||
DeleteLocalString(oidObject, sFullVarName);
|
||||
DeleteLocalObject(oidObject, sFullVarName);
|
||||
DeleteLocalLocation(oidObject, sFullVarName);
|
||||
}
|
||||
}
|
||||
|
||||
SetLocalArrayLowerBound(oidObject, sVarName, 0);
|
||||
SetLocalArrayUpperBound(oidObject, sVarName, -1);
|
||||
sFullVarName = sVarName + "_INIT";
|
||||
SetLocalInt(oidObject, sFullVarName, TRUE);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
int GetLocalArrayLowerBound(object oidObject, string sVarName)
|
||||
{
|
||||
string sFullVarName = sVarName + "_MIN";
|
||||
return GetLocalInt(oidObject, sFullVarName);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
int GetLocalArrayUpperBound(object oidObject, string sVarName)
|
||||
{
|
||||
string sFullVarName = sVarName + "_MAX";
|
||||
return GetLocalInt(oidObject, sFullVarName);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
void SetLocalArrayLowerBound(object oidObject, string sVarName, int nMin)
|
||||
{
|
||||
string sFullVarName = sVarName + "_MIN";
|
||||
SetLocalInt(oidObject, sFullVarName, nMin);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
void SetLocalArrayUpperBound(object oidObject, string sVarName, int nMax)
|
||||
{
|
||||
string sFullVarName = sVarName + "_MAX";
|
||||
SetLocalInt(oidObject, sFullVarName, nMax);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
int GetLocalArrayInt(object oidObject, string sVarName, int nVarNum)
|
||||
{
|
||||
string sFullVarName = sVarName + IntToString(nVarNum) ;
|
||||
return GetLocalInt(oidObject, sFullVarName);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
void SetLocalArrayInt(object oidObject, string sVarName, int nVarNum, int nValue)
|
||||
{
|
||||
string sFullVarName = sVarName + IntToString(nVarNum) ;
|
||||
SetLocalInt(oidObject, sFullVarName, nValue);
|
||||
// update bounds
|
||||
if (nVarNum < GetLocalArrayLowerBound(oidObject, sVarName))
|
||||
SetLocalArrayLowerBound(oidObject, sVarName, nVarNum);
|
||||
if (nVarNum > GetLocalArrayUpperBound(oidObject, sVarName))
|
||||
SetLocalArrayUpperBound(oidObject, sVarName, nVarNum);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
float GetLocalArrayFloat(object oidObject, string sVarName, int nVarNum)
|
||||
{
|
||||
string sFullVarName = sVarName + IntToString(nVarNum) ;
|
||||
return GetLocalFloat(oidObject, sFullVarName);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
void SetLocalArrayFloat(object oidObject, string sVarName, int nVarNum, float fValue)
|
||||
{
|
||||
string sFullVarName = sVarName + IntToString(nVarNum) ;
|
||||
SetLocalFloat(oidObject, sFullVarName, fValue);
|
||||
// update bounds
|
||||
if (nVarNum < GetLocalArrayLowerBound(oidObject, sVarName))
|
||||
SetLocalArrayLowerBound(oidObject, sVarName, nVarNum);
|
||||
if (nVarNum > GetLocalArrayUpperBound(oidObject, sVarName))
|
||||
SetLocalArrayUpperBound(oidObject, sVarName, nVarNum);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
string GetLocalArrayString(object oidObject, string sVarName, int nVarNum)
|
||||
{
|
||||
string sFullVarName = sVarName + IntToString(nVarNum) ;
|
||||
return GetLocalString(oidObject, sFullVarName);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
void SetLocalArrayString(object oidObject, string sVarName, int nVarNum, string nValue)
|
||||
{
|
||||
string sFullVarName = sVarName + IntToString(nVarNum) ;
|
||||
SetLocalString(oidObject, sFullVarName, nValue);
|
||||
// update bounds
|
||||
if (nVarNum < GetLocalArrayLowerBound(oidObject, sVarName))
|
||||
SetLocalArrayLowerBound(oidObject, sVarName, nVarNum);
|
||||
if (nVarNum > GetLocalArrayUpperBound(oidObject, sVarName))
|
||||
SetLocalArrayUpperBound(oidObject, sVarName, nVarNum);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
object GetLocalArrayObject(object oidObject, string sVarName, int nVarNum)
|
||||
{
|
||||
string sFullVarName = sVarName + IntToString(nVarNum) ;
|
||||
return GetLocalObject(oidObject, sFullVarName);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
void SetLocalArrayObject(object oidObject, string sVarName, int nVarNum, object oidValue)
|
||||
{
|
||||
string sFullVarName = sVarName + IntToString(nVarNum) ;
|
||||
SetLocalObject(oidObject, sFullVarName, oidValue);
|
||||
// update bounds
|
||||
if (nVarNum < GetLocalArrayLowerBound(oidObject, sVarName))
|
||||
SetLocalArrayLowerBound(oidObject, sVarName, nVarNum);
|
||||
if (nVarNum > GetLocalArrayUpperBound(oidObject, sVarName))
|
||||
SetLocalArrayUpperBound(oidObject, sVarName, nVarNum);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
location GetLocalArrayLocation(object oidObject, string sVarName, int nVarNum)
|
||||
{
|
||||
string sFullVarName = sVarName + IntToString(nVarNum) ;
|
||||
return GetLocalLocation(oidObject, sFullVarName);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
void SetLocalArrayLocation(object oidObject, string sVarName, int nVarNum, location locValue)
|
||||
{
|
||||
string sFullVarName = sVarName + IntToString(nVarNum) ;
|
||||
SetLocalLocation(oidObject, sFullVarName, locValue);
|
||||
// update bounds
|
||||
if (nVarNum < GetLocalArrayLowerBound(oidObject, sVarName))
|
||||
SetLocalArrayLowerBound(oidObject, sVarName, nVarNum);
|
||||
if (nVarNum > GetLocalArrayUpperBound(oidObject, sVarName))
|
||||
SetLocalArrayUpperBound(oidObject, sVarName, nVarNum);
|
||||
}
|
||||
|
64
_module/nss/dmfi_db_biow_inc.nss
Normal file
64
_module/nss/dmfi_db_biow_inc.nss
Normal file
@@ -0,0 +1,64 @@
|
||||
//DMFI Persistence wrapper functions
|
||||
//This include file contains the wrapper functions for the
|
||||
//persistent settings of the DMFI Wand and Widget package
|
||||
//Advanced users can adapt this to the database system that
|
||||
//they want to use for NWN.
|
||||
//
|
||||
//These functions use the Bioware database by default and use a primitive form
|
||||
//of "caching" to avoid lots of database R/W
|
||||
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: The DMFI Team
|
||||
//:: Created On:
|
||||
//:://////////////////////////////////////////////
|
||||
//:: 2008.07.10 tsunami282 - implemented alternate database support, initially
|
||||
//:: for Knat's NBDE
|
||||
|
||||
|
||||
const int DMFI_DB_TYPE =DMFI_DB_TYPE_BIOWARE;
|
||||
|
||||
void FlushDMFIPersistentData(string sDBName)
|
||||
{
|
||||
// no flushing required for Bioware database
|
||||
}
|
||||
|
||||
int IsDMFIPersistentDataDirty(string sDBName)
|
||||
{
|
||||
return FALSE; // bioware database system has no cache, so is never dirty
|
||||
}
|
||||
|
||||
//Int functions
|
||||
int GetDMFIPersistentInt(string sDBName, string sDBSetting, object oPlayer = OBJECT_INVALID)
|
||||
{
|
||||
int iReturn = GetCampaignInt(sDBName, sDBSetting, oPlayer);
|
||||
return iReturn;
|
||||
}
|
||||
|
||||
void SetDMFIPersistentInt(string sDBName, string sDBSetting, int iDBValue, object oPlayer = OBJECT_INVALID)
|
||||
{
|
||||
SetCampaignInt(sDBName, sDBSetting, iDBValue, oPlayer);
|
||||
}
|
||||
|
||||
//Float functions
|
||||
float GetDMFIPersistentFloat(string sDBName, string sDBSetting, object oPlayer = OBJECT_INVALID)
|
||||
{
|
||||
float fReturn = GetCampaignFloat(sDBName, sDBSetting, oPlayer);
|
||||
return fReturn;
|
||||
}
|
||||
|
||||
void SetDMFIPersistentFloat(string sDBName, string sDBSetting, float fDBValue, object oPlayer = OBJECT_INVALID)
|
||||
{
|
||||
SetCampaignFloat(sDBName, sDBSetting, fDBValue, oPlayer);
|
||||
}
|
||||
|
||||
//String functions
|
||||
string GetDMFIPersistentString(string sDBName, string sDBSetting, object oPlayer = OBJECT_INVALID)
|
||||
{
|
||||
string sReturn = GetCampaignString(sDBName, sDBSetting, oPlayer);
|
||||
return sReturn;
|
||||
}
|
||||
|
||||
void SetDMFIPersistentString(string sDBName, string sDBSetting, string sDBValue, object oPlayer = OBJECT_INVALID)
|
||||
{
|
||||
SetCampaignString(sDBName, sDBSetting, sDBValue, oPlayer);
|
||||
}
|
39
_module/nss/dmfi_db_inc.nss
Normal file
39
_module/nss/dmfi_db_inc.nss
Normal file
@@ -0,0 +1,39 @@
|
||||
//DMFI Persistence wrapper functions
|
||||
//This include file contains the wrapper functions for the
|
||||
//persistent settings of the DMFI Wand and Widget package
|
||||
//Advanced users can adapt this to the database system that
|
||||
//they want to use for NWN.
|
||||
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: The DMFI Team
|
||||
//:: Created On:
|
||||
//:://////////////////////////////////////////////
|
||||
//:: 2008.07.10 tsunami282 - implemented alternate database support, initially
|
||||
//:: for Knat's NBDE
|
||||
|
||||
//Listen Pattern ** variable
|
||||
//Change this to 0 to make the DMFI W&W more compatible with Jasperre's AI
|
||||
const int LISTEN_PATTERN = 20600;
|
||||
|
||||
const int DMFI_DB_TYPE_BIOWARE = 1;
|
||||
const int DMFI_DB_TYPE_NBDE = 2;
|
||||
const int DMFI_DB_TYPE_RESERVED_3 = 3;
|
||||
const int DMFI_DB_TYPE_RESERVED_4 = 4;
|
||||
const int DMFI_DB_TYPE_RESERVED_5 = 5;
|
||||
const int DMFI_DB_TYPE_RESERVED_6 = 6;
|
||||
const int DMFI_DB_TYPE_RESERVED_7 = 7;
|
||||
const int DMFI_DB_TYPE_RESERVED_8 = 8;
|
||||
const int DMFI_DB_TYPE_RESERVED_9 = 9;
|
||||
const int DMFI_DB_TYPE_RESERVED_10 = 10;
|
||||
|
||||
// *** DATABASE SELECTION ***
|
||||
// Only choose one of the following #include lines. Comment out all the others!
|
||||
|
||||
// Standard version uses the default Bioware database
|
||||
#include "dmfi_db_biow_inc"
|
||||
|
||||
// Alternate version: using Knat's NBDE
|
||||
// This provides greatly increased speed, but necessitates occasional flushing to disk.
|
||||
// Flushing requires you to add code to Your module OnHeartbeat event.
|
||||
// #include "dmfi_db_nbde_inc"
|
||||
|
65
_module/nss/dmfi_db_nbde_inc.nss
Normal file
65
_module/nss/dmfi_db_nbde_inc.nss
Normal file
@@ -0,0 +1,65 @@
|
||||
//DMFI Persistence wrapper functions
|
||||
// modified version for Knat's NBDE support
|
||||
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: The DMFI Team
|
||||
//:: Created On:
|
||||
//:://////////////////////////////////////////////
|
||||
//:: 2008.07.10 tsunami282 - implemented alternate database support, initially
|
||||
//:: for Knat's NBDE
|
||||
|
||||
|
||||
const int DMFI_DB_TYPE = DMFI_DB_TYPE_NBDE;
|
||||
|
||||
#include "nbde_inc"
|
||||
|
||||
void FlushDMFIPersistentData(string sDBName)
|
||||
{
|
||||
NBDE_SetCampaignInt(sDBName, "DMFI_DB_DIRTY", FALSE);
|
||||
NBDE_FlushCampaignDatabase(sDBName);
|
||||
}
|
||||
|
||||
int IsDMFIPersistentDataDirty(string sDBName)
|
||||
{
|
||||
return NBDE_GetCampaignInt(sDBName, "DMFI_DB_DIRTY");
|
||||
}
|
||||
|
||||
//Int functions
|
||||
int GetDMFIPersistentInt(string sDBName, string sDBSetting, object oPlayer = OBJECT_INVALID)
|
||||
{
|
||||
int iReturn = NBDE_GetCampaignInt(sDBName, sDBSetting, oPlayer);
|
||||
return iReturn;
|
||||
}
|
||||
|
||||
void SetDMFIPersistentInt(string sDBName, string sDBSetting, int iDBValue, object oPlayer = OBJECT_INVALID)
|
||||
{
|
||||
NBDE_SetCampaignInt(sDBName, sDBSetting, iDBValue, oPlayer);
|
||||
NBDE_SetCampaignInt(sDBName, "DMFI_DB_DIRTY", TRUE);
|
||||
}
|
||||
|
||||
//Float functions
|
||||
float GetDMFIPersistentFloat(string sDBName, string sDBSetting, object oPlayer = OBJECT_INVALID)
|
||||
{
|
||||
float fReturn = NBDE_GetCampaignFloat(sDBName, sDBSetting, oPlayer);
|
||||
return fReturn;
|
||||
}
|
||||
|
||||
void SetDMFIPersistentFloat(string sDBName, string sDBSetting, float fDBValue, object oPlayer = OBJECT_INVALID)
|
||||
{
|
||||
NBDE_SetCampaignFloat(sDBName, sDBSetting, fDBValue, oPlayer);
|
||||
NBDE_SetCampaignInt(sDBName, "DMFI_DB_DIRTY", TRUE);
|
||||
}
|
||||
|
||||
//String functions
|
||||
string GetDMFIPersistentString(string sDBName, string sDBSetting, object oPlayer = OBJECT_INVALID)
|
||||
{
|
||||
string sReturn = NBDE_GetCampaignString(sDBName, sDBSetting, oPlayer);
|
||||
return sReturn;
|
||||
}
|
||||
|
||||
void SetDMFIPersistentString(string sDBName, string sDBSetting, string sDBValue, object oPlayer = OBJECT_INVALID)
|
||||
{
|
||||
NBDE_SetCampaignString(sDBName, sDBSetting, sDBValue, oPlayer);
|
||||
NBDE_SetCampaignInt(sDBName, "DMFI_DB_DIRTY", TRUE);
|
||||
}
|
||||
|
35
_module/nss/dmfi_getln_cbtpl.nss
Normal file
35
_module/nss/dmfi_getln_cbtpl.nss
Normal file
@@ -0,0 +1,35 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: DMFI - DMFI_get_line callback template
|
||||
//:: dmfi_getln_cbtpl
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A template (skeleton) function for DMFI_get_line callback processing.
|
||||
|
||||
Use this template to create your script to be invoked when your scripted call
|
||||
to DMFI_get_line receives input.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: tsunami282
|
||||
//:: Created On: 2008.05.21
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
int nVolume = GetPCChatVolume();
|
||||
object oShouter = GetPCChatSpeaker();
|
||||
string sSaid = GetPCChatMessage();
|
||||
|
||||
// you may wish to define an "abort" input message, such as a line
|
||||
// containing a single period:
|
||||
if (sSaid != ".")
|
||||
{
|
||||
// put your code here to process the input line (in sSaid)
|
||||
|
||||
}
|
||||
|
||||
// after processing, you will likely want to "eat" the text line, so it is
|
||||
// not spoken or available for further processing. If you want the line to
|
||||
// appear, either comment out the following line, or set it to:
|
||||
// SetPCChatMessage(sSaid);
|
||||
SetPCChatMessage("");
|
||||
}
|
61
_module/nss/dmfi_getln_inc.nss
Normal file
61
_module/nss/dmfi_getln_inc.nss
Normal file
@@ -0,0 +1,61 @@
|
||||
|
||||
// DMFI_get_line: generic input line processing
|
||||
//
|
||||
// You can use this when you want to retrieve a spoken line of text.
|
||||
//
|
||||
// Specify the PC you want to listen to, the channel you want to listen on
|
||||
// (often the TALK channel), and the name of the script to run when a line
|
||||
// of text is heard.
|
||||
//
|
||||
// See the file dmfi_getln_cbtbl for a sample template script for processing
|
||||
// the heard line.
|
||||
|
||||
#include "dmfi_plychat_inc"
|
||||
|
||||
const string DMFI_GETLINE_HOOK_HANDLE_VARNAME = "dmfi_getline_hookhandle";
|
||||
|
||||
/**
|
||||
*
|
||||
* @author tsunami282
|
||||
* @since 1.09
|
||||
*
|
||||
* @param oSpeaker PC we want to listen to.
|
||||
* @param iChannel voice channel to listen on (use TALKVOLUME_ constants).
|
||||
* @param sEventScriptName sEventScriptName = name of script to call upon completion
|
||||
* of input (cannot be blank).
|
||||
* @param oRequester object requesting the result: the sEventScriptName script
|
||||
* will be invoked with this as the caller, and therefore it
|
||||
* must be valid at time of player chat event.
|
||||
* @return handle (positive int) of the chat event hook
|
||||
*/
|
||||
int DMFI_get_line(object oSpeaker, int iChannel, string sEventScriptName,
|
||||
object oRequester = OBJECT_SELF)
|
||||
{
|
||||
int hdlHook = 0;
|
||||
|
||||
if (GetIsObjectValid(oSpeaker) && GetIsObjectValid(oRequester) && sEventScriptName != "")
|
||||
{
|
||||
// SendMessageToPC(GetFirstPC(), "getline - apply hook");
|
||||
hdlHook = DMFI_ChatHookAdd(sEventScriptName, oRequester, (1 << iChannel),
|
||||
FALSE, oSpeaker, TRUE);
|
||||
// SendMessageToPC(GetFirstPC(), "getline - hook handle returned is " + IntToString(hdlHook));
|
||||
SetLocalInt(oRequester, DMFI_GETLINE_HOOK_HANDLE_VARNAME, hdlHook);
|
||||
}
|
||||
|
||||
return hdlHook;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param hdlHookIn handle of hook handler that we want to un-hook.
|
||||
* @param oRequester object requesting the result of DMFI_get_line
|
||||
*/
|
||||
void DMFI_cancel_get_line(int hdlHookIn = 0, object oRequester = OBJECT_SELF)
|
||||
{
|
||||
int hdlHook = hdlHookIn;
|
||||
if (hdlHook == 0) hdlHook = GetLocalInt(oRequester, DMFI_GETLINE_HOOK_HANDLE_VARNAME);
|
||||
DMFI_ChatHookRemove(hdlHook);
|
||||
}
|
||||
|
217
_module/nss/dmfi_init_inc.nss
Normal file
217
_module/nss/dmfi_init_inc.nss
Normal file
@@ -0,0 +1,217 @@
|
||||
|
||||
#include "dmfi_db_inc"
|
||||
|
||||
const int DMFI_DEFAULT_EMOTES_MUTED = FALSE;
|
||||
|
||||
int dmfiInitialize(object oUser)
|
||||
{
|
||||
//*************************************INITIALIZATION CODE***************************************
|
||||
//***************************************RUNS ONE TIME ***************************************
|
||||
|
||||
//voice stuff is module wide
|
||||
|
||||
if (GetLocalInt(GetModule(), "dmfi_initialized") != 1)
|
||||
{
|
||||
SendMessageToPC(oUser,":: DMFI Wands & Widgets System ::");
|
||||
int iLoop = 20610;
|
||||
string sText;
|
||||
while (iLoop < 20680)
|
||||
{
|
||||
sText = GetDMFIPersistentString("dmfi", "hls" + IntToString(iLoop));
|
||||
SetCustomToken(iLoop, sText);
|
||||
iLoop++;
|
||||
}
|
||||
SendMessageToAllDMs("DMFI voice custom tokens initialized.");
|
||||
|
||||
SetLocalInt(GetModule(), "dmfi_initialized", 1);
|
||||
}
|
||||
|
||||
|
||||
//remainder of settings are user based
|
||||
|
||||
if ((GetLocalInt(oUser, "dmfi_initialized")!=1) && (GetIsDM(oUser) || GetIsDMPossessed(oUser)))
|
||||
{
|
||||
//if you have campaign variables set - use those settings
|
||||
if (GetDMFIPersistentInt("dmfi", "Settings", oUser)==1)
|
||||
{
|
||||
FloatingTextStringOnCreature("DMFI Settings Restored", oUser, FALSE);
|
||||
// SendMessageToPC(oUser, "DMFI Settings Restored");
|
||||
|
||||
int n = GetDMFIPersistentInt("dmfi", "dmfi_alignshift", oUser);
|
||||
SetCustomToken(20781, IntToString(n));
|
||||
SetLocalInt(oUser, "dmfi_alignshift", n);
|
||||
SendMessageToPC(oUser, "Settings: Alignment shift: "+IntToString(n));
|
||||
|
||||
n = GetDMFIPersistentInt("dmfi", "dmfi_safe_factions", oUser);
|
||||
SetLocalInt(oUser, "dmfi_safe_factions", n);
|
||||
SendMessageToPC(oUser, "Settings: Factions (1 is DMFI Safe Faction): "+IntToString(n));
|
||||
|
||||
n = GetDMFIPersistentInt("dmfi", "dmfi_damagemodifier", oUser);
|
||||
SetLocalInt(oUser, "dmfi_damagemodifier",n);
|
||||
SendMessageToPC(oUser, "Settings: Damage Modifier: "+IntToString(n));
|
||||
|
||||
n = GetDMFIPersistentInt("dmfi","dmfi_buff_party",oUser);
|
||||
SetLocalInt(oUser, "dmfi_buff_party", n);
|
||||
if (n==1)
|
||||
SetCustomToken(20783, "Party");
|
||||
else
|
||||
SetCustomToken(20783, "Single Target");
|
||||
|
||||
SendMessageToPC(oUser, "Settings: Buff Party (1 is Party): "+IntToString(n));
|
||||
|
||||
string sLevel = GetDMFIPersistentString("dmfi", "dmfi_buff_level", oUser);
|
||||
SetCustomToken(20782, sLevel);
|
||||
SetLocalString(oUser, "dmfi_buff_level", sLevel);
|
||||
SendMessageToPC(oUser, "Settings: Buff Level: "+ sLevel);
|
||||
|
||||
n = GetDMFIPersistentInt("dmfi", "dmfi_dicebag", oUser);
|
||||
SetLocalInt(oUser, "dmfi_dicebag", n);
|
||||
|
||||
string sText;
|
||||
if (n==0)
|
||||
{
|
||||
SetCustomToken(20681, "Private");
|
||||
sText = "Private";
|
||||
}
|
||||
else if (n==1)
|
||||
{
|
||||
SetCustomToken(20681, "Global");
|
||||
sText = "Global";
|
||||
}
|
||||
else if (n==2)
|
||||
{
|
||||
SetCustomToken(20681, "Local");
|
||||
sText = "Local";
|
||||
}
|
||||
else if (n==3)
|
||||
{
|
||||
SetCustomToken(20681, "DM Only");
|
||||
sText = "DM Only";
|
||||
}
|
||||
SendMessageToPC(oUser, "Settings: Dicebag Reporting: "+sText);
|
||||
|
||||
n = GetDMFIPersistentInt("dmfi", "dmfi_dice_no_animate", oUser);
|
||||
SetLocalInt(oUser, "dmfi_dice_no_animate", n);
|
||||
SendMessageToPC(oUser, "Settings: Roll Animations (1 is OFF): "+IntToString(n));
|
||||
|
||||
float f = GetDMFIPersistentFloat("dmfi", "dmfi_reputation", oUser);
|
||||
SetLocalFloat(oUser, "dmfi_reputation", f);
|
||||
SendMessageToPC(oUser, "Settings: Reputation Adjustment: "+FloatToString(f));
|
||||
|
||||
f = GetDMFIPersistentFloat("dmfi", "dmfi_effectduration", oUser);
|
||||
SetLocalFloat(oUser, "dmfi_effectduration", f);
|
||||
SendMessageToPC(oUser, "Settings: Effect Duration: "+FloatToString(f));
|
||||
|
||||
f = GetDMFIPersistentFloat("dmfi", "dmfi_sound_delay", oUser);
|
||||
SetLocalFloat(oUser, "dmfi_sound_delay", f);
|
||||
SendMessageToPC(oUser, "Settings: Sound Delay: "+FloatToString(f));
|
||||
|
||||
f = GetDMFIPersistentFloat("dmfi", "dmfi_beamduration", oUser);
|
||||
SetLocalFloat(oUser, "dmfi_beamduration", f);
|
||||
SendMessageToPC(oUser, "Settings: Beam Duration: "+FloatToString(f));
|
||||
|
||||
f = GetDMFIPersistentFloat("dmfi", "dmfi_stunduration", oUser);
|
||||
SetLocalFloat(oUser, "dmfi_stunduration", f);
|
||||
SendMessageToPC(oUser, "Settings: Stun Duration: "+FloatToString(f));
|
||||
|
||||
f = GetDMFIPersistentFloat("dmfi", "dmfi_saveamount", oUser);
|
||||
SetLocalFloat(oUser, "dmfi_saveamount", f);
|
||||
SendMessageToPC(oUser, "Settings: Save Adjustment: "+FloatToString(f));
|
||||
|
||||
f = GetDMFIPersistentFloat("dmfi", "dmfi_effectdelay", oUser);
|
||||
SetLocalFloat(oUser, "dmfi_effectdelay", f);
|
||||
SendMessageToPC(oUser, "Settings: Effect Delay: "+FloatToString(f));
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
FloatingTextStringOnCreature("DMFI Default Settings Initialized", oUser, FALSE);
|
||||
// SendMessageToPC(oUser, "DMFI Default Settings Initialized");
|
||||
|
||||
//Setting FOUR campaign variables so 1st use will be slow.
|
||||
//Recommend initializing your preferences with no players or
|
||||
//while there is NO fighting.
|
||||
// SetLocalInt(oUser, "dmfi_initialized", 1);
|
||||
SetDMFIPersistentInt("dmfi", "Settings", 1, oUser);
|
||||
|
||||
SetCustomToken(20781, "5");
|
||||
SetLocalInt(oUser, "dmfi_alignshift", 5);
|
||||
SetDMFIPersistentInt("dmfi", "dmfi_alignshift", 5, oUser);
|
||||
SendMessageToPC(oUser, "Settings: Alignment shift: 5");
|
||||
|
||||
SetCustomToken(20783, "Single Target");
|
||||
SetLocalInt(oUser, "dmfi_buff_party", 0);
|
||||
SetDMFIPersistentInt("dmfi", "dmfi_buff_party", 0, oUser);
|
||||
SendMessageToPC(oUser, "Settings: Buff set to Single Target: ");
|
||||
|
||||
SetCustomToken(20782, "Low");
|
||||
SetLocalString(oUser, "dmfi_buff_level", "LOW");
|
||||
SetDMFIPersistentString("dmfi", "dmfi_buff_level", "LOW", oUser);
|
||||
SendMessageToPC(oUser, "Settings: Buff Level set to LOW: ");
|
||||
|
||||
SetLocalInt(oUser, "dmfi_dicebag", 0);
|
||||
SetCustomToken(20681, "Private");
|
||||
SetDMFIPersistentInt("dmfi", "dmfi_dicebag", 0, oUser);
|
||||
SendMessageToPC(oUser, "Settings: Dicebag Rolls set to PRIVATE");
|
||||
|
||||
SetLocalInt(oUser, "", 0);
|
||||
SetDMFIPersistentInt("dmfi", "dmfi_safe_factions", 0, oUser);
|
||||
SendMessageToPC(oUser, "Settings: Factions set to BW base behavior");
|
||||
|
||||
SetLocalFloat(oUser, "dmfi_reputation", 5.0);
|
||||
SetCustomToken(20784, "5");
|
||||
SetDMFIPersistentFloat("dmfi", "dmfi_reputation", 5.0, oUser);
|
||||
SendMessageToPC(oUser, "Settings: Reputation adjustment: 5");
|
||||
|
||||
SetDMFIPersistentFloat("dmfi", "dmfi_effectduration", 60.0, oUser);
|
||||
SetLocalFloat(oUser, "dmfi_effectduration", 60.0);
|
||||
SetDMFIPersistentFloat("dmfi", "dmfi_sound_delay", 0.2, oUser);
|
||||
SetLocalFloat(oUser, "dmfi_sound_delay", 0.2);
|
||||
SetDMFIPersistentFloat("dmfi", "dmfi_beamduration", 5.0, oUser);
|
||||
SetLocalFloat(oUser, "dmfi_beamduration", 5.0);
|
||||
SetDMFIPersistentFloat("dmfi", "dmfi_stunduration", 1000.0, oUser);
|
||||
SetLocalFloat(oUser, "dmfi_stunduration", 1000.0);
|
||||
SetDMFIPersistentFloat("dmfi", "dmfi_saveamount", 5.0, oUser);
|
||||
SetLocalFloat(oUser, "dmfi_saveamount", 5.0);
|
||||
SetDMFIPersistentFloat("dmfi", "dmfi_effectdelay", 1.0, oUser);
|
||||
SetLocalFloat(oUser, "dmfi_effectdelay", 1.0);
|
||||
|
||||
SendMessageToPC(oUser, "Settings: Effect Duration: 60.0");
|
||||
SendMessageToPC(oUser, "Settings: Effect Delay: 1.0");
|
||||
SendMessageToPC(oUser, "Settings: Beam Duration: 5.0");
|
||||
SendMessageToPC(oUser, "Settings: Stun Duration: 1000.0");
|
||||
SendMessageToPC(oUser, "Settings: Sound Delay: 0.2");
|
||||
SendMessageToPC(oUser, "Settings: Save Adjustment: 5.0");
|
||||
}
|
||||
}
|
||||
//********************************END INITIALIZATION***************************
|
||||
|
||||
// inits for all users (DM & player)
|
||||
if (GetLocalInt(oUser, "dmfi_initialized")!=1)
|
||||
{
|
||||
int bEmotesMuted;
|
||||
if (GetDMFIPersistentInt("dmfi", "Settings", oUser)==1)
|
||||
{
|
||||
bEmotesMuted = GetDMFIPersistentInt("dmfi", "dmfi_emotemute", oUser);
|
||||
}
|
||||
else
|
||||
{
|
||||
bEmotesMuted = DMFI_DEFAULT_EMOTES_MUTED;
|
||||
SetDMFIPersistentInt("dmfi", "dmfi_emotemute", bEmotesMuted, oUser);
|
||||
}
|
||||
SetLocalInt(oUser, "hls_emotemute", bEmotesMuted);
|
||||
SendMessageToPC(oUser, "Settings: Emotes "+(bEmotesMuted ? "muted" : "unmuted"));
|
||||
|
||||
SetLocalObject(oUser, "dmfi_VoiceTarget", OBJECT_INVALID);
|
||||
SendMessageToPC(oUser, "Settings: Voice throw target cleared");
|
||||
|
||||
SetLocalObject(oUser, "dmfi_univ_target", oUser);
|
||||
SendMessageToPC(oUser, "Settings: Command target set to self");
|
||||
|
||||
SetLocalInt(oUser, "dmfi_initialized", 1);
|
||||
}
|
||||
|
||||
return TRUE; // no errors detected
|
||||
}
|
||||
|
23
_module/nss/dmfi_onclienter.nss
Normal file
23
_module/nss/dmfi_onclienter.nss
Normal file
@@ -0,0 +1,23 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: DMFI - OnClientEnter event handler
|
||||
//:: dmfi_onclienter
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Event handler for the module-level OnClientEnter event. Initializes DMFI system.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: 2008.08.02 tsunami282 - created.
|
||||
|
||||
#include "dmfi_init_inc"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oUser = GetEnteringObject();
|
||||
|
||||
// do any other module OnClientEnter work here
|
||||
ExecuteScript("x3_mod_def_enter", OBJECT_SELF);
|
||||
|
||||
// initialize DMFI
|
||||
dmfiInitialize(oUser);
|
||||
}
|
29
_module/nss/dmfi_onmodhb.nss
Normal file
29
_module/nss/dmfi_onmodhb.nss
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
#include "dmfi_db_inc"
|
||||
|
||||
const int FLUSH_INTERVAL = 30; // seconds between database flushes to disk
|
||||
|
||||
void main()
|
||||
{
|
||||
// see if database is "dirty" (changed since last flush)
|
||||
if (IsDMFIPersistentDataDirty("dmfi"))
|
||||
{
|
||||
// it is, so check if time to flush database
|
||||
object oMod = GetModule();
|
||||
int iTick = GetLocalInt(oMod, "DMFI_MODULE_HEARTBEAT_TICK");
|
||||
int iSecsSinceFlush = iTick * 6;
|
||||
if (iSecsSinceFlush >= FLUSH_INTERVAL)
|
||||
{
|
||||
FlushDMFIPersistentData("dmfi");
|
||||
iTick = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
iTick++;
|
||||
}
|
||||
SetLocalInt(oMod, "DMFI_MODULE_HEARTBEAT_TICK", iTick);
|
||||
}
|
||||
|
||||
// do any other module OnHeartbeat work here
|
||||
ExecuteScript("x3_mod_def_hb", OBJECT_SELF);
|
||||
}
|
79
_module/nss/dmfi_onplychat.nss
Normal file
79
_module/nss/dmfi_onplychat.nss
Normal file
@@ -0,0 +1,79 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: DMFI - OnPlayerChat event handler
|
||||
//:: dmfi_onplychat
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Event handler for the module-level OnPlayerChat event. Manages scripter-added
|
||||
event scripts.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Merle, with help from mykael22000 and tsunami282
|
||||
//:: Created On: 2007.12.12
|
||||
//:://////////////////////////////////////////////
|
||||
//:: 2007.12.27 tsunami282 - implemented hooking tree
|
||||
|
||||
#include "dmfi_plychat_inc"
|
||||
|
||||
const string DMFI_PLAYERCHAT_SCRIPTNAME = "dmfi_plychat_exe";
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
int nVolume = GetPCChatVolume();
|
||||
object oShouter = GetPCChatSpeaker();
|
||||
|
||||
int bInvoke;
|
||||
string sChatHandlerScript;
|
||||
int maskChannels;
|
||||
// int bListenAll;
|
||||
object oRunner;
|
||||
int bAutoRemove;
|
||||
int bDirtyList = FALSE;
|
||||
int iHook;
|
||||
object oMod = GetModule();
|
||||
// SendMessageToPC(GetFirstPC(), "OnPlayerChat - process hooks");
|
||||
int nHooks = GetLocalArrayUpperBound(oMod, DMFI_CHATHOOK_HANDLE_ARRAYNAME);
|
||||
for (iHook = nHooks; iHook > 0; iHook--) // reverse-order execution, last hook gets first dibs
|
||||
{
|
||||
// SendMessageToPC(GetFirstPC(), "OnPlayerChat -- process hook #" + IntToString(iHook));
|
||||
maskChannels = GetLocalArrayInt(oMod, DMFI_CHATHOOK_CHANNELS_ARRAYNAME, iHook);
|
||||
// SendMessageToPC(GetFirstPC(), "OnPlayerChat -- channel heard=" + IntToString(nVolume) + ", soughtmask=" + IntToString(maskChannels));
|
||||
if (((1 << nVolume) & maskChannels) != 0) // right channel
|
||||
{
|
||||
// SendMessageToPC(GetFirstPC(), "OnPlayerChat --- channel matched");
|
||||
|
||||
bInvoke = FALSE;
|
||||
if (GetLocalArrayInt(oMod, DMFI_CHATHOOK_LISTENALL_ARRAYNAME, iHook) != FALSE)
|
||||
{
|
||||
bInvoke = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
object oDesiredSpeaker = GetLocalArrayObject(oMod, DMFI_CHATHOOK_SPEAKER_ARRAYNAME, iHook);
|
||||
if (oShouter == oDesiredSpeaker) bInvoke = TRUE;
|
||||
}
|
||||
if (bInvoke) // right speaker
|
||||
{
|
||||
// SendMessageToPC(GetFirstPC(), "OnPlayerChat --- speaker matched");
|
||||
sChatHandlerScript = GetLocalArrayString(oMod, DMFI_CHATHOOK_SCRIPT_ARRAYNAME, iHook);
|
||||
oRunner = GetLocalArrayObject(oMod, DMFI_CHATHOOK_RUNNER_ARRAYNAME, iHook);
|
||||
// SendMessageToPC(GetFirstPC(), "OnPlayerChat --- executing script '" + sChatHandlerScript + "' on object '" + GetName(oRunner) +"'");
|
||||
ExecuteScript(sChatHandlerScript, oRunner);
|
||||
bAutoRemove = GetLocalArrayInt(oMod, DMFI_CHATHOOK_AUTOREMOVE_ARRAYNAME, iHook);
|
||||
if (bAutoRemove)
|
||||
{
|
||||
// SendMessageToPC(GetFirstPC(), "OnPlayerChat --- scheduling autoremove");
|
||||
bDirtyList = TRUE;
|
||||
SetLocalArrayInt(oMod, DMFI_CHATHOOK_HANDLE_ARRAYNAME, iHook, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bDirtyList) DMFI_ChatHookRemove(0);
|
||||
|
||||
// always execute the DMFI parser
|
||||
ExecuteScript(DMFI_PLAYERCHAT_SCRIPTNAME, OBJECT_SELF);
|
||||
|
||||
}
|
||||
|
464
_module/nss/dmfi_onrest.nss
Normal file
464
_module/nss/dmfi_onrest.nss
Normal file
@@ -0,0 +1,464 @@
|
||||
/*DMFI Rest System Alpha by hahnsoo
|
||||
|
||||
CONTENTS
|
||||
--------
|
||||
Placeables>>Special>>Custom 5 - DMFI Bed Roll, DMFI Campfire, DMFI Invisible
|
||||
Rest Object, DMFI Tent
|
||||
|
||||
Items>>Special>>Custom5 - DMFI Bed Roll (100 gp), DMFI Firewood (1 gp), DMFI
|
||||
Portable Tent (500 gp) (different gp values for different situations)
|
||||
|
||||
Scripts - dmfi_onrest
|
||||
(Yup, that's it)
|
||||
|
||||
Description
|
||||
-----------
|
||||
This is a robust and versatile rest system that incorporates a LOT of options.
|
||||
Perhaps too many, I don't know. I tried to find everything that folks would
|
||||
possibly want in a resting system. The most important "feature" is the rest
|
||||
conversation menu, which governs for both DM and Player the kind of resting that
|
||||
is allowed.
|
||||
|
||||
The ways you can control rest in this system are:
|
||||
1) Global vs. Local - Restrict or release restrictions on resting based on world
|
||||
settings or on a per-area basis
|
||||
2) Unlimited vs. Limited vs. No Rest - Have the Players rest at any time they'd
|
||||
like. Or Limit them according to certain parameters and toggles. Or don't
|
||||
allow them to rest at all. You can set these both globally and locally
|
||||
(Unlimited and No Rest areas).
|
||||
3) Time restriction - The staple of most simple rest restrictions. You can limit
|
||||
resting per 1, 2, 4, 8, 12, or 24 in-game hours, and the amount of real-time
|
||||
minutes are calculated for the DM. Again, you can set these both globally
|
||||
and locally.
|
||||
4) Placeables - Popularized by Demetrious's Supply-Based Rest, this allows you
|
||||
to restrict resting according to proximity to objects. It allows you to use
|
||||
DMFI rest objects (tag = dmfi_restobject), campfires, bedrolls, beds, tents
|
||||
(a "Name-based" rest placeable), and toggles to include/exclude certain
|
||||
classes that typically don't care about such niceties.
|
||||
5) Armor Restrictions - I'm not quite fond of this particular one, but it is a
|
||||
standard feature of many rest systems and thus included in the package.
|
||||
Allows you to set what weight of armor allows a PC to rest.
|
||||
6) Set Hit Point Restrictions - Unlike the other restrictions, this does NOT
|
||||
prevent resting. What it does is determine how many hitpoints are regained
|
||||
upon resting, from a gradient of no hitpoints to all hitpoint, and some
|
||||
interesting options in between (1 HP per level, per 3rd edition, which
|
||||
skews against fighter classes and CON based HP gain, which skews in favor of
|
||||
lower level characters).
|
||||
7) Toggle Spell Memorization - This converts the "rest" into a "pseudorest"
|
||||
which only heals HP. Useful for a "no spell memorization" zone locally, not
|
||||
much use globally.
|
||||
8) Various other "fluff" settings (Snoring, the rest conversation menu,
|
||||
immobilized resting, floating text feedback).
|
||||
|
||||
There is also a "big red button" option that simply full rests all PCs in the
|
||||
area. Useful to quickly work around rest restrictions that you have previously
|
||||
set up.
|
||||
|
||||
Installation
|
||||
------------
|
||||
Change your OnRest event script to the dmfi_onrest script. Or you can do an
|
||||
external execute script call by using ExecuteScript("dmfi_onrest", OBJECT_SELF);
|
||||
in your current script.
|
||||
|
||||
The areas in your module should NOT have the "No Rest" box checked, in the areas
|
||||
which you wish to use this system.
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
All configuration of the system is done in-game as a DM. To bring up the Rest
|
||||
Configuration Menu, press R or the rest button.
|
||||
The conversation will detail the settings you have in the area (whether you are
|
||||
using the default Global settings or using the Local area settings to override)
|
||||
and the particular restrictions that you have set.
|
||||
|
||||
Settings are stored Persistently using the Bioware Database, per the DMFI W&W
|
||||
default persistence options. If you want to use another database system, simply
|
||||
edit the the dmfi_db_inc wrapper functions to your liking.
|
||||
|
||||
Unlimited Rest means just that: No restrictions. You may have global
|
||||
restrictions set up, but as long as Unlimited rest is set globally or locally,
|
||||
they are ignored.
|
||||
No Rest means just that: No resting allowed, regardless of restrictions.
|
||||
Limited Rest means that the restrictions you have set globally or locally are in
|
||||
effect. You can restrict resting as stated above in the Description.
|
||||
|
||||
When you set any [LOCAL] Area variables, you automatically set the area to
|
||||
"override" the global rest restrictions. This means that this area follows its
|
||||
own rules, and isn't governed by the global rules. Setting the [LOCAL] Area
|
||||
restrictions will copy the current global restriction variables, but after that,
|
||||
the only way to go back to "global" is to select "Use default [GLOBAL] Module
|
||||
settings"
|
||||
Tip: The most useful way to use this is to simply set areas as Unlimited Rest or
|
||||
No Rest, say an Inn Room or a combat zone, respectively.
|
||||
|
||||
Player Notes
|
||||
------------
|
||||
If you are using the DMFI Rest Menu (on by default), the rest restrictions (if
|
||||
any) are displayed on your Rest Conversation Menu, telling you why you can't
|
||||
rest (if you are restricted). You also have the option to access both the DMFI
|
||||
Dicebag and the DMFI Emote wand directly from the Rest Menu. This allows you to
|
||||
use emotes or dice checks WITHOUT having that silly "Use Unique Power"
|
||||
animation.
|
||||
|
||||
Included in this package is a way to do "Alternate Resting Animations". These
|
||||
animations simply change the way you appear when you rest. Since they use the
|
||||
ForceRest() function, it isn't a "true" rest... rather it sets you for a certain
|
||||
amount of time (equal to a normal rest) as un-moveable, and applies the rest at
|
||||
the end of that time. This just means you don't get the little egg timer.
|
||||
|
||||
This is an ALPHA release, and I'm pretty sure I don't know everything about
|
||||
Resting systems in the universe. I've tried to incorporate nearly all of the
|
||||
elements I've seen in other available resting systems and encorporate them into
|
||||
a small (single script), DMFI-integrated package.
|
||||
|
||||
I would greatly appreciate feedback, suggestions, additions, omissions, bug
|
||||
reports, whatever. Send them to me at hahns_shin@hotmail.com.*/
|
||||
#include "prc_inc_util"
|
||||
#include "dmfi_db_inc"
|
||||
|
||||
//This function calculates the resting duration based on PC Hit Dice
|
||||
//Based off of restduration.2da
|
||||
void FloatyText(string sText, object oPC, int iSettings)
|
||||
{
|
||||
if (!(iSettings & 0x40000000))
|
||||
FloatingTextStringOnCreature(sText, oPC, FALSE);
|
||||
}
|
||||
|
||||
float GetRestDuration(object oPC)
|
||||
{
|
||||
return 10.0f + 0.5f * IntToFloat(GetHitDice(oPC));
|
||||
}
|
||||
|
||||
// This function is used as a wrapper for the Rest VFX Object
|
||||
void DoRestVFX(object oPC, float fDuration, int nEffect) {
|
||||
effect eEffect;
|
||||
if (nEffect == -1) {
|
||||
eEffect = EffectCutsceneImmobilize();
|
||||
} else {
|
||||
eEffect = EffectVisualEffect(nEffect);
|
||||
}
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ExtraordinaryEffect(eEffect), oPC, fDuration);
|
||||
}
|
||||
|
||||
|
||||
//This function adds the Blindness/Snore effects
|
||||
//Also adds cutscene immobilize to prevent movement
|
||||
//Snoring should only occur at start, then follows on the module's hb
|
||||
void ApplyRestVFX(object oPC, int iSettings)
|
||||
{
|
||||
object oRestVFX = GetObjectByTag("dmfi_restvfxobject");
|
||||
effect eSnore = EffectVisualEffect(VFX_IMP_SLEEP); //Sleepy "ZZZ"s
|
||||
float fDuration = GetRestDuration(oPC);
|
||||
float fSeconds = 6.0f;
|
||||
if (!(iSettings & 0x80000000)) //Immobile Resting flag
|
||||
{
|
||||
// Pass a -1 for EffectCutsceneImmobilize.
|
||||
// For a visual effect, simply pass the VFX constant.
|
||||
AssignCommand(oRestVFX, DoRestVFX(oPC, fDuration, -1));
|
||||
}
|
||||
if (!(iSettings & 0x20000000)) //VFX flag
|
||||
{
|
||||
// AssignCommand(oRestVFX, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ExtraordinaryEffect(eBlind), oPC, fDuration));
|
||||
AssignCommand(oRestVFX, DoRestVFX(oPC, fDuration, VFX_DUR_BLACKOUT));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eSnore, oPC);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Removes blindness & immobilize -- Merle
|
||||
void RemoveRestVFX(object oPC) {
|
||||
object oRestVFX = GetObjectByTag("dmfi_restvfxobject");
|
||||
effect eEffect = GetFirstEffect(oPC);
|
||||
while (GetIsEffectValid(eEffect)) {
|
||||
if (GetEffectCreator(eEffect) == oRestVFX) {
|
||||
RemoveEffect(oPC, eEffect);
|
||||
}
|
||||
eEffect = GetNextEffect(oPC);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//This function gets the "Final HP" available to the PC after resting
|
||||
int CalculateFinalHitPoints(object oPC, int iSettings)
|
||||
{
|
||||
int iHP = (iSettings & 0x0f000000);
|
||||
switch(iHP)
|
||||
{
|
||||
case 0x01000000: return 0; break;
|
||||
case 0x02000000: return GetHitDice(oPC); break;
|
||||
case 0x03000000: return GetAbilityScore(oPC, ABILITY_CONSTITUTION); break;
|
||||
case 0x04000000: return GetMaxHitPoints(oPC)/10; break;
|
||||
case 0x05000000: return GetMaxHitPoints(oPC)/4; break;
|
||||
case 0x06000000: return GetMaxHitPoints(oPC)/2; break;
|
||||
case 0x07000000: return GetMaxHitPoints(oPC); break;
|
||||
default: return GetMaxHitPoints(oPC); break;
|
||||
}
|
||||
return GetMaxHitPoints(oPC);
|
||||
}
|
||||
|
||||
void RemoveMagicalEffects(object oPC)
|
||||
{
|
||||
effect eEffect = GetFirstEffect(oPC);
|
||||
while (GetIsEffectValid(eEffect))
|
||||
{
|
||||
if (GetEffectSubType(eEffect) == SUBTYPE_MAGICAL)
|
||||
RemoveEffect(oPC, eEffect);
|
||||
eEffect = GetNextEffect(oPC);
|
||||
}
|
||||
}
|
||||
|
||||
//This function simulates a rest without restoring spells
|
||||
void DoPseudoRest(object oPC, int iSettings, int iSpells = FALSE)
|
||||
{
|
||||
effect eSnore = EffectVisualEffect(VFX_IMP_SLEEP);
|
||||
effect eBlind = EffectVisualEffect(VFX_DUR_BLACKOUT);
|
||||
effect eStop = EffectCutsceneImmobilize();
|
||||
float fDuration = GetRestDuration(oPC);
|
||||
float fSeconds = 6.0f;
|
||||
int iAnimation = GetLocalInt(oPC, "dmfi_r_alternate");
|
||||
if (!iAnimation)
|
||||
iAnimation = ANIMATION_LOOPING_SIT_CROSS;
|
||||
AssignCommand(oPC, PlayAnimation(iAnimation, 1.0f, fDuration));
|
||||
DelayCommand(0.1, SetCommandable(FALSE, oPC));
|
||||
DelayCommand(fDuration, SetCommandable(TRUE, oPC));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ExtraordinaryEffect(eStop), oPC, fDuration);
|
||||
if (!(iSettings & 0x20000000) && iAnimation != ANIMATION_LOOPING_MEDITATE && iAnimation != ANIMATION_LOOPING_WORSHIP) //If the No VFX flag is not set, do VFX
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ExtraordinaryEffect(eBlind), oPC, fDuration);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eSnore, oPC);
|
||||
while (fSeconds < fDuration)
|
||||
{
|
||||
DelayCommand(fSeconds, ApplyEffectToObject(DURATION_TYPE_INSTANT, eSnore, oPC));
|
||||
fSeconds += 6.0f;
|
||||
}
|
||||
}
|
||||
if (!iSpells)
|
||||
{
|
||||
effect eHeal = EffectHeal(CalculateFinalHitPoints(oPC, iSettings)); //Heal the PC
|
||||
DelayCommand(fDuration + 0.1f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oPC));
|
||||
DelayCommand(fDuration + 0.1f, RemoveMagicalEffects(oPC)); //Remove all magical effects from PC
|
||||
}
|
||||
else
|
||||
{
|
||||
DelayCommand(fDuration + 0.1f, PRCForceRest(oPC));
|
||||
}
|
||||
DeleteLocalInt(oPC, "dmfi_r_alternate");
|
||||
}
|
||||
|
||||
//This function determines if the PC is wearing heavy armor
|
||||
int GetIsWearingHeavyArmor(object oPC, int iSettings)
|
||||
{
|
||||
int iArmor = (iSettings & 0x00f00000);
|
||||
object oArmor = GetItemInSlot(INVENTORY_SLOT_CHEST, oPC);
|
||||
int iWeight = GetWeight(oArmor);
|
||||
switch(iArmor)
|
||||
{
|
||||
default:
|
||||
case 0x00100000: if (iWeight > 20) return TRUE; break;
|
||||
case 0x00200000: if (iWeight > 60) return TRUE; break;
|
||||
case 0x00300000: if (iWeight > 110) return TRUE; break;
|
||||
case 0x00400000: if (iWeight > 160) return TRUE; break;
|
||||
case 0x00500000: if (iWeight > 310) return TRUE; break;
|
||||
case 0x00600000: if (iWeight > 410) return TRUE; break;
|
||||
case 0x00700000: if (iWeight > 460) return TRUE; break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//This function determines if the PC is near a resting placeable
|
||||
int GetIsNearRestingObject(object oPC, int iSettings)
|
||||
{
|
||||
if (iSettings & 0x00020000) //Ignore Druid
|
||||
{
|
||||
if (GetLevelByClass(CLASS_TYPE_DRUID, oPC))
|
||||
return TRUE;
|
||||
}
|
||||
if (iSettings & 0x00040000) //Ignore Ranger
|
||||
{
|
||||
if (GetLevelByClass(CLASS_TYPE_RANGER, oPC))
|
||||
return TRUE;
|
||||
}
|
||||
if (iSettings & 0x00080000) //Ignore Barb
|
||||
{
|
||||
if (GetLevelByClass(CLASS_TYPE_BARBARIAN, oPC))
|
||||
return TRUE;
|
||||
}
|
||||
object oPlaceable = GetFirstObjectInShape(SHAPE_SPHERE, 6.0f, GetLocation(oPC), TRUE, OBJECT_TYPE_PLACEABLE);
|
||||
while (GetIsObjectValid(oPlaceable))
|
||||
{
|
||||
if (!(iSettings & 0x00001000) && GetTag(oPlaceable) == "dmfi_rest") //DMFI Placeables: by default, ON
|
||||
return TRUE;
|
||||
if ((iSettings & 0x00002000) && GetStringLowerCase(GetName(oPlaceable)) == "campfire") //Campfires
|
||||
return TRUE;
|
||||
if ((iSettings & 0x00004000) && (GetStringLowerCase(GetName(oPlaceable)) == "bed roll" || GetStringLowerCase(GetName(oPlaceable)) == "bedroll")) //Bed rolls
|
||||
return TRUE;
|
||||
if ((iSettings & 0x00008000) && GetStringLowerCase(GetName(oPlaceable)) == "bed") //beds
|
||||
return TRUE;
|
||||
if ((iSettings & 0x00010000) && GetStringLowerCase(GetName(oPlaceable)) == "tent") //tents
|
||||
return TRUE;
|
||||
oPlaceable = GetNextObjectInShape(SHAPE_SPHERE, 6.0f, GetLocation(oPC), TRUE, OBJECT_TYPE_PLACEABLE);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Updated to allow 6 hour breaks and to pass in a percentage if rest is interrupted
|
||||
void SetNextRestTime(object oPC, int iSettings, float fPercentage = 1.0)
|
||||
{
|
||||
if (fPercentage > 1.0 || fPercentage <= 0.0) {
|
||||
fPercentage = 1.0;
|
||||
}
|
||||
int iHours = (iSettings & 0x00000f00);
|
||||
int iTime = GetTimeHour() + GetCalendarDay() * 24 + GetCalendarMonth() * 24 * 28 + GetCalendarYear() * 24 * 28 * 12;
|
||||
|
||||
switch(iHours)
|
||||
{
|
||||
default:
|
||||
case 0x00000100: SetLocalInt(oPC, "dmfi_r_nextrest", iTime + FloatToInt(IntToFloat(1) * fPercentage)); break;
|
||||
case 0x00000200: SetLocalInt(oPC, "dmfi_r_nextrest", iTime + FloatToInt(IntToFloat(2) * fPercentage)); break;
|
||||
case 0x00000300: SetLocalInt(oPC, "dmfi_r_nextrest", iTime + FloatToInt(IntToFloat(4) * fPercentage)); break;
|
||||
case 0x00000400: SetLocalInt(oPC, "dmfi_r_nextrest", iTime + FloatToInt(IntToFloat(6) * fPercentage)); break;
|
||||
case 0x00000500: SetLocalInt(oPC, "dmfi_r_nextrest", iTime + FloatToInt(IntToFloat(8) * fPercentage)); break;
|
||||
case 0x00000600: SetLocalInt(oPC, "dmfi_r_nextrest", iTime + FloatToInt(IntToFloat(12) * fPercentage)); break;
|
||||
case 0x00000700: SetLocalInt(oPC, "dmfi_r_nextrest", iTime + FloatToInt(IntToFloat(24) * fPercentage)); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//This function determines whether or not you can rest.
|
||||
int DMFI_CanIRest(object oPC, int iSettings)
|
||||
{
|
||||
if (GetIsDM(oPC)) return TRUE;
|
||||
if (iSettings & 0x00000002) //No Rest Override
|
||||
{
|
||||
if (iSettings & 0x00000080)
|
||||
FloatyText("This is a No Rest area", oPC, iSettings);
|
||||
return FALSE;
|
||||
}
|
||||
if (!(iSettings & 0x00000001)) //Unlimited Rest Override
|
||||
{
|
||||
if (iSettings & 0x00000080)
|
||||
FloatyText("This is an Unlimited Rest area", oPC, iSettings);
|
||||
return TRUE;
|
||||
}
|
||||
if ((iSettings & 0x00000004) && (iSettings & 0x00000001)) //Time restriction
|
||||
{
|
||||
int iTime = GetTimeHour() + GetCalendarDay() * 24 + GetCalendarMonth() * 24 * 28 + GetCalendarYear() * 24 * 28 * 12;
|
||||
if (iTime < GetLocalInt(oPC, "dmfi_r_nextrest"))
|
||||
{
|
||||
FloatyText("You cannot rest at this time. You may rest again in " + IntToString(GetLocalInt(oPC, "dmfi_r_nextrest") - iTime) + " hours.", oPC, iSettings);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
if ((iSettings & 0x00000008) && (iSettings & 0x00000001)) //Placeable restriction
|
||||
{
|
||||
if (!GetIsNearRestingObject(oPC, iSettings))
|
||||
{
|
||||
FloatyText("You are not near a rest placeable", oPC, iSettings);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
if ((iSettings & 0x00000010) && (iSettings & 0x00000001)) //Armor restriction
|
||||
{
|
||||
if (GetIsWearingHeavyArmor(oPC, iSettings))
|
||||
{
|
||||
FloatyText("Your current armor is too heavy to rest", oPC, iSettings);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastPCRested();
|
||||
object oArea = GetArea(oPC);
|
||||
int iSettings;
|
||||
int iModSettings = GetDMFIPersistentInt("dmfi", "dmfi_r_");
|
||||
int iAreaSettings = GetDMFIPersistentInt("dmfi", "dmfi_r_" + GetTag(oArea));
|
||||
if (iAreaSettings & 0x00000080)
|
||||
{
|
||||
iSettings = iAreaSettings;
|
||||
}
|
||||
else
|
||||
{
|
||||
iSettings = iModSettings;
|
||||
}
|
||||
SetLocalInt(oPC, "dmfi_r_settings", iSettings);
|
||||
|
||||
if (GetLastRestEventType()==REST_EVENTTYPE_REST_STARTED)
|
||||
{
|
||||
SetLocalInt(oPC, "dmfi_norest", !(DMFI_CanIRest(oPC, iSettings)));
|
||||
SetLocalInt(oPC, "dmfi_r_hitpoints", GetCurrentHitPoints(oPC));
|
||||
if (GetIsDM(oPC) || (!(iSettings & 0x10000000) && !GetLocalInt(oPC, "dmfi_r_bypass")))
|
||||
{ //If the Rest Conversation variable is set, then activate the rest conversation here.
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
SetLocalString(oPC, "dmfi_univ_conv", "rest");
|
||||
AssignCommand(oPC, ActionStartConversation(oPC, "dmfi_universal", TRUE));
|
||||
return;
|
||||
}
|
||||
if (GetLocalInt(oPC, "dmfi_norest")) //PC cannot rest
|
||||
{
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
DeleteLocalInt(oPC, "dmfi_r_bypass");
|
||||
return;
|
||||
}
|
||||
if ((iSettings & 0x00000004) && (iSettings & 0x00000001)) //Time restriction
|
||||
SetNextRestTime(oPC, iSettings);
|
||||
|
||||
if (GetLocalInt(oPC, "dmfi_r_alternate") || ((iSettings & 0x00000040) && (iSettings & 0x00000001)))
|
||||
{
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
if ((iSettings & 0x00000040) && (iSettings & 0x00000001))
|
||||
FloatyText("You cannot regain your spells in this area",oPC, iSettings);
|
||||
DoPseudoRest(oPC, iSettings, ((iSettings & 0x00000040) && (iSettings & 0x00000001)));
|
||||
DeleteLocalInt(oPC, "dmfi_r_bypass");
|
||||
return;
|
||||
}
|
||||
else if (!(iSettings & 0x20000000))
|
||||
{ //Rest VFX
|
||||
ApplyRestVFX(oPC, iSettings);
|
||||
}
|
||||
if ((iSettings & 0x00000020) && (iSettings & 0x00000001))
|
||||
{ //Auto Party Drop
|
||||
FloatyText("You have been removed from the party to prevent rest canceling",oPC, iSettings);
|
||||
RemoveFromParty(oPC);
|
||||
}
|
||||
}
|
||||
else if (GetLastRestEventType()==REST_EVENTTYPE_REST_CANCELLED)
|
||||
{
|
||||
// Make sure that resting has been initialized and the start time has been set. Otherwise, the Cancelled Rest Event was fired by
|
||||
// the Resting conversation.
|
||||
if (GetLocalInt(oPC, "dmfi_r_init"))
|
||||
{
|
||||
int iTime = GetTimeSecond() + GetTimeMinute() * 60 + GetTimeHour() * 3600 + GetCalendarDay() * 24 * 3600 + GetCalendarMonth() *3600 * 24 * 28 + GetCalendarYear() * 24 * 28 * 12 * 3600;
|
||||
int nTimeRested = iTime - GetLocalInt(oPC, "dmfi_r_startseconds");
|
||||
int nFullTime = FloatToInt(GetRestDuration(oPC));
|
||||
float fPercentage = IntToFloat(nTimeRested) / IntToFloat(nFullTime);
|
||||
SetNextRestTime(oPC, iSettings, fPercentage);
|
||||
// SendMessageToPC(oPC, "Rest interrupted; resting for " + IntToString(nTimeRested) + " out of " + IntToString(nFullTime) + " seconds (" + FloatToString(fPercentage) + "%).");
|
||||
SetLocalInt(oPC, "dmfi_r_init", FALSE);
|
||||
if ((iSettings & 0x00000020) && GetCurrentHitPoints(oPC) > GetLocalInt(oPC, "dmfi_r_hitpoints") && iSettings & 0x00000001) //HP restriction
|
||||
{
|
||||
effect eDam = EffectDamage(GetMaxHitPoints(oPC) - GetLocalInt(oPC, "dmfi_r_hitpoints"));
|
||||
FloatyText("Your hitpoints have been reset",oPC, iSettings);
|
||||
AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oPC));
|
||||
|
||||
}
|
||||
}
|
||||
RemoveRestVFX(oPC);
|
||||
}
|
||||
else if (GetLastRestEventType()==REST_EVENTTYPE_REST_FINISHED)
|
||||
{
|
||||
if ((iSettings & 0x00000020) && (iSettings & 0x00000001)) //HP restriction
|
||||
{
|
||||
int iDam = GetMaxHitPoints(oPC) - GetLocalInt(oPC, "dmfi_r_hitpoints") - CalculateFinalHitPoints(oPC, iSettings);
|
||||
if (iDam > 0)
|
||||
{
|
||||
effect eDam = EffectDamage(iDam);
|
||||
FloatyText("You gain back limited HP from this rest",oPC, iSettings);
|
||||
AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oPC));
|
||||
}
|
||||
}
|
||||
}
|
||||
DeleteLocalInt(oPC, "dmfi_r_bypass");
|
||||
}
|
117
_module/nss/dmfi_plchlishk_i.nss
Normal file
117
_module/nss/dmfi_plchlishk_i.nss
Normal file
@@ -0,0 +1,117 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: DMFI - internal player chat listener hooking include
|
||||
//:: dmfi_plchlishk_i
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Include file containing routines for managing the internal DMFI chain of
|
||||
"listeners", which are now implemented as OnPlayerChat event handlers rather
|
||||
than creatures.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: tsunami282
|
||||
//:: Created On: 2008.03.24
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
const int DMFI_LISTEN_ON_CHANNEL_TALK = 1;
|
||||
const int DMFI_LISTEN_ON_CHANNEL_WHISPER = 1;
|
||||
const int DMFI_LISTEN_ON_CHANNEL_SHOUT = 1;
|
||||
const int DMFI_LISTEN_ON_CHANNEL_DM = 1;
|
||||
const int DMFI_LISTEN_ON_CHANNEL_PARTY = 1;
|
||||
|
||||
const string DMFI_EAVESDROP_HOOK_VARNAME = "dmfi_Eavesdrop";
|
||||
|
||||
const float WHISPER_DISTANCE = 1.0;
|
||||
const float TALK_DISTANCE = 30.0;
|
||||
|
||||
string sHookTypeVarname = DMFI_EAVESDROP_HOOK_VARNAME + "_Type"; // 1=PC (says), 2=NPC/location (hears)
|
||||
string sHookCreatureVarname = DMFI_EAVESDROP_HOOK_VARNAME + "_Creature"; // must be valid for type 1, for type 2 object_invalid means location only
|
||||
string sHookRangeModeVarname = DMFI_EAVESDROP_HOOK_VARNAME + "_RangeMode"; // listening range: for type 1, 0=pc only, 1=pc's party; for type 2, 0=earshot, 1=area, 2=module
|
||||
string sHookLocationVarname = DMFI_EAVESDROP_HOOK_VARNAME + "_Location"; // for type 2, location of "listening post"
|
||||
string sHookChannelsVarname = DMFI_EAVESDROP_HOOK_VARNAME + "_Channels"; // bitmask of TALKVOLUME channels to listen to
|
||||
string sHookOwnerVarname = DMFI_EAVESDROP_HOOK_VARNAME + "_Owner"; // unique ID of owner of this hook (he who will get the captured text)
|
||||
string sHookBcastDMsVarname = DMFI_EAVESDROP_HOOK_VARNAME + "_BcastDMs"; // 0=relay message to owner only, 1=broadcast to all DMs
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
void RemoveListenerHook(int hooknum)
|
||||
{
|
||||
int hooktype;
|
||||
object hookcreature;
|
||||
location hooklocation;
|
||||
int hookchannels;
|
||||
object hookowner;
|
||||
int hookparty, hookbcast;
|
||||
|
||||
int iHook = hooknum;
|
||||
string siHook = "", siHookN = "";
|
||||
object oMod = GetModule();
|
||||
|
||||
while (1)
|
||||
{
|
||||
siHook = IntToString(iHook);
|
||||
siHookN = IntToString(iHook+1);
|
||||
|
||||
hooktype = GetLocalInt(oMod, sHookTypeVarname+siHookN);
|
||||
if (hooktype != 0)
|
||||
{
|
||||
hookcreature = GetLocalObject(oMod, sHookCreatureVarname+siHookN);
|
||||
hooklocation = GetLocalLocation(oMod, sHookLocationVarname+siHookN);
|
||||
hookchannels = GetLocalInt(oMod, sHookChannelsVarname+siHookN);
|
||||
hookowner = GetLocalObject(oMod, sHookOwnerVarname+siHookN);
|
||||
hookparty = GetLocalInt(oMod, sHookRangeModeVarname+siHookN);
|
||||
hookbcast = GetLocalInt(oMod, sHookBcastDMsVarname+siHookN);
|
||||
|
||||
SetLocalInt(oMod, sHookTypeVarname+siHook, hooktype);
|
||||
SetLocalObject(oMod, sHookCreatureVarname+siHook, hookcreature);
|
||||
SetLocalLocation(oMod, sHookLocationVarname+siHook, hooklocation);
|
||||
SetLocalInt(oMod, sHookChannelsVarname+siHook, hookchannels);
|
||||
SetLocalObject(oMod, sHookOwnerVarname+siHook, hookowner);
|
||||
SetLocalInt(oMod, sHookRangeModeVarname+siHook, hookparty);
|
||||
SetLocalInt(oMod, sHookBcastDMsVarname+siHook, hookbcast);
|
||||
}
|
||||
else
|
||||
{
|
||||
DeleteLocalInt(oMod, sHookTypeVarname+siHook);
|
||||
DeleteLocalObject(oMod, sHookCreatureVarname+siHook);
|
||||
DeleteLocalLocation(oMod, sHookLocationVarname+siHook);
|
||||
DeleteLocalInt(oMod, sHookChannelsVarname+siHook);
|
||||
DeleteLocalObject(oMod, sHookOwnerVarname+siHook);
|
||||
DeleteLocalInt(oMod, sHookRangeModeVarname+siHook);
|
||||
DeleteLocalInt(oMod, sHookBcastDMsVarname+siHook);
|
||||
|
||||
break;
|
||||
}
|
||||
iHook++;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
int AppendListenerHook(int hooktype, object hookcreature, location hooklocation,
|
||||
int hookchannels, int hookparty, int hookbcast, object hookowner)
|
||||
{
|
||||
int iHook = 0;
|
||||
|
||||
if (hooktype != 0)
|
||||
{
|
||||
int iHookType;
|
||||
string siHook = "";
|
||||
object oMod = GetModule();
|
||||
iHook = 1;
|
||||
while (1)
|
||||
{
|
||||
siHook = IntToString(iHook);
|
||||
iHookType = GetLocalInt(oMod, sHookTypeVarname+siHook);
|
||||
if (iHookType == 0) break; // end of list
|
||||
iHook++;
|
||||
}
|
||||
SetLocalInt(oMod, sHookTypeVarname+siHook, hooktype);
|
||||
SetLocalObject(oMod, sHookCreatureVarname+siHook, hookcreature);
|
||||
SetLocalLocation(oMod, sHookLocationVarname+siHook, hooklocation);
|
||||
SetLocalInt(oMod, sHookChannelsVarname+siHook, hookchannels);
|
||||
SetLocalObject(oMod, sHookOwnerVarname+siHook, hookowner);
|
||||
SetLocalInt(oMod, sHookRangeModeVarname+siHook, hookparty);
|
||||
SetLocalInt(oMod, sHookBcastDMsVarname+siHook, hookbcast);
|
||||
}
|
||||
|
||||
return iHook;
|
||||
}
|
||||
|
3914
_module/nss/dmfi_plychat_exe.nss
Normal file
3914
_module/nss/dmfi_plychat_exe.nss
Normal file
File diff suppressed because it is too large
Load Diff
142
_module/nss/dmfi_plychat_inc.nss
Normal file
142
_module/nss/dmfi_plychat_inc.nss
Normal file
@@ -0,0 +1,142 @@
|
||||
|
||||
// DMFI OnPlayerChat routines :: event hooking functions
|
||||
//
|
||||
// history
|
||||
// 2008.03.23 tsunami282 - created.
|
||||
//
|
||||
|
||||
#include "dmfi_arrays_inc"
|
||||
|
||||
const string DMFI_CHATHOOK_HANDLE_ARRAYNAME = "DMFI_CHATHOOK_HANDLE";
|
||||
const string DMFI_CHATHOOK_SCRIPT_ARRAYNAME = "DMFI_CHATHOOK_SCRIPT";
|
||||
const string DMFI_CHATHOOK_RUNNER_ARRAYNAME = "DMFI_CHATHOOK_RUNNER";
|
||||
const string DMFI_CHATHOOK_CHANNELS_ARRAYNAME = "DMFI_CHATHOOK_CHANNELS";
|
||||
const string DMFI_CHATHOOK_LISTENALL_ARRAYNAME = "DMFI_CHATHOOK_LISTENALL";
|
||||
const string DMFI_CHATHOOK_SPEAKER_ARRAYNAME = "DMFI_CHATHOOK_SPEAKER";
|
||||
const string DMFI_CHATHOOK_AUTOREMOVE_ARRAYNAME = "DMFI_CHATHOOK_AUTOREMOVE";
|
||||
const string DMFI_CHATHOOK_PREVHANDLE_VARNAME = "DMFI_CHATHOOK_PREVHANDLE";
|
||||
|
||||
int DMFI_CHANNELMASK_TALK = (1 << TALKVOLUME_TALK);
|
||||
int DMFI_CHANNELMASK_WHISPER = (1 << TALKVOLUME_WHISPER);
|
||||
int DMFI_CHANNELMASK_SHOUT = (1 << TALKVOLUME_SHOUT);
|
||||
// * this channel not hookable ** int DMFI_CHANNELMASK_SILENT_TALK = (1 << TALKVOLUME_SILENT_TALK);
|
||||
int DMFI_CHANNELMASK_DM = (1 << TALKVOLUME_SILENT_SHOUT);
|
||||
int DMFI_CHANNELMASK_PARTY = (1 << TALKVOLUME_PARTY);
|
||||
// * this channel not hookable ** int DMFI_CHANNELMASK_TELL = (1 << TALKVOLUME_TELL);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
void dmfi__init_chathook_data()
|
||||
{
|
||||
object oMod = GetModule();
|
||||
|
||||
if (!GetLocalArrayInitialized(oMod, DMFI_CHATHOOK_HANDLE_ARRAYNAME))
|
||||
{
|
||||
InitializeLocalArray(oMod, DMFI_CHATHOOK_HANDLE_ARRAYNAME);
|
||||
SetLocalArrayLowerBound(oMod, DMFI_CHATHOOK_HANDLE_ARRAYNAME, 1);
|
||||
SetLocalArrayUpperBound(oMod, DMFI_CHATHOOK_HANDLE_ARRAYNAME, 0);
|
||||
InitializeLocalArray(oMod, DMFI_CHATHOOK_SCRIPT_ARRAYNAME);
|
||||
SetLocalArrayLowerBound(oMod, DMFI_CHATHOOK_SCRIPT_ARRAYNAME, 1);
|
||||
SetLocalArrayUpperBound(oMod, DMFI_CHATHOOK_SCRIPT_ARRAYNAME, 0);
|
||||
InitializeLocalArray(oMod, DMFI_CHATHOOK_RUNNER_ARRAYNAME);
|
||||
SetLocalArrayLowerBound(oMod, DMFI_CHATHOOK_RUNNER_ARRAYNAME, 1);
|
||||
SetLocalArrayUpperBound(oMod, DMFI_CHATHOOK_RUNNER_ARRAYNAME, 0);
|
||||
InitializeLocalArray(oMod, DMFI_CHATHOOK_CHANNELS_ARRAYNAME);
|
||||
SetLocalArrayLowerBound(oMod, DMFI_CHATHOOK_CHANNELS_ARRAYNAME, 1);
|
||||
SetLocalArrayUpperBound(oMod, DMFI_CHATHOOK_CHANNELS_ARRAYNAME, 0);
|
||||
InitializeLocalArray(oMod, DMFI_CHATHOOK_LISTENALL_ARRAYNAME);
|
||||
SetLocalArrayLowerBound(oMod, DMFI_CHATHOOK_LISTENALL_ARRAYNAME, 1);
|
||||
SetLocalArrayUpperBound(oMod, DMFI_CHATHOOK_LISTENALL_ARRAYNAME, 0);
|
||||
InitializeLocalArray(oMod, DMFI_CHATHOOK_SPEAKER_ARRAYNAME);
|
||||
SetLocalArrayLowerBound(oMod, DMFI_CHATHOOK_SPEAKER_ARRAYNAME, 1);
|
||||
SetLocalArrayUpperBound(oMod, DMFI_CHATHOOK_SPEAKER_ARRAYNAME, 0);
|
||||
InitializeLocalArray(oMod, DMFI_CHATHOOK_AUTOREMOVE_ARRAYNAME);
|
||||
SetLocalArrayLowerBound(oMod, DMFI_CHATHOOK_AUTOREMOVE_ARRAYNAME, 1);
|
||||
SetLocalArrayUpperBound(oMod, DMFI_CHATHOOK_AUTOREMOVE_ARRAYNAME, 0);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//! Adds a callback function to the OnPlayerChat list.
|
||||
//!
|
||||
//! \param sChatHandlerScript name of script to invoke on receiving input
|
||||
//! \param oScriptRunner object to execute the sChatHandlerScript on
|
||||
//! \param maskChannels mask of channels to listen on (defaults to all channels)
|
||||
//! \param bListenAll TRUE to listen to all PC speakers everywhere
|
||||
//! \param oSpeaker if bListenAll is FALSE, creature to listen to (others will be ignored)
|
||||
//! \param bAutoRemove - automatically unhook this chathook after first use
|
||||
//! \return hook handle (needed to remove the hook later); 0 means failed to add the hook
|
||||
int DMFI_ChatHookAdd(string sChatHandlerScript, object oScriptRunner = OBJECT_SELF,
|
||||
int maskChannels = -1, int bListenAll = TRUE, object oSpeaker = OBJECT_INVALID,
|
||||
int bAutoRemove = FALSE)
|
||||
{
|
||||
dmfi__init_chathook_data();
|
||||
|
||||
object oMod = GetModule();
|
||||
|
||||
int iHook = GetLocalArrayUpperBound(oMod, DMFI_CHATHOOK_HANDLE_ARRAYNAME);
|
||||
iHook++;
|
||||
int hdlHook = GetLocalInt(oMod, DMFI_CHATHOOK_PREVHANDLE_VARNAME);
|
||||
hdlHook++;
|
||||
if (hdlHook < 1) hdlHook = 1; // reserving 0 and negatives
|
||||
// SendMessageToPC(GetFirstPC(), "chathookadd - adding hook #" + IntToString(iHook));
|
||||
SetLocalInt(oMod, DMFI_CHATHOOK_PREVHANDLE_VARNAME, hdlHook);
|
||||
SetLocalArrayInt(oMod, DMFI_CHATHOOK_HANDLE_ARRAYNAME, iHook, hdlHook);
|
||||
SetLocalArrayString(oMod, DMFI_CHATHOOK_SCRIPT_ARRAYNAME, iHook, sChatHandlerScript);
|
||||
SetLocalArrayObject(oMod, DMFI_CHATHOOK_RUNNER_ARRAYNAME, iHook, oScriptRunner);
|
||||
SetLocalArrayInt(oMod, DMFI_CHATHOOK_CHANNELS_ARRAYNAME, iHook, maskChannels);
|
||||
SetLocalArrayInt(oMod, DMFI_CHATHOOK_LISTENALL_ARRAYNAME, iHook, bListenAll);
|
||||
SetLocalArrayObject(oMod, DMFI_CHATHOOK_SPEAKER_ARRAYNAME, iHook, oSpeaker);
|
||||
SetLocalArrayInt(oMod, DMFI_CHATHOOK_AUTOREMOVE_ARRAYNAME, iHook, bAutoRemove);
|
||||
|
||||
return hdlHook;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//! removes a callback function from the OnPlayerChat list.
|
||||
//! \param hdlHookIn handle of hook to remove (0 for clean up orphans)
|
||||
//! \return TRUE if requested hook found and removed
|
||||
int DMFI_ChatHookRemove(int hdlHookIn)
|
||||
{
|
||||
int bRemoved = FALSE;
|
||||
int hdlHook;
|
||||
int iHook, iHook2;
|
||||
object oMod = GetModule();
|
||||
int nHooks = GetLocalArrayUpperBound(oMod, DMFI_CHATHOOK_HANDLE_ARRAYNAME);
|
||||
for (iHook = 1; iHook <= nHooks; iHook++)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
hdlHook = GetLocalArrayInt(oMod, DMFI_CHATHOOK_HANDLE_ARRAYNAME, iHook);
|
||||
if (hdlHook != 0 && hdlHook != hdlHookIn) break;
|
||||
|
||||
// kill this one
|
||||
for (iHook2 = iHook; iHook2 < nHooks; iHook2++)
|
||||
{
|
||||
SetLocalArrayInt(oMod, DMFI_CHATHOOK_HANDLE_ARRAYNAME, iHook2, GetLocalArrayInt(oMod, DMFI_CHATHOOK_HANDLE_ARRAYNAME, iHook2+1));
|
||||
SetLocalArrayString(oMod, DMFI_CHATHOOK_SCRIPT_ARRAYNAME, iHook2, GetLocalArrayString(oMod, DMFI_CHATHOOK_SCRIPT_ARRAYNAME, iHook2+1));
|
||||
SetLocalArrayObject(oMod, DMFI_CHATHOOK_RUNNER_ARRAYNAME, iHook2, GetLocalArrayObject(oMod, DMFI_CHATHOOK_RUNNER_ARRAYNAME, iHook2+1));
|
||||
SetLocalArrayInt(oMod, DMFI_CHATHOOK_CHANNELS_ARRAYNAME, iHook2, GetLocalArrayInt(oMod, DMFI_CHATHOOK_CHANNELS_ARRAYNAME, iHook2+1));
|
||||
SetLocalArrayInt(oMod, DMFI_CHATHOOK_LISTENALL_ARRAYNAME, iHook2, GetLocalArrayInt(oMod, DMFI_CHATHOOK_LISTENALL_ARRAYNAME, iHook2+1));
|
||||
SetLocalArrayObject(oMod, DMFI_CHATHOOK_SPEAKER_ARRAYNAME, iHook2, GetLocalArrayObject(oMod, DMFI_CHATHOOK_SPEAKER_ARRAYNAME, iHook2+1));
|
||||
SetLocalArrayInt(oMod, DMFI_CHATHOOK_AUTOREMOVE_ARRAYNAME, iHook2, GetLocalArrayInt(oMod, DMFI_CHATHOOK_AUTOREMOVE_ARRAYNAME, iHook2+1));
|
||||
}
|
||||
bRemoved = TRUE;
|
||||
nHooks--;
|
||||
if (nHooks < iHook) break;
|
||||
}
|
||||
}
|
||||
|
||||
if (bRemoved)
|
||||
{
|
||||
SetLocalArrayUpperBound(oMod, DMFI_CHATHOOK_HANDLE_ARRAYNAME, nHooks);
|
||||
SetLocalArrayUpperBound(oMod, DMFI_CHATHOOK_SCRIPT_ARRAYNAME, nHooks);
|
||||
SetLocalArrayUpperBound(oMod, DMFI_CHATHOOK_RUNNER_ARRAYNAME, nHooks);
|
||||
SetLocalArrayUpperBound(oMod, DMFI_CHATHOOK_CHANNELS_ARRAYNAME, nHooks);
|
||||
SetLocalArrayUpperBound(oMod, DMFI_CHATHOOK_LISTENALL_ARRAYNAME, nHooks);
|
||||
SetLocalArrayUpperBound(oMod, DMFI_CHATHOOK_SPEAKER_ARRAYNAME, nHooks);
|
||||
SetLocalArrayUpperBound(oMod, DMFI_CHATHOOK_AUTOREMOVE_ARRAYNAME, nHooks);
|
||||
}
|
||||
|
||||
return bRemoved;
|
||||
}
|
||||
|
71
_module/nss/dmfi_string_inc.nss
Normal file
71
_module/nss/dmfi_string_inc.nss
Normal file
@@ -0,0 +1,71 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: DMFI - string functions and constants
|
||||
//:: dmfi_string_inc
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Library of functions relating to strings for DMFI.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: tsunami282
|
||||
//:: Created On: 2008.08.11
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "x3_inc_string"
|
||||
|
||||
const string DMFI_MESSAGE_COLOR_ALERT = "733"; // default 733 - brite red
|
||||
const string DMFI_MESSAGE_COLOR_STATUS = "773"; // default 773 - yellow
|
||||
const string DMFI_MESSAGE_COLOR_EAVESDROP = "777"; // default 777 - white
|
||||
const string DMFI_MESSAGE_COLOR_TRANSLATION = "555"; // default 733 - lite gray
|
||||
const string DMFI_MESSAGE_COLOR_OTHER = ""; // default blank
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
string LTrim(string sTrimMe, string sDelim = " ")
|
||||
{
|
||||
int l;
|
||||
|
||||
if (sDelim != "")
|
||||
{
|
||||
l = GetStringLength(sTrimMe);
|
||||
while (GetStringLeft(sTrimMe, 1) == sDelim)
|
||||
{
|
||||
l--;
|
||||
if (l < 1)
|
||||
{
|
||||
sTrimMe = "";
|
||||
break;
|
||||
}
|
||||
sTrimMe = GetStringRight(sTrimMe, l);
|
||||
}
|
||||
}
|
||||
|
||||
return sTrimMe;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
void DMFISendMessageToPC(object oPC, string sMsg, int bAllDMs=FALSE,
|
||||
string sRGB="")
|
||||
{
|
||||
string sColMsg;
|
||||
object oTarget = oPC;
|
||||
if (bAllDMs) oTarget = GetFirstPC();
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
if ((!bAllDMs) || (GetIsDM(oTarget) || GetIsDMPossessed(oTarget)))
|
||||
{
|
||||
if (sRGB != "")
|
||||
{
|
||||
sColMsg = StringToRGBString(sMsg, sRGB);
|
||||
}
|
||||
else
|
||||
{
|
||||
sColMsg = sMsg;
|
||||
}
|
||||
SendMessageToPC(oTarget, sColMsg);
|
||||
}
|
||||
|
||||
if (!bAllDMs) break;
|
||||
oTarget = GetNextPC();
|
||||
}
|
||||
|
||||
}
|
||||
|
12
_module/nss/dmfi_unact_nam02.nss
Normal file
12
_module/nss/dmfi_unact_nam02.nss
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
#include "dmfi_getln_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oListener = OBJECT_SELF;
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
// attach our listener event
|
||||
SetLocalString(oListener, "dmfi_getln_mode", "name");
|
||||
DMFI_get_line(oPC, TALKVOLUME_TALK, "dmfi_univ_listen", oListener);
|
||||
}
|
6
_module/nss/dmfi_unact_nam03.nss
Normal file
6
_module/nss/dmfi_unact_nam03.nss
Normal file
@@ -0,0 +1,6 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
object oTarget = GetLocalObject(oPC, "dmfi_univ_target");
|
||||
SetName(oTarget, "");
|
||||
}
|
8
_module/nss/dmfi_unact_nam04.nss
Normal file
8
_module/nss/dmfi_unact_nam04.nss
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
#include "dmfi_getln_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oListener = OBJECT_SELF;
|
||||
DMFI_cancel_get_line(0, oListener);
|
||||
}
|
12
_module/nss/dmfi_unact_nam06.nss
Normal file
12
_module/nss/dmfi_unact_nam06.nss
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
#include "dmfi_getln_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oListener = OBJECT_SELF;
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
// attach our listener event
|
||||
SetLocalString(oListener, "dmfi_getln_mode", "desc");
|
||||
DMFI_get_line(oPC, TALKVOLUME_TALK, "dmfi_univ_listen", oListener);
|
||||
}
|
6
_module/nss/dmfi_unact_nam07.nss
Normal file
6
_module/nss/dmfi_unact_nam07.nss
Normal file
@@ -0,0 +1,6 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
object oTarget = GetLocalObject(oPC, "dmfi_univ_target");
|
||||
SetName(oTarget, "");
|
||||
}
|
8
_module/nss/dmfi_unact_nam08.nss
Normal file
8
_module/nss/dmfi_unact_nam08.nss
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
#include "dmfi_getln_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oListener = OBJECT_SELF;
|
||||
DMFI_cancel_get_line(0, oListener);
|
||||
}
|
13
_module/nss/dmfi_uncnd_nam01.nss
Normal file
13
_module/nss/dmfi_uncnd_nam01.nss
Normal file
@@ -0,0 +1,13 @@
|
||||
int StartingConditional()
|
||||
{
|
||||
// set the custom tokens
|
||||
object oPC = GetPCSpeaker();
|
||||
object oTarget = GetLocalObject(oPC, "dmfi_univ_target");
|
||||
|
||||
string sName = GetName(oTarget);
|
||||
SetCustomToken(20680, sName);
|
||||
string sOrigName = GetName(oTarget, TRUE);
|
||||
SetCustomToken(20681, sOrigName);
|
||||
|
||||
return TRUE;
|
||||
}
|
13
_module/nss/dmfi_uncnd_nam05.nss
Normal file
13
_module/nss/dmfi_uncnd_nam05.nss
Normal file
@@ -0,0 +1,13 @@
|
||||
int StartingConditional()
|
||||
{
|
||||
// set the custom tokens
|
||||
object oPC = GetPCSpeaker();
|
||||
object oTarget = GetLocalObject(oPC, "dmfi_univ_target");
|
||||
|
||||
string sName = GetDescription(oTarget);
|
||||
SetCustomToken(20682, sName);
|
||||
string sOrigName = GetDescription(oTarget, TRUE);
|
||||
SetCustomToken(20683, sOrigName);
|
||||
|
||||
return TRUE;
|
||||
}
|
115
_module/nss/dmfi_univ_listen.nss
Normal file
115
_module/nss/dmfi_univ_listen.nss
Normal file
@@ -0,0 +1,115 @@
|
||||
|
||||
// dmfi_univ_listen
|
||||
|
||||
// template: dmfi_getln_cbtpl
|
||||
// triggered from OnPlayerChat callback
|
||||
|
||||
#include "dmfi_db_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
int nVolume = GetPCChatVolume();
|
||||
object oShouter = GetPCChatSpeaker();
|
||||
string sSaid = GetPCChatMessage();
|
||||
|
||||
// SendMessageToPC(GetFirstPC(), "ENTER dmfi_univ_listen: speaker=" + GetName(oShouter) + ", channel=" + IntToString(nVolume) + ", said=" + sSaid);
|
||||
// first, lets deal with a getln event
|
||||
string getln_mode = GetLocalString(OBJECT_SELF, "dmfi_getln_mode");
|
||||
if (getln_mode == "name")
|
||||
{
|
||||
if (sSaid != ".")
|
||||
{
|
||||
object oTarget = GetLocalObject(oShouter, "dmfi_univ_target");
|
||||
SetName(oTarget, sSaid);
|
||||
}
|
||||
DeleteLocalString(OBJECT_SELF, "dmfi_getln_mode");
|
||||
}
|
||||
else if (getln_mode == "desc")
|
||||
{
|
||||
if (sSaid != ".")
|
||||
{
|
||||
object oTarget = GetLocalObject(oShouter, "dmfi_univ_target");
|
||||
SetDescription(oTarget, sSaid);
|
||||
}
|
||||
DeleteLocalString(OBJECT_SELF, "dmfi_getln_mode");
|
||||
}
|
||||
else
|
||||
{
|
||||
// you may wish to define an "abort" input message, such as a line
|
||||
// containing a single period:
|
||||
if (sSaid != ".")
|
||||
{
|
||||
// put your code here to process the input line (in sSaid)
|
||||
|
||||
if (GetIsDM(oShouter)) SetLocalInt(GetModule(), "dmfi_Admin" + GetPCPublicCDKey(oShouter), 1);
|
||||
if (GetIsDMPossessed(oShouter)) SetLocalObject(GetMaster(oShouter), "dmfi_familiar", oShouter);
|
||||
|
||||
object oTarget = GetLocalObject(oShouter, "dmfi_VoiceTarget");
|
||||
object oMaster = OBJECT_INVALID;
|
||||
if (GetIsObjectValid(oTarget)) oMaster = oShouter;
|
||||
|
||||
int iPhrase = GetLocalInt(oShouter, "hls_EditPhrase");
|
||||
|
||||
object oSummon;
|
||||
|
||||
if (GetIsObjectValid(oShouter) && GetIsDM(oShouter))
|
||||
{
|
||||
if (GetTag(OBJECT_SELF) == "dmfi_setting" && GetLocalString(oShouter, "EffectSetting") != "")
|
||||
{
|
||||
string sPhrase = GetLocalString(oShouter, "EffectSetting");
|
||||
SetLocalFloat(oShouter, sPhrase, StringToFloat(sSaid));
|
||||
SetDMFIPersistentFloat("dmfi", sPhrase, StringToFloat(sSaid), oShouter);
|
||||
DeleteLocalString(oShouter, "EffectSetting");
|
||||
DelayCommand(0.5, ActionSpeakString("The setting " + sPhrase + " has been changed to " + FloatToString(GetLocalFloat(oShouter, sPhrase))));
|
||||
DelayCommand(1.5, DestroyObject(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
if (GetIsObjectValid(oShouter) && GetIsPC(oShouter))
|
||||
{
|
||||
if (sSaid != GetLocalString(GetModule(), "hls_voicebuffer"))
|
||||
{
|
||||
SetLocalString(GetModule(), "hls_voicebuffer", sSaid);
|
||||
|
||||
// PrintString("<Conv>"+GetName(GetArea(oShouter))+ " " + GetName(oShouter) + ": " + sSaid + " </Conv>");
|
||||
|
||||
// if the phrase begins with .MyName, reparse the string as a voice throw
|
||||
if (GetStringLeft(sSaid, GetStringLength("." + GetName(OBJECT_SELF))) == "." + GetName(OBJECT_SELF) &&
|
||||
(GetLocalInt(GetModule(), "dmfi_Admin" + GetPCPublicCDKey(oShouter)) ||
|
||||
GetIsDM(oShouter) || GetIsDMPossessed(oShouter)))
|
||||
{
|
||||
oTarget = OBJECT_SELF;
|
||||
sSaid = GetStringRight(sSaid, GetStringLength(sSaid) - GetStringLength("." + GetName(OBJECT_SELF)));
|
||||
if (GetStringLeft(sSaid, 1) == " ") sSaid = GetStringRight(sSaid, GetStringLength(sSaid) - 1);
|
||||
sSaid = ":" + sSaid;
|
||||
SetPCChatMessage(sSaid);
|
||||
// SendMessageToPC(GetFirstPC(), "LEAVE(1) dmfi_univ_listen: speaker=" + GetName(oShouter) + ", channel=" + IntToString(nVolume) + ", said=" + sSaid);
|
||||
return; // must bail out here to prevent clearing of message at end
|
||||
}
|
||||
|
||||
if (iPhrase)
|
||||
{
|
||||
if (iPhrase > 0)
|
||||
{
|
||||
SetCustomToken(iPhrase, sSaid);
|
||||
SetDMFIPersistentString("dmfi", "hls" + IntToString(iPhrase), sSaid);
|
||||
FloatingTextStringOnCreature("Phrase " + IntToString(iPhrase) + " has been recorded", oShouter, FALSE);
|
||||
}
|
||||
else if (iPhrase < 0)
|
||||
{
|
||||
|
||||
}
|
||||
DeleteLocalInt(oShouter, "hls_EditPhrase");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// after processing, you will likely want to "eat" the text line, so it is
|
||||
// not spoken or available for further processing
|
||||
SetPCChatMessage("");
|
||||
|
||||
// SendMessageToPC(GetFirstPC(), "LEAVE(2) dmfi_univ_listen: speaker=" + GetName(oShouter) + ", channel=" + IntToString(nVolume) + ", said=" + sSaid);
|
||||
|
||||
}
|
@@ -1,5 +1,5 @@
|
||||
//DMFI Voice script
|
||||
|
||||
#include "prc_inc_racial"
|
||||
|
||||
int AppearType (string sCom)
|
||||
{
|
||||
@@ -1192,8 +1192,8 @@ string ConvertLeetspeak(string sLetter)
|
||||
case 36: return "|<";
|
||||
case 11: return "1";
|
||||
case 37: return "1";
|
||||
case 12: return "/\/\";
|
||||
case 38: return "/\/\";
|
||||
case 12: return "/\/\/";
|
||||
case 38: return "/\/\/";
|
||||
case 13: return "|\|";
|
||||
case 39: return "|\|";
|
||||
case 14: return "0";
|
||||
@@ -2253,14 +2253,20 @@ int GetDefaultRacialLanguage(object oPC, int iRename)
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
int GetDefaultClassLanguage(object oPC)
|
||||
{
|
||||
int iRace = MyPRCGetRacialType(oPC);
|
||||
int iSubrace = GetRacialType(oPC);
|
||||
|
||||
if (GetLevelByClass(CLASS_TYPE_RANGER, oPC) || GetLevelByClass(CLASS_TYPE_DRUID, oPC))
|
||||
return 8;
|
||||
if (GetLevelByClass(CLASS_TYPE_ROGUE, oPC))
|
||||
return 9;
|
||||
if ((GetSubRace(oPC)=="drow") ||(GetSubRace(oPC)=="DROW")||(GetSubRace(oPC)=="Drow"))
|
||||
if (iSubrace == RACIAL_TYPE_DROW_MALE || iSubrace == RACIAL_TYPE_DROW_FEMALE || iSubrace == RACIAL_TYPE_HALFDROW)
|
||||
return 13;
|
||||
if (iRace == RACIAL_TYPE_FEY)
|
||||
return 14;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
377
_module/nss/dmfi_x_afflict.nss
Normal file
377
_module/nss/dmfi_x_afflict.nss
Normal file
@@ -0,0 +1,377 @@
|
||||
#include "dmfi_db_inc"
|
||||
|
||||
|
||||
object DMFI_NextTarget(object oTarget, object oUser)
|
||||
{
|
||||
object oNew;
|
||||
|
||||
if (GetIsPC(oTarget))
|
||||
{
|
||||
if (GetIsObjectValid(GetNextFactionMember(oTarget)))
|
||||
oNew = GetNextFactionMember(oTarget);
|
||||
else
|
||||
oNew = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, oTarget, 1);
|
||||
}
|
||||
else
|
||||
oNew = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_NOT_PC, oTarget, 1);
|
||||
|
||||
|
||||
if (!GetIsObjectValid(oNew))
|
||||
{
|
||||
SendMessageToPC(oUser, "No valid target to transfer to.");
|
||||
oNew = oTarget;
|
||||
}
|
||||
|
||||
SetLocalObject(oUser, "dmfi_univ_target", oNew);
|
||||
SetCustomToken(20680, GetName(oNew));
|
||||
FloatingTextStringOnCreature("Target changed to: "+ GetName(oNew), oUser);
|
||||
return oNew;
|
||||
}
|
||||
|
||||
//DMFI Creates the "settings" creature
|
||||
void CreateSetting(object oUser)
|
||||
{
|
||||
object oSetting = CreateObject(OBJECT_TYPE_CREATURE, "dmfi_setting", GetLocation(oUser));
|
||||
DelayCommand(0.5f, AssignCommand(oSetting, ActionSpeakString(GetLocalString(oUser, "EffectSetting") + " is currently set at " + FloatToString(GetLocalFloat(oUser, GetLocalString(oUser, "EffectSetting"))))));
|
||||
SetLocalObject(oSetting, "MyMaster", oUser);
|
||||
SetListenPattern(oSetting, "**", LISTEN_PATTERN); //listen to all text
|
||||
SetLocalInt(oSetting, "hls_Listening", 1); //listen to all text
|
||||
SetListening(oSetting, TRUE); //be sure NPC is listening
|
||||
}
|
||||
|
||||
//This function is for the DMFI Affliction Wand
|
||||
void ReportImmunity(object oT, object oUser)
|
||||
{
|
||||
SendMessageToPC(oUser, "Immunities Reported: (blank if none)");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_ABILITY_DECREASE))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Ability Decrease");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_AC_DECREASE))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE AC Decrease");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_ATTACK_DECREASE))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Attack Decrease");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_BLINDNESS))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Blindness");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_CHARM))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Charm");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_CONFUSED))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Confusion");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_CRITICAL_HIT))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Critical Hit");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_CURSED))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Cursed");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_DAMAGE_DECREASE))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Damage Decrease");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_DAMAGE_IMMUNITY_DECREASE))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Damage Immunity Decrease");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_DAZED))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Dazed");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_DEAFNESS))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Deafness");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_DEATH))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Death");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_DISEASE))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Disease");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_DOMINATE))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Dominate");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_ENTANGLE))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Entangle");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_FEAR))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Fear");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_KNOCKDOWN))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Knockdown");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_MIND_SPELLS))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Mind Spells");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_MOVEMENT_SPEED_DECREASE))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Movement Speed Decrease");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_NEGATIVE_LEVEL))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Negative Level");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_PARALYSIS))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Paralysis");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_POISON))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Poison");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_SAVING_THROW_DECREASE))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Saving Throw Decrease");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_SILENCE))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Silence");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_SKILL_DECREASE))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Skill Decrease");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_SLEEP))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Sleep");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_SLOW))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Slow");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_SNEAK_ATTACK))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Sneak Attack");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_SPELL_RESISTANCE_DECREASE))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Spell Resistance Decrease");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_STUN))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Stun");
|
||||
if (GetIsImmune(oT, IMMUNITY_TYPE_TRAP))
|
||||
SendMessageToPC(oUser, GetName(oT) + " IMMUNE Trap");
|
||||
}
|
||||
|
||||
void CheckForEffect(effect eA, object oT, object oUser)
|
||||
{
|
||||
int Result = FALSE;
|
||||
effect Check = GetFirstEffect(oT);
|
||||
|
||||
while (GetIsEffectValid(Check))
|
||||
{
|
||||
if (Check == eA)
|
||||
Result = TRUE;
|
||||
|
||||
Check = GetNextEffect(oT);
|
||||
}
|
||||
if (Result)
|
||||
FloatingTextStringOnCreature("Affliction Wand Saving Throw Failure: " + GetName(oT), oUser);
|
||||
else
|
||||
FloatingTextStringOnCreature("Affliction Wand Saving Throw Success: No Effect: " + GetName(oT), oUser);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
int iAfflict = GetLocalInt(OBJECT_SELF, "dmfi_univ_int");
|
||||
object oUser = OBJECT_SELF;
|
||||
effect eEffect;
|
||||
object oTarget = GetLocalObject(oUser, "dmfi_univ_target");
|
||||
float fDuration;
|
||||
int nDNum;
|
||||
effect eD;
|
||||
effect eA;
|
||||
effect eT;
|
||||
effect eVis;
|
||||
int nBug = 0;
|
||||
int nSaveAmount; float fSaveAmount;
|
||||
|
||||
nDNum = GetLocalInt(oUser, "dmfi_damagemodifier");
|
||||
fDuration = GetLocalFloat(oUser, "dmfi_stunduration");
|
||||
fSaveAmount = GetLocalFloat(oUser, "dmfi_saveamount");
|
||||
|
||||
nSaveAmount = FloatToInt(fSaveAmount);
|
||||
|
||||
if (!(GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) ||
|
||||
GetIsDM(oTarget))
|
||||
{
|
||||
FloatingTextStringOnCreature("You must target a valid creature!", oUser, FALSE);
|
||||
return;
|
||||
}
|
||||
switch(iAfflict)
|
||||
{
|
||||
case 11: eD= EffectDamage(d4(nDNum), DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_TWENTY);
|
||||
eVis = EffectVisualEffect(VFX_COM_BLOOD_SPARK_SMALL); break;
|
||||
case 12: eD = EffectDamage(d6(nDNum), DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_TWENTY);
|
||||
eVis = EffectVisualEffect(VFX_COM_BLOOD_LRG_RED); break;
|
||||
case 13: eD = EffectDamage(d8(nDNum), DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_TWENTY);
|
||||
eVis = EffectVisualEffect(VFX_COM_BLOOD_LRG_RED); break;
|
||||
case 14: eD = EffectDamage(d10(nDNum), DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_TWENTY);
|
||||
eVis = EffectVisualEffect(VFX_COM_BLOOD_SPARK_SMALL); break;
|
||||
case 15: eD = EffectDamage(d12(nDNum), DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_TWENTY);
|
||||
eVis = EffectVisualEffect(VFX_COM_BLOOD_SPARK_SMALL); break;
|
||||
case 16: eD = EffectDamage(GetCurrentHitPoints(oTarget)/4, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_TWENTY);
|
||||
eVis = EffectVisualEffect(VFX_COM_BLOOD_LRG_RED); break;
|
||||
case 17: eD = EffectDamage(GetCurrentHitPoints(oTarget)/2, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_TWENTY);
|
||||
eVis = EffectVisualEffect(VFX_COM_BLOOD_LRG_RED); break;
|
||||
case 18: eD = EffectDamage(GetCurrentHitPoints(oTarget) * 3 / 4, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_TWENTY);
|
||||
eVis =EffectVisualEffect(VFX_COM_CHUNK_RED_SMALL); break;
|
||||
case 19: eD = EffectDamage(GetCurrentHitPoints(oTarget)-1, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_TWENTY);
|
||||
eVis =EffectVisualEffect(VFX_COM_CHUNK_RED_SMALL); break;
|
||||
case 21: eA =EffectDisease(DISEASE_FILTH_FEVER); break;
|
||||
case 22: eA =EffectDisease(DISEASE_MINDFIRE); break;
|
||||
case 23: eA =EffectDisease(DISEASE_DREAD_BLISTERS); break;
|
||||
case 24: eA =EffectDisease(DISEASE_SHAKES); break;
|
||||
case 25: eA =EffectDisease(DISEASE_VERMIN_MADNESS); break;
|
||||
case 26: eA =EffectDisease(DISEASE_DEVIL_CHILLS); break;
|
||||
case 27: eA =EffectDisease(DISEASE_SLIMY_DOOM); break;
|
||||
case 28: eA =EffectDisease(DISEASE_RED_ACHE); break;
|
||||
case 29: eA =EffectDisease(DISEASE_ZOMBIE_CREEP); break;
|
||||
case 31: eA =EffectDisease(DISEASE_BLINDING_SICKNESS); break;
|
||||
case 32: eA =EffectDisease(DISEASE_CACKLE_FEVER); break;
|
||||
case 33: eA =EffectDisease(DISEASE_BURROW_MAGGOTS); break;
|
||||
case 34: eA =EffectDisease(DISEASE_RED_SLAAD_EGGS); break;
|
||||
case 35: eA =EffectDisease(DISEASE_DEMON_FEVER); break;
|
||||
case 36: eA =EffectDisease(DISEASE_GHOUL_ROT); break;
|
||||
case 37: eA =EffectDisease(DISEASE_MUMMY_ROT); break;
|
||||
case 38: eA =EffectDisease(DISEASE_SOLDIER_SHAKES); break;
|
||||
case 39: eA =EffectDisease(DISEASE_SOLDIER_SHAKES); break;
|
||||
case 41: eA =EffectPoison(POISON_TINY_SPIDER_VENOM); break;
|
||||
case 42: eA =EffectPoison(POISON_ARANEA_VENOM); break;
|
||||
case 43: eA =EffectPoison(POISON_MEDIUM_SPIDER_VENOM); break;
|
||||
case 44: eA = EffectPoison(POISON_CARRION_CRAWLER_BRAIN_JUICE); break;
|
||||
case 45: eA = EffectPoison(POISON_OIL_OF_TAGGIT); break;
|
||||
case 46: eA = EffectPoison(POISON_ARSENIC); break;
|
||||
case 47: eA = EffectPoison(POISON_GREENBLOOD_OIL); break;
|
||||
case 48: eA = EffectPoison(POISON_NITHARIT); break;
|
||||
case 49: eA = EffectPoison(POISON_PHASE_SPIDER_VENOM); break;
|
||||
case 51: eA = EffectPoison(POISON_LICH_DUST); break;
|
||||
case 52: eA = EffectPoison(POISON_SHADOW_ESSENCE); break;
|
||||
case 53: eA = EffectPoison(POISON_LARGE_SPIDER_VENOM); break;
|
||||
case 54: eA = EffectPoison(POISON_PURPLE_WORM_POISON); break;
|
||||
case 55: eA = EffectPoison(POISON_IRON_GOLEM); break;
|
||||
case 56: eA = EffectPoison(POISON_PIT_FIEND_ICHOR); break;
|
||||
case 57: eA = EffectPoison(POISON_WYVERN_POISON); break;
|
||||
case 58: eA = EffectPoison(POISON_BLACK_LOTUS_EXTRACT); break;
|
||||
case 59: eA = EffectPoison(POISON_GARGANTUAN_SPIDER_VENOM); break;
|
||||
case 60: eT = EffectPetrify(); break;
|
||||
case 61: eT = EffectBlindness(); break;
|
||||
case 62: eT = EffectCurse(4,4,4,4,4,4); break;
|
||||
case 63: eT = EffectFrightened(); break;
|
||||
case 64: eT = EffectStunned(); break;
|
||||
case 65: eT = EffectSilence(); break;
|
||||
case 66: eT = EffectSleep(); break;
|
||||
case 67: eT = EffectSlow(); break;
|
||||
case 68: eT = EffectKnockdown(); nBug = 1; break;
|
||||
case 69: eD = EffectDamage( GetCurrentHitPoints(oTarget)-1, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_NORMAL);
|
||||
AssignCommand( oTarget, ClearAllActions());
|
||||
AssignCommand( oTarget, ActionPlayAnimation( ANIMATION_LOOPING_DEAD_FRONT, 1.0, 99999.0));
|
||||
DelayCommand(0.5, SetCommandable( FALSE, oTarget)); break;
|
||||
case 71: eA = EffectCutsceneDominated();break;
|
||||
case 72: eA = EffectCutsceneGhost(); break;
|
||||
case 73: eA = EffectCutsceneImmobilize(); break;
|
||||
case 74: eA = EffectCutsceneParalyze(); break;
|
||||
case 75: nBug = -1; break; //special case for combo death effect
|
||||
case 81: eEffect = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eEffect))
|
||||
{
|
||||
if (GetEffectType(eEffect) == EFFECT_TYPE_POISON) RemoveEffect(oTarget, eEffect);
|
||||
eEffect = GetNextEffect(oTarget);
|
||||
} break;
|
||||
case 82: eEffect = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eEffect))
|
||||
{
|
||||
if (GetEffectType(eEffect) == EFFECT_TYPE_DISEASE) RemoveEffect(oTarget, eEffect);
|
||||
eEffect = GetNextEffect(oTarget);
|
||||
} break;
|
||||
case 83: eEffect = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eEffect))
|
||||
{
|
||||
if (GetEffectType(eEffect) == EFFECT_TYPE_BLINDNESS) RemoveEffect(oTarget, eEffect);
|
||||
eEffect = GetNextEffect(oTarget);
|
||||
} break;
|
||||
case 84: eEffect = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eEffect))
|
||||
{
|
||||
if (GetEffectType(eEffect) == EFFECT_TYPE_CURSE) RemoveEffect(oTarget, eEffect);
|
||||
eEffect = GetNextEffect(oTarget);
|
||||
} break;
|
||||
case 85: eEffect = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eEffect))
|
||||
{
|
||||
if (GetEffectType(eEffect) == EFFECT_TYPE_FRIGHTENED) RemoveEffect(oTarget, eEffect);
|
||||
eEffect = GetNextEffect(oTarget);
|
||||
} break;
|
||||
case 86: eEffect = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eEffect))
|
||||
{
|
||||
if (GetEffectType(eEffect) == EFFECT_TYPE_STUNNED) RemoveEffect(oTarget, eEffect);
|
||||
eEffect = GetNextEffect(oTarget);
|
||||
} break;
|
||||
case 87: eEffect = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eEffect))
|
||||
{
|
||||
if (GetEffectType(eEffect) == EFFECT_TYPE_SILENCE) RemoveEffect(oTarget, eEffect);
|
||||
eEffect = GetNextEffect(oTarget);
|
||||
} break;
|
||||
case 88: eEffect = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eEffect))
|
||||
{
|
||||
RemoveEffect(oTarget, eEffect);
|
||||
eEffect = GetNextEffect(oTarget);
|
||||
} break;
|
||||
case 89: SetCommandable(TRUE, oTarget);
|
||||
AssignCommand(oTarget, ClearAllActions()); break;
|
||||
case 80: eEffect = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eEffect))
|
||||
{
|
||||
if (GetEffectType(eEffect) == EFFECT_TYPE_PETRIFY) RemoveEffect(oTarget, eEffect);
|
||||
eEffect = GetNextEffect(oTarget);
|
||||
} break;//Added July 5, 2003
|
||||
|
||||
// 99 is a duplicate instance - simple copy. - Demetrious
|
||||
case 91: SetLocalString(oUser, "EffectSetting", "dmfi_stunduration");
|
||||
CreateSetting(oUser);
|
||||
case 92: SetDMFIPersistentInt("dmfi", "DamageModifier", nDNum+1); SetCustomToken(20780, IntToString(nDNum+1));; break;
|
||||
case 93:
|
||||
if (nDNum==1)
|
||||
{
|
||||
FloatingTextStringOnCreature("Illegal operation: Minimum modifier is 1.", oUser);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetDMFIPersistentInt("dmfi", "DamageModifier", nDNum-1); SetCustomToken(20780, IntToString(nDNum-1)); ;break;
|
||||
break;
|
||||
}
|
||||
case 94: ReportImmunity(oTarget, oUser); break;
|
||||
case 95: DMFI_NextTarget(oTarget, oUser); break;
|
||||
case 99: SetLocalString(oUser, "EffectSetting", "SaveEffectAmount");
|
||||
CreateSetting(oUser); break;
|
||||
case 101: eT = EffectSavingThrowDecrease(SAVING_THROW_FORT, nSaveAmount); break;
|
||||
case 102: eT = EffectSavingThrowDecrease(SAVING_THROW_REFLEX, nSaveAmount); break;
|
||||
case 103: eT = EffectSavingThrowDecrease(SAVING_THROW_WILL, nSaveAmount); break;
|
||||
case 104: eT = EffectSavingThrowIncrease(SAVING_THROW_FORT, nSaveAmount); break;
|
||||
case 105: eT = EffectSavingThrowIncrease(SAVING_THROW_REFLEX, nSaveAmount); break;
|
||||
case 106: eT = EffectSavingThrowIncrease(SAVING_THROW_WILL, nSaveAmount); break;
|
||||
case 107: eT = EffectSavingThrowDecrease(SAVING_THROW_ALL, nSaveAmount); break;
|
||||
case 108: eT = EffectSavingThrowIncrease(SAVING_THROW_ALL, nSaveAmount); break;
|
||||
case 109: SetLocalString(oUser, "EffectSetting", "SaveEffectAmount");
|
||||
CreateSetting(oUser);
|
||||
case 100: eEffect = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eEffect))
|
||||
{
|
||||
if ((GetEffectType(eEffect) == EFFECT_TYPE_SAVING_THROW_INCREASE)
|
||||
||(GetEffectType(eEffect) == EFFECT_TYPE_SAVING_THROW_DECREASE))
|
||||
RemoveEffect(oTarget, eEffect);
|
||||
eEffect = GetNextEffect(oTarget);
|
||||
} break;//Added July 5, 2003
|
||||
|
||||
|
||||
|
||||
default: break;
|
||||
}
|
||||
//code down here to apply the effects an then go back and see if the
|
||||
//player successfully saved or did not for the diseases and poisons.
|
||||
|
||||
if ((GetEffectType(eD)!= EFFECT_TYPE_INVALIDEFFECT) ||
|
||||
(GetEffectType(eVis) != EFFECT_TYPE_INVALIDEFFECT))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eD, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eVis, oTarget);
|
||||
return;
|
||||
}
|
||||
if (GetEffectType(eA)!= EFFECT_TYPE_INVALIDEFFECT)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eA, oTarget);
|
||||
DelayCommand(5.0, CheckForEffect(eA, oTarget, oUser));
|
||||
return;
|
||||
}
|
||||
if ((GetEffectType(eT)!= EFFECT_TYPE_INVALIDEFFECT) || (nBug ==1))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eT, oTarget, fDuration);
|
||||
|
||||
if ((GetEffectType(eT)==EFFECT_TYPE_SAVING_THROW_INCREASE) ||
|
||||
(GetEffectType(eT)==EFFECT_TYPE_SAVING_THROW_DECREASE))
|
||||
{
|
||||
DelayCommand(1.0, FloatingTextStringOnCreature("Target Saves: Fortitude " + IntToString(GetFortitudeSavingThrow(oTarget))
|
||||
+ " Reflex " + IntToString(GetReflexSavingThrow(oTarget)) + " Will " + IntToString(GetWillSavingThrow(oTarget)), oUser));
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (nBug == -1)
|
||||
{
|
||||
object oFollowMe = GetFirstFactionMember(oTarget, TRUE);
|
||||
|
||||
if (!GetIsObjectValid(oFollowMe))
|
||||
oFollowMe = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, oTarget, 1,CREATURE_TYPE_IS_ALIVE, TRUE);
|
||||
|
||||
if (GetIsDM(oFollowMe) || GetIsDMPossessed(oFollowMe))
|
||||
oFollowMe = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, oTarget, 2,CREATURE_TYPE_IS_ALIVE, TRUE);
|
||||
|
||||
if (!GetIsObjectValid(oFollowMe))
|
||||
oFollowMe = oUser;
|
||||
|
||||
AssignCommand(oFollowMe, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectCutsceneDominated(), oTarget));
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectCutsceneGhost(), oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY), oTarget);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
219
_module/nss/dmfi_x_emote.nss
Normal file
219
_module/nss/dmfi_x_emote.nss
Normal file
@@ -0,0 +1,219 @@
|
||||
#include "prc_inc_racial"
|
||||
//Smoking Function by Jason Robinson
|
||||
location GetLocationAboveAndInFrontOf(object oPC, float fDist, float fHeight)
|
||||
{
|
||||
float fDistance = -fDist;
|
||||
object oTarget = (oPC);
|
||||
object oArea = GetArea(oTarget);
|
||||
vector vPosition = GetPosition(oTarget);
|
||||
vPosition.z += fHeight;
|
||||
float fOrientation = GetFacing(oTarget);
|
||||
vector vNewPos = AngleToVector(fOrientation);
|
||||
float vZ = vPosition.z;
|
||||
float vX = vPosition.x - fDistance * vNewPos.x;
|
||||
float vY = vPosition.y - fDistance * vNewPos.y;
|
||||
fOrientation = GetFacing(oTarget);
|
||||
vX = vPosition.x - fDistance * vNewPos.x;
|
||||
vY = vPosition.y - fDistance * vNewPos.y;
|
||||
vNewPos = AngleToVector(fOrientation);
|
||||
vZ = vPosition.z;
|
||||
vNewPos = Vector(vX, vY, vZ);
|
||||
return Location(oArea, vNewPos, fOrientation);
|
||||
}
|
||||
|
||||
//Smoking Function by Jason Robinson
|
||||
void SmokePipe(object oActivator)
|
||||
{
|
||||
string sEmote1 = "*puffs on a pipe*";
|
||||
string sEmote2 = "*inhales from a pipe*";
|
||||
string sEmote3 = "*pulls a mouthful of smoke from a pipe*";
|
||||
float fHeight = 1.7;
|
||||
float fDistance = 0.1;
|
||||
// Set height based on race and gender
|
||||
if (GetGender(oActivator) == GENDER_MALE)
|
||||
{
|
||||
switch (MyPRCGetRacialType(oActivator))
|
||||
{
|
||||
case RACIAL_TYPE_HUMAN:
|
||||
case RACIAL_TYPE_HALFELF: fHeight = 1.7; fDistance = 0.12; break;
|
||||
case RACIAL_TYPE_ELF: fHeight = 1.55; fDistance = 0.08; break;
|
||||
case RACIAL_TYPE_GNOME:
|
||||
case RACIAL_TYPE_HALFLING: fHeight = 1.15; fDistance = 0.12; break;
|
||||
case RACIAL_TYPE_DWARF: fHeight = 1.2; fDistance = 0.12; break;
|
||||
case RACIAL_TYPE_HALFORC: fHeight = 1.9; fDistance = 0.2; break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// FEMALES
|
||||
switch (MyPRCGetRacialType(oActivator))
|
||||
{
|
||||
case RACIAL_TYPE_HUMAN:
|
||||
case RACIAL_TYPE_HALFELF: fHeight = 1.6; fDistance = 0.12; break;
|
||||
case RACIAL_TYPE_ELF: fHeight = 1.45; fDistance = 0.12; break;
|
||||
case RACIAL_TYPE_GNOME:
|
||||
case RACIAL_TYPE_HALFLING: fHeight = 1.1; fDistance = 0.075; break;
|
||||
case RACIAL_TYPE_DWARF: fHeight = 1.2; fDistance = 0.1; break;
|
||||
case RACIAL_TYPE_HALFORC: fHeight = 1.8; fDistance = 0.13; break;
|
||||
}
|
||||
}
|
||||
location lAboveHead = GetLocationAboveAndInFrontOf(oActivator, fDistance, fHeight);
|
||||
// emotes
|
||||
switch (d3())
|
||||
{
|
||||
case 1: AssignCommand(oActivator, ActionSpeakString(sEmote1)); break;
|
||||
case 2: AssignCommand(oActivator, ActionSpeakString(sEmote2)); break;
|
||||
case 3: AssignCommand(oActivator, ActionSpeakString(sEmote3));break;
|
||||
}
|
||||
// glow red
|
||||
AssignCommand(oActivator, ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_LIGHT_RED_5), oActivator, 0.15)));
|
||||
// wait a moment
|
||||
AssignCommand(oActivator, ActionWait(3.0));
|
||||
// puff of smoke above and in front of head
|
||||
AssignCommand(oActivator, ActionDoCommand(ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SMOKE_PUFF), lAboveHead)));
|
||||
// if female, turn head to left
|
||||
if ((GetGender(oActivator) == GENDER_FEMALE) && (MyPRCGetRacialType(oActivator) != RACIAL_TYPE_DWARF))
|
||||
AssignCommand(oActivator, ActionPlayAnimation(ANIMATION_FIREFORGET_HEAD_TURN_LEFT, 1.0, 5.0));
|
||||
}
|
||||
|
||||
void EmoteDance(object oPC)
|
||||
{
|
||||
object oRightHand = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC);
|
||||
object oLeftHand = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oPC);
|
||||
|
||||
AssignCommand(oPC,ActionUnequipItem(oRightHand));
|
||||
AssignCommand(oPC,ActionUnequipItem(oLeftHand));
|
||||
|
||||
AssignCommand(oPC,ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY2,1.0));
|
||||
AssignCommand(oPC,ActionDoCommand(PlayVoiceChat(VOICE_CHAT_LAUGH,oPC)));
|
||||
AssignCommand(oPC,ActionPlayAnimation( ANIMATION_LOOPING_TALK_LAUGHING, 2.0, 2.0));
|
||||
AssignCommand(oPC,ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY1,1.0));
|
||||
AssignCommand(oPC,ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY3,2.0));
|
||||
AssignCommand(oPC,ActionPlayAnimation( ANIMATION_LOOPING_GET_MID, 3.0, 1.0));
|
||||
AssignCommand(oPC,ActionPlayAnimation( ANIMATION_LOOPING_TALK_FORCEFUL,1.0));
|
||||
AssignCommand(oPC,ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY2,1.0));
|
||||
AssignCommand(oPC,ActionDoCommand(PlayVoiceChat(VOICE_CHAT_LAUGH,oPC)));
|
||||
AssignCommand(oPC,ActionPlayAnimation( ANIMATION_LOOPING_TALK_LAUGHING, 2.0, 2.0));
|
||||
AssignCommand(oPC,ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY1,1.0));
|
||||
AssignCommand(oPC,ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY3,2.0));
|
||||
AssignCommand(oPC,ActionDoCommand(PlayVoiceChat(VOICE_CHAT_LAUGH,oPC)));
|
||||
AssignCommand(oPC,ActionPlayAnimation( ANIMATION_LOOPING_GET_MID, 3.0, 1.0));
|
||||
AssignCommand(oPC,ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY2,1.0));
|
||||
|
||||
AssignCommand(oPC,ActionDoCommand(ActionEquipItem(oLeftHand,INVENTORY_SLOT_LEFTHAND)));
|
||||
AssignCommand(oPC,ActionDoCommand(ActionEquipItem(oRightHand,INVENTORY_SLOT_RIGHTHAND)));
|
||||
}
|
||||
|
||||
void SitInNearestChair(object oPC)
|
||||
{
|
||||
object oSit,oRightHand,oLeftHand,oChair,oCouch,oBenchPew,oStool;
|
||||
float fDistSit;int nth;
|
||||
// get the closest chair, couch bench or stool
|
||||
nth = 1;oChair = GetNearestObjectByTag("Chair", oPC,nth);
|
||||
while(oChair != OBJECT_INVALID && GetSittingCreature(oChair) != OBJECT_INVALID)
|
||||
{nth++;oChair = GetNearestObjectByTag("Chair", oPC,nth);}
|
||||
|
||||
nth = 1;oCouch = GetNearestObjectByTag("Couch", oPC,nth);
|
||||
while(oCouch != OBJECT_INVALID && GetSittingCreature(oCouch) != OBJECT_INVALID)
|
||||
{nth++;oChair = GetNearestObjectByTag("Couch", oPC,nth);}
|
||||
|
||||
nth = 1;oBenchPew = GetNearestObjectByTag("BenchPew", oPC,nth);
|
||||
while(oBenchPew != OBJECT_INVALID && GetSittingCreature(oBenchPew) != OBJECT_INVALID)
|
||||
{nth++;oChair = GetNearestObjectByTag("BenchPew", oPC,nth);}
|
||||
/* 1.27 bug
|
||||
nth = 1;oStool = GetNearestObjectByTag("Stool", oPC,nth);
|
||||
while(oStool != OBJECT_INVALID && GetSittingCreature(oStool) != OBJECT_INVALID)
|
||||
{nth++;oStool = GetNearestObjectByTag("Stool", oPC,nth);}
|
||||
*/
|
||||
// get the distance between the user and each object (-1.0 is the result if no
|
||||
// object is found
|
||||
float fDistanceChair = GetDistanceToObject(oChair);
|
||||
float fDistanceBench = GetDistanceToObject(oBenchPew);
|
||||
float fDistanceCouch = GetDistanceToObject(oCouch);
|
||||
float fDistanceStool = GetDistanceToObject(oStool);
|
||||
|
||||
// if any of the objects are invalid (not there), change the return value
|
||||
// to a high number so the distance math can work
|
||||
if (fDistanceChair == -1.0)
|
||||
{fDistanceChair =1000.0;}
|
||||
|
||||
if (fDistanceBench == -1.0)
|
||||
{fDistanceBench = 1000.0;}
|
||||
|
||||
if (fDistanceCouch == -1.0)
|
||||
{fDistanceCouch = 1000.0;}
|
||||
|
||||
if (fDistanceStool == -1.0)
|
||||
{fDistanceStool = 1000.0;}
|
||||
|
||||
// find out which object is closest to the PC
|
||||
if (fDistanceChair<fDistanceBench && fDistanceChair<fDistanceCouch && fDistanceChair<fDistanceStool)
|
||||
{oSit=oChair;fDistSit=fDistanceChair;}
|
||||
else if (fDistanceBench<fDistanceChair && fDistanceBench<fDistanceCouch && fDistanceBench<fDistanceStool)
|
||||
{oSit=oBenchPew;fDistSit=fDistanceBench;}
|
||||
else if (fDistanceCouch<fDistanceChair && fDistanceCouch<fDistanceBench && fDistanceCouch<fDistanceStool)
|
||||
{oSit=oCouch;fDistSit=fDistanceCouch;}
|
||||
else
|
||||
//if (fDistanceStool<fDistanceChair && fDistanceStool<fDistanceBench && fDistanceStool<fDistanceCouch)
|
||||
{oSit=oStool;fDistSit=fDistanceStool;}
|
||||
|
||||
if(oSit != OBJECT_INVALID && fDistSit < 12.0)
|
||||
{
|
||||
// if no one is sitting in the object the PC is closest to, have him sit in it
|
||||
if (GetSittingCreature(oSit) == OBJECT_INVALID)
|
||||
{
|
||||
oRightHand = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC);
|
||||
oLeftHand = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oPC);
|
||||
AssignCommand(oPC,ActionMoveToObject(oSit,FALSE,2.0)); //:: Presumably this will be fixed in a patch so that Plares will not run to chair
|
||||
ActionUnequipItem(oRightHand); //:: Added to resolve clipping issues when seated
|
||||
ActionUnequipItem(oLeftHand); //:: Added to resolve clipping issues when seated
|
||||
ActionDoCommand(AssignCommand(oPC,ActionSit(oSit)));
|
||||
|
||||
}
|
||||
else
|
||||
{SendMessageToPC(oPC,"The nearest chair is already taken ");}
|
||||
}
|
||||
else
|
||||
{SendMessageToPC(oPC,"There are no chairs nearby");}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
int iEmote = GetLocalInt(OBJECT_SELF, "dmfi_univ_int");
|
||||
object oUser = OBJECT_SELF;
|
||||
object oTarget = GetLocalObject(oUser, "dmfi_univ_target");
|
||||
if (!GetIsObjectValid(oTarget))
|
||||
oTarget = oUser;
|
||||
float fDur = 9999.0f; //Duration
|
||||
|
||||
switch(iEmote)
|
||||
{
|
||||
case 1: AssignCommand(oTarget, PlayAnimation( ANIMATION_FIREFORGET_DODGE_SIDE, 1.0)); break;
|
||||
case 2: AssignCommand(oTarget, PlayAnimation( ANIMATION_FIREFORGET_DRINK, 1.0)); break;
|
||||
case 3: AssignCommand(oTarget, PlayAnimation( ANIMATION_FIREFORGET_DODGE_DUCK, 1.0)); break;
|
||||
case 4: AssignCommand(oTarget, PlayAnimation( ANIMATION_LOOPING_DEAD_BACK, 1.0, fDur)); break;
|
||||
case 5: AssignCommand(oTarget, PlayAnimation( ANIMATION_LOOPING_DEAD_FRONT, 1.0, fDur)); break;
|
||||
case 6: AssignCommand(oTarget, PlayAnimation( ANIMATION_FIREFORGET_READ, 1.0)); DelayCommand(3.0f, AssignCommand(oTarget, PlayAnimation( ANIMATION_FIREFORGET_READ, 1.0)));break;
|
||||
case 7: AssignCommand(oTarget, PlayAnimation( ANIMATION_LOOPING_SIT_CROSS, 1.0, fDur)); break;
|
||||
case 81: AssignCommand(oTarget, PlayAnimation( ANIMATION_LOOPING_TALK_PLEADING, 1.0, fDur)); break;
|
||||
case 82: AssignCommand(oTarget, PlayAnimation( ANIMATION_LOOPING_CONJURE1, 1.0, fDur)); break;
|
||||
case 83: AssignCommand(oTarget, PlayAnimation( ANIMATION_LOOPING_CONJURE2, 1.0, fDur)); break;
|
||||
case 84: AssignCommand(oTarget, PlayAnimation( ANIMATION_LOOPING_GET_LOW, 1.0, fDur)); break;
|
||||
case 85: AssignCommand(oTarget, PlayAnimation( ANIMATION_LOOPING_GET_MID, 1.0, fDur)); break;
|
||||
case 86: AssignCommand(oTarget, PlayAnimation( ANIMATION_LOOPING_MEDITATE, 1.0, fDur)); break;
|
||||
case 87: AssignCommand(oTarget, PlayAnimation( ANIMATION_LOOPING_TALK_FORCEFUL, 1.0, fDur)); break;
|
||||
case 88: AssignCommand(oTarget, PlayAnimation( ANIMATION_LOOPING_WORSHIP, 1.0, fDur)); break;
|
||||
case 10: if (!GetLocalInt(oTarget, "hls_emotemute")) FloatingTextStringOnCreature("*emote* commands are off", oTarget, FALSE);
|
||||
else FloatingTextStringOnCreature("*emote* commands are on", oTarget, FALSE);
|
||||
SetLocalInt(oTarget, "hls_emotemute", abs(GetLocalInt(oTarget, "hls_emotemute") - 1)); break;
|
||||
case 91: EmoteDance(oTarget); break;
|
||||
case 92: AssignCommand(oTarget, PlayAnimation( ANIMATION_LOOPING_PAUSE_DRUNK, 1.0, fDur)); break;
|
||||
case 93: AssignCommand(oTarget, ActionForceFollowObject(GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, oTarget), 2.0f)); break;
|
||||
case 94: SitInNearestChair(oTarget); break;
|
||||
case 95: AssignCommand(oTarget, ActionPlayAnimation( ANIMATION_LOOPING_SIT_CROSS, 1.0, fDur)); DelayCommand(1.0f, AssignCommand(oTarget, PlayAnimation( ANIMATION_FIREFORGET_DRINK, 1.0))); DelayCommand(3.0f, AssignCommand(oTarget, PlayAnimation( ANIMATION_LOOPING_SIT_CROSS, 1.0, fDur)));break;
|
||||
case 96: AssignCommand(oTarget, ActionPlayAnimation( ANIMATION_LOOPING_SIT_CROSS, 1.0, fDur)); DelayCommand(1.0f, AssignCommand(oTarget, PlayAnimation( ANIMATION_FIREFORGET_READ, 1.0))); DelayCommand(3.0f, AssignCommand(oTarget, PlayAnimation( ANIMATION_LOOPING_SIT_CROSS, 1.0, fDur)));break;
|
||||
case 97: AssignCommand(oTarget, PlayAnimation( ANIMATION_LOOPING_SPASM, 1.0, fDur)); break;
|
||||
case 98: SmokePipe(oTarget); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user