added things

added a crafting tool merchant,
added a training hall (not quite working yet)
fixed crafting issues,
exchanged the small cave area
This commit is contained in:
2024-09-01 14:11:15 -04:00
parent 65af23f08d
commit 7030eb2235
335 changed files with 55956 additions and 3946 deletions

View File

@@ -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+"%"));