Area Changes and other fixes

Added CCOH
Fixed some on death issues
Fixed the gaurd
Added Server Enty/ooc
changed some areas back to original craftable
This commit is contained in:
2024-08-30 10:02:16 -04:00
parent 034a2cd838
commit d39928374d
5670 changed files with 373265 additions and 173083 deletions

View File

@@ -1,5 +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);
@@ -27,7 +28,13 @@ void main()
string sOldTag = sItemTag;
//int iAlchemyChance = GetTokenPair(oPC,14,12);
//int iAlchemySkill = iAlchemyChance;
int iAlchemySkill = GetCampaignInt("UOACraft","iAlchemySkill",oPC);
//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 iAlchemyChance = iAlchemySkill;
int iSuccess = 0;
int iSkillGain = 0;
@@ -107,176 +114,182 @@ void main()
{
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_BLUEIRIRS")
{
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_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 dark-blue pigment.";
sSuccess = "You boil the tulip, and extract the 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 a greyish pigment.";
sSuccess = "You boil the nasturtium, and extract an orange 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 greyish pigment.";
sSuccess = "You boil the mayapple, and extract a smokey 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")
@@ -290,28 +303,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
@@ -553,7 +566,7 @@ void main()
}
//End code for fixing stackables issue
if (GetStringRight(sDItemResRef,3)=="013") // Tanning Oil
if (sDItemResRef == "pattern013") // 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));
@@ -567,7 +580,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;
@@ -688,8 +701,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";
@@ -710,7 +723,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";
@@ -728,7 +741,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";
@@ -747,7 +760,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";
@@ -767,7 +780,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";
@@ -786,8 +799,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";
@@ -809,7 +822,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 sulpher improperly, rending this batch useless.";
sFail = "The tar hardens as you mix the coal and sulphur improperly, rendering this batch useless.";
sItemResRef = "_uoa_alch_fire";
sFailResRef = "glassbottle";
sComponent1Name = "bottles of tar";
@@ -887,7 +900,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";
@@ -903,7 +916,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";
@@ -919,7 +932,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";
@@ -932,7 +945,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)))
@@ -1164,7 +1177,7 @@ void main()
case 17:
{
sSuccess=sSuccess+"Essence of Cold";
sComponent1 = "GEM_POWDER_JADE";
sComponent1 = "GEM_POWDERED_JADE";
iComponent1 = 3;
sComponent2 = "SEED_SPEARMINT";
iComponent2 = 5;
@@ -1521,7 +1534,13 @@ void main()
if (iAlchemySkill <= 1000)
{
//DelayCommand(6.0,SetTokenPair(oPC,14,12,iAlchemySkill));
DelayCommand(6.0,SetCampaignInt("UOACraft","iAlchemySkill",iAlchemySkill,oPC));
// 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,SendMessageToPC(oPC,"=================================="));
DelayCommand(6.0,SendMessageToPC(oPC,"Your skill in alchemy has gone up!"));
DelayCommand(6.0,SendMessageToPC(oPC,"Current alchemy skill : "+ sOldSkill+"%"));

View File

@@ -1,5 +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);
@@ -104,21 +105,33 @@ void main()
if (GetLocalInt(OBJECT_SELF,"iAmInUse") != 0)
{
SendMessageToPC(oPC,"You must wait till the current weapon or armor is completed before starting another.");
SendMessageToPC(oPC,"You must wait until the current weapon or armor is completed before starting another.");
return;
}
if (GetTag(oTool) != "ITEM_SMITHHAMMER_NORMAL")
{
FloatingTextStringOnCreature("You must have a smithy hammer equipped in order to attempt this craft...",oPC,FALSE);
FloatingTextStringOnCreature("You must have a blacksmith hammer equipped in order to attempt this craft.",oPC,FALSE);
return;
}
//int iSmithSkill = GetTokenPair(oPC,13,4); // Weaponsmith
int iSmithSkill = GetCampaignInt("UOACraft","iSmithSkill",oPC);
// uses NWN Database
//int iSmithSkill = GetCampaignInt("UOACraft","iSmithSkill",oPC);
// uses external database
int iSmithSkill = GetPersistentInt(oPC,"iSmithSkill","UOACraft");
int iSmithChance = iSmithSkill;
//int iArmorSkill = GetTokenPair(oPC,13,5); // ArmorCraft
int iArmorSkill = GetCampaignInt("UOACraft","iArmorSkill",oPC);
// uses NWN database
//int iArmorSkill = GetCampaignInt("UOACraft","iArmorSkill",oPC);
// external database
int iArmorSkill = GetPersistentInt(oPC,"iArmorSkill","UOACraft");
int iArmorChance = iArmorSkill;
if (iSmithChance < 350)
@@ -150,7 +163,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, rending the dagger useless.";
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the dagger useless.";
sItemResRefPoor = CraftLookup("wswdg002",iIngotType);
sItemResRef = CraftLookup("nw_wswdg001",iIngotType);
sItemResRefExceptional = CraftLookup("wswdg003",iIngotType);
@@ -163,7 +176,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, rending the shortsword useless.";
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the shortsword useless.";
sItemResRefPoor = CraftLookup("wswss002",iIngotType);
sItemResRef = CraftLookup("nw_wswss001",iIngotType);
sItemResRefExceptional = CraftLookup("wswss003",iIngotType);
@@ -177,7 +190,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);
@@ -225,7 +238,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 properly, and the scale mail armor is ruined.";
sFail = "The scales do not hook together properly, and the scale mail armor is ruined.";
sItemResRefPoor = CraftLookup("aarcl006",iIngotType);
sItemResRef = CraftLookup("nw_aarcl003",iIngotType);
sItemResRefExceptional = CraftLookup("aarcl007",iIngotType);
@@ -256,7 +269,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 properly, and the banded mail armor is ruined.";
sFail = "The bands do not fix together properly, and the banded mail armor is ruined.";
sItemResRefPoor = CraftLookup("aarcl014",iIngotType);
sItemResRef = CraftLookup("nw_aarcl011",iIngotType);
sItemResRefExceptional = CraftLookup("aarcl015",iIngotType);
@@ -273,7 +286,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 properly, and the splint mail armor is ruined.";
sFail = "The small metal plates are too brittle to fix together properly, and the splint mail armor is ruined.";
sItemResRefPoor = CraftLookup("aarcl018",iIngotType);
sItemResRef = CraftLookup("nw_aarcl005",iIngotType);
sItemResRefExceptional = CraftLookup("aarcl019",iIngotType);
@@ -323,7 +336,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, rending the longsword useless.";
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the longsword useless.";
sItemResRefPoor = CraftLookup("wswls002",iIngotType);
sItemResRef = CraftLookup("nw_wswls001",iIngotType);
sItemResRefExceptional = CraftLookup("wswls003",iIngotType);
@@ -336,7 +349,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, rending the bastard sword useless.";
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the bastard sword useless.";
sItemResRefPoor = CraftLookup("wswbs002",iIngotType);
sItemResRef = CraftLookup("nw_wswbs001",iIngotType);
sItemResRefExceptional = CraftLookup("wswbs003",iIngotType);
@@ -349,7 +362,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, rending the greatsword useless.";
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the greatsword useless.";
sItemResRefPoor = CraftLookup("wswgs002",iIngotType);
sItemResRef = CraftLookup("nw_wswgs001",iIngotType);
sItemResRefExceptional = CraftLookup("wswgs003",iIngotType);
@@ -481,7 +494,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, rending the mace useless.";
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the mace useless.";
sItemResRefPoor = CraftLookup("wblml002",iIngotType);
sItemResRef = CraftLookup("nw_wblml001",iIngotType);
sItemResRefExceptional = CraftLookup("wblml003",iIngotType);
@@ -494,7 +507,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, rending the morning star useless.";
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the morning star useless.";
sItemResRefPoor = CraftLookup("wblms002",iIngotType);
sItemResRef = CraftLookup("nw_wblms001",iIngotType);
sItemResRefExceptional = CraftLookup("wblms003",iIngotType);
@@ -510,7 +523,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, rending the light flail useless.";
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the light flail useless.";
sItemResRefPoor = CraftLookup("wblfl002",iIngotType);
sItemResRef = CraftLookup("nw_wblfl001",iIngotType);
sItemResRefExceptional = CraftLookup("wblfl003",iIngotType);
@@ -523,7 +536,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, rending the heavy flail useless.";
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the heavy flail useless.";
sItemResRefPoor = CraftLookup("wblfh002",iIngotType);
sItemResRef = CraftLookup("nw_wblfh001",iIngotType);
sItemResRefExceptional = CraftLookup("wblfh003",iIngotType);
@@ -536,7 +549,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, rending the light hammer useless.";
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the light hammer useless.";
sItemResRefPoor = CraftLookup("wblhl002",iIngotType);
sItemResRef = CraftLookup("nw_wblhl001",iIngotType);
sItemResRefExceptional = CraftLookup("wblhl003",iIngotType);
@@ -549,7 +562,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, rending the warhammer useless.";
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the warhammer useless.";
sItemResRefPoor = CraftLookup("wblhw002",iIngotType);
sItemResRef = CraftLookup("nw_wblhw001",iIngotType);
sItemResRefExceptional = CraftLookup("wblhw003",iIngotType);
@@ -562,7 +575,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, rending the handaxe useless.";
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the handaxe useless.";
sItemResRefPoor = CraftLookup("waxhn002",iIngotType);
sItemResRef = CraftLookup("nw_waxhn001",iIngotType);
sItemResRefExceptional = CraftLookup("waxhn003",iIngotType);
@@ -575,7 +588,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, rending the battleaxe useless.";
sFail = "The metal turns brittle as you heat, fold, and pound it, rendering the battleaxe useless.";
sItemResRefPoor = CraftLookup("waxbt002",iIngotType);
sItemResRef = CraftLookup("nw_waxbt001",iIngotType);
sItemResRefExceptional = CraftLookup("waxbt003",iIngotType);
@@ -589,7 +602,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);
@@ -603,7 +616,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);
@@ -617,7 +630,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);
@@ -629,8 +642,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 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 it, and the halberd is ruined.";
sItemResRefPoor = CraftLookup("wplhb002",iIngotType);
sItemResRef = CraftLookup("nw_wplhb001",iIngotType);
sItemResRefExceptional = CraftLookup("wplhb003",iIngotType);
@@ -645,8 +658,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 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 it, and the scythe is ruined.";
sItemResRefPoor = CraftLookup("wplsc002",iIngotType);
sItemResRef = CraftLookup("nw_wplsc001",iIngotType);
sItemResRefExceptional = CraftLookup("wplsc003",iIngotType);
@@ -661,8 +674,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 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 it, and the spear is ruined.";
sItemResRefPoor = CraftLookup("wplss002",iIngotType);
sItemResRef = CraftLookup("nw_wplss001",iIngotType);
sItemResRefExceptional = CraftLookup("wplss003",iIngotType);
@@ -691,7 +704,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 and the kukri is ruined.";
sFail = "The metal turns brittle as you attempt to forge it, and the kukri is ruined.";
sItemResRefPoor = CraftLookup("wspku002",iIngotType);
sItemResRef = CraftLookup("nw_wspku001",iIngotType);
sItemResRefExceptional = CraftLookup("wspku003",iIngotType);
@@ -704,7 +717,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 and the sickle is ruined.";
sFail = "The metal turns brittle as you attempt to forge it, and the sickle is ruined.";
sItemResRefPoor = CraftLookup("wspsc002",iIngotType);
sItemResRef = CraftLookup("nw_wspsc001",iIngotType);
sItemResRefExceptional = CraftLookup("wspsc003",iIngotType);
@@ -717,7 +730,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 and the dire mace is ruined.";
sFail = "The metal turns brittle as you attempt to forge it, and the dire mace is ruined.";
sItemResRefPoor = CraftLookup("wdbma002",iIngotType);
sItemResRef = CraftLookup("nw_wdbma001",iIngotType);
sItemResRefExceptional = CraftLookup("wdbma003",iIngotType);
@@ -730,7 +743,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 and the double axe is ruined.";
sFail = "The metal turns brittle as you attempt to forge it, and the double axe is ruined.";
sItemResRefPoor = CraftLookup("wdbax002",iIngotType);
sItemResRef = CraftLookup("nw_wdbax001",iIngotType);
sItemResRefExceptional = CraftLookup("wdbax003",iIngotType);
@@ -743,7 +756,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 and the two-bladed sword is ruined.";
sFail = "The metal turns brittle as you attempt to forge it, and the two-bladed sword is ruined.";
sItemResRefPoor = CraftLookup("wdbsw002",iIngotType);
sItemResRef = CraftLookup("nw_wdbsw001",iIngotType);
sItemResRefExceptional = CraftLookup("wdbsw003",iIngotType);
@@ -757,7 +770,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);
@@ -771,7 +784,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);
@@ -785,7 +798,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);
@@ -800,7 +813,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);
@@ -813,7 +826,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 and the katana is ruined.";
sFail = "The metal turns brittle as you attempt to forge it, and the katana is ruined.";
sItemResRefPoor = CraftLookup("wswka002",iIngotType);
sItemResRef = CraftLookup("nw_wswka001",iIngotType);
sItemResRefExceptional = CraftLookup("wswka003",iIngotType);
@@ -826,7 +839,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 and the rapier is ruined.";
sFail = "The metal turns brittle as you attempt to forge it, and the rapier is ruined.";
sItemResRefPoor = CraftLookup("wswrp002",iIngotType);
sItemResRef = CraftLookup("nw_wswrp001",iIngotType);
sItemResRefExceptional = CraftLookup("wswrp003",iIngotType);
@@ -839,7 +852,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 and the scimitar is ruined.";
sFail = "The metal turns brittle as you attempt to forge it, and the scimitar is ruined.";
sItemResRefPoor = CraftLookup("wswsc002",iIngotType);
sItemResRef = CraftLookup("nw_wswsc001",iIngotType);
sItemResRefExceptional = CraftLookup("wswsc003",iIngotType);
@@ -852,7 +865,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 and the great axe is ruined.";
sFail = "The metal turns brittle as you attempt to forge it, and the great axe is ruined.";
sItemResRefPoor = CraftLookup("waxgr002",iIngotType);
sItemResRef = CraftLookup("nw_waxgr001",iIngotType);
sItemResRefExceptional = CraftLookup("waxgr003",iIngotType);
@@ -865,12 +878,12 @@ void main()
{
if (GetRacialType(oPC)!=RACIAL_TYPE_DWARF)
{
FloatingTextStringOnCreature("You are not a dwarf! You cannot craft a Dwarven Waraxe!",oPC,FALSE);
FloatingTextStringOnCreature("You are not a dwarf! You will be unable to 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 and the dwarven waraxe is ruined.";
sFail = "The metal turns brittle as you attempt to forge it, and the dwarven waraxe is ruined.";
sItemResRefPoor = CraftLookup("wdwraxe002",iIngotType);
sItemResRef = CraftLookup("x2_wdwraxe001",iIngotType);
sItemResRefExceptional = CraftLookup("wdwraxe003",iIngotType);
@@ -1246,7 +1259,13 @@ 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+"%"));
@@ -1270,7 +1289,13 @@ 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+"%"));

View File

@@ -1,4 +1,5 @@
//#include "_persist_01a"
#include "aps_include"
void CreateAnObject(string sResource, object oPC, int iStackSize);
void BeeAttackPC(object oPC, object oSelf);
@@ -58,7 +59,13 @@ void main()
int iHoney = GetLocalInt(oSelf,"iHoney");
//int iBeeSkill = GetTokenPair(oPC,13,1);
int iBeeSkill = GetCampaignInt("UOACraft","iBeeSkill",oPC);
//uses NWN database
//int iBeeSkill = GetCampaignInt("UOACraft","iBeeSkill",oPC);
//uses external database
int iBeeSkill = GetPersistentInt(oPC,"iBeeSkill","UOACraft");
int iBeeChance = iBeeSkill;
if (iBeeChance <350)
@@ -83,7 +90,7 @@ void main()
if (GetTag(oItem)=="ITEM_HONEYCOMB")
{
FloatingTextStringOnCreature("You begin to cut the honeycomb from the beehive..",oPC,FALSE);
FloatingTextStringOnCreature("You begin to cut the honeycomb from the beehive.",oPC,FALSE);
sItem = "honeycomb";
iBeeChance = iBeeChance - 250;
sSuccess = "You carefully cut the honeycomb from the hive.";
@@ -98,14 +105,14 @@ void main()
}
else
{
sFail = "You have destroyed the honeycomb while trying to remove it from the hive.";
sFail = "You have destroyed the honeycomb while trying to remove it from the hive!";
}
}
}
if (GetTag(oItem)=="ITEM_HONEY")
{
FloatingTextStringOnCreature("You begin gathering up some of the honey from the beehive...",oPC,FALSE);
FloatingTextStringOnCreature("You begin gathering up some of the honey from the beehive.",oPC,FALSE);
sItem = "honey";
iHoney--;
sSuccess = "You carefully collect the honey from the hive.";
@@ -184,7 +191,13 @@ void main()
if (iBeeSkill <= 1000)
{
//DelayCommand(6.0,SetTokenPair(oPC,13,1,iBeeSkill));
DelayCommand(6.0,SetCampaignInt("UOACraft","iBeeSkill",iBeeSkill,oPC));
//uses NWN database
//DelayCommand(6.0,SetCampaignInt("UOACraft","iBeeSkill",iBeeSkill,oPC));
//uses external database
DelayCommand(6.0,SetPersistentInt(oPC,"iBeeSkill",iBeeSkill,0,"UOACraft"));
DelayCommand(6.0,SendMessageToPC(oPC,"====================================="));
DelayCommand(6.0,SendMessageToPC(oPC,"Your skill in beekeeping has gone up!"));
DelayCommand(6.0,SendMessageToPC(oPC,"Current beekeeping skill : "+ sOldSkill+"%"));

View File

@@ -1,5 +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);
@@ -102,7 +103,13 @@ void main()
}
//int iBowSkill = GetTokenPair(oPC,13,3);
int iBowSkill = GetCampaignInt("UOACraft","iBowSkill",oPC);
// uses NWN database
//int iBowSkill = GetCampaignInt("UOACraft","iBowSkill",oPC);
//external database
int iBowSkill = GetPersistentInt(oPC,"iBowSkill","UOACraft");
int iBowChance = iBowSkill;
if (iBowChance < 350)
{
@@ -361,7 +368,13 @@ void main()
if (iBowSkill <= 1000)
{
//DelayCommand(13.0,SetTokenPair(oPC,13,3,iBowSkill));
DelayCommand(13.0,SetCampaignInt("UOACraft","iBowSkill",iBowSkill,oPC));
//NWN database
//DelayCommand(13.0,SetCampaignInt("UOACraft","iBowSkill",iBowSkill,oPC));
//external database
DelayCommand(13.0,SetPersistentInt(oPC,"iBowSkill",iBowSkill,0,"UOACraft"));
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+"%"));

View File

@@ -1,4 +1,5 @@
#include "nw_i0_plot"
#include "aps_include"
int CheckComponent(object oPC, string sTag, int iMinimum);
void RemoveComponent(object oPC, string sTag, int iMinimum);
@@ -92,8 +93,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. The cider is ruined.";
sSuccess="You carefully combine the ingredients, and seal the jug.";
sFail = "The yeast fails to ferment the ingredients and the cider is ruined.";
sProduct = "item_fullkeg_001";
sByproduct1 = "glassbottle";
iByproduct1 = 1;
@@ -111,8 +112,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. The cider is ruined.";
sSuccess="You carefully combine the ingredients, and seal the jug.";
sFail = "The yeast fails to ferment the ingredients, and the cider is ruined.";
sProduct = "item_fullkeg_002";
sByproduct1 = "glassbottle";
iByproduct1 = 1;
@@ -131,7 +132,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";
@@ -151,7 +152,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";
@@ -215,8 +216,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 topyeast with the cider.";
sFail = "The mixture is contaminated as you attempt to add the topyeast.";
sSuccess="You carefully combine the top yeast with the cider.";
sFail = "The mixture is contaminated as you attempt to add the top yeast.";
sProduct = "item_fullkeg_008";
sFailKeg = "item_cask_006";
}
@@ -233,8 +234,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. The wine is ruined.";
sSuccess="You carefully combine the ingredients, and seal the cask.";
sFail = "The yeast fails to ferment the ingredients, and the wine is ruined.";
sProduct = "item_fullkeg_009";
sByproduct1 = "glassbottle";
iByproduct1 = 3;
@@ -252,7 +253,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";
@@ -270,7 +271,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 bottomyeast, sugar, and red wine and seal the cask.";
sSuccess="You carefully combine the bottom yeast, 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";
@@ -287,7 +288,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";
@@ -309,7 +310,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 bottomyeast and seal the barrel.";
sSuccess="You combine the water, hops, barley wort, and bottom yeast and seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The lager is ruined.";
sProduct = "item_fullkeg_013";
sByproduct1 = "item001";
@@ -330,7 +331,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 bottomyeast and seal the barrel.";
sSuccess="You combine the water, hops, barley wort, and bottom yeast and seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The lager is ruined.";
sProduct = "item_fullkeg_014";
sByproduct1 = "item001";
@@ -352,7 +353,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 bottomyeast and seal the barrel.";
sSuccess="You combine the water, hops, barley wort, and bottom yeast and seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The lager is ruined.";
sProduct = "item_fullkeg_015";
sByproduct1 = "item001";
@@ -376,7 +377,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 bottomyeast and seal the barrel.";
sSuccess="You combine the water, hops, barley wort, caramel, and bottom yeast then seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The draught is ruined.";
sProduct = "item_fullkeg_016";
sByproduct1 = "item001";
@@ -398,7 +399,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 bottomyeast and seal the barrel.";
sSuccess="You combine the water, hops, barley wort, and bottom yeast then seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The red malt lager is ruined.";
sProduct = "item_fullkeg_017";
sByproduct1 = "item001";
@@ -422,7 +423,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 bottomyeast and seal the barrel.";
sSuccess="You combine the water, hops, barley wort, caramel, and bottom yeast then seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The gold malt lager is ruined.";
sProduct = "item_fullkeg_018";
sByproduct1 = "item001";
@@ -446,7 +447,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 bottomyeast and seal the barrel.";
sSuccess="You combine the water, hops, barley wort, molasses, and bottom yeast then seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The ice lager is ruined.";
sProduct = "item_fullkeg_019";
sByproduct1 = "item001";
@@ -470,7 +471,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 bottomyeast and seal the barrel.";
sSuccess="You combine the water, hops, barley wort, caramel, and bottom yeast then seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The stout lager is ruined.";
sProduct = "item_fullkeg_020";
sByproduct1 = "item001";
@@ -493,7 +494,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 topyeast and seal the barrel.";
sSuccess="You combine the water, hops, barley wort, and top yeast then seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The ale is ruined.";
sProduct = "item_fullkeg_021";
sByproduct1 = "item001";
@@ -517,7 +518,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 topyeast and seal the barrel.";
sSuccess="You combine the water, hops, barley wort, caramel, and top yeast then seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The stout ale is ruined.";
sProduct = "item_fullkeg_022";
sByproduct1 = "item001";
@@ -543,7 +544,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 topyeast and seal the barrel.";
sSuccess="You combine the water, hops, barley wort, caramel, molasses, and top yeast then seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The porter ale is ruined.";
sProduct = "item_fullkeg_023";
sByproduct1 = "item001";
@@ -569,7 +570,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 topyeast and seal the barrel.";
sSuccess="You combine the water, hops, barley wort, caramel, grape juice, and top yeast then seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The barleywine ale is ruined.";
sProduct = "item_fullkeg_024";
sByproduct1 = "item001";
@@ -595,7 +596,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 topyeast and seal the barrel.";
sSuccess="You combine the water, hops, barley wort, caramel, and top yeast then seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The kolsch ale is ruined.";
sProduct = "item_fullkeg_025";
sByproduct1 = "item001";
@@ -619,7 +620,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 topyeast and seal the barrel.";
sSuccess="You combine the water, honey, caramel, and top yeast then seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The honeymead is ruined.";
sProduct = "item_fullkeg_026";
sByproduct1 = "item001";
@@ -640,7 +641,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 topyeast and seal the barrel.";
sSuccess="You combine the water, honey, caramel, and top yeast then seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The sackmead is ruined.";
sProduct = "item_fullkeg_027";
sByproduct1 = "item001";
@@ -664,7 +665,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 topyeast and seal the barrel.";
sSuccess="You combine the water, honey, caramel, apples, and top yeast then seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The apple muslin mead is ruined.";
sProduct = "item_fullkeg_028";
sByproduct1 = "item001";
@@ -690,7 +691,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 topyeast and seal the barrel.";
sSuccess="You combine the water, honey, caramel, mint leaves, and top yeast then seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The metheglin is ruined.";
sProduct = "item_fullkeg_029";
sByproduct1 = "item001";
@@ -714,7 +715,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 topyeast and seal the barrel.";
sSuccess="You combine the water, honey, caramel, blueberries, and top yeast then seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The morat is ruined.";
sProduct = "item_fullkeg_030";
sByproduct1 = "item001";
@@ -740,7 +741,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 topyeast and seal the barrel.";
sSuccess="You combine the water, honey, caramel, grapes, ginger, and top yeast then seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The hippocras is ruined.";
sProduct = "item_fullkeg_031";
sByproduct1 = "item001";
@@ -764,7 +765,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 topyeast and seal the barrel.";
sSuccess="You combine the water, honey, caramel, grapes, and top yeast then seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The pyment is ruined.";
sProduct = "item_fullkeg_032";
sByproduct1 = "item001";
@@ -788,7 +789,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 topyeast and seal the barrel.";
sSuccess="You combine the water, honey, caramel, corn wort, and top yeast then seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The braggot is ruined.";
sProduct = "item_fullkeg_033";
sByproduct1 = "item001";
@@ -812,7 +813,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 topyeast and seal the barrel.";
sSuccess="You combine the water, honey, caramel, vinegar, and top yeast then seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The oxymel is ruined.";
sProduct = "item_fullkeg_034";
sByproduct1 = "item001";
@@ -838,7 +839,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 topyeast and seal the barrel.";
sSuccess="You combine the water, honey, caramel, poppies, and top yeast then seal the barrel.";
sFail = "The yeast fails to ferment the ingredients. The rhodomel is ruined.";
sProduct = "item_fullkeg_035";
sByproduct1 = "item001";
@@ -857,7 +858,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 and seal the barrel.";
sSuccess="You combine the distilled corn wort and caramel then seal the barrel.";
sFail = "The whiskey fails to age properly and is ruined.";
sProduct = "item_fullkeg_036";
sFailKeg = "item_cask_004";
@@ -873,7 +874,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 and seal the barrel.";
sSuccess="You combine the distilled acorn wort and caramel then seal the barrel.";
sFail = "The whiskey fails to age properly and is ruined.";
sProduct = "item_fullkeg_037";
sFailKeg = "item_cask_004";
@@ -889,7 +890,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 and seal the barrel.";
sSuccess="You combine the distilled rice wort and molasses then seal the barrel.";
sFail = "The sake fails to age properly and is ruined.";
sProduct = "item_fullkeg_038";
sFailKeg = "item_cask_004";
@@ -908,7 +909,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 and seal the barrel.";
sSuccess="You combine the sugarcane, molasses, and yeast then seal the barrel.";
sFail = "The rum fails to age properly and is ruined.";
sProduct = "item_fullkeg_039";
sByproduct1 = "glassbottle";
@@ -930,7 +931,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 and seal the barrel.";
sSuccess="You combine the sugarcane, molasses, wine, and yeast then seal the barrel.";
sFail = "The rum fails to age properly and is ruined.";
sProduct = "item_fullkeg_040";
sByproduct1 = "glassbottle";
@@ -952,7 +953,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 and seal the barrel.";
sSuccess="You combine the sugarcane, molasses, caramel, and yeast then seal the barrel.";
sFail = "The rum fails to age properly and is ruined.";
sProduct = "item_fullkeg_041";
sByproduct1 = "glassbottle";
@@ -976,7 +977,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 and seal the barrel.";
sSuccess="You combine the sugarcane, molasses, honey, syrup, and yeast then seal the barrel.";
sFail = "The rum fails to age properly and is ruined.";
sProduct = "item_fullkeg_042";
sByproduct1 = "glassbottle";
@@ -998,7 +999,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 and seal the barrel.";
sSuccess="You combine the sugar, molasses, water, molasses, and yeast then seal the barrel.";
sFail = "The rum fails to age properly and is ruined.";
sProduct = "item_fullkeg_043";
sByproduct1 = "glassbottle";
@@ -1009,7 +1010,7 @@ void main()
}
//Other
if (iBrew==73) // Vodka
if (iBrew==74) // Vodka
{
iDifficulty = 100;
if (CheckComponent(oPC,"item_wort_019",2)==FALSE) iMissing=1;
@@ -1021,7 +1022,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 snd sugar and seal the jug.";
sSuccess="You combine the distilled vodka base and sugar then seal the jug.";
sFail = "The vodka fails to mature properly and is ruined.";
sProduct = "item_fullkeg_045";
sByproduct1= "item001";
@@ -1029,7 +1030,7 @@ void main()
sFailKeg = "item_cask_006";
}
if (iBrew==74) // Gin
if (iBrew==75) // Gin
{
iDifficulty = 100;
if (CheckComponent(oPC,"item_fullkeg_045",1)==FALSE) iMissing=1;
@@ -1039,7 +1040,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, snd sugarcane extract and seal the jug.";
sSuccess="You combine the vodka, juniper berry juice, and sugarcane extract then seal the jug.";
sFail = "The gin fails to mature properly and is ruined.";
sProduct = "item_fullkeg_046";
sFailKeg = "item_cask_006";
@@ -1053,7 +1054,12 @@ void main()
return;
}
int iBrewSkill = GetCampaignInt("UOACraft","iBrewSkill",oPC);
//nwn database
//int iBrewSkill = GetCampaignInt("UOACraft","iBrewSkill",oPC);
//external database
int iBrewSkill = GetPersistentInt(oPC,"iBrewSkill","UOACraft");
int iBrewChance = iBrewSkill;
if (iBrewChance<350)
@@ -1137,9 +1143,15 @@ void main()
if (iBrewSkill <= 1000)
{
//DelayCommand(13.0,SetTokenPair(oPC,13,3,iBrewSkill));
DelayCommand(12.5,SetCampaignInt("UOACraft","iBrewSkill",iBrewSkill,oPC));
//nwn database
//DelayCommand(12.5,SetCampaignInt("UOACraft","iBrewSkill",iBrewSkill,oPC));
//external database
DelayCommand(12.5,SetPersistentInt(oPC,"iBrewSkill",iBrewSkill,0,"UOACraft"));
DelayCommand(12.5,SendMessageToPC(oPC,"=================================="));
DelayCommand(12.5,SendMessageToPC(oPC,"Your skill in nrewing has gone up!"));
DelayCommand(12.5,SendMessageToPC(oPC,"Your skill in brewing 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")));

View File

@@ -1,4 +1,5 @@
#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);
@@ -106,7 +107,12 @@ void main()
return;
}
int iCarpentrySkill = GetCampaignInt("UOACraft","iCarpentrySkill",oPC);
// nwn database
//int iCarpentrySkill = GetCampaignInt("UOACraft","iCarpentrySkill",oPC);
//external database
int iCarpentrySkill = GetPersistentInt(oPC,"iCarpentrySkill","UOACraft");
int iCarpentryChance = iCarpentrySkill;
@@ -179,7 +185,7 @@ void main()
sItemResRefPoor = sItemResRef;
sItemResRefExceptional = sItemResRef;
sComponent1 = "WOOD_NORMAL"; //Normal Wood
iComponent1 = 8;
iComponent1 = 6;
sComponent1Name="normal wood";
}
if (sTag == "pattern118") //Beer barrel
@@ -433,7 +439,13 @@ void main()
}
if (iCarpentrySkill <= 1000)
{
DelayCommand(13.0,SetCampaignInt("UOACraft","iCarpentrySkill",iCarpentrySkill,oPC));
//nwn database
//DelayCommand(13.0,SetCampaignInt("UOACraft","iCarpentrySkill",iCarpentrySkill,oPC));
//external database
DelayCommand(13.0,SetPersistentInt(oPC,"iCarpentrySkill",iCarpentrySkill,0,"UOACraft"));
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+"%"));

View File

@@ -1,4 +1,6 @@
#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);
@@ -12,7 +14,13 @@ void main()
string sItemTag = GetTag(oItem);
string sTagSelf = GetTag(oSelf);
string sItemResRef;
int iCookSkill = GetCampaignInt("UOACraft","iCookSkill",oPC);
//nwn database
//int iCookSkill = GetCampaignInt("UOACraft","iCookSkill",oPC);
//external database
int iCookSkill = GetPersistentInt(oPC,"iCookSkill","UOACraft");
int iCookChance = iCookSkill;
int iDifficulty;
string sComponent1;
@@ -63,7 +71,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;
}
@@ -283,7 +291,7 @@ void main()
}
case 30:
{
sComponent1 = "MEAT_WOLLYRAZORBACK";
sComponent1 = "MEAT_WOOLYRAZORBACK";
sComponent1Name = "wooly razorback meat";
break;
}
@@ -540,7 +548,13 @@ void main()
if (iCookSkill <= 1000)
{
//DelayCommand(13.0,SetTokenPair(oPC,13,3,iCookSkill));
DelayCommand(14.5,SetCampaignInt("UOACraft","iCookSkill",iCookSkill,oPC));
//nwn database
//DelayCommand(14.5,SetCampaignInt("UOACraft","iCookSkill",iCookSkill,oPC));
//external database
DelayCommand(14.5,SetPersistentInt(oPC,"iCookSkill",iCookSkill,0,"UOACraft"));
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+"%"));

View File

@@ -1,4 +1,5 @@
//#include "_persist_01a"
#include "aps_include"
void CreateAnObject(string sResource, object oPC, int iStackSize);
@@ -59,7 +60,13 @@ void main()
}
//int iPaperSkill = GetTokenPair(oPC,13,13);
int iPaperSkill = GetCampaignInt("UOACraft","iPaperSkill",oPC);
//nwn database
//int iPaperSkill = GetCampaignInt("UOACraft","iPaperSkill",oPC);
//external database
int iPaperSkill = GetPersistentInt(oPC,"iPaperSkill","UOACraft");
int iPaperChance = iPaperSkill;
if (iPaperSkill <350)
{
@@ -339,7 +346,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)
{
@@ -394,7 +401,13 @@ void main()
if (iPaperSkill <= 1000)
{
//DelayCommand(30.0,SetTokenPair(oPC,13,13,iPaperSkill));
DelayCommand(30.0,SetCampaignInt("UOACraft","iPaperSkill",iPaperSkill,oPC));
//nwn database
//DelayCommand(30.0,SetCampaignInt("UOACraft","iPaperSkill",iPaperSkill,oPC));
//external database
DelayCommand(30.0,SetPersistentInt(oPC,"iPaperSkill",iPaperSkill,0,"UOACraft"));
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+"%"));

View File

@@ -1,4 +1,5 @@
//#include "_persist_01a"
#include "aps_include"
void CreateAnObject(string sResource, object oPC, int iStackSize);
@@ -131,7 +132,13 @@ void main()
if (iDye>9) sDyeResRef = sDyeResRef+IntToString(iDye);
//int iDyeSkill = GetTokenPair(oPC,13,12); //Cloth Dyeing Skill
int iDyeSkill = GetCampaignInt("UOACraft","iDyeSkill",oPC);
//nwn database
//int iDyeSkill = GetCampaignInt("UOACraft","iDyeSkill",oPC);
//external database
int iDyeSkill = GetPersistentInt(oPC,"iDyeSkill","UOACraft");
int iDyeChance = iDyeSkill;
if (iDyeChance < 350)
{
@@ -229,7 +236,13 @@ void main()
if (iDyeSkill <= 1000)
{
//DelayCommand(13.0,SetTokenPair(oPC,13,12,iDyeSkill));
DelayCommand(13.0,SetCampaignInt("UOACraft","iDyeSkill",iDyeSkill,oPC));
//nwn database
//DelayCommand(13.0,SetCampaignInt("UOACraft","iDyeSkill",iDyeSkill,oPC));
//external database
DelayCommand(13.0,SetPersistentInt(oPC,"iDyeSkill",iDyeSkill,0,"UOACraft"));
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+"%"));

View File

@@ -1,4 +1,5 @@
//#include "_persist_01a"
#include "aps_include"
void CreatePlaceable(object oPC, string sObject, location lPlace, float fDuration);
void CreateAMonster(string sMonster, object oPC, int iNumberOfMonsters);
@@ -60,7 +61,8 @@ void main()
}
//iFishingSkill = GetTokenPair(oPC,14,13);
iFishingSkill = GetCampaignInt("UOACraft","iFishingSkill",oPC);
//iFishingSkill = GetCampaignInt("UOACraft","iFishingSkill",oPC);
iFishingSkill = GetPersistentInt(oPC,"iFishingSkill","UOACraft");
iFishingChance = iFishingSkill;
if (iFishingChance <350)
{
@@ -88,7 +90,7 @@ void main()
int iSkillGain = 0;
string sFishResRef = "";
string sSuccessMessage = "";
string sFailMessage = "You fish for a while but fail to catch anything...";
string sFailMessage = "You fish for a while but fail to catch anything.";
if (iRandom <= iFishingChance)
{
@@ -266,7 +268,7 @@ void main()
default:
{
AssignCommand(oPC,DelayCommand(11.5,(CreatePlaceable(oPC, "waterloggedcorps",GetLocation(oPC),600.0))));
sSuccessMessage = "You have pulled a water-soaked corpse fromt he water!";
sSuccessMessage = "You have pulled a heavy water-soaked corpse from the water!";
break;
}
}
@@ -426,7 +428,7 @@ void CreateAMonster(string sMonster, object oPC, int iNumberOfMonsters)
for (iNumberOfMonsters; iNumberOfMonsters>0; iNumberOfMonsters--)
{
SendMessageToPC(oPC,"Oops! You have disrurbed a Monster!!");
SendMessageToPC(oPC,"Oops! You have disturbed something in the water!!");
fSelf = GetFacing(oPC)+Random(360);
fDistance = (IntToFloat(Random(100)+1)/10.0);
@@ -471,7 +473,7 @@ void DelaySkill(object oPC, int iFishingSkill, string sOldSkill)
{
if (GetDistanceBetweenLocations(GetLocalLocation(oPC,"lIWasHere"),GetLocation(oPC))>0.8) return;
//SetTokenPair(oPC,14,13,iFishingSkill);
SetCampaignInt("UOACraft","iFishingSkill",iFishingSkill,oPC);
SetPersistentInt(oPC,"iFishingSkill",iFishingSkill,0,"UOACraft");
SendMessageToPC(oPC,"==================================");
SendMessageToPC(oPC,"Your skill in fishing has gone up!");
SendMessageToPC(oPC,"Current fishing skill : "+ sOldSkill+"%");

View File

@@ -1,5 +1,6 @@
//#include "_persist_01a"
#include "nw_i0_plot"
#include "aps_include"
void CreateAnObject(string sResource, object oPC, int iStackSize);
string CraftLookup(string sResRef, int iIngotType);
@@ -79,7 +80,7 @@ void main()
int iItemStack2;
object oItem2;
int iFletchingSkill = GetCampaignInt("UOACraft","iFletchingSkill",oPC);
int iFletchingSkill = GetPersistentInt(oPC,"iFletchingSkill","UOACraft");
int iFletchingChance = iFletchingSkill;
if (iFletchingChance <350)
@@ -338,8 +339,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 careate "+IntToString(iItemStack)+" arrows.",oPC,FALSE)));
if (iShaftType==2) AssignCommand(oPC,DelayCommand(9.5,FloatingTextStringOnCreature("You careate "+IntToString(iItemStack)+" bolts.",oPC,FALSE)));
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)));
//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));
@@ -492,7 +493,7 @@ void main()
if (iFletchingSkill <= 1000)
{
//DelayCommand(12.0,SetTokenPair(oPC,13,2,iFletchingSkill));
DelayCommand(12.0,SetCampaignInt("UOACraft","iFletchingSkill",iFletchingSkill,oPC));
DelayCommand(12.0,SetPersistentInt(oPC,"iFletchingSkill",iFletchingSkill,0,"UOACraft"));
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+"%"));

View File

@@ -1,4 +1,5 @@
//#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);
@@ -152,7 +153,7 @@ void main()
}
//int iSmeltChance = GetTokenPair(oPC,14,2);
int iSmeltSkill = GetCampaignInt("UOACraft","iSmeltSkill",oPC);
int iSmeltSkill = GetPersistentInt(oPC,"iSmeltSkill","UOACraft");
int iSmeltChance = iSmeltSkill;
//int iSmeltSkill = iSmeltChance;
string sOre;
@@ -509,7 +510,7 @@ void main()
if (iSmeltSkill <= 1000)
{
//DelayCommand(6.0,SetTokenPair(oPC,14,2,iSmeltSkill));
DelayCommand(6.0,SetCampaignInt("UOACraft","iSmeltSkill",iSmeltSkill,oPC));
DelayCommand(6.0,SetPersistentInt(oPC,"iSmeltSkill",iSmeltSkill,0,"UOACraft"));
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+"%"));
@@ -551,6 +552,7 @@ 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";
@@ -658,7 +660,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=1;
if (iBaseItem==BASE_ITEM_GREATAXE) iMaxIngot=9;
if (iBaseItem==BASE_ITEM_GREATSWORD) iMaxIngot=10;
if (iBaseItem==BASE_ITEM_HALBERD) iMaxIngot=20;
if (iBaseItem==BASE_ITEM_HANDAXE) iMaxIngot=3;
@@ -762,9 +764,18 @@ 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

View File

@@ -150,7 +150,7 @@ void main()
}
}
sSuccess = "The mineral bath revelas the gemstone to be "+sSuccess+".";
sSuccess = "The mineral bath reveals 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

View File

@@ -1,4 +1,5 @@
//#include "_persist_01a"
#include "aps_include"
void CreateAnObject(string sResource, object oPC, int iStackSize);
@@ -56,7 +57,7 @@ void main()
}
//int iGemSkill = GetTokenPair(oPC,13,7);
int iGemSkill = GetCampaignInt("UOACraft","iGemSkill",oPC);
int iGemSkill = GetPersistentInt(oPC,"iGemSkill","UOACraft");
int iGemChance = iGemSkill;
if (iGemSkill <350)
{
@@ -209,12 +210,12 @@ void main()
if (sItemResRef =="")
{
oItem = GetItemPossessedBy(OBJECT_SELF,sItemTag);
sItemResRef = GetStringRight(sItemTag,GetStringLength(sItemTag)-13)+"002";
sItemResRef = GetStringLeft(GetStringRight(sItemTag,GetStringLength(sItemTag)-13), 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++;
@@ -233,7 +234,7 @@ void main()
}
case 1:
{
DelayCommand(16.0,FloatingTextStringOnCreature("You barely manage to cut the gem, produing a poor quality cut gem.",oPC,FALSE));
DelayCommand(16.0,FloatingTextStringOnCreature("You barely manage to cut the gem, producing a poor quality cut gem.",oPC,FALSE));
sGemResRef = sGemResRef+"4";
break;
}
@@ -241,11 +242,17 @@ 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, produing an average quality cut gem.",oPC,FALSE));
DelayCommand(16.0,FloatingTextStringOnCreature("You successfully cut the gem, producing an average quality cut gem.",oPC,FALSE));
sGemResRef = sGemResRef+"3";
break;
}
@@ -300,7 +307,7 @@ void main()
if (iGemSkill <= 1000)
{
//DelayCommand(17.0,SetTokenPair(oPC,13,7,iGemSkill));
DelayCommand(17.0,SetCampaignInt("UOACraft","iGemSkill",iGemSkill,oPC));
DelayCommand(17.0,SetPersistentInt(oPC,"iGemSkill",iGemSkill,0,"UOACraft"));
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+"%"));

View File

@@ -1,4 +1,5 @@
//#include "_persist_01a"
#include "aps_include"
void CreateAnObject(string sResource, object oPC, int iStackSize);
@@ -203,7 +204,7 @@ void main()
int iItem = GetNumStackedItems(oItem);
//int iPolishSkill = GetTokenPair(oPC,13,6);
int iPolishSkill = GetCampaignInt("UOACraft","iPolishSkill",oPC);
int iPolishSkill = GetPersistentInt(oPC,"iPolishSkill","UOACraft");
int iPolishChance = iPolishSkill;
if (iPolishChance <350)
{
@@ -292,7 +293,7 @@ void main()
if (iPolishSkill <= 1000)
{
//DelayCommand(31.0,SetTokenPair(oPC,13,6,iPolishSkill));
DelayCommand(31.0,SetCampaignInt("UOACraft","iPolishSkill",iPolishSkill,oPC));
DelayCommand(31.0,SetPersistentInt(oPC,"iPolishSkill",iPolishSkill,0,"UOACraft"));
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

View File

@@ -1,3 +1,5 @@
#include "aps_include"
void CreateAnObject(string sResource, object oPC);
void main()
@@ -310,7 +312,7 @@ void main()
oGlass = GetItemPossessedBy(oPC,"ITEM_GLASSVIAL");
if (oGlass==OBJECT_INVALID)
{
FloatingTextStringOnCreature("You must have an empty glass bottle to extract oils.",oPC,FALSE);
FloatingTextStringOnCreature("You must have an empty glass vial to extract oils.",oPC,FALSE);
CopyItem(oItem,oPC,TRUE);
DestroyObject(oItem,0.1);
return;
@@ -318,7 +320,7 @@ void main()
}
//DestroyObject(oGlass,0.1);
int iCookSkill = GetCampaignInt("UOACraft","iCookSkill",oPC);
int iCookSkill = GetPersistentInt(oPC,"iCookSkill","UOACraft");
int iCookChance = iCookSkill;
if (iCookChance<350)
@@ -399,7 +401,7 @@ void main()
if (iCookSkill <= 1000)
{
//DelayCommand(13.0,SetTokenPair(oPC,13,3,iCookSkill));
DelayCommand(6.5,SetCampaignInt("UOACraft","iCookSkill",iCookSkill,oPC));
DelayCommand(6.5,SetPersistentInt(oPC,"iCookSkill",iCookSkill,0,"UOACraft"));
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+"%"));

View File

@@ -1,5 +1,6 @@
//#include "_persist_01a"
#include "nw_i0_plot"
#include "aps_include"
void CreateAnObject(string sResource, object oPC);
object CreatePlaceable(string sObject, location lPlace, float fDuration);
@@ -37,7 +38,7 @@ void main()
if (GetLocalInt(OBJECT_SELF,"iAmInUse")!=0)
{
FloatingTextStringOnCreature("You must wait until the kiln is cooled off before starting any other craft.",oPC,FALSE);
FloatingTextStringOnCreature("You must wait until the kiln is at the right temprature before starting any other item.",oPC,FALSE);
if (iAdded != 99)CopyItem(oItem,oPC,TRUE);
DestroyObject(oItem);
return;
@@ -193,7 +194,7 @@ void main()
//int iGlassSkill = GetTokenPair(oPC,14,4);
int iGlassSkill = GetCampaignInt("UOACraft","iGlassSkill",oPC);
int iGlassSkill = GetPersistentInt(oPC,"iGlassSkill","UOACraft");
int iGlassChance = iGlassSkill;
object oFire = CreatePlaceable("plc_flamemedium", lFire, 6.0);
@@ -226,7 +227,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);
@@ -242,7 +243,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);
@@ -256,7 +257,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);
@@ -269,7 +270,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);
@@ -282,7 +283,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);
@@ -295,7 +296,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);
@@ -308,7 +309,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);
@@ -322,7 +323,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);
@@ -336,7 +337,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);
@@ -351,7 +352,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);
@@ -365,7 +366,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);
@@ -456,7 +457,7 @@ void main()
if (iGlassSkill <= 1000)
{
//DelayCommand(5.0,SetTokenPair(oPC,14,4,iGlassSkill));
DelayCommand(6.0,SetCampaignInt("UOACraft","iGlassSkill",iGlassSkill,oPC));
DelayCommand(6.0,SetPersistentInt(oPC,"iGlassSkill",iGlassSkill,0,"UOACraft"));
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+"%"));

View File

@@ -1,3 +1,5 @@
#include "aps_include"
void CreateAnObject(string sResource, object oPC, int iProduct);
void main()
@@ -114,7 +116,7 @@ void main()
}
DestroyObject(oSugar,0.2);
int iBrewSkill = GetCampaignInt("UOACraft","iBrewSkill",oPC);
int iBrewSkill = GetPersistentInt(oPC,"iBrewSkill","UOACraft");
int iBrewChance = iBrewSkill;
if (iBrewChance<350)
@@ -207,7 +209,7 @@ void main()
if (iBrewSkill <= 1000)
{
//DelayCommand(13.0,SetTokenPair(oPC,13,3,iBrewSkill));
DelayCommand(12.5,SetCampaignInt("UOACraft","iBrewSkill",iBrewSkill,oPC));
DelayCommand(12.5,SetPersistentInt(oPC,"iBrewSkill",iBrewSkill,0,"UOACraft"));
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+"%"));

View File

@@ -1,5 +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);
@@ -41,7 +42,7 @@ void main()
if (GetLocalInt(OBJECT_SELF,"iAmInUse") != 0)
{
CopyItem(oItem,oPC,TRUE);
SendMessageToPC(oPC,"You must wait till the hide in the tanning bath is done before starting another.");
SendMessageToPC(oPC,"You must wait till the hide currently being worked is done before starting another.");
DestroyObject(oItem);
return;
}
@@ -61,7 +62,7 @@ void main()
int iTanMode = GetLocalInt(oPC,"iTanningMode");
//int iTanChance = GetTokenPair(oPC,14,11);
//int iTanSkill = iTanChance;
int iTanSkill = GetCampaignInt("UOACraft","iLeatherSkill",oPC);
int iTanSkill = GetPersistentInt(oPC,"iLeatherSkill","UOACraft");
int iTanChance = iTanSkill;
int iTanOil = 1;
int iBeeswax = 1;
@@ -413,7 +414,7 @@ void main()
if (iTanSkill <= 1000)
{
//DelayCommand(6.0,SetTokenPair(oPC,14,11,iTanSkill));
DelayCommand(6.0,SetCampaignInt("UOACraft","iLeatherSkill",iTanSkill,oPC));
DelayCommand(6.0,SetPersistentInt(oPC,"iLeatherSkill",iTanSkill,0,"UOACraft"));
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+"%"));

View File

@@ -1,5 +1,6 @@
//#include "_persist_01a"
#include "nw_i0_plot"
#include "aps_include"
void CreateAnObject(string sResource, object oPC, int iStackSize);
void GetNextItemPossessedBy(object oPC, string sItemTag);
@@ -40,7 +41,7 @@ void main()
CopyObject(oItem,GetLocation(oSelf),oSelf,GetTag(oItem));
//int iClothSkill = GetTokenPair(oPC,13,4); // Clothmaking
int iClothSkill = GetCampaignInt("UOACraft","iClothSkill",oPC);
int iClothSkill = GetPersistentInt(oPC,"iClothSkill","UOACraft");
int iClothChance = iClothSkill;
if (iClothChance < 350)
{
@@ -194,7 +195,7 @@ void main()
if (iClothSkill <= 1000)
{
//DelayCommand(13.0,SetTokenPair(oPC,13,4,iClothSkill));
DelayCommand(13.0,SetCampaignInt("UOACraft","iClothSkill",iClothSkill,oPC));
DelayCommand(13.0,SetPersistentInt(oPC,"iClothSkill",iClothSkill,0,"UOACraft"));
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+"%"));

View File

@@ -1,3 +1,4 @@
#include "aps_include"
void CreateAnObject(string sResource, object oPC, int iProduct);
void main()
@@ -101,7 +102,7 @@ void main()
}
int iBrewSkill = GetCampaignInt("UOACraft","iBrewSkill",oPC);
int iBrewSkill = GetPersistentInt(oPC,"iBrewSkill","UOACraft");
int iBrewChance = iBrewSkill;
if (iBrewChance<350)
@@ -197,9 +198,9 @@ void main()
if (iBrewSkill <= 1000)
{
//DelayCommand(13.0,SetTokenPair(oPC,13,3,iBrewSkill));
DelayCommand(12.5,SetCampaignInt("UOACraft","iBrewSkill",iBrewSkill,oPC));
DelayCommand(12.5,SetPersistentInt(oPC,"iBrewSkill",iBrewSkill,0,"UOACraft"));
DelayCommand(12.5,SendMessageToPC(oPC,"=================================="));
DelayCommand(12.5,SendMessageToPC(oPC,"Your skill in nrewing has gone up!"));
DelayCommand(12.5,SendMessageToPC(oPC,"Your skill in brewing 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")));

View File

@@ -1,3 +1,4 @@
#include "aps_include"
void CreateAnObject(string sResource, object oPC);
void main()
@@ -130,7 +131,7 @@ void main()
return;
}
int iCookSkill = GetCampaignInt("UOACraft","iCookSkill",oPC);
int iCookSkill = GetPersistentInt(oPC,"iCookSkill","UOACraft");
int iCookChance = iCookSkill;
DestroyObject(oItem,0.1);
@@ -213,7 +214,7 @@ void main()
if (iCookSkill <= 1000)
{
//DelayCommand(13.0,SetTokenPair(oPC,13,3,iCookSkill));
DelayCommand(14.5,SetCampaignInt("UOACraft","iCookSkill",iCookSkill,oPC));
DelayCommand(14.5,SetPersistentInt(oPC,"iCookSkill",iCookSkill,0,"UOACraft"));
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+"%"));

View File

@@ -1,4 +1,5 @@
//#include "_persist_01a"
#include "aps_include"
void CreateAnObject(string sResource, object oPC, int iStackSize);
@@ -33,7 +34,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;
}
@@ -41,7 +42,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 baking it into paper.",oPC,FALSE);
FloatingTextStringOnCreature("You must first bleach this pulp before pressing and making it into paper.",oPC,FALSE);
DestroyObject(oItem);
return;
}
@@ -49,7 +50,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;
}
@@ -82,7 +83,7 @@ void main()
}
//int iPaperSkill = GetTokenPair(oPC,13,13);
int iPaperSkill = GetCampaignInt("UOACraft","iPaperSkill",oPC);
int iPaperSkill = GetPersistentInt(oPC,"iPaperSkill","UOACraft");
int iPaperChance = iPaperSkill;
if (iPaperSkill <350)
{
@@ -225,7 +226,7 @@ void main()
if (iPaperSkill <= 1000)
{
//DelayCommand(30.0,SetTokenPair(oPC,13,13,iPaperSkill));
DelayCommand(30.0,SetCampaignInt("UOACraft","iPaperSkill",iPaperSkill,oPC));
DelayCommand(30.0,SetPersistentInt(oPC,"iPaperSkill",iPaperSkill,0,"UOACraft"));
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+"%"));
@@ -241,7 +242,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;

View File

@@ -1,5 +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);
@@ -33,7 +34,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;
}
@@ -49,7 +50,7 @@ void main()
if (sItemTag=="P_PULP_BLEACHED_SILK")
{
SetLocalInt(oPC,"iPulpType",1);
FloatingTextStringOnCreature("Setting up to bleach wood pulp with silk addative.",oPC,FALSE);
FloatingTextStringOnCreature("Setting up to bleach wood pulp with silk additive.",oPC,FALSE);
}
string sTagSelf = GetTag(oSelf);
AssignCommand(oPC,DoPlaceableObjectAction(oSelf,PLACEABLE_ACTION_USE));
@@ -96,7 +97,7 @@ void main()
//int iPaperSkill = GetTokenPair(oPC,13,7);
int iPaperSkill = GetCampaignInt("UOACraft","iPaperSkill",oPC);
int iPaperSkill = GetPersistentInt(oPC,"iPaperSkill","UOACraft");
int iPaperChance = iPaperSkill;
if (iPaperSkill <350)
{
@@ -154,7 +155,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")

View File

@@ -1,4 +1,5 @@
#include "nw_i0_plot"
#include "aps_include"
string GetInk(object oItem);
string GetComponent(object oItem);
@@ -57,7 +58,7 @@ void main()
int iDifficulty;
int iRandom;
int iSkillGain;
int iScribeSkill = GetCampaignInt("UOACraft","iScribeSkill",oPC);
int iScribeSkill = GetPersistentInt(oPC,"iScribeSkill","UOACraft");
int iScribeChance = iScribeSkill;
if (iScribeChance < 350)
{
@@ -183,7 +184,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;
@@ -211,7 +212,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);
@@ -269,7 +270,7 @@ void main()
if (iScribeSkill <= 1000)
{
//DelayCommand(13.0,SetTokenPair(oPC,13,12,iDyeSkill));
DelayCommand(13.0,SetCampaignInt("UOACraft","iScribeSkill",iScribeSkill,oPC));
DelayCommand(13.0,SetPersistentInt(oPC,"iScribeSkill",iScribeSkill,0,"UOACraft"));
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+"%"));
@@ -360,7 +361,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);

View File

@@ -1,4 +1,5 @@
//#include "_persist_01a"
#include "aps_include"
void CreateAnObject(string sResource, object oPC, int iStackSize);
void SpinNextItemPossessedBy(object oSelf, object oPC, string sItemTag);
@@ -91,7 +92,7 @@ void main()
//int iSpindleSkill = GetTokenPair(oPC,13,10);
int iSpindleSkill = GetCampaignInt("UOACraft","iSpindleSkill",oPC);
int iSpindleSkill = GetPersistentInt(oPC,"iSpindleSkill","UOACraft");
int iSpindleChance = iSpindleSkill;
int iSuccess = 0;
int iSuccess2 = 0;
@@ -214,7 +215,7 @@ void main()
if (iSpindleSkill <= 1000)
{
//DelayCommand(10.0,SetTokenPair(oPC,13,10,iSpindleSkill));
DelayCommand(10.0,SetCampaignInt("UOACraft","iSpindleSkill",iSpindleSkill,oPC));
DelayCommand(10.0,SetPersistentInt(oPC,"iSpindleSkill",iSpindleSkill,0,"UOACraft"));
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+"%"));
@@ -269,7 +270,7 @@ void SpinNextItemPossessedBy(object oSelf, object oPC, string sItemTag)
//int iSpindleSkill = GetTokenPair(oPC,13,10);
int iSpindleSkill = GetCampaignInt("UOACraft","iSpindleSkill",oPC);
int iSpindleSkill = GetPersistentInt(oPC,"iSpindleSkill","UOACraft");
int iSpindleChance = iSpindleSkill;
int iSuccess = 0;
int iSuccess2 = 0;
@@ -392,7 +393,7 @@ void SpinNextItemPossessedBy(object oSelf, object oPC, string sItemTag)
if (iSpindleSkill <= 1000)
{
//DelayCommand(10.0,SetTokenPair(oPC,13,10,iSpindleSkill));
DelayCommand(10.0,SetCampaignInt("UOACraft","iSpindleSkill",iSpindleSkill,oPC));
DelayCommand(10.0,SetPersistentInt(oPC,"iSpindleSkill",iSpindleSkill,0,"UOACraft"));
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+"%"));

View File

@@ -1,3 +1,5 @@
#include "aps_include"
void CreateAnObject(string sResource, object oPC, int iProduct);
void main()
@@ -156,13 +158,12 @@ void main()
if (sProduct1=="INVALID")
{
SendMessageToPC(oPC,"You may not distill this item!");
CopyItem(oItem,oPC,TRUE);
DestroyObject(oItem,0.1);
return;
}
int iBrewSkill = GetCampaignInt("UOACraft","iBrewSkill",oPC);
int iBrewSkill = GetPersistentInt(oPC,"iBrewSkill","UOACraft");
int iBrewChance = iBrewSkill;
if (iBrewChance<350)
@@ -251,9 +252,9 @@ void main()
if (iBrewSkill <= 1000)
{
//DelayCommand(13.0,SetTokenPair(oPC,13,3,iBrewSkill));
DelayCommand(12.5,SetCampaignInt("UOACraft","iBrewSkill",iBrewSkill,oPC));
DelayCommand(12.5,SetPersistentInt(oPC,"iBrewSkill",iBrewSkill,0,"UOACraft"));
DelayCommand(12.5,SendMessageToPC(oPC,"=================================="));
DelayCommand(12.5,SendMessageToPC(oPC,"Your skill in nrewing has gone up!"));
DelayCommand(12.5,SendMessageToPC(oPC,"Your skill in brewing 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")));

View File

@@ -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 = GetCampaignInt("UOACraft","iTailorSkill",oPC);
int iTailorSkill = GetPersistentInt(oPC,"iTailorSkill","UOACraft");
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,SetCampaignInt("UOACraft","iTailorSkill",iTailorSkill,oPC));
DelayCommand(13.0,SetPersistentInt(oPC,"iTailorSkill",iTailorSkill,0,"UOACraft"));
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+"%"));

View File

@@ -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 = GetCampaignInt("UOACraft","iTailorSkill",oPC);
int iTailorSkill = GetPersistentInt(oPC,"iTailorSkill","UOACraft");
int iTailorChance = iTailorSkill;
if (iTailorChance < 350)
{
@@ -375,8 +375,8 @@ void main()
{
//iTailorChance = iTailorChance - 200;
sItemResRefPoor = CraftLookup("cloth002",iClothType);
sItemResRef = CraftLookup("cloth237",iClothType);
sItemResRefExceptional = CraftLookup("cloth238",iClothType);
sItemResRef = CraftLookup("cloth246",iClothType);
sItemResRefExceptional = CraftLookup("cloth247",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,SetCampaignInt("UOACraft","iTailorSkill",iTailorSkill,oPC));
DelayCommand(13.0,SetPersistentInt(oPC,"iTailorSkill",iTailorSkill,0,"UOACraft"));
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+"%"));

View File

@@ -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 = GetCampaignInt("UOACraft","iTanSkill",oPC);
int iTanSkill = GetPersistentInt(oPC,"iTanSkill","UOACraft");
//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,SetCampaignInt("UOACraft","iTanSkill",iTanSkill,oPC));
DelayCommand(6.0,SetPersistentInt(oPC,"iTanSkill",iTanSkill,0,"UOACraft"));
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+"%"));

View File

@@ -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 = GetCampaignInt("UOACraft","iCureSkill",oPC);
int iTanSkill = GetPersistentInt(oPC,"iCureSkill","UOACraft");
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,SetCampaignInt("UOACraft","iCureSkill",iTanSkill,oPC));
DelayCommand(6.0,SetPersistentInt(oPC,"iCureSkill",iTanSkill,0,"UOACraft"));
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+"%"));

View File

@@ -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 tools to work with..",oPC,FALSE);
FloatingTextStringOnCreature("You do not have any tinker's toolset 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 = GetCampaignInt("UOACraft","iTinkerSkill",oPC);
int iGlassSkill = GetPersistentInt(oPC,"iTinkerSkill","UOACraft");
int iGlassChance = iGlassSkill;
if (iGlassChance <350)
{
@@ -174,14 +174,14 @@ void main()
if (iAdded==0)
{
if (GetStringRight(sItemResRef,3)=="001") // Tinkers toolkit
if (GetStringRight(sItemResRef,3)=="001") // Tinkers toolset
{
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") // Excavation Tools
if (GetStringRight(sItemResRef,3)=="089") // Smith Hammer
{
//iComponent1Stackable=0;
//iStackable=1;
iComponent1 =6;
sComponent1 = "INGOT_IRON";
sComponent1Name = "iron ingots";
iGlassChance = iGlassChance - 400;
sCraft = "item_excavation";
sFailString = "The measurements are off and as a result the excavation tools are useless.";
}
iGlassChance = iGlassChance - 10;
sCraft = "blacksmithhammer";
sFailString = "The measurements are off, and as a result the smith hammer is 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 carpenters tools are useless.";
sFailString = "The measurements are off, and as a result the carpenter's tools are useless.";
}
}
@@ -794,7 +794,7 @@ void main()
if (iGlassSkill <= 1000)
{
//DelayCommand(5.0,SetTokenPair(oPC,14,5,iGlassSkill));
DelayCommand(6.0,SetCampaignInt("UOACraft","iTinkerSkill",iGlassSkill,oPC));
DelayCommand(6.0,SetPersistentInt(oPC,"iTinkerSkill",iGlassSkill,0,"UOACraft"));
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+"%"));

View File

@@ -1,5 +1,6 @@
//#include "_persist_01a"
#include "nw_i0_plot"
#include "aps_include"
void main()
{
@@ -98,7 +99,7 @@ void main()
if (sTagSelf == "PLANT_SORGHUM")
{
sPlant = "sorghumgrains";
sMessageToPC = "You carefully cut the rice stalks and gather the grain.";
sMessageToPC = "You carefully cut the sorghum and gather the grain.";
}
if (sTagSelf == "PLANT_BAMBOO")
@@ -594,11 +595,11 @@ void main()
sMessageToPC = "You have chopped a log from the tree.";
}
}
if (sTagSelf == "TREE_TANGARINE")
if (sTagSelf == "TREE_TANGERINE")
{
if (iTreeMode == 99)
{
sPlant = "tangarine";
sPlant = "tangerine";
sMessageToPC = "You carefully harvest some ripe tangarines.";
}
else
@@ -921,7 +922,6 @@ void main()
}
if (sPlant == "") sMessageToPC = "There is nothing to gather from this with the tool being used.";
int iPlantMax = GetLocalInt(oSelf,"iMaxPlant");
int iFarmChance = 0;
int iFarmSkill = 0;
@@ -935,7 +935,7 @@ void main()
if (iPlantMax == 0)
{
//iFarmSkill = GetTokenPair(oPC,14,6);
iFarmSkill = GetCampaignInt("UOACraft","iFarmSkill",oPC);
iFarmSkill = GetPersistentInt(oPC,"iFarmSkill","UOACraft");
iFarmChance = iFarmSkill;
if (iFarmChance <350)
{
@@ -958,7 +958,7 @@ void main()
if (iTreeMode == 0)
{
//iFarmSkill = GetTokenPair(oPC,14,7);
iFarmSkill = GetCampaignInt("UOACraft","iLumberjackSkill",oPC);
iFarmSkill = GetPersistentInt(oPC,"iLumberjackSkill","UOACraft");
iFarmChance = iFarmSkill;
if (iFarmChance <350)
{
@@ -972,7 +972,7 @@ void main()
else
{
//iFarmSkill = GetTokenPair(oPC,14,6);
iFarmSkill = GetCampaignInt("UOACraft","iFarmSkill",oPC);
iFarmSkill = GetPersistentInt(oPC,"iFarmSkill","UOACraft");
iFarmChance = iFarmSkill;
if (iFarmChance <350)
{
@@ -1005,7 +1005,7 @@ void main()
}
if (iRandom <= iFarmChance)
{
CreateItemOnObject(sPlant,oPC,1);
SetIdentified (CreateItemOnObject(sPlant,oPC,1), TRUE);
FloatingTextStringOnCreature(sMessageToPC,oPC,FALSE);
if (Random(1000)>=iFarmSkill)
{
@@ -1051,7 +1051,7 @@ void main()
if (iFarmSkill <= 1000)
{
//DelayCommand(5.0,SetTokenPair(oPC,14,7,iFarmSkill));
DelayCommand(6.0,SetCampaignInt("UOACraft","iLumberjackSkill",iFarmSkill,oPC));
DelayCommand(6.0,SetPersistentInt(oPC,"iLumberjackSkill",iFarmSkill,0,"UOACraft"));
DelayCommand(6.0,SendMessageToPC(oPC,"=================================="));
DelayCommand(6.0,SendMessageToPC(oPC,"Your Lumberjack skill has gone up!"));
DelayCommand(6.0,SendMessageToPC(oPC,"Current Lumberjack skill : "+ sOldSkill+"%"));

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,904 @@
////////////////////////////////////////////////////////////////////////////////
// // //
// _kb_loot_corpse (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 (F7 key) "nw_c2_default7" whenever //
// "_kb_loot_corpse" is modified! //
// //
// 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 included as //
// part of "nw_c2_default7" using the #include command. All you need to do //
// is configure the script (see below) as desired. //
// //
////////////////////////////////////////////////////////////////////////////////
// //
// //
// CONFIGURING THE SCRIPT //
// //
// This script supports some configuration by the user. Following the //
// void LeaveCorpse() of the _kb_loot_corpse, you'll find a section where //
// you can set a few things. These include: (with default values displayed) //
// //
// //
// int nUseLootable = TRUE This enables the script. Setting is to FALSE //
// disables it. //
// //
// int nMoveEquipped = TRUE Setting this to FALSE will stop the script //
// from moving equipped items (other than //
// Armour/Helmet and Weapons/Shield/Torch) to //
// the lootable corpse placeable. (To prevent //
// the move/copy of Armour/Helmet and Weapons/ //
// Shield/Torch, use the next four toggles.) //
// Remember that CREATURE SLOTTED items are //
// NEVER moved. //
// //
// int nCopyArmour = TRUE This will use the ResRef to create a copy of //
// the Armour/Helmet the creature is wearing. //
// If you do not want to use this function, you //
// may want to consider the next one (called //
// nMoveArmour). nCopyArmour takes precedence //
// over nMoveArmour if both are TRUE. //
// //
// int nMoveArmour = FALSE Setting this TRUE will just move the armour //
// from the Chest slot to the lootable corpse //
// placeable on death; it will also move the //
// helmet from the Head slot to the lootable //
// corpse placeable. This can be a visual issue //
// when used with NPCs - since when the armour //
// is moved, the NPC will become 'naked'. //
// //
// *** If you do not wish to use either of the armour functions, just set //
// both values to FALSE. Then just add an additional suit of armour //
// and/or helmet to the inventory of creatures you want to have drop //
// their armour/helmet. //
// //
// int nDropWeapons = TRUE This will use the ResRef for dropping the //
// weapons on the ground - which is accomplished //
// by creating new ones on the ground and //
// destroying the ones in the creature's //
// inventory. NOTE: Even though the parameter //
// is called nDropWeapons, anything held in the //
// left or right hand (shield, torch, etc.) is //
// affected by this parameter. nDropWeapons //
// takes precedence over nMoveWeapons if both //
// are TRUE. //
// //
// int nMoveWeapons = FALSE Setting this TRUE will just move the weapons //
// to the Lootable Object just as the rest of //
// inventory is handled. NOTE: Even though the //
// parameter is called nMoveWeapons, anything //
// held in the left or right hand (shield, //
// torch, etc.) is affected by this parameter. //
// //
// *** If you do not wish to use either of the weapon functions, just set //
// both values to FALSE. Then just add additional weapons/shields/ //
// torches to the inventory of creatures you want to have drop those //
// items. //
// //
// int nUseBlood = TRUE Set this to TRUE if you want a Bloodspot to //
// appear under the corpse for a little extra //
// gory appeal. In addition, it will allow for //
// a grisly display if the corpse is destroyed. //
// Undead/constructs/elementals will not leave a //
// Bloodspot or "gib" when bashed. //
// //
// int nTinyBlood = FALSE Set this to FALSE if you don't want Tiny- //
// sized creatures (rats, bats, etc.) to leave a //
// Bloodspot, scorch mark, or small flame. They //
// will still "gib" normally. Only applies if //
// nUseBlood = TRUE. //
// //
// int nUseFlame = TRUE Set this to TRUE if you want a scorch mark or //
// a small flame (which burns out after 10-120 //
// seconds, and is replaced by a scorch mark) to //
// appear if 1/3 or more of the damage which //
// killed the creature was fire or electrical. //
// Scorch mark or flame will appear instead of //
// Bloodspot. If the total fire or electrical //
// damage exceeds the creature's max HP, a small //
// flame appears instead of a scorch mark. The //
// corpse will still gib normally. Undead, //
// constructs, and elementals will leave a //
// scorch mark, small flame, or nothing. Only //
// applies if nUseBlood = TRUE. //
// //
// int nCorpseFade = 0 This is the delay in actual seconds that the //
// corpse will remain before it fades. If you //
// set this to 0 (zero) it will turn off the //
// corpse fade - allowing all bodies and loot //
// to remain indefinitely. //
// //
// int nUseBonesBash = TRUE Set this to TRUE if you want bones to appear //
// when the corpse is bashed. The bones cannot //
// be bashed; they will only disappear if //
// nBonesFade > 0. //
// //
// int nUseBonesFade = TRUE Set this to TRUE if you want bones to appear //
// when the corpse fades. The bones cannot //
// be bashed; they will only disappear if //
// nBonesFade > 0. //
// //
// int nBonesFade = 60 This is the delay in actual seconds that the //
// bones will remain before they fade. If you //
// set this to 0 (zero) it will turn off the //
// bones fade - allowing all bones (and loot, //
// if the bones contain any) to remain forever. //
// //
// int nTinyBones = FALSE Set this to FALSE if you don't want Tiny- //
// sized creatures (rats, bats, etc.) to turn //
// into bones when their corpse is bashed or //
// fades. Only applies if nUseBonesBash and/or //
// nUseBonesFade = TRUE. //
// //
// int nKeepInventoryBash = FALSE Set this to TRUE if you want all items //
// in a creature's inventory to remain when //
// its corpse is bashed. If installed, //
// DOA's "Bashed Loot Breakage" plugin //
// ("doa_bashbreak") takes precedence over //
// nKeepInventoryBash. //
// //
// int nKeepInventoryFade = FALSE Set this to TRUE if you want all items //
// in a creature's inventory to remain when //
// its corpse fades. //
// //
// int nKeepEmpties = TRUE Set this to FALSE if you want EMPTY corpses //
// to fade immediately after their inventory is //
// emptied (and dropped weapons are claimed, //
// unless nKeepWeaponsEmpty is TRUE). //
// //
// int nKeepWeaponsBonesFade = FALSE Set this to FALSE if you want //
// dropped, unclaimed, non-plot weapons //
// to be destroyed when bones fade. //
// Only valid if nBonesFade > 0. //
// //
// int nKeepWeaponsCorpseFade = TRUE Set this to FALSE if you want //
// dropped, unclaimed, non-plot weapons //
// to be destroyed when corpses fade. //
// Only valid if nCorpseFade > 0. //
// //
// int nKeepWeaponsBash = TRUE Set this to FALSE if you want //
// dropped, unclaimed, non-plot weapons //
// to be destroyed when corpses are //
// bashed. //
// //
// int nKeepWeaponsEmpty = TRUE Set this to TRUE if you want empty //
// corpses to be destroyed even if //
// dropped weapons are unclaimed. //
// //
// *** Even though the 4 parameters listed above start with "nKeepWeapons", //
// anything held in the left or right hand (shield, torch, etc.) is //
// affected by these parameters, not just weapons. //
// //
// int nOverrideForPlacedCorpses = TRUE Set this to TRUE if you want the //
// 'Spawned Corpses' you place to be //
// permament. Setting it to FALSE //
// will cause your Placed Dead //
// creatures to act as the settings //
// above dictate. (i.e. Fading Out //
// after the delay or being emptied) //
// To use this functionality, you //
// should place the _kb_plc_corpse //
// script in the OnSpawn of the //
// critter you want to spawn dead. //
// //
////////////////////////////////////////////////////////////////////////////////
/* Version 3.3 Change Log:
- added SetPlotFlag to ensure oLootCorpse can't be destroyed before oHostBody is emptied (and weapons are dropped)
- fixed comments to clarify that "doa_bashbreak" script refers to DOA's "Bashed Loot Breakage" plugin
/* Version 3.2 Change Log:
- consolidated inventory management functions to _kb_inc_invmgmt
- DestroyInventory function calls changed to DestroyInventory + DestroyDroppedWeapons in _kb_inc_invmgmt (identical)
- added nTinyBlood and nUseFlame (added Flameout function and rewrote Bloodspot routine)
- added GetIsObjectValid check before destroying Bloodspot
- removed ActionWait (wasn't needed)
- combined several DelayCommand's into a single function (FadeCorpse) to improve performance
- improved FadeCorpse to take advantage of new functionality (nKeepInventoryFade, nUseBonesFade, etc.)
- fixed bug in DropLeftWeapon/DropRightWeapon that caused dropped weapons to have incorrect GetIdentified value
- fixed bug where 2 copies of droppable, equipped, Plot armor were created instead of 1 when corpse was bashed
- fixed bug that caused copied armor to have incorrect GetPlotFlag and GetIdentified values
- added nUseBonesBash to create bones when corpse is bashed
- added nUseBonesFade to create bones when corpse fades
- added nBonesFade to determine when bones fade (if ever)
- added nTinyBones to prevent bones from appearing for tiny-sized creatures
- added nKeepInventoryBash to keep all items in a creature's inventory when its corpse is bashed
- added nKeepInventoryFade to keep all items in a creature's inventory when its corpse fades
- replaced nKeepWeapons with: nKeepWeaponsBonesFade, nKeepWeaponsCorpseFade, nKeepWeaponsBash, and nKeepWeaponsEmpty
- changed comments to clarify weapons/shields/torches are affected by "weapons" parameters/functions
- changed comments to reflect that undead/constructs/elementals will not leave Bloodspot or "gib" when bashed
- fixed bug so that nCopyArmour takes precedence over nMoveArmour if both are TRUE
- added comments to clarify that nCopyArmour takes precedence over nMoveArmour if both are TRUE
- added comments to clarify that nDropWeapons takes precedence over nMoveWeapons if both are TRUE
- renamed oDeadNPC to oHostBody, and vDeadNPCLoc to vHostBodyLoc for consistency
- fixed bug so that nCopyArmour/nMoveArmour affect helmets equipped in the creature's Head slot, as well
- added support for "Destroy Target" command of DM's Helper wand (used to destroy the corpse or bones)
- added code to pass oLeftWpn/oRightWpn from oHostBody to oLootCorpse for use with Scrotok's Raise Dead/Ressurection Plugin
*/
#include "_kb_inc_invmgmt"
#include "sd_lootsystem"
/*******************************************************************************
** This script was borrowed from the Hard Core Ruleset, where they use it to **
** move a Dead PC's inventory to a lootable corpse object. Credit where **
** credit is due, I always say. :) **
*******************************************************************************/
object strip_equipped(object oHostBody, object oLootCorpse, object oEquip)
{
if(GetIsObjectValid(oEquip) && GetDroppableFlag(oEquip))
{
AssignCommand(oLootCorpse, ActionTakeItem(oEquip, oHostBody));
}
return oEquip;
}
/*******************************************************************************
** These scripts drop weapons/shields/torches held in the corpse's hands. **
** **
** SPECIAL THANKS TO DREZDAR and MOJO for their help in getting these two **
** drop weapon scripts written. I never would have gotten the vectors right, **
** but THEY sure did! **
** **
** (East = 0, North = 90, West = 180, South = 270) **
** **
*******************************************************************************/
void DropLeftWeapon(object oLeftWpn, object oLootCorpse)
{
if(GetIsObjectValid(oLeftWpn) && GetDroppableFlag(oLeftWpn))
{
vector vCorpseLoc = GetPositionFromLocation(GetLocation(oLootCorpse));
float fDifferential = 45.0f + IntToFloat(d20());//Randomize the Drop Angle
float fDistance = 0.5f + (IntToFloat(d10())/10);//Randomize the Drop Distance
float fVarWpnFace = -20.0f - IntToFloat(d20(2));//Randomize the Drop Facing
float fFacing = GetFacing(oLootCorpse);
fFacing = fFacing + fDifferential;
if (fFacing > 360.0f)
{ fFacing = 720.0f - fFacing; }
if (fFacing < 0.0f)
{ fFacing = 360.0f + fFacing; }
float fWpnFacing = GetFacing(oLootCorpse) + fVarWpnFace;
if (fWpnFacing > 360.0f)
{ fWpnFacing = 720.0f - fWpnFacing; }
if (fWpnFacing < 0.0f)
{ fWpnFacing = 360.0f + fWpnFacing; }
object oArea = GetArea(oLootCorpse);
//Generate New Location
float fNewX;
float fNewY;
float fNewZ;
if ((fFacing > 0.0f) && (fFacing < 90.0f))
{ fNewX = vCorpseLoc.x + ((cos(fFacing))*fDistance); fNewY = vCorpseLoc.y + ((sin(fFacing))*fDistance); fNewZ = vCorpseLoc.z; }
else if ((fFacing > 90.0f) && (fFacing < 180.0f))
{ fNewX = vCorpseLoc.x - ((cos(180.0f - fFacing))*fDistance); fNewY = vCorpseLoc.y + ((sin(180.0f - fFacing))*fDistance); fNewZ = vCorpseLoc.z; }
else if ((fFacing > 180.0f) && (fFacing < 270.0f))
{ fNewX = vCorpseLoc.x - ((cos(fFacing - 180.0f))*fDistance); fNewY = vCorpseLoc.y - ((sin(fFacing - 180.0f))*fDistance); fNewZ = vCorpseLoc.z; }
else if ((fFacing > 270.0f) && (fFacing < 360.0f))
{ fNewX = vCorpseLoc.x + ((cos(360.0f - fFacing))*fDistance); fNewY = vCorpseLoc.y - ((sin(360.0f - fFacing))*fDistance); fNewZ = vCorpseLoc.z; }
else if (fFacing == 0.0f)
{ fNewX = vCorpseLoc.x + fDistance; fNewY = vCorpseLoc.y; fNewZ = vCorpseLoc.z; }
else if (fFacing == 90.0f)
{ fNewX = vCorpseLoc.x; fNewY = vCorpseLoc.y + fDistance; fNewZ = vCorpseLoc.z; }
else if (fFacing == 180.0f)
{ fNewX = vCorpseLoc.x - fDistance; fNewY = vCorpseLoc.y; fNewZ = vCorpseLoc.z; }
else if (fFacing == 270.0f)
{ fNewX = vCorpseLoc.x; fNewY = vCorpseLoc.y - fDistance; fNewZ = vCorpseLoc.z; }
vector vNewFinal = Vector(fNewX, fNewY, fNewZ);
location lDropLeft = Location(oArea, vNewFinal, fWpnFacing);
//Drop Weapon
string sLeftWpnRef = GetResRef(oLeftWpn);
int nID = GetIdentified(oLeftWpn);
if (GetPlotFlag(oLeftWpn))
{
SetPlotFlag(oLeftWpn, FALSE);
DestroyObject(oLeftWpn);
oLeftWpn = CreateObject(OBJECT_TYPE_ITEM, sLeftWpnRef, lDropLeft, FALSE);
SetPlotFlag(oLeftWpn, TRUE);
}
else
{
DestroyObject(oLeftWpn);
oLeftWpn = CreateObject(OBJECT_TYPE_ITEM, sLeftWpnRef, lDropLeft, FALSE);
}
SetIdentified(oLeftWpn, nID);
SetLocalObject(oLootCorpse, "oLeftWpn", oLeftWpn);
}
// We're done with oHostBody, so allow oLootCorpse to be destroyable
AssignCommand(oLootCorpse, ActionDoCommand(SetPlotFlag(oLootCorpse, FALSE)));
}
void DropRightWeapon(object oRightWpn, object oLootCorpse)
{
if(GetIsObjectValid(oRightWpn) && GetDroppableFlag(oRightWpn))
{
vector vCorpseLoc = GetPositionFromLocation(GetLocation(oLootCorpse));
float fDifferential = -45.0f + IntToFloat(d20());//Randomize the Drop Angle
float fDistance = 0.5f + (IntToFloat(d10())/10);//Randomize the Drop Distance
float fVarWpnFace = 20.0f - IntToFloat(d20(2));//Randomize the Drop Facing
float fFacing = GetFacing(oLootCorpse);
fFacing = fFacing + fDifferential;
if (fFacing > 360.0f)
{ fFacing = 720.0f - fFacing; }
if (fFacing < 0.0f)
{ fFacing = 360.0f + fFacing; }
float fWpnFacing = GetFacing(oLootCorpse) + fVarWpnFace;
if (fWpnFacing > 360.0f)
{ fWpnFacing = 720.0f - fWpnFacing; }
if (fWpnFacing < 0.0f)
{ fWpnFacing = 360.0f + fWpnFacing; }
object oArea = GetArea(oLootCorpse);
//Generate New Location
float fNewX;
float fNewY;
float fNewZ;
if ((fFacing > 0.0f) && (fFacing < 90.0f))
{ fNewX = vCorpseLoc.x + ((cos(fFacing))*fDistance); fNewY = vCorpseLoc.y + ((sin(fFacing))*fDistance); fNewZ = vCorpseLoc.z; }
else if ((fFacing > 90.0f) && (fFacing < 180.0f))
{ fNewX = vCorpseLoc.x - ((cos(180.0f - fFacing))*fDistance); fNewY = vCorpseLoc.y + ((sin(180.0f - fFacing))*fDistance); fNewZ = vCorpseLoc.z; }
else if ((fFacing > 180.0f) && (fFacing < 270.0f))
{ fNewX = vCorpseLoc.x - ((cos(fFacing - 180.0f))*fDistance); fNewY = vCorpseLoc.y - ((sin(fFacing - 180.0f))*fDistance); fNewZ = vCorpseLoc.z; }
else if ((fFacing > 270.0f) && (fFacing < 360.0f))
{ fNewX = vCorpseLoc.x + ((cos(360.0f - fFacing))*fDistance); fNewY = vCorpseLoc.y - ((sin(360.0f - fFacing))*fDistance); fNewZ = vCorpseLoc.z; }
else if (fFacing == 0.0f)
{ fNewX = vCorpseLoc.x + fDistance; fNewY = vCorpseLoc.y; fNewZ = vCorpseLoc.z; }
else if (fFacing == 90.0f)
{ fNewX = vCorpseLoc.x; fNewY = vCorpseLoc.y + fDistance; fNewZ = vCorpseLoc.z; }
else if (fFacing == 180.0f)
{ fNewX = vCorpseLoc.x - fDistance; fNewY = vCorpseLoc.y; fNewZ = vCorpseLoc.z; }
else if (fFacing == 270.0f)
{ fNewX = vCorpseLoc.x; fNewY = vCorpseLoc.y - fDistance; fNewZ = vCorpseLoc.z; }
vector vNewFinal = Vector(fNewX, fNewY, fNewZ);
location lDropRight = Location(oArea, vNewFinal, fWpnFacing);
//Drop Weapon
string sRightWpnRef = GetResRef(oRightWpn);
int nID = GetIdentified(oRightWpn);
if (GetPlotFlag(oRightWpn))
{
SetPlotFlag(oRightWpn, FALSE);
DestroyObject(oRightWpn);
oRightWpn = CreateObject(OBJECT_TYPE_ITEM, sRightWpnRef, lDropRight, FALSE);
SetPlotFlag(oRightWpn, TRUE);
}
else
{
DestroyObject(oRightWpn);
oRightWpn = CreateObject(OBJECT_TYPE_ITEM, sRightWpnRef, lDropRight, FALSE);
}
SetIdentified(oRightWpn, nID);
SetLocalObject(oLootCorpse, "oRightWpn", oRightWpn);
}
}
/*******************************************************************************
** This script gets rid of the bloodspot, lootable corpse, and creature body **
*******************************************************************************/
void FadeCorpse(object oCorpseBlood, object oLootCorpse, object oHostBody)
{
//Delete the BloodSpot (if created)
if (GetIsObjectValid(oCorpseBlood))
{
DestroyObject(oCorpseBlood);
}
// Empty (or don't empty) the lootable corpse placeable
if (GetLocalInt(oLootCorpse, "nKeepInventoryFade") == FALSE)
// Delete all items (except Plot) from lootable corpse placeable
DestroyInventory(oLootCorpse);
else
{
// Do nothing (delete nothing from lootable corpse placeable)
}
// If user wants bones to be created when corpse fades...
if (GetLocalInt(oLootCorpse, "nUseBonesFade"))
{
if ((GetLocalInt(oLootCorpse, "nTinyBones") == FALSE) && (GetCreatureSize(oHostBody) == CREATURE_SIZE_TINY))
{
// Do nothing -- no bones for tiny creatures if nTinyBones is FALSE
}
else
{
// Create the bones
object oBones = CreateObject(OBJECT_TYPE_PLACEABLE, "loot_bones_obj", GetLocation(oLootCorpse), FALSE);
// Move inventory to bones
TransferToBones(oLootCorpse, oBones);
// Fade bones after nBoneFade seconds
if (GetLocalInt(oLootCorpse, "nBonesFade") > 0)
{
// Remember racial type and Blueprint ResRef for use with Scrotok's Raise Dead/Resurrection plugin
SetLocalInt(oBones, "nRacialType", GetLocalInt(oLootCorpse, "nRacialType"));
SetLocalString(oBones, "sHostBodyResRef", GetLocalString(oLootCorpse, "sHostBodyResRef"));
// Pass dropped weapon/shield/torch info to bones
SetLocalObject(oBones, "oLeftWpn", GetLocalObject(oLootCorpse, "oLeftWpn"));
SetLocalObject(oBones, "oRightWpn", GetLocalObject(oLootCorpse, "oRightWpn"));
int nKeepWeaponsBonesFade = GetLocalInt(oLootCorpse, "nKeepWeaponsBonesFade");
// Remember nKeepWeaponsBonesFade for use with DM's Helper wand
SetLocalInt(oBones, "nKeepWeaponsBonesFade", nKeepWeaponsBonesFade);
float fBonesFade = IntToFloat(GetLocalInt(oLootCorpse, "nBonesFade"));
AssignCommand(oBones, DelayCommand(fBonesFade, BonesCleanup(oBones, nKeepWeaponsBonesFade)));
}
}
}
// Delete unclaimed, dropped, non-Plot weapons unless nKeepWeaponsCorpseFade = 1
if (!GetLocalInt(oLootCorpse, "nKeepWeaponsCorpseFade"))
DestroyDroppedWeapons(oLootCorpse);
// Delete the lootable corpse placeable
DestroyObject(oLootCorpse);
// Empty and delete actual creature corpse (body)
DestroyInventory(oHostBody);
/* There is no call to DestroyDroppedWeapons since if the weapons are
dropped, they are already deleted from oHostBody. If the weapons are
not dropped, then the function would still not delete the weapons
since GetItemPossessor would be a valid object */
SetIsDestroyable(TRUE,FALSE,FALSE);
// NOTE: The following line MUST be last in this script, since oHostBody
// is the same as OBJECT_SELF
DestroyObject(oHostBody);
}
/*******************************************************************************
** This script replaces the small flame with a scorch mark **
*******************************************************************************/
void Flameout(object oCorpseBlood, object oLootCorpse)
{
location lBloodLoc = GetLocation(oCorpseBlood);
/*
// Used for debugging
SendMessageToPC(GetFirstPC(), "Flame script started...");
if (!GetIsObjectValid(oCorpseBlood))
{
// This should never happen (if you bash/fade corpse, oHostBody is
// destroyed, so Flameout won't run (can't add to action queue of invalid
// object)
SendMessageToPC(GetFirstPC(), "Flame already destroyed... location for new scorch unknown?");
}
*/
// Get rid of small flame
DestroyObject(oCorpseBlood);
// ... and turn it into a scorch mark
oCorpseBlood = CreateObject(OBJECT_TYPE_PLACEABLE, "plc_weathmark", lBloodLoc, FALSE);
ExecuteScript("sl_destroyself2", oCorpseBlood);
//Set Local for deletion later if needed
SetLocalObject(oLootCorpse, "oBloodSpot", oCorpseBlood);
}
void BodyFade(object oHostBody, object oBlood)
{
object oBones;
location lLoc = GetLocation(oHostBody);
SetPlotFlag(oHostBody, FALSE);
AssignCommand(oHostBody, SetIsDestroyable(TRUE,FALSE,FALSE));
if ((GetRacialType(oHostBody) != RACIAL_TYPE_CONSTRUCT) &&
(GetRacialType(oHostBody) != RACIAL_TYPE_ELEMENTAL)&&
(GetRacialType(oHostBody) != RACIAL_TYPE_DRAGON)&&
(GetRacialType(oHostBody) != RACIAL_TYPE_ANIMAL)&&
GetTag(oHostBody)!="sd_coff_mummy")
{
oBones = CreateObject(OBJECT_TYPE_PLACEABLE, "sd_remains", lLoc, FALSE);
ExecuteScript("sl_destroyself", oBones);
}
DestroyObject(oBlood);
if (GetIsDead(oHostBody))DestroyObject(oHostBody, 0.2f);
}
void LeaveCorpse()
{
//SET YOUR LOOTABLE CORPSES PREFERENCES HERE ///////////////
//
int nUseLootable = TRUE; // 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) //
int nDropWeapons = TRUE; // This will use the ResRef for dropping the weapons on the ground //
int nMoveWeapons = FALSE; // Setting this TRUE will just move the weapons to the Lootable Object //
int nUseBlood = FALSE; // Set this to TRUE if you want a Bloodspot to appear under the corpse and have //
// "gibs" when a corpse is destroyed. Undead/constructs/elementals won't leave a //
// Bloodspot or gib. //
int nTinyBlood = FALSE; // Set this to FALSE if you don't want Tiny-sized creatures (rats, bats, etc.) to //
// leave a Bloodspot, scorch mark, or small flame. They will still "gib" //
// normally. Only applies if nUseBlood = TRUE. //
int nUseFlame = FALSE; // Set this to TRUE if you want a scorch mark or a small flame (which burns out //
// after 10-120 seconds, and is replaced by a scorch mark) to appear if 1/3 or //
// more of the damage which killed the creature was fire or electrical. Scorch //
// mark or flame will appear instead of Bloodspot. If the total fire or //
// electrical damage exceeds the creature's max HP, a small flame appears instead //
// of a scorch mark. The corpse will still gib normally. Undead, constructs, //
// and elementals will leave a scorch mark, small flame, or nothing. Only //
// applies if nUseBlood = TRUE. //
int nCorpseFade = 0; // Set this to 0 (ZERO) if you DO NOT want the corpses to fade //
int nUseBonesBash = FALSE; // Set this to TRUE if you want bones to appear when the corpse is bashed. The //
// bones cannot be bashed; they will only disappear if nBonesFade > 0. //
int nUseBonesFade = TRUE; // Set this to TRUE if you want bones to appear when the corpse fades. The bones //
// cannot be bashed; they will only disappear if nBonesFade > 0. //
int nBonesFade = 120; // This is the delay in actual seconds that the bones will remain before they fade. //
// If you set this to 0 (zero) it will turn off the bones fade - allowing all //
// bones (and loot, if the bones contain any) to remain forever. //
int nTinyBones = FALSE; // Set this to FALSE if you don't want Tiny-sized creatures (rats, bats, etc.) to //
// turn into bones when their corpse is bashed or fades. Only applies if //
// nUseBonesBash and/or nUseBonesFade = TRUE. //
int nKeepInventoryBash = FALSE; // Set this to TRUE if you want all items in a creature's inventory to remain when //
// its corpse is bashed. If installed, DOA's "Bashed Loot Breakage" plugin //
// ("doa_bashbreak") takes precedence over nKeepInventoryBash. //
int nKeepInventoryFade = FALSE; // Set this to TRUE if you want all items in a creature's inventory to remain when //
// its corpse fades. //
int nKeepEmpties = TRUE; // Set this to FALSE if you want EMPTY corpses to fade immediately. //
int nKeepWeaponsBonesFade = FALSE; // Set this to FALSE if you want dropped, unclaimed, non-plot weapons to be //
// destroyed when bones fade. Only valid if nBonesFade > 0. //
int nKeepWeaponsCorpseFade = FALSE; // Set this to FALSE if you want dropped, unclaimed, non-plot weapons to be //
// destroyed when corpses fade. Only valid if nCorpseFade > 0. //
int nKeepWeaponsBash = TRUE; // Set this to FALSE if you want dropped, unclaimed, non-plot weapons to be //
// destroyed when corpses are bashed. //
int nKeepWeaponsEmpty = TRUE; // Set this to TRUE if you want empty corpses to be destroyed even if dropped //
// weapons are unclaimed. //
int nOverrideForPlacedCorpses = FALSE;// Set this to TRUE if you want the 'Spawned Corpses' you //
// place to be permament. Setting it to FALSE will cause //
// your Placed Dead creatures to act as the settings above dictate. //
float lsDelay = 240.0; // Corpse & loot fade delay
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//ALTER THE FOLLOWING AT YOUR OWN RISK :)
object oHostBody = OBJECT_SELF; //Get the Dead Creature Object
object oBlood;
object oSaveBlood;
string sBaseTag = GetTag(oHostBody); //Get that TAG of the dead creature
string sPrefix = GetStringLeft(sBaseTag, 4); //Look for Dead Prefix
location lLoc = GetLocation(oHostBody);
if ((GetRacialType(oHostBody) != RACIAL_TYPE_UNDEAD) &&
(GetRacialType(oHostBody) != RACIAL_TYPE_CONSTRUCT) &&
(GetRacialType(oHostBody) != RACIAL_TYPE_ELEMENTAL)&&
(GetRacialType(oHostBody) != RACIAL_TYPE_DRAGON))
{
oBlood = CreateObject(OBJECT_TYPE_PLACEABLE, "plc_bloodstain", lLoc, FALSE);
}
DelayCommand(lsDelay, BodyFade(oHostBody, oBlood));
if(nUseLootable) //If False, do nothing
{
//Do 'spawned corpse' settings if desired
if (sPrefix == "Dead")
{
if (nOverrideForPlacedCorpses)
{
nKeepEmpties = TRUE; //Set 'Spawned Dead' corpses to Keep Empties
nCorpseFade = 0; //Disable Corpse Fade for 'Spawned Dead' corpses
}
}
SetIsDestroyable(FALSE,TRUE,FALSE); //Protect our corpse from decaying
/*
UNDER CONSTRUCTION :)
// Create lootable corpse object only if oHostBody has something to loot
if (GetIsObjectValid(GetFirstItemInInventory(oHostBody)))
{
}
else
{
// Don't create lootable corpse object(nothing to loot)
if (nKeepEmpties == FALSE)
{
// Get rid of corpse immediately, since it's already empty
nCorpseFade = 1;
}
else
{
// Ensure oHostBody is destroyed/fades properly
// Ensure blood spot is created and destroyed/fades properly
}
}
*/
//Set the spawnpoint for our lootable object and sink it
float fSinkCorpseObj = 0.1f; //set depth to sink lootable object
vector vHostBodyLoc = GetPosition(oHostBody); //get original vector so we can change it
float fCorpseFacing = GetFacing(oHostBody); //get original facing
vector vCorpseLoc = Vector(vHostBodyLoc.x, vHostBodyLoc.y, vHostBodyLoc.z - fSinkCorpseObj); //adjust z-axis to sink lootable object
location lCorpseLoc = Location(GetArea(oHostBody), vCorpseLoc, fCorpseFacing); //create new location
object oLootCorpse = CreateObject(OBJECT_TYPE_PLACEABLE, "rr_sack", lCorpseLoc, FALSE); //Spawn our lootable object
SetLocalObject(oLootCorpse, "oHostBody", oHostBody); //Set Local for deletion later if needed
SetLocalObject(oLootCorpse, "oBlood", oBlood);
NameSack(oLootCorpse);
DelayCommand(0.1,sd_droploot(oHostBody, oLootCorpse));
DelayCommand(lsDelay, LootClear(oLootCorpse));
// Ensure oLootCorpse can't be destroyed until oHostBody is emptied (and weapons are dropped)
//SetPlotFlag(oLootCorpse, TRUE);
SetLocalInt(oLootCorpse, "nKeepEmpty", nKeepEmpties); //Set Local for deletion later if needed
SetLocalInt(oLootCorpse, "nUseBonesBash", nUseBonesBash); //Set Local for later use
SetLocalInt(oLootCorpse, "nUseBonesFade", nUseBonesFade); //Set Local for later use
SetLocalInt(oLootCorpse, "nBonesFade", nBonesFade); //Set Local for later use
SetLocalInt(oLootCorpse, "nTinyBones", nTinyBones); //Set Local for later use
SetLocalInt(oLootCorpse, "nKeepInventoryBash", nKeepInventoryBash); //Set Local for later use
SetLocalInt(oLootCorpse, "nKeepInventoryFade", nKeepInventoryFade); //Set Local for later use
// Remember racial type and Blueprint ResRef for use with Scrotok's Raise Dead/Resurrection plugin
SetLocalInt(oLootCorpse, "nRacialType", GetRacialType(oHostBody));
SetLocalString(oLootCorpse, "sHostBodyResRef", GetResRef(oHostBody));
object oCorpseBlood;
// If nUseBlood is TRUE and oHostBody isn't Undead/Construct/Elemental, set Local for later "gibbing" if bashed
if ((nUseBlood) && (GetRacialType(oHostBody) != RACIAL_TYPE_UNDEAD) && (GetRacialType(oHostBody) != RACIAL_TYPE_CONSTRUCT) && (GetRacialType(oHostBody) != RACIAL_TYPE_ELEMENTAL))
{
SetLocalInt(oLootCorpse, "nUseBlood", TRUE);
}
// If nUseBlood = TRUE, continue Bloodspot routine
if (nUseBlood)
{
location lBloodLoc = GetLocation(oHostBody); //get original location for placing blood spot
if ((nTinyBlood == FALSE) && (GetCreatureSize(oHostBody) == CREATURE_SIZE_TINY))
{
// Do nothing -- no bloodspot for tiny creatures if nTinyBlood is FALSE
}
else
{
if (nUseFlame)
{
// If nUseFlame = TRUE, determine if scorch, flame, or bloodspot should appear
int nFireDam = GetDamageDealtByType(DAMAGE_TYPE_FIRE);
int nElecDam = GetDamageDealtByType(DAMAGE_TYPE_ELECTRICAL);
int nTotDam = GetTotalDamageDealt();
int nMaxHP = GetMaxHitPoints();
int nFlameout;
/*
// Used for debugging
SendMessageToPC(GetFirstPC(), "nFireDam: "+IntToString(nFireDam)+" nElecDam: "+IntToString(nElecDam)+" nTotDam: "+IntToString(nTotDam)+" nMaxHP: "+IntToString(nMaxHP)+" nTotDam/3: "+IntToString(nTotDam/3));
*/
// If 1/3 or more of the damage is due to fire or electricity...
// (only the final damage that actually killed the creature is
// considered; tracking the cumulative damage taken would require
// altering the default OnDamaged script for every creature,
// which is not desirable)
if ((nFireDam >= (nTotDam/3)) || (nElecDam >= (nTotDam/3)))
{
// If massive fire or electricity damage, spawn a small flame
// which turns into a scorch mark after 10-120 seconds
// ("massive" means >= max HP)
if ((nFireDam >= nMaxHP) || (nElecDam >= nMaxHP))
{
oCorpseBlood = CreateObject(OBJECT_TYPE_PLACEABLE, "plc_flamesmall", lBloodLoc, FALSE);
ExecuteScript("sl_destroyself", oCorpseBlood);
/*
// Used for debugging
nFlameout = 30;
*/
nFlameout = d12(10);
DelayCommand(IntToFloat(nFlameout), Flameout(oCorpseBlood, oLootCorpse));
}
else
{
// Otherwise, spawn a scorch mark
oCorpseBlood = CreateObject(OBJECT_TYPE_PLACEABLE, "plc_weathmark", lBloodLoc, FALSE);
ExecuteScript("sl_destroyself", oCorpseBlood);
}
}
else
{
// Not enough (or zero) fire/electrical damage, so just spawn bloodspot (or do nothing for Undead/Constructs/Elementals)
if ((GetRacialType(oHostBody) != RACIAL_TYPE_UNDEAD) && (GetRacialType(oHostBody) != RACIAL_TYPE_CONSTRUCT) && (GetRacialType(oHostBody) != RACIAL_TYPE_ELEMENTAL))
{
oCorpseBlood = CreateObject(OBJECT_TYPE_PLACEABLE, "plc_bloodstain", lBloodLoc, FALSE);
ExecuteScript("sl_destroyself", oCorpseBlood);
}
}
}
else
{
// If nUseFlame = FALSE, just spawn the bloodspot (or do nothing for Undead/Constructs/Elementals)
if ((GetRacialType(oHostBody) != RACIAL_TYPE_UNDEAD) && (GetRacialType(oHostBody) != RACIAL_TYPE_CONSTRUCT) && (GetRacialType(oHostBody) != RACIAL_TYPE_ELEMENTAL))
{
oCorpseBlood = CreateObject(OBJECT_TYPE_PLACEABLE, "plc_bloodstain", lBloodLoc, FALSE);
ExecuteScript("sl_destroyself", oCorpseBlood);
}
}
// oBloodSpot will either be a bloodstain, scorch mark, small flame, or OBJECT_INVALID (for Undead/Constructs/Elementals)
SetLocalObject(oLootCorpse, "oBloodSpot", oCorpseBlood); //Set Local for deletion later if needed
}
}
// Get DEAD CREATURE'S INVENTORY - Move to oLootCorpse
int nAmtGold = GetGold(oHostBody); //Get any gold from the dead creature
if(nAmtGold)
{
AssignCommand(oLootCorpse, TakeGoldFromCreature(nAmtGold, oHostBody, FALSE));
}
if (nMoveEquipped)
{
//Get any DROPPABLE loot the dead creature has equipped
object oEquip1 = strip_equipped(oHostBody, oLootCorpse, GetItemInSlot(INVENTORY_SLOT_ARMS, oHostBody));
object oEquip2 = strip_equipped(oHostBody, oLootCorpse, GetItemInSlot(INVENTORY_SLOT_ARROWS, oHostBody));
object oEquip3 = strip_equipped(oHostBody, oLootCorpse, GetItemInSlot(INVENTORY_SLOT_BELT, oHostBody));
object oEquip4 = strip_equipped(oHostBody, oLootCorpse, GetItemInSlot(INVENTORY_SLOT_BOLTS, oHostBody));
object oEquip5 = strip_equipped(oHostBody, oLootCorpse, GetItemInSlot(INVENTORY_SLOT_BOOTS, oHostBody));
object oEquip6 = strip_equipped(oHostBody, oLootCorpse, GetItemInSlot(INVENTORY_SLOT_BULLETS, oHostBody));
object oEquip7 = strip_equipped(oHostBody, oLootCorpse, GetItemInSlot(INVENTORY_SLOT_CLOAK, oHostBody));
// Version 3.2: Moved oEquip8 (helmets) to the armour section (see below)
object oEquip9 = strip_equipped(oHostBody, oLootCorpse, GetItemInSlot(INVENTORY_SLOT_LEFTRING, oHostBody));
object oEquip10 = strip_equipped(oHostBody, oLootCorpse, GetItemInSlot(INVENTORY_SLOT_NECK, oHostBody));
object oEquip11 = strip_equipped(oHostBody, oLootCorpse, GetItemInSlot(INVENTORY_SLOT_RIGHTRING, oHostBody));
SetLocalObject(oLootCorpse, "oEquip1", oEquip1);
SetLocalObject(oLootCorpse, "oEquip2", oEquip2);
SetLocalObject(oLootCorpse, "oEquip3", oEquip3);
SetLocalObject(oLootCorpse, "oEquip4", oEquip4);
SetLocalObject(oLootCorpse, "oEquip5", oEquip5);
SetLocalObject(oLootCorpse, "oEquip6", oEquip6);
SetLocalObject(oLootCorpse, "oEquip7", oEquip7);
// Version 3.2: Moved oEquip8 (helmets) to the armour section (see below)
SetLocalObject(oLootCorpse, "oEquip9", oEquip9);
SetLocalObject(oLootCorpse, "oEquip10", oEquip10);
SetLocalObject(oLootCorpse, "oEquip11", oEquip11);
}
// Handle Weapons/Shields/Torches equipped (held) in left/right hands
// NOTE: nDropWeapons takes precedence over nMoveWeapons if both are TRUE
/*
If oHostBody has nothing in left/right hand, and has oLeftWpn/
oRightWpn set (due to Scrotok's Raise Dead/Resurrection plugin),
set oLeftWpn/oRightWpn (dropped weapon info) on oLootCorpse for
later use
*/
if (nDropWeapons)
{
if (GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oHostBody) == OBJECT_INVALID)
{
if (GetIsObjectValid(GetLocalObject(oHostBody, "oRightWpn")))
{
SetLocalObject(oLootCorpse, "oRightWpn", GetLocalObject(oHostBody, "oRightWpn"));
}
}
if (GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oHostBody) == OBJECT_INVALID)
{
if (GetIsObjectValid(GetLocalObject(oHostBody, "oLeftWpn")))
{
SetLocalObject(oLootCorpse, "oLeftWpn", GetLocalObject(oHostBody, "oLeftWpn"));
}
}
}
if (nMoveWeapons || nDropWeapons)
{
//Move equipped Weapons/Shields/Torches from oHostBody to oLootCorpse
object oEquip12 = strip_equipped(oHostBody, oLootCorpse, GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oHostBody));
object oEquip13 = strip_equipped(oHostBody, oLootCorpse, GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oHostBody));
// oEquip12/13 == OBJECT_INVALID if oHostBody has nothing in right/left hand slots
SetLocalObject(oLootCorpse, "oEquip12", oEquip12);
SetLocalObject(oLootCorpse, "oEquip13", oEquip13);
}
if (nDropWeapons)
{
// oEquip12/13 == OBJECT_INVALID if oHostBody has nothing in right/left hand slots
object oEquip12 = GetLocalObject(oLootCorpse, "oEquip12");
object oEquip13 = GetLocalObject(oLootCorpse, "oEquip13");
// Drop the weapons/shields/torches
/*
The following commands destroy oEquip12 and oEquip13, and store
the dropped weapons on oLootCorpse as "oLeftWpn" and "oRightWpn".
Nothing gets stored in oLeftWpn/oRightWpn if oEquip12/13 ==
OBJECT_INVALID.
*/
// Make sure DropLeftWeapon comes after DropRightWeapon in the lines
// below, in order for the SetPlotFlag fix (version 3.3) to work
AssignCommand(oLootCorpse, ActionDoCommand(DropRightWeapon(oEquip12, oLootCorpse)));
AssignCommand(oLootCorpse, ActionDoCommand(DropLeftWeapon(oEquip13, oLootCorpse)));
SetLocalInt(oLootCorpse, "nKeepWeaponsBonesFade", nKeepWeaponsBonesFade); //Set Local to prevent deletion later if needed
SetLocalInt(oLootCorpse, "nKeepWeaponsCorpseFade", nKeepWeaponsCorpseFade); //Set Local to prevent deletion later if needed
SetLocalInt(oLootCorpse, "nKeepWeaponsBash", nKeepWeaponsBash); //Set Local to prevent deletion later if needed
SetLocalInt(oLootCorpse, "nKeepWeaponsEmpty", nKeepWeaponsEmpty); //Set Local for later use
}
// Handle Armour/Helmets
// NOTE: nCopyArmour takes precedence over nMoveArmour if both are TRUE
if(nCopyArmour)
{
nMoveArmour = FALSE;
// Handle armour
object oArmour = GetItemInSlot(INVENTORY_SLOT_CHEST, oHostBody);
SetLocalObject(oLootCorpse, "oOrigArmour", oArmour);
if (GetDroppableFlag(oArmour))
{
string sArmourRef = GetResRef(oArmour);
object oLootArmour = CreateItemOnObject(sArmourRef, oLootCorpse);
SetPlotFlag(oLootArmour, GetPlotFlag(oArmour));
SetIdentified(oLootArmour, GetIdentified(oArmour));
// Set Plot flag to FALSE for original armor so it can be
// destroyed later if corpse is bashed
SetPlotFlag(oArmour, FALSE);
SetLocalObject(oLootCorpse, "oLootArmour", oLootArmour);
SetLocalObject(oLootCorpse, "oEquip14", oLootArmour);
}
// Handle helmet
object oHelmet = GetItemInSlot(INVENTORY_SLOT_HEAD, oHostBody);
SetLocalObject(oLootCorpse, "oOrigHelmet", oHelmet);
if (GetDroppableFlag(oHelmet))
{
string sHelmetRef = GetResRef(oHelmet);
object oLootHelmet = CreateItemOnObject(sHelmetRef, oLootCorpse);
SetPlotFlag(oLootHelmet, GetPlotFlag(oHelmet));
SetIdentified(oLootHelmet, GetIdentified(oHelmet));
// Set Plot flag to FALSE for original helmet so it can be
// destroyed later if corpse is bashed
SetPlotFlag(oHelmet, FALSE);
SetLocalObject(oLootCorpse, "oLootHelmet", oLootHelmet);
SetLocalObject(oLootCorpse, "oEquip8", oLootHelmet);
}
}
if(nMoveArmour)
{
nCopyArmour = FALSE;
// Handle armour
object oEquip14 = strip_equipped(oHostBody, oLootCorpse, GetItemInSlot(INVENTORY_SLOT_CHEST, oHostBody));
SetLocalObject(oLootCorpse, "oEquip14", oEquip14);
// Handle helmet
object oEquip8 = strip_equipped(oHostBody, oLootCorpse, GetItemInSlot(INVENTORY_SLOT_HEAD, oHostBody));
SetLocalObject(oLootCorpse, "oEquip8", oEquip8);
}
//Get the remaining loot from the dead creature and move it to oLootCorpse
int nEquipCount = 14;
object oLootEQ = GetFirstItemInInventory(oHostBody);
while(GetIsObjectValid(oLootEQ))
{
nEquipCount++;
// AssignCommand(oLootCorpse, ActionDoCommand(SendMessageToPC(GetFirstPC(), "oEquip"+IntToString(nEquipCount)+": "+GetTag(oLootEQ))));
object oEquipTemp = strip_equipped(oHostBody, oLootCorpse, oLootEQ);
string sEquipCount = "oEquip" + IntToString(nEquipCount);
SetLocalObject(oLootCorpse, sEquipCount, oEquipTemp);
oLootEQ = GetNextItemInInventory(oHostBody);
}
// We're done with oHostBody, so allow oLootCorpse to be destroyable
if (!nDropWeapons)
{
AssignCommand(oLootCorpse, ActionDoCommand(SetPlotFlag(oLootCorpse, FALSE)));
}
// Fade corpse out of existence after specified delay (unless set to 0)
if (nCorpseFade > 0)
{
float fCorpseFade = IntToFloat(nCorpseFade);
// ActionWait(fCorpseFade); // Removed for version 3.2
DelayCommand(fCorpseFade, FadeCorpse(oCorpseBlood, oLootCorpse, oHostBody));
}
}
}
//void main(){}

View File

@@ -119,8 +119,8 @@ void main()
{
oSelf = CreateObject(OBJECT_TYPE_PLACEABLE, "temporaryplaceho",lSelf,FALSE);
}
AssignCommand(oSelf,DelayCommand(1800.0,CreatePlaceable(sSelf,lSelf,0.0)));
DestroyObject(oSelf,1830.0);
AssignCommand(oSelf,DelayCommand(900.0,CreatePlaceable(sSelf,lSelf,0.0)));
DestroyObject(oSelf,930.0);
}

View File

@@ -1,9 +1,6 @@
#include "udk_include"
#include "ww_inc_on_act"
void main()
{
EnableDyeKitMenu();
ExecuteScript(GetTag(GetItemActivated()),OBJECT_SELF);
object oItem = GetItemActivated();
object oActivator = GetItemActivator();
location lTarget = GetItemActivatedTargetLocation();
@@ -11,66 +8,6 @@ void main()
string oCreatureTag = "";
int oMaxGoldValue = 0;
string oNewItemTag = "";
object oUser=GetItemActivator();
location lLoc=GetItemActivatedTargetLocation();
string sTag=GetTag(oItem);
object oMod=GetModule();
string sPre=GetLocalString(oMod,"OnAct_Pre");
string sPreScript=GetLocalString(oMod,"OnAct_PreScript");
int nN=GetStringLength(sPre);
//SendMessageToPC(GetItemActivator(),"uni_onactivateit:'"+GetResRef(oItem)+"'.");
if (nN<1)
{ // check for prefix waypoint
oMod=GetWaypointByTag("UNI_ACTIVATEPRE");
if (oMod!=OBJECT_INVALID) sPre=GetName(oMod);
oMod=GetWaypointByTag("UNI_ACTIVATEPRES");
if (oMod!=OBJECT_INVALID) sPreScript=GetName(oMod);
nN=GetStringLength(sPre);
//SendMessageToPC(GetItemActivator()," prefix waypoint check: nN="+IntToString(nN)+".");
} // check for prefix waypoint
if (GetStringLeft(GetTag(oItem),4)=="DH2_") ExecuteScript("desertheat2",OBJECT_SELF);
else
{ // not a special
//SendMessageToPC(GetItemActivator()," not special.");
if (nN>0&&sPre!="")
{ // check for special prefix
if (GetStringLeft(GetTag(oItem),nN)==sPre) ExecuteScript(sPreScript,OBJECT_SELF);
else {nN=-1;}
//SendMessageToPC(GetItemActivator()," Check for special prefix:"+IntToString(nN)+".");
} // check for special prefix
if (nN<1)
{ // special prefix was not used
sPre=GetResRef(oItem);
//SendMessageToPC(GetItemActivator()," Special prefix not used.");
if (GetStringLength(sPre)>0)
{ // has res ref
//SendMessageToPC(GetItemActivator()," resref:'"+sPre+"'.");
ExecuteScript(sPre,OBJECT_SELF);
} // has res ref
else
{ // use tag
sPre=GetTag(oItem);
if (GetStringLength(sPre)>16) sPre=GetStringLeft(sPre,16);
//SendMessageToPC(GetItemActivator()," tag:'"+sPre+"'.");
ExecuteScript(sPre,OBJECT_SELF);
} // use tag
oMod=GetWaypointByTag("UNI_ACTIVATE");
if (oMod!=OBJECT_INVALID) ExecuteScript(GetName(oMod),OBJECT_SELF);
} // special prefix was not used
} // not a special
if(sTag=="kpbwand")
{
if (GetIsDM(oUser) == TRUE)
{
AssignCommand(oUser, ActionStartConversation(oUser, "kpb_wand", TRUE));
}
else
{
DestroyObject(oItem);
SendMessageToPC(oUser, "I am not an immortal, and I cannot use that item!");
}
}
if(GetStringLeft(GetTag(oItem),4)=="SEED")
{
@@ -151,6 +88,13 @@ void main()
if (GetTag(oItem) == "SEED_HOPS")ExecuteScript("_plant_seed",oActivator);
if (GetTag(oItem) == "SEED_SUGARCANE")ExecuteScript("_plant_seed2",oActivator);
}
if (GetTag(oItem)=="FOOD_EAROFCORN")

View File

@@ -1,11 +1,13 @@
//#include "_persist_01a"
#include "aps_include"
void main()
{
object oPC = GetLastOpenedBy();
SetLocalObject(oPC,"oLastOpened",OBJECT_SELF);
//int iAlchemySkill = GetTokenPair(oPC,14,12);
int iAlchemySkill = GetCampaignInt("UOACraft","iAlchemySkill",oPC);
int iAlchemySkill = GetPersistentInt(oPC,"iAlchemySkill","UOACraft"
);
int iAlchemyChance = iAlchemySkill;
if (iAlchemyChance <350)

View File

@@ -1,13 +1,16 @@
//#include "_persist_01a"
#include "aps_include"
void main()
{
object oPC = GetLastOpenedBy();
//int iSmithSkill = GetTokenPair(oPC,13,4); // Weaponsmith
int iSmithSkill = GetCampaignInt("UOACraft","iSmithSkill",oPC);
int iSmithSkill = GetPersistentInt(oPC,"iSmithSkill","UOACraft"
);
int iSmithChance = iSmithSkill;
//int iArmorSkill = GetTokenPair(oPC,13,5); // ArmorCraft
int iArmorSkill = GetCampaignInt("UOACraft","iArmorSkill",oPC);
int iArmorSkill = GetPersistentInt(oPC,"iArmorSkill","UOACraft"
);
int iArmorChance = iArmorSkill;
int iIngotType = GetLocalInt(oPC,"iUseIngotType");
int iIngotMod = iIngotType*25;

View File

@@ -1,10 +1,12 @@
//#include "_persist_01a"
#include "aps_include"
void main()
{
object oPC = GetLastOpenedBy();
//int iBowSkill = GetTokenPair(oPC,13,3);
int iBowSkill = GetCampaignInt("UOACraft","iBowSkill",oPC);
int iBowSkill = GetPersistentInt(oPC,"iBowSkill","UOACraft"
);
int iBowChance = iBowSkill;
int iWoodType = GetLocalInt(oPC,"iUseThisWood");

View File

@@ -1,8 +1,11 @@
#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 = GetCampaignInt("UOACraft","iBrewSkill",oPC);
int iBrewSkill = GetPersistentInt(oPC,"iBrewSkill","UOACraft"
);
int iBrewChance = iBrewSkill;
if (GetItemPossessedBy(oPC,"NoDrop_SkillLogBook")==OBJECT_INVALID)

View File

@@ -1,10 +1,12 @@
//#include "_persist_01a"
#include "aps_include"
void main()
{
object oPC = GetLastOpenedBy();
//int iCarpentrySkill = GetTokenPair(oPC,13,3);
int iCarpentrySkill = GetCampaignInt("UOACraft","iCarpentrySkill",oPC);
int iCarpentrySkill = GetPersistentInt(oPC,"iCarpentrySkill","UOACraft"
);
int iCarpentryChance = iCarpentrySkill;
int iWoodType = GetLocalInt(oPC,"iUseThisWood");

View File

@@ -1,3 +1,5 @@
#include "aps_include"
void main()
{
object oPC = GetLastOpenedBy();
@@ -5,7 +7,8 @@ void main()
string sTagSelf = GetTag(oSelf);
int iCookType = StringToInt(GetStringRight(sTagSelf,3));
int iCookSkill = GetCampaignInt("UOACraft","iCookSkill",oPC);
int iCookSkill = GetPersistentInt(oPC,"iCookSkill","UOACraft"
);
int iCookChance = iCookSkill;
if (GetItemPossessedBy(oPC,"NoDrop_SkillLogBook")==OBJECT_INVALID)

View File

@@ -0,0 +1,54 @@
void main()
{
// +1 - +14 switches
CreateItemOnObject("flagswitch087",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch088",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch089",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch090",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch091",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch092",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch093",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch180",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch181",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch182",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch183",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch184",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch185",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch186",OBJECT_SELF,1); //enchant item
//elemental damage switches
CreateItemOnObject("flagswitch094",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch095",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch096",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch097",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch098",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch099",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch163",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch164",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch165",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch166",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch172",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch167",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch168",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch169",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch170",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch171",OBJECT_SELF,1); //enchant item
// Search for and destroy any hidden 'body bags' from prior incarnations of this placeable
object oSearchForBag = GetNearestObjectByTag("Body Bag",OBJECT_SELF,1);
if (oSearchForBag == OBJECT_INVALID)return;
object oBagItem = OBJECT_INVALID;
if (GetDistanceToObject(oSearchForBag)<= 0.2)
{
//SendMessageToPC(GetFirstPC(),"Body bag found.. destroying contents..");
oBagItem = GetFirstItemInInventory(oSearchForBag);
while (oBagItem != OBJECT_INVALID)
{
//SendMessageToPC(GetFirstPC(),"Destroying : "+GetName(oBagItem));
DestroyObject(oBagItem);
oBagItem = GetNextItemInInventory(oSearchForBag);
}
DestroyObject(oSearchForBag,1.0);
}
}

View File

@@ -1,10 +1,12 @@
//#include "_persist_01a"
#include "aps_include"
void main()
{
object oPC = GetLastOpenedBy();
//int iJewelSkill = GetTokenPair(oPC,12,4); // JewelCraft
int iJewelSkill = GetCampaignInt("UOACraft","iJewelSkill",oPC);
int iJewelSkill = GetPersistentInt(oPC,"iJewelSkill","UOACraft"
);
int iJewelChance = iJewelSkill;
int iIngotType = GetLocalInt(oPC,"iUseIngotType");

View File

@@ -1,10 +1,12 @@
//#include "_persist_01a"
#include "aps_include"
void main()
{
object oPC = GetLastOpenedBy();
//int iGlassSkill = GetTokenPair(oPC,14,4);
int iGlassSkill = GetCampaignInt("UOACraft","iGlassSkill",oPC);
int iGlassSkill = GetPersistentInt(oPC,"iGlassSkill","UOACraft"
);
int iGlassChance = iGlassSkill;
if (GetItemPossessedBy(oPC,"NoDrop_SkillLogBook")==OBJECT_INVALID)

View File

@@ -1,10 +1,12 @@
//#include "_persist_01a"
#include "aps_include"
void main()
{
object oPC = GetLastOpenedBy();
//int iWoodSkill = GetTokenPair(oPC,13,13);
int iWoodSkill = GetCampaignInt("UOACraft","iPaperSkill",oPC);
int iWoodSkill = GetPersistentInt(oPC,"iPaperSkill","UOACraft"
);
int iWoodChance = iWoodSkill;
if (GetItemPossessedBy(oPC,"NoDrop_SkillLogBook")==OBJECT_INVALID)

View File

@@ -1,10 +1,12 @@
//#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 = GetCampaignInt("UOACraft","iTailorSkill",oPC);
int iTailorSkill = GetPersistentInt(oPC,"iTailorSkill","UOACraft"
);
int iTailorChance = iTailorSkill;
if (GetItemPossessedBy(oPC,"NoDrop_SkillLogBook")==OBJECT_INVALID)

View File

@@ -1,10 +1,12 @@
//#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 = GetCampaignInt("UOACraft","iTailorSkill",oPC);
int iTailorSkill = GetPersistentInt(oPC,"iTailorSkill","UOACraft"
);
int iTailorChance = iTailorSkill;
if (GetItemPossessedBy(oPC,"NoDrop_SkillLogBook")==OBJECT_INVALID)

View File

@@ -1,10 +1,11 @@
//#include "_persist_01a"
#include "aps_include"
void main()
{
object oPC = GetLastOpenedBy();
//int iGlassSkill = GetTokenPair(oPC,14,5);
int iGlassSkill = GetCampaignInt("UOACraft","iTinkerSkill",oPC);
int iGlassSkill = GetPersistentInt(oPC,"iTinkerSkill","UOACraft");
int iGlassChance = iGlassSkill;
if (GetItemPossessedBy(oPC,"NoDrop_SkillLogBook")==OBJECT_INVALID)

View File

@@ -0,0 +1,59 @@
void main()
{
/* CreateItemOnObject("flagswitch064",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch065",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch066",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch067",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch068",OBJECT_SELF,1); //enchant item
*/
CreateItemOnObject("flagswitch069",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch070",OBJECT_SELF,1); //enchant item
//CreateItemOnObject("flagswitch063",OBJECT_SELF,1); //add effect
CreateItemOnObject("flagswitch071",OBJECT_SELF,1); //enchant item
// CreateItemOnObject("flagswitch072",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch073",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch074",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch075",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch076",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch173",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch174",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch175",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch176",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch177",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch178",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch179",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch077",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch078",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch079",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch080",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch081",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch082",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch083",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch084",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch085",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch086",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch157",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch158",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch159",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch160",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch161",OBJECT_SELF,1); //enchant item
CreateItemOnObject("flagswitch162",OBJECT_SELF,1); //enchant item
// Search for and destroy any hidden 'body bags' from prior incarnations of this placeable
object oSearchForBag = GetNearestObjectByTag("Body Bag",OBJECT_SELF,1);
if (oSearchForBag == OBJECT_INVALID)return;
object oBagItem = OBJECT_INVALID;
if (GetDistanceToObject(oSearchForBag)<= 0.2)
{
//SendMessageToPC(GetFirstPC(),"Body bag found.. destroying contents..");
oBagItem = GetFirstItemInInventory(oSearchForBag);
while (oBagItem != OBJECT_INVALID)
{
//SendMessageToPC(GetFirstPC(),"Destroying : "+GetName(oBagItem));
DestroyObject(oBagItem);
oBagItem = GetNextItemInInventory(oSearchForBag);
}
DestroyObject(oSearchForBag,1.0);
}
}

View File

@@ -16,9 +16,7 @@ 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);

View File

@@ -1,4 +1,5 @@
//#include "_persist_01a"
#include "aps_include"
void CreateAnObject(string sResource, object oPC, int iStackSize);
void CreatePlaceable(string sObject, location lPlace, float fDuration);
@@ -37,7 +38,7 @@ void main()
DelayCommand(8.1,SetLocalInt(oPC,"iAmDigging",0));
//int iShroomSkill = GetTokenPair(oPC,12,1);
int iShroomSkill = GetCampaignInt("UOACraft","iShroomSkill",oPC);
int iShroomSkill = GetPersistentInt(oPC,"iShroomSkill","UOACraft");
int iShroomChance = iShroomSkill;
if (iShroomSkill <350)
{
@@ -123,7 +124,7 @@ void main()
DelayCommand(4.5,ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_COM_HIT_FIRE,FALSE),OBJECT_SELF,1.0));
DelayCommand(5.0,ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_COM_HIT_FIRE,FALSE),OBJECT_SELF,1.0));
DelayCommand(3.5,PlaySound(""));
DelayCommand(3.0,FloatingTextStringOnCreature("You have triggered a stag's horn fungus to spew forth its spores!!",oPC,FALSE));
DelayCommand(3.0,FloatingTextStringOnCreature("You have triggered a candlesnuff fungus to spew forth its spores!!",oPC,FALSE));
if (Random(1000)<200) NewShroomPatch(OBJECT_SELF,oPC);
}
break;
@@ -284,7 +285,7 @@ void main()
{
SetLocalInt(OBJECT_SELF,"iTriggered",99);
DelayCommand(3.3,ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_PWSTUN,FALSE),OBJECT_SELF,1.0));
DelayCommand(3.0,FloatingTextStringOnCreature("You have triggered a velvet earth star fungus to spew forth its spores!!",oPC,FALSE));
DelayCommand(3.0,FloatingTextStringOnCreature("You have triggered an earth star fungus to spew forth its spores!!",oPC,FALSE));
if (Random(1000)<200) NewShroomPatch(OBJECT_SELF,oPC);
}
break;
@@ -1007,7 +1008,7 @@ void main()
{
SetLocalInt(OBJECT_SELF,"iTriggered",99);
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_COM_HIT_FROST,FALSE),OBJECT_SELF,1.0));
DelayCommand(3.0,FloatingTextStringOnCreature("You have triggered a spring agaric to spew forth its spores!!",oPC,FALSE));
DelayCommand(3.0,FloatingTextStringOnCreature("You have triggered a spring agaric to spew forth its blinding spores!!",oPC,FALSE));
AssignCommand(oPC,DelayCommand(3.0,DoSavingThrow(oPC,1,20,5,oSelf)));
}
break;
@@ -1170,7 +1171,7 @@ void main()
}
else
{
DelayCommand(8.0,FloatingTextStringOnCreature("You fail to find any mushrooms..",oPC,FALSE));
DelayCommand(8.0,FloatingTextStringOnCreature("You accidentally crush the fungi whilst picking it.",oPC,FALSE));
if (GetLocalInt(OBJECT_SELF,"iAmDestroyed")==99)
{
object oTemp = OBJECT_INVALID;
@@ -1221,7 +1222,7 @@ void main()
if (iShroomSkill <= 1000)
{
//DelayCommand(8.1,SetTokenPair(oPC,12,1,iShroomSkill));
DelayCommand(8.1,SetCampaignInt("UOACraft","iShroomSkill",iShroomSkill,oPC));
DelayCommand(8.1,SetPersistentInt(oPC,"iShroomSkill",iShroomSkill,0,"UOACraft"));
DelayCommand(8.1,SendMessageToPC(oPC,"==================================="));
DelayCommand(8.2,SendMessageToPC(oPC,"Your skill in mycology has gone up!"));
DelayCommand(8.3,SendMessageToPC(oPC,"Current mycology skill : "+ sOldSkill+"%"));

View File

@@ -16,14 +16,14 @@
//by UOAbigail on Aug. 19, 2003
//
//------End comment------
#include "aps_include"
void DelayText(object oPC, int iSkillNumber);
void main()
{
object oPC = OBJECT_SELF;
int iSkillNumber =33;
int iSkillNumber =34;
for (iSkillNumber; iSkillNumber>0; iSkillNumber--)
{
DelayText(oPC,iSkillNumber);
@@ -48,202 +48,208 @@ void DelayText(object oPC, int iSkillNumber)
{
case 1:
{
iSkillValue = GetCampaignInt("UOACraft","iMiningSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iMiningSkill","UOACraft");
sSkillName = "Mining";
break;
}
case 2:
{
iSkillValue = GetCampaignInt("UOACraft","iSmeltSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iSmeltSkill","UOACraft");
sSkillName = "Smelting";
break;
}
case 3:
{
iSkillValue = GetCampaignInt("UOACraft","iDigSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iDigSkill","UOACraft");
sSkillName = "Digging";
break;
}
case 4:
{
iSkillValue = GetCampaignInt("UOACraft","iGlassSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iGlassSkill","UOACraft");
sSkillName = "Pottery and Glassblowing";
break;
}
case 5:
{
iSkillValue = GetCampaignInt("UOACraft","iTinkerSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iTinkerSkill","UOACraft");
sSkillName = "Tinkering";
break;
}
case 6:
{
iSkillValue = GetCampaignInt("UOACraft","iFarmSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iFarmSkill","UOACraft");
sSkillName = "Farming";
break;
}
case 7:
{
iSkillValue = GetCampaignInt("UOACraft","iLumberjackSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iLumberjackSkill","UOACraft");
sSkillName = "Lumberjacking";
break;
}
case 8:
{
iSkillValue = GetCampaignInt("UOACraft","iSkinningSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iSkinningSkill","UOACraft");
sSkillName = "Skinning Pelts";
break;
}
case 9:
{
iSkillValue = GetCampaignInt("UOACraft","iCureSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iCureSkill","UOACraft");
sSkillName = "Curing Hides";
break;
}
case 10:
{
iSkillValue = GetCampaignInt("UOACraft","iTanSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iTanSkill","UOACraft");
sSkillName = "Tanning Leather";
break;
}
case 11:
{
iSkillValue = GetCampaignInt("UOACraft","iLeatherSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iLeatherSkill","UOACraft");
sSkillName = "Leatherworking";
break;
}
case 12:
{
iSkillValue = GetCampaignInt("UOACraft","iAlchemySkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iAlchemySkill","UOACraft");
sSkillName = "Alchemy";
break;
}
case 13:
{
iSkillValue = GetCampaignInt("UOACraft","iFishingSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iFishingSkill","UOACraft");
sSkillName = "Fishing";
break;
}
case 14:
{
iSkillValue = GetCampaignInt("UOACraft","iBeeSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iBeeSkill","UOACraft");
sSkillName = "Beekeeping";
break;
}
case 15:
{
iSkillValue = GetCampaignInt("UOACraft","iFletchingSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iFletchingSkill","UOACraft");
sSkillName = "Fletching";
break;
}
case 16:
{
iSkillValue = GetCampaignInt("UOACraft","iBowSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iBowSkill","UOACraft");
sSkillName = "Bowcraft";
break;
}
case 17:
{
iSkillValue = GetCampaignInt("UOACraft","iSmithSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iSmithSkill","UOACraft");
sSkillName = "Weaponcrafting";
break;
}
case 18:
{
iSkillValue = GetCampaignInt("UOACraft","iArmorSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iArmorSkill","UOACraft");
sSkillName = "Armorcrafting";
break;
}
case 19:
{
iSkillValue = GetCampaignInt("UOACraft","iPolishSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iPolishSkill","UOACraft");
sSkillName = "Gem Polishing";
break;
}
case 20:
{
iSkillValue = GetCampaignInt("UOACraft","iGemSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iGemSkill","UOACraft");
sSkillName = "Gemcutting";
break;
}
case 21:
{
iSkillValue = GetCampaignInt("UOACraft","iGemQuarrySkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iGemQuarrySkill","UOACraft");
sSkillName = "Gem Quarrying";
break;
}
case 22:
{
iSkillValue = GetCampaignInt("UOACraft","iTailorSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iTailorSkill","UOACraft");
sSkillName = "Tailoring";
break;
}
case 23:
{
iSkillValue = GetCampaignInt("UOACraft","iSpindleSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iSpindleSkill","UOACraft");
sSkillName = "Spindling";
break;
}
case 24:
{
iSkillValue = GetCampaignInt("UOACraft","iClothSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iClothSkill","UOACraft");
sSkillName = "Clothmaking";
break;
}
case 25:
{
iSkillValue = GetCampaignInt("UOACraft","iDyeSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iDyeSkill","UOACraft");
sSkillName = "Cloth Dyeing";
break;
}
case 26:
{
iSkillValue = GetCampaignInt("UOACraft","iPaperSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iPaperSkill","UOACraft");
sSkillName = "Papermaking";
break;
}
case 27:
{
iSkillValue = GetCampaignInt("UOACraft","iShroomSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iShroomSkill","UOACraft");
sSkillName = "Mycology";
break;
}
case 28:
{
iSkillValue = GetCampaignInt("UOACraft","iScribeSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iScribeSkill","UOACraft");
sSkillName = "Inscription";
break;
}
case 29:
{
iSkillValue = GetCampaignInt("UOACraft","iCookSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iCookSkill","UOACraft");
sSkillName = "Cooking";
break;
}
case 30:
{
iSkillValue = GetCampaignInt("UOACraft","iJewelSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iJewelSkill","UOACraft");
sSkillName = "Jewelcraft";
break;
}
case 31:
{
iSkillValue = GetCampaignInt("UOACraft","iMapSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iMapSkill","UOACraft");
sSkillName = "Cartography";
break;
}
case 32:
{
iSkillValue = GetCampaignInt("UOACraft","iCarpentrySkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iCarpentrySkill","UOACraft");
sSkillName = "Carpentry";
break;
}
case 33:
{
iSkillValue = GetCampaignInt("UOACraft","iBrewSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iBrewSkill","UOACraft");
sSkillName = "Brewing";
break;
}
case 34:
{
iSkillValue = GetPersistentInt(oPC,"iEnchantSkill","UOACraft");
sSkillName = "Enchanting";
break;
}
default:{return;}
}

View File

@@ -16,7 +16,7 @@
//by UOAbigail on Aug. 19, 2003
//
//------End comment------
#include "aps_include"
void DelayText(object oPC, int iSkillNumber);
@@ -25,7 +25,7 @@ void main()
object oPC = OBJECT_SELF;
object oTarget = GetLocalObject(oPC,"oTarget");
//DeleteLocalObject(oPC,"oTarget");
int iSkillNumber =33;
int iSkillNumber =34;
for (iSkillNumber; iSkillNumber>0; iSkillNumber--)
{
DelayText(oTarget,iSkillNumber);
@@ -52,202 +52,208 @@ void DelayText(object oPC, int iSkillNumber)
{
case 1:
{
iSkillValue = GetCampaignInt("UOACraft","iMiningSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iMiningSkill","UOACraft");
sSkillName = "Miner";
break;
}
case 2:
{
iSkillValue = GetCampaignInt("UOACraft","iSmeltSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iSmeltSkill","UOACraft");
sSkillName = "Smelter";
break;
}
case 3:
{
iSkillValue = GetCampaignInt("UOACraft","iDigSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iDigSkill","UOACraft");
sSkillName = "Digger";
break;
}
case 4:
{
iSkillValue = GetCampaignInt("UOACraft","iGlassSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iGlassSkill","UOACraft");
sSkillName = "Potter/Glassblower";
break;
}
case 5:
{
iSkillValue = GetCampaignInt("UOACraft","iTinkerSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iTinkerSkill","UOACraft");
sSkillName = "Tinkerer";
break;
}
case 6:
{
iSkillValue = GetCampaignInt("UOACraft","iFarmSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iFarmSkill","UOACraft");
sSkillName = "Farmer";
break;
}
case 7:
{
iSkillValue = GetCampaignInt("UOACraft","iLumberjackSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iLumberjackSkill","UOACraft");
sSkillName = "Lumberjack";
break;
}
case 8:
{
iSkillValue = GetCampaignInt("UOACraft","iSkinningSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iSkinningSkill","UOACraft");
sSkillName = "Skinning Pelts";
break;
}
case 9:
{
iSkillValue = GetCampaignInt("UOACraft","iCureSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iCureSkill","UOACraft");
sSkillName = "Hide Curer";
break;
}
case 10:
{
iSkillValue = GetCampaignInt("UOACraft","iTanSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iTanSkill","UOACraft");
sSkillName = "Leather Tanner";
break;
}
case 11:
{
iSkillValue = GetCampaignInt("UOACraft","iLeatherSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iLeatherSkill","UOACraft");
sSkillName = "Leatherworker";
break;
}
case 12:
{
iSkillValue = GetCampaignInt("UOACraft","iAlchemySkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iAlchemySkill","UOACraft");
sSkillName = "Alchemist";
break;
}
case 13:
{
iSkillValue = GetCampaignInt("UOACraft","iFishingSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iFishingSkill","UOACraft");
sSkillName = "Fisher";
break;
}
case 14:
{
iSkillValue = GetCampaignInt("UOACraft","iBeeSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iBeeSkill","UOACraft");
sSkillName = "Beekeeper";
break;
}
case 15:
{
iSkillValue = GetCampaignInt("UOACraft","iFletchingSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iFletchingSkill","UOACraft");
sSkillName = "Fletcher";
break;
}
case 16:
{
iSkillValue = GetCampaignInt("UOACraft","iBowSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iBowSkill","UOACraft");
sSkillName = "Bowcrafter";
break;
}
case 17:
{
iSkillValue = GetCampaignInt("UOACraft","iSmithSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iSmithSkill","UOACraft");
sSkillName = "Weaponcrafter";
break;
}
case 18:
{
iSkillValue = GetCampaignInt("UOACraft","iArmorSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iArmorSkill","UOACraft");
sSkillName = "Armorcrafter";
break;
}
case 19:
{
iSkillValue = GetCampaignInt("UOACraft","iPolishSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iPolishSkill","UOACraft");
sSkillName = "Gem Polisher";
break;
}
case 20:
{
iSkillValue = GetCampaignInt("UOACraft","iGemSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iGemSkill","UOACraft");
sSkillName = "Gemcutter";
break;
}
case 21:
{
iSkillValue = GetCampaignInt("UOACraft","iGemQuarrySkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iGemQuarrySkill","UOACraft");
sSkillName = "Gem Quarrier";
break;
}
case 22:
{
iSkillValue = GetCampaignInt("UOACraft","iTailorSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iTailorSkill","UOACraft");
sSkillName = "Tailor";
break;
}
case 23:
{
iSkillValue = GetCampaignInt("UOACraft","iSpindleSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iSpindleSkill","UOACraft");
sSkillName = "Spindler";
break;
}
case 24:
{
iSkillValue = GetCampaignInt("UOACraft","iClothSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iClothSkill","UOACraft");
sSkillName = "Clothmaker";
break;
}
case 25:
{
iSkillValue = GetCampaignInt("UOACraft","iDyeSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iDyeSkill","UOACraft");
sSkillName = "Cloth Dyer";
break;
}
case 26:
{
iSkillValue = GetCampaignInt("UOACraft","iPaperSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iPaperSkill","UOACraft");
sSkillName = "Papermaker";
break;
}
case 27:
{
iSkillValue = GetCampaignInt("UOACraft","iShroomSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iShroomSkill","UOACraft");
sSkillName = "Mycologist";
break;
}
case 28:
{
iSkillValue = GetCampaignInt("UOACraft","iScribeSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iScribeSkill","UOACraft");
sSkillName = "Inscriptionist";
break;
}
case 29:
{
iSkillValue = GetCampaignInt("UOACraft","iCookSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iCookSkill","UOACraft");
sSkillName = "Cook";
break;
}
case 30:
{
iSkillValue = GetCampaignInt("UOACraft","iJewelSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iJewelSkill","UOACraft");
sSkillName = "Jewelcrafter";
break;
}
case 31:
{
iSkillValue = GetCampaignInt("UOACraft","iMapSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iMapSkill","UOACraft");
sSkillName = "Cartographer";
break;
}
case 32:
{
iSkillValue = GetCampaignInt("UOACraft","iCarpentrySkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iCarpentrySkill","UOACraft");
sSkillName = "Carpenter";
break;
}
case 33:
{
iSkillValue = GetCampaignInt("UOACraft","iBrewSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iBrewSkill","UOACraft");
sSkillName = "Brewmeister";
break;
}
case 34:
{
iSkillValue = GetPersistentInt(oPC,"iEnchantSkill","UOACraft");
sSkillName = "Enchanting";
break;
}
default:{return;}
}

View File

@@ -16,7 +16,7 @@
//by UOAbigail on Aug. 19, 2003
//
//------End comment------
#include "aps_include"
void DelayText(object oPC, int iSkillNumber);
void DelayText2(object oPC, int iSkillNumber);
@@ -25,7 +25,7 @@ void main()
{
object oPC = OBJECT_SELF;
object oTarget = GetLocalObject(oPC,"oTarget");
int iSkillNumber =33;
int iSkillNumber =34;
for (iSkillNumber; iSkillNumber>0; iSkillNumber--)
{
if (oTarget==OBJECT_INVALID)DelayText(oPC,iSkillNumber);
@@ -49,202 +49,224 @@ void DelayText(object oPC, int iSkillNumber)
{
case 1:
{
iSkillValue = GetCampaignInt("UOACraft","iMiningSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iMiningSkill","UOACraft");
sSkillName = "Mining";
break;
}
case 2:
{
iSkillValue = GetCampaignInt("UOACraft","iSmeltSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iSmeltSkill","UOACraft");
sSkillName = "Smelting";
break;
}
case 3:
{
iSkillValue = GetCampaignInt("UOACraft","iDigSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iDigSkill","UOACraft");
sSkillName = "Digging";
break;
}
case 4:
{
iSkillValue = GetCampaignInt("UOACraft","iGlassSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iGlassSkill","UOACraft");
sSkillName = "Pottery and Glassblowing";
break;
}
case 5:
{
iSkillValue = GetCampaignInt("UOACraft","iTinkerSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iTinkerSkill","UOACraft");
sSkillName = "Tinkering";
break;
}
case 6:
{
iSkillValue = GetCampaignInt("UOACraft","iFarmSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iFarmSkill","UOACraft");
sSkillName = "Farming";
break;
}
case 7:
{
iSkillValue = GetCampaignInt("UOACraft","iLumberjackSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iLumberjackSkill","UOACraft");
sSkillName = "Lumberjacking";
break;
}
case 8:
{
iSkillValue = GetCampaignInt("UOACraft","iSkinningSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iSkinningSkill","UOACraft");
sSkillName = "Skinning Pelts";
break;
}
case 9:
{
iSkillValue = GetCampaignInt("UOACraft","iCureSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iCureSkill","UOACraft");
sSkillName = "Curing Hides";
break;
}
case 10:
{
iSkillValue = GetCampaignInt("UOACraft","iTanSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iTanSkill","UOACraft");
sSkillName = "Tanning Leather";
break;
}
case 11:
{
iSkillValue = GetCampaignInt("UOACraft","iLeatherSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iLeatherSkill","UOACraft");
sSkillName = "Leatherworking";
break;
}
case 12:
{
iSkillValue = GetCampaignInt("UOACraft","iAlchemySkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iAlchemySkill","UOACraft");
sSkillName = "Alchemy";
break;
}
case 13:
{
iSkillValue = GetCampaignInt("UOACraft","iFishingSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iFishingSkill","UOACraft");
sSkillName = "Fishing";
break;
}
case 14:
{
iSkillValue = GetCampaignInt("UOACraft","iBeeSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iBeeSkill","UOACraft");
sSkillName = "Beekeeping";
break;
}
case 15:
{
iSkillValue = GetCampaignInt("UOACraft","iFletchingSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iFletchingSkill","UOACraft");
sSkillName = "Fletching";
break;
}
case 16:
{
iSkillValue = GetCampaignInt("UOACraft","iBowSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iBowSkill","UOACraft");
sSkillName = "Bowcraft";
break;
}
case 17:
{
iSkillValue = GetCampaignInt("UOACraft","iSmithSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iSmithSkill","UOACraft");
sSkillName = "Weaponcrafting";
break;
}
case 18:
{
iSkillValue = GetCampaignInt("UOACraft","iArmorSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iArmorSkill","UOACraft");
sSkillName = "Armorcrafting";
break;
}
case 19:
{
iSkillValue = GetCampaignInt("UOACraft","iPolishSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iPolishSkill","UOACraft"
);
sSkillName = "Gem Polishing";
break;
}
case 20:
{
iSkillValue = GetCampaignInt("UOACraft","iGemSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iGemSkill","UOACraft"
);
sSkillName = "Gemcutting";
break;
}
case 21:
{
iSkillValue = GetCampaignInt("UOACraft","iGemQuarrySkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iGemQuarrySkill","UOACraft"
);
sSkillName = "Gem Quarrying";
break;
}
case 22:
{
iSkillValue = GetCampaignInt("UOACraft","iTailorSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iTailorSkill","UOACraft"
);
sSkillName = "Tailoring";
break;
}
case 23:
{
iSkillValue = GetCampaignInt("UOACraft","iSpindleSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iSpindleSkill","UOACraft"
);
sSkillName = "Spindling";
break;
}
case 24:
{
iSkillValue = GetCampaignInt("UOACraft","iClothSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iClothSkill","UOACraft"
);
sSkillName = "Clothmaking";
break;
}
case 25:
{
iSkillValue = GetCampaignInt("UOACraft","iDyeSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iDyeSkill","UOACraft"
);
sSkillName = "Cloth Dyeing";
break;
}
case 26:
{
iSkillValue = GetCampaignInt("UOACraft","iPaperSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iPaperSkill","UOACraft"
);
sSkillName = "Papermaking";
break;
}
case 27:
{
iSkillValue = GetCampaignInt("UOACraft","iShroomSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iShroomSkill","UOACraft"
);
sSkillName = "Mycology";
break;
}
case 28:
{
iSkillValue = GetCampaignInt("UOACraft","iScribeSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iScribeSkill","UOACraft"
);
sSkillName = "Inscription";
break;
}
case 29:
{
iSkillValue = GetCampaignInt("UOACraft","iCookSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iCookSkill","UOACraft"
);
sSkillName = "Cooking";
break;
}
case 30:
{
iSkillValue = GetCampaignInt("UOACraft","iJewelSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iJewelSkill","UOACraft"
);
sSkillName = "Jewelcraft";
break;
}
case 31:
{
iSkillValue = GetCampaignInt("UOACraft","iMapSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iMapSkill","UOACraft"
);
sSkillName = "Cartography";
break;
}
case 32:
{
iSkillValue = GetCampaignInt("UOACraft","iCarpentrySkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iCarpentrySkill","UOACraft"
);
sSkillName = "Carpentry";
break;
}
case 33:
{
iSkillValue = GetCampaignInt("UOACraft","iBrewSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iBrewSkill","UOACraft"
);
sSkillName = "Brewing";
break;
}
case 34:
{
iSkillValue = GetPersistentInt(oPC,"iEnchantSkill","UOACraft"
);
sSkillName = "Enchanting";
break;
}
default:{return;}
}
@@ -289,202 +311,242 @@ void DelayText2(object oPC, int iSkillNumber)
{
case 1:
{
iSkillValue = GetCampaignInt("UOACraft","iMiningSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iMiningSkill","UOACraft"
);
sSkillName = "Mining";
break;
}
case 2:
{
iSkillValue = GetCampaignInt("UOACraft","iSmeltSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iSmeltSkill","UOACraft"
);
sSkillName = "Smelting";
break;
}
case 3:
{
iSkillValue = GetCampaignInt("UOACraft","iDigSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iDigSkill","UOACraft"
);
sSkillName = "Digging";
break;
}
case 4:
{
iSkillValue = GetCampaignInt("UOACraft","iGlassSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iGlassSkill","UOACraft"
);
sSkillName = "Pottery and Glassblowing";
break;
}
case 5:
{
iSkillValue = GetCampaignInt("UOACraft","iTinkerSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iTinkerSkill","UOACraft"
);
sSkillName = "Tinkering";
break;
}
case 6:
{
iSkillValue = GetCampaignInt("UOACraft","iFarmSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iFarmSkill","UOACraft"
);
sSkillName = "Farming";
break;
}
case 7:
{
iSkillValue = GetCampaignInt("UOACraft","iLumberjackSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iLumberjackSkill","UOACraft"
);
sSkillName = "Lumberjacking";
break;
}
case 8:
{
iSkillValue = GetCampaignInt("UOACraft","iSkinningSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iSkinningSkill","UOACraft"
);
sSkillName = "Skinning Pelts";
break;
}
case 9:
{
iSkillValue = GetCampaignInt("UOACraft","iCureSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iCureSkill","UOACraft"
);
sSkillName = "Curing Hides";
break;
}
case 10:
{
iSkillValue = GetCampaignInt("UOACraft","iTanSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iTanSkill","UOACraft"
);
sSkillName = "Tanning Leather";
break;
}
case 11:
{
iSkillValue = GetCampaignInt("UOACraft","iLeatherSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iLeatherSkill","UOACraft"
);
sSkillName = "Leatherworking";
break;
}
case 12:
{
iSkillValue = GetCampaignInt("UOACraft","iAlchemySkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iAlchemySkill","UOACraft"
);
sSkillName = "Alchemy";
break;
}
case 13:
{
iSkillValue = GetCampaignInt("UOACraft","iFishingSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iFishingSkill","UOACraft"
);
sSkillName = "Fishing";
break;
}
case 14:
{
iSkillValue = GetCampaignInt("UOACraft","iBeeSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iBeeSkill","UOACraft"
);
sSkillName = "Beekeeping";
break;
}
case 15:
{
iSkillValue = GetCampaignInt("UOACraft","iFletchingSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iFletchingSkill","UOACraft"
);
sSkillName = "Fletching";
break;
}
case 16:
{
iSkillValue = GetCampaignInt("UOACraft","iBowSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iBowSkill","UOACraft"
);
sSkillName = "Bowcraft";
break;
}
case 17:
{
iSkillValue = GetCampaignInt("UOACraft","iSmithSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iSmithSkill","UOACraft"
);
sSkillName = "Weaponcrafting";
break;
}
case 18:
{
iSkillValue = GetCampaignInt("UOACraft","iArmorSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iArmorSkill","UOACraft"
);
sSkillName = "Armorcrafting";
break;
}
case 19:
{
iSkillValue = GetCampaignInt("UOACraft","iPolishSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iPolishSkill","UOACraft"
);
sSkillName = "Gem Polishing";
break;
}
case 20:
{
iSkillValue = GetCampaignInt("UOACraft","iGemSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iGemSkill","UOACraft"
);
sSkillName = "Gemcutting";
break;
}
case 21:
{
iSkillValue = GetCampaignInt("UOACraft","iGemQuarrySkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iGemQuarrySkill","UOACraft"
);
sSkillName = "Gem Quarrying";
break;
}
case 22:
{
iSkillValue = GetCampaignInt("UOACraft","iTailorSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iTailorSkill","UOACraft"
);
sSkillName = "Tailoring";
break;
}
case 23:
{
iSkillValue = GetCampaignInt("UOACraft","iSpindleSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iSpindleSkill","UOACraft"
);
sSkillName = "Spindling";
break;
}
case 24:
{
iSkillValue = GetCampaignInt("UOACraft","iClothSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iClothSkill","UOACraft"
);
sSkillName = "Clothmaking";
break;
}
case 25:
{
iSkillValue = GetCampaignInt("UOACraft","iDyeSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iDyeSkill","UOACraft"
);
sSkillName = "Cloth Dyeing";
break;
}
case 26:
{
iSkillValue = GetCampaignInt("UOACraft","iPaperSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iPaperSkill","UOACraft"
);
sSkillName = "Papermaking";
break;
}
case 27:
{
iSkillValue = GetCampaignInt("UOACraft","iShroomSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iShroomSkill","UOACraft"
);
sSkillName = "Mycology";
break;
}
case 28:
{
iSkillValue = GetCampaignInt("UOACraft","iScribeSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iScribeSkill","UOACraft"
);
sSkillName = "Inscription";
break;
}
case 29:
{
iSkillValue = GetCampaignInt("UOACraft","iCookSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iCookSkill","UOACraft"
);
sSkillName = "Cooking";
break;
}
case 30:
{
iSkillValue = GetCampaignInt("UOACraft","iJewelSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iJewelSkill","UOACraft"
);
sSkillName = "Jewelcraft";
break;
}
case 31:
{
iSkillValue = GetCampaignInt("UOACraft","iMapSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iMapSkill","UOACraft"
);
sSkillName = "Cartography";
break;
}
case 32:
{
iSkillValue = GetCampaignInt("UOACraft","iCarpentrySkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iCarpentrySkill","UOACraft"
);
sSkillName = "Carpentry";
break;
}
case 33:
{
iSkillValue = GetCampaignInt("UOACraft","iBrewSkill",oPC);
iSkillValue = GetPersistentInt(oPC,"iBrewSkill","UOACraft"
);
sSkillName = "Brewmeister";
break;
}
case 34:
{
iSkillValue = GetPersistentInt(oPC,"iEnchantSkill","UOACraft"
);
sSkillName = "Enchanter";
break;
}
default:{return;}
}

View File

@@ -31,6 +31,6 @@ void main()
void ItemCreate(object oPC)
{
object oWater = CreateItemOnObject("item002",oPC,1);
SetLocalInt(oPC,"iWaterFull",5);
SetLocalInt(oPC,"iWaterFull",100);
return;
}

693
_module/nss/aps_include.nss Normal file
View File

@@ -0,0 +1,693 @@
// Name : Avlis Persistence System include
// Purpose : Various APS/NWNX2 related functions
// Authors : Ingmar Stieger, Adam Colon, Josh Simon
// Modified : January 1st, 2005
// This file is licensed under the terms of the
// GNU GENERAL PUBLIC LICENSE (GPL) Version 2
/************************************/
/* Return codes */
/************************************/
const int SQL_ERROR = 0;
const int SQL_SUCCESS = 1;
/************************************/
/* Function prototypes */
/************************************/
// Setup placeholders for ODBC requests and responses
void SQLInit();
// Execute statement in sSQL
void SQLExecDirect(string sSQL);
// Position cursor on next row of the resultset
// Call this before using SQLGetData().
// returns: SQL_SUCCESS if there is a row
// SQL_ERROR if there are no more rows
int SQLFetch();
// * deprecated. Use SQLFetch instead.
// Position cursor on first row of the resultset and name it sResultSetName
// Call this before using SQLNextRow() and SQLGetData().
// returns: SQL_SUCCESS if result set is not empty
// SQL_ERROR is result set is empty
int SQLFirstRow();
// * deprecated. Use SQLFetch instead.
// Position cursor on next row of the result set sResultSetName
// returns: SQL_SUCCESS if cursor could be advanced to next row
// SQL_ERROR if there was no next row
int SQLNextRow();
// Return value of column iCol in the current row of result set sResultSetName
string SQLGetData(int iCol);
// Return a string value when given a location
string APSLocationToString(location lLocation);
// Return a location value when given the string form of the location
location APSStringToLocation(string sLocation);
// Return a string value when given a vector
string APSVectorToString(vector vVector);
// Return a vector value when given the string form of the vector
vector APSStringToVector(string sVector);
// Set oObject's persistent string variable sVarName to sValue
// Optional parameters:
// iExpiration: Number of days the persistent variable should be kept in database (default: 0=forever)
// sTable: Name of the table where variable should be stored (default: pwdata)
void SetPersistentString(object oObject, string sVarName, string sValue, int iExpiration =
0, string sTable = "pwdata");
// Set oObject's persistent integer variable sVarName to iValue
// Optional parameters:
// iExpiration: Number of days the persistent variable should be kept in database (default: 0=forever)
// sTable: Name of the table where variable should be stored (default: pwdata)
void SetPersistentInt(object oObject, string sVarName, int iValue, int iExpiration =
0, string sTable = "pwdata");
// Set oObject's persistent float variable sVarName to fValue
// Optional parameters:
// iExpiration: Number of days the persistent variable should be kept in database (default: 0=forever)
// sTable: Name of the table where variable should be stored (default: pwdata)
void SetPersistentFloat(object oObject, string sVarName, float fValue, int iExpiration =
0, string sTable = "pwdata");
// Set oObject's persistent location variable sVarName to lLocation
// Optional parameters:
// iExpiration: Number of days the persistent variable should be kept in database (default: 0=forever)
// sTable: Name of the table where variable should be stored (default: pwdata)
// This function converts location to a string for storage in the database.
void SetPersistentLocation(object oObject, string sVarName, location lLocation, int iExpiration =
0, string sTable = "pwdata");
// Set oObject's persistent vector variable sVarName to vVector
// Optional parameters:
// iExpiration: Number of days the persistent variable should be kept in database (default: 0=forever)
// sTable: Name of the table where variable should be stored (default: pwdata)
// This function converts vector to a string for storage in the database.
void SetPersistentVector(object oObject, string sVarName, vector vVector, int iExpiration =
0, string sTable = "pwdata");
// Set oObject's persistent object with sVarName to sValue
// Optional parameters:
// iExpiration: Number of days the persistent variable should be kept in database (default: 0=forever)
// sTable: Name of the table where variable should be stored (default: pwobjdata)
void SetPersistentObject(object oObject, string sVarName, object oObject2, int iExpiration =
0, string sTable = "pwobjdata");
// Get oObject's persistent string variable sVarName
// Optional parameters:
// sTable: Name of the table where variable is stored (default: pwdata)
// * Return value on error: ""
string GetPersistentString(object oObject, string sVarName, string sTable = "pwdata");
// Get oObject's persistent integer variable sVarName
// Optional parameters:
// sTable: Name of the table where variable is stored (default: pwdata)
// * Return value on error: 0
int GetPersistentInt(object oObject, string sVarName, string sTable = "pwdata");
// Get oObject's persistent float variable sVarName
// Optional parameters:
// sTable: Name of the table where variable is stored (default: pwdata)
// * Return value on error: 0
float GetPersistentFloat(object oObject, string sVarName, string sTable = "pwdata");
// Get oObject's persistent location variable sVarName
// Optional parameters:
// sTable: Name of the table where variable is stored (default: pwdata)
// * Return value on error: 0
location GetPersistentLocation(object oObject, string sVarname, string sTable = "pwdata");
// Get oObject's persistent vector variable sVarName
// Optional parameters:
// sTable: Name of the table where variable is stored (default: pwdata)
// * Return value on error: 0
vector GetPersistentVector(object oObject, string sVarName, string sTable = "pwdata");
// Get oObject's persistent object sVarName
// Optional parameters:
// sTable: Name of the table where object is stored (default: pwobjdata)
// * Return value on error: 0
object GetPersistentObject(object oObject, string sVarName, object oOwner = OBJECT_INVALID, string sTable = "pwobjdata");
// Delete persistent variable sVarName stored on oObject
// Optional parameters:
// sTable: Name of the table where variable is stored (default: pwdata)
void DeletePersistentVariable(object oObject, string sVarName, string sTable = "pwdata");
// (private function) Replace special character ' with ~
string SQLEncodeSpecialChars(string sString);
// (private function)Replace special character ' with ~
string SQLDecodeSpecialChars(string sString);
/************************************/
/* Implementation */
/************************************/
// Functions for initializing APS and working with result sets
void SQLInit()
{
int i;
// Placeholder for ODBC persistence
string sMemory;
for (i = 0; i < 8; i++) // reserve 8*128 bytes
sMemory +=
"................................................................................................................................";
SetLocalString(GetModule(), "NWNX!ODBC!SPACER", sMemory);
}
void SQLExecDirect(string sSQL)
{
SetLocalString(GetModule(), "NWNX!ODBC!EXEC", sSQL);
}
int SQLFetch()
{
string sRow;
object oModule = GetModule();
SetLocalString(oModule, "NWNX!ODBC!FETCH", GetLocalString(oModule, "NWNX!ODBC!SPACER"));
sRow = GetLocalString(oModule, "NWNX!ODBC!FETCH");
if (GetStringLength(sRow) > 0)
{
SetLocalString(oModule, "NWNX_ODBC_CurrentRow", sRow);
return SQL_SUCCESS;
}
else
{
SetLocalString(oModule, "NWNX_ODBC_CurrentRow", "");
return SQL_ERROR;
}
}
// deprecated. use SQLFetch().
int SQLFirstRow()
{
return SQLFetch();
}
// deprecated. use SQLFetch().
int SQLNextRow()
{
return SQLFetch();
}
string SQLGetData(int iCol)
{
int iPos;
string sResultSet = GetLocalString(GetModule(), "NWNX_ODBC_CurrentRow");
// find column in current row
int iCount = 0;
string sColValue = "";
iPos = FindSubString(sResultSet, "<22>");
if ((iPos == -1) && (iCol == 1))
{
// only one column, return value immediately
sColValue = sResultSet;
}
else if (iPos == -1)
{
// only one column but requested column > 1
sColValue = "";
}
else
{
// loop through columns until found
while (iCount != iCol)
{
iCount++;
if (iCount == iCol)
sColValue = GetStringLeft(sResultSet, iPos);
else
{
sResultSet = GetStringRight(sResultSet, GetStringLength(sResultSet) - iPos - 1);
iPos = FindSubString(sResultSet, "<22>");
}
// special case: last column in row
if (iPos == -1)
iPos = GetStringLength(sResultSet);
}
}
return sColValue;
}
// These functions deal with various data types. Ultimately, all information
// must be stored in the database as strings, and converted back to the proper
// form when retrieved.
string APSVectorToString(vector vVector)
{
return "#POSITION_X#" + FloatToString(vVector.x) + "#POSITION_Y#" + FloatToString(vVector.y) +
"#POSITION_Z#" + FloatToString(vVector.z) + "#END#";
}
vector APSStringToVector(string sVector)
{
float fX, fY, fZ;
int iPos, iCount;
int iLen = GetStringLength(sVector);
if (iLen > 0)
{
iPos = FindSubString(sVector, "#POSITION_X#") + 12;
iCount = FindSubString(GetSubString(sVector, iPos, iLen - iPos), "#");
fX = StringToFloat(GetSubString(sVector, iPos, iCount));
iPos = FindSubString(sVector, "#POSITION_Y#") + 12;
iCount = FindSubString(GetSubString(sVector, iPos, iLen - iPos), "#");
fY = StringToFloat(GetSubString(sVector, iPos, iCount));
iPos = FindSubString(sVector, "#POSITION_Z#") + 12;
iCount = FindSubString(GetSubString(sVector, iPos, iLen - iPos), "#");
fZ = StringToFloat(GetSubString(sVector, iPos, iCount));
}
return Vector(fX, fY, fZ);
}
string APSLocationToString(location lLocation)
{
object oArea = GetAreaFromLocation(lLocation);
vector vPosition = GetPositionFromLocation(lLocation);
float fOrientation = GetFacingFromLocation(lLocation);
string sReturnValue;
if (GetIsObjectValid(oArea))
sReturnValue =
"#AREA#" + GetTag(oArea) + "#POSITION_X#" + FloatToString(vPosition.x) +
"#POSITION_Y#" + FloatToString(vPosition.y) + "#POSITION_Z#" +
FloatToString(vPosition.z) + "#ORIENTATION#" + FloatToString(fOrientation) + "#END#";
return sReturnValue;
}
location APSStringToLocation(string sLocation)
{
location lReturnValue;
object oArea;
vector vPosition;
float fOrientation, fX, fY, fZ;
int iPos, iCount;
int iLen = GetStringLength(sLocation);
if (iLen > 0)
{
iPos = FindSubString(sLocation, "#AREA#") + 6;
iCount = FindSubString(GetSubString(sLocation, iPos, iLen - iPos), "#");
oArea = GetObjectByTag(GetSubString(sLocation, iPos, iCount));
iPos = FindSubString(sLocation, "#POSITION_X#") + 12;
iCount = FindSubString(GetSubString(sLocation, iPos, iLen - iPos), "#");
fX = StringToFloat(GetSubString(sLocation, iPos, iCount));
iPos = FindSubString(sLocation, "#POSITION_Y#") + 12;
iCount = FindSubString(GetSubString(sLocation, iPos, iLen - iPos), "#");
fY = StringToFloat(GetSubString(sLocation, iPos, iCount));
iPos = FindSubString(sLocation, "#POSITION_Z#") + 12;
iCount = FindSubString(GetSubString(sLocation, iPos, iLen - iPos), "#");
fZ = StringToFloat(GetSubString(sLocation, iPos, iCount));
vPosition = Vector(fX, fY, fZ);
iPos = FindSubString(sLocation, "#ORIENTATION#") + 13;
iCount = FindSubString(GetSubString(sLocation, iPos, iLen - iPos), "#");
fOrientation = StringToFloat(GetSubString(sLocation, iPos, iCount));
lReturnValue = Location(oArea, vPosition, fOrientation);
}
return lReturnValue;
}
// These functions are responsible for transporting the various data types back
// and forth to the database.
void SetPersistentString(object oObject, string sVarName, string sValue, int iExpiration =
0, string sTable = "pwdata")
{
string sPlayer;
string sTag;
if (GetIsPC(oObject))
{
sPlayer = SQLEncodeSpecialChars(GetPCPlayerName(oObject));
sTag = SQLEncodeSpecialChars(GetName(oObject));
}
else
{
sPlayer = "~";
sTag = GetTag(oObject);
}
sVarName = SQLEncodeSpecialChars(sVarName);
sValue = SQLEncodeSpecialChars(sValue);
string sSQL = "SELECT player FROM " + sTable + " WHERE player='" + sPlayer +
"' AND tag='" + sTag + "' AND name='" + sVarName + "'";
SQLExecDirect(sSQL);
if (SQLFetch() == SQL_SUCCESS)
{
// row exists
sSQL = "UPDATE " + sTable + " SET val='" + sValue +
"',expire=" + IntToString(iExpiration) + " WHERE player='" + sPlayer +
"' AND tag='" + sTag + "' AND name='" + sVarName + "'";
SQLExecDirect(sSQL);
}
else
{
// row doesn't exist
sSQL = "INSERT INTO " + sTable + " (player,tag,name,val,expire) VALUES" +
"('" + sPlayer + "','" + sTag + "','" + sVarName + "','" +
sValue + "'," + IntToString(iExpiration) + ")";
SQLExecDirect(sSQL);
}
}
string GetPersistentString(object oObject, string sVarName, string sTable = "pwdata")
{
string sPlayer;
string sTag;
if (GetIsPC(oObject))
{
sPlayer = SQLEncodeSpecialChars(GetPCPlayerName(oObject));
sTag = SQLEncodeSpecialChars(GetName(oObject));
}
else
{
sPlayer = "~";
sTag = GetTag(oObject);
}
sVarName = SQLEncodeSpecialChars(sVarName);
string sSQL = "SELECT val FROM " + sTable + " WHERE player='" + sPlayer +
"' AND tag='" + sTag + "' AND name='" + sVarName + "'";
SQLExecDirect(sSQL);
if (SQLFetch() == SQL_SUCCESS)
return SQLDecodeSpecialChars(SQLGetData(1));
else
{
return "";
// If you want to convert your existing persistent data to APS, this
// would be the place to do it. The requested variable was not found
// in the database, you should
// 1) query it's value using your existing persistence functions
// 2) save the value to the database using SetPersistentString()
// 3) return the string value here.
}
}
void SetPersistentInt(object oObject, string sVarName, int iValue, int iExpiration =
0, string sTable = "pwdata")
{
SetPersistentString(oObject, sVarName, IntToString(iValue), iExpiration, sTable);
}
int GetPersistentInt(object oObject, string sVarName, string sTable = "pwdata")
{
string sPlayer;
string sTag;
object oModule;
if (GetIsPC(oObject))
{
sPlayer = SQLEncodeSpecialChars(GetPCPlayerName(oObject));
sTag = SQLEncodeSpecialChars(GetName(oObject));
}
else
{
sPlayer = "~";
sTag = GetTag(oObject);
}
sVarName = SQLEncodeSpecialChars(sVarName);
string sSQL = "SELECT val FROM " + sTable + " WHERE player='" + sPlayer +
"' AND tag='" + sTag + "' AND name='" + sVarName + "'";
SQLExecDirect(sSQL);
oModule = GetModule();
SetLocalString(oModule, "NWNX!ODBC!FETCH", "-2147483647");
return StringToInt(GetLocalString(oModule, "NWNX!ODBC!FETCH"));
}
void SetPersistentFloat(object oObject, string sVarName, float fValue, int iExpiration =
0, string sTable = "pwdata")
{
SetPersistentString(oObject, sVarName, FloatToString(fValue), iExpiration, sTable);
}
float GetPersistentFloat(object oObject, string sVarName, string sTable = "pwdata")
{
string sPlayer;
string sTag;
object oModule;
if (GetIsPC(oObject))
{
sPlayer = SQLEncodeSpecialChars(GetPCPlayerName(oObject));
sTag = SQLEncodeSpecialChars(GetName(oObject));
}
else
{
sPlayer = "~";
sTag = GetTag(oObject);
}
sVarName = SQLEncodeSpecialChars(sVarName);
string sSQL = "SELECT val FROM " + sTable + " WHERE player='" + sPlayer +
"' AND tag='" + sTag + "' AND name='" + sVarName + "'";
SQLExecDirect(sSQL);
oModule = GetModule();
SetLocalString(oModule, "NWNX!ODBC!FETCH", "-340282306073709650000000000000000000000.000000000");
return StringToFloat(GetLocalString(oModule, "NWNX!ODBC!FETCH"));
}
void SetPersistentLocation(object oObject, string sVarName, location lLocation, int iExpiration =
0, string sTable = "pwdata")
{
SetPersistentString(oObject, sVarName, APSLocationToString(lLocation), iExpiration, sTable);
}
location GetPersistentLocation(object oObject, string sVarName, string sTable = "pwdata")
{
return APSStringToLocation(GetPersistentString(oObject, sVarName, sTable));
}
void SetPersistentVector(object oObject, string sVarName, vector vVector, int iExpiration =
0, string sTable = "pwdata")
{
SetPersistentString(oObject, sVarName, APSVectorToString(vVector), iExpiration, sTable);
}
vector GetPersistentVector(object oObject, string sVarName, string sTable = "pwdata")
{
return APSStringToVector(GetPersistentString(oObject, sVarName, sTable));
}
void SetPersistentObject(object oOwner, string sVarName, object oObject, int iExpiration =
0, string sTable = "pwobjdata")
{
string sPlayer;
string sTag;
if (GetIsPC(oOwner))
{
sPlayer = SQLEncodeSpecialChars(GetPCPlayerName(oOwner));
sTag = SQLEncodeSpecialChars(GetName(oOwner));
}
else
{
sPlayer = "~";
sTag = GetTag(oOwner);
}
sVarName = SQLEncodeSpecialChars(sVarName);
string sSQL = "SELECT player FROM " + sTable + " WHERE player='" + sPlayer +
"' AND tag='" + sTag + "' AND name='" + sVarName + "'";
SQLExecDirect(sSQL);
if (SQLFetch() == SQL_SUCCESS)
{
// row exists
sSQL = "UPDATE " + sTable + " SET val=%s,expire=" + IntToString(iExpiration) +
" WHERE player='" + sPlayer + "' AND tag='" + sTag + "' AND name='" + sVarName + "'";
SetLocalString(GetModule(), "NWNX!ODBC!SETSCORCOSQL", sSQL);
StoreCampaignObject ("NWNX", "-", oObject);
}
else
{
// row doesn't exist
sSQL = "INSERT INTO " + sTable + " (player,tag,name,val,expire) VALUES" +
"('" + sPlayer + "','" + sTag + "','" + sVarName + "',%s," + IntToString(iExpiration) + ")";
SetLocalString(GetModule(), "NWNX!ODBC!SETSCORCOSQL", sSQL);
StoreCampaignObject ("NWNX", "-", oObject);
}
}
object GetPersistentObject(object oObject, string sVarName, object oOwner = OBJECT_INVALID, string sTable = "pwobjdata")
{
string sPlayer;
string sTag;
object oModule;
if (GetIsPC(oObject))
{
sPlayer = SQLEncodeSpecialChars(GetPCPlayerName(oObject));
sTag = SQLEncodeSpecialChars(GetName(oObject));
}
else
{
sPlayer = "~";
sTag = GetTag(oObject);
}
sVarName = SQLEncodeSpecialChars(sVarName);
string sSQL = "SELECT val FROM " + sTable + " WHERE player='" + sPlayer +
"' AND tag='" + sTag + "' AND name='" + sVarName + "'";
SetLocalString(GetModule(), "NWNX!ODBC!SETSCORCOSQL", sSQL);
if (!GetIsObjectValid(oOwner))
oOwner = oObject;
return RetrieveCampaignObject ("NWNX", "-", GetLocation(oOwner), oOwner);
}
void DeletePersistentVariable(object oObject, string sVarName, string sTable = "pwdata")
{
string sPlayer;
string sTag;
if (GetIsPC(oObject))
{
sPlayer = SQLEncodeSpecialChars(GetPCPlayerName(oObject));
sTag = SQLEncodeSpecialChars(GetName(oObject));
}
else
{
sPlayer = "~";
sTag = GetTag(oObject);
}
sVarName = SQLEncodeSpecialChars(sVarName);
string sSQL = "DELETE FROM " + sTable + " WHERE player='" + sPlayer +
"' AND tag='" + sTag + "' AND name='" + sVarName + "'";
SQLExecDirect(sSQL);
}
// Problems can arise with SQL commands if variables or values have single quotes
// in their names. These functions are a replace these quote with the tilde character
string SQLEncodeSpecialChars(string sString)
{
if (FindSubString(sString, "'") == -1) // not found
return sString;
int i;
string sReturn = "";
string sChar;
// Loop over every character and replace special characters
for (i = 0; i < GetStringLength(sString); i++)
{
sChar = GetSubString(sString, i, 1);
if (sChar == "'")
sReturn += "~";
else
sReturn += sChar;
}
return sReturn;
}
string SQLDecodeSpecialChars(string sString)
{
if (FindSubString(sString, "~") == -1) // not found
return sString;
int i;
string sReturn = "";
string sChar;
// Loop over every character and replace special characters
for (i = 0; i < GetStringLength(sString); i++)
{
sChar = GetSubString(sString, i, 1);
if (sChar == "~")
sReturn += "'";
else
sReturn += sChar;
}
return sReturn;
}
// Gets the current REAL WORLD time, uses NWNX2
// Year-Month-Day Time
// 1997-12-15 23:50:26
string GetSQLTime();
string GetSQLTime()
{
string sSQL = "SELECT CURRENT_TIME";
SQLExecDirect(sSQL);
if(SQLFetch() == SQL_SUCCESS)
{
return SQLGetData(1);
}
else
{
return "Database error";
}
}
// Gets the current REAL WORLD date, uses NWNX2
string GetSQLDate();
string GetSQLDate()
{
string sSQL = "SELECT CURRENT_DATE";
SQLExecDirect(sSQL);
if(SQLFetch() == SQL_SUCCESS)
{
return SQLGetData(1);
}
else
{
return "Database error";
}
}
// Gets the current REAL WORLD time stamp, uses NWNX2
string GetSQLTimeStamp();
string GetSQLTimeStamp()
{
string sSQL = "SELECT CURRENT_TIMESTAMP";
SQLExecDirect(sSQL);
if(SQLFetch() == SQL_SUCCESS)
{
return SQLGetData(1);
}
else
{
return "Database error";
}
}

View File

@@ -0,0 +1,11 @@
int StartingConditional()
{
object oSpeaker = GetPCSpeaker();
//Show this line in the conversation ONLY if it's a DM!
if(GetIsDM(oSpeaker))
return TRUE;
//Otherwise Don't show the line to anyone else!
return FALSE;
}

View File

@@ -0,0 +1,9 @@
int StartingConditional()
{
int i = 3;
if(i==1)
return TRUE;
return FALSE;
}

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

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName is_guild
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 3/5/2009 2:50:49 PM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(GetItemPossessedBy(GetPCSpeaker(), "guildpass")!=OBJECT_INVALID)
return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,66 @@
#include "mk_inc_debug"
#include "mk_inc_2DA_disp"
void main()
{
object oPC = OBJECT_SELF;
int nRow = GetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_ROW);
int bIgnoreRacialType = GetLocalInt(oPC, "MK_DEITY_IGNORE_RACIALTYPE");
int bIgnoreAlignment = GetLocalInt(oPC, "MK_DEITY_IGNORE_ALIGNMENT");
int bIgnoreClasses = GetLocalInt(oPC, "MK_DEITY_IGNORE_CLASSES");
int bIgnoreGender = GetLocalInt(oPC, "MK_DEITY_IGNORE_GENDER");
string s2DA = GetLocalString(oPC, "MK_DEITY_2DAFILE");
if (s2DA == "") s2DA = "mk_deities";
int bCheckRacialType = TRUE;
if (!bIgnoreRacialType)
{
bCheckRacialType = MK_Get2DAInt(s2DA, "AllRaces", nRow, 0)
|| MK_Get2DAInt("mk_deities", GetLocalString(oPC, "MK_BODY_DEITY_RACIAL_COLUMN"), nRow, 0);
}
int nAlignmentGenderAdjustment = ( GetLocalInt(oPC, "MK_BODY_DEITY_ALIGNMENTGENDER_ADJUST") ? 1 : 0 );
int bCheckAlignment = TRUE;
if (!bIgnoreAlignment)
{
int nAlignment = MK_Get2DAInt(s2DA, GetLocalString(oPC, "MK_BODY_DEITY_ALIGNMENT_COLUMN"), nRow, 0);
if ((nAlignment>0) && (!bIgnoreClasses))
{
nAlignment-=nAlignmentGenderAdjustment;
}
bCheckAlignment = nAlignment;
}
int bCheckGender = TRUE;
if (!bIgnoreGender)
{
int nAlignment = MK_Get2DAInt(s2DA, GetLocalString(oPC, "MK_BODY_DEITY_GENDER_COLUMN"), nRow, 0);
if ((nAlignment>0) && (!bIgnoreClasses))
{
nAlignment-=nAlignmentGenderAdjustment;
}
bCheckGender = nAlignment;
}
int bCheckClasses = TRUE;
if (!bIgnoreClasses)
{
int iClass;
for (iClass = 1; iClass<=3; iClass++)
{
string sColumn = GetLocalString(oPC, "MK_BODY_DEITY_CLASS"+IntToString(iClass)+"_COLUMN");
if (sColumn!="")
{
bCheckClasses = bCheckClasses && MK_Get2DAInt(s2DA, sColumn, nRow);
}
}
}
MK_DEBUG_TRACE("mk_cb_deity_chk: "+Get2DAString("mk_deities", "LABEL", nRow)+"["+IntToString(nRow)+"]: "+IntToString(bCheckRacialType)+", "+IntToString(bCheckAlignment)+", "+IntToString(bCheckGender)+", "+IntToString(bCheckClasses));
int bCheck = bCheckRacialType && bCheckAlignment && bCheckGender && bCheckClasses;
SetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_CHECK, bCheck);
}

View File

@@ -0,0 +1,28 @@
// mk_cb_hd_f_flt
#include "mk_inc_debug"
#include "mk_inc_generic"
#include "mk_inc_states"
#include "mk_inc_head"
#include "mk_inc_2da_disp"
void main()
{
int bReturn = FALSE;
int nState = MK_GenericDialog_GetState();
switch (nState)
{
case MK_STATE_HEAD_FILTER:
{
object oPC = GetPCSpeaker();
object oTarget = OBJECT_SELF;
int nRow = GetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_ROW);
bReturn = !MK_HEAD_GetIsFilterEmpty(oPC, oTarget, nRow);
MK_DEBUG_TRACE("mk_cb_hd_f_flt: nRow="+IntToString(nRow)+", bReturn="+IntToString(bReturn));
break;
}
}
SetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_CHECK, bReturn);
}

View File

@@ -0,0 +1,23 @@
// mk_cb_hd_f_label
#include "mk_inc_tools"
#include "mk_inc_2da_disp"
#include "mk_inc_tlk"
#include "mk_inc_head"
void main()
{
object oPC = GetPCSpeaker();
object oTarget = OBJECT_SELF;
int nRow = GetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_ROW);
string s2DA = MK_HEAD_Get2DAFile(oPC);
MK_DEBUG_TRACE("mk_cb_hd_f_label(oPC='"+GetName(oPC)+"', oTarget='"+GetName(oTarget)+"', s2DA='"+s2DA+"', nRow="+IntToString(nRow)+")");
string sLabel = MK_TLK_GetStringByStrRef( MK_HEAD_GetIsFilterSelected(oTarget, nRow) ? -39 : -40 )
+ MK_TLK_Get2DAStringByStrRef(s2DA, nRow, "STRREF", "LABEL");
MK_DEBUG_TRACE(" > sLabel='"+sLabel+"'");
// int nStrRef = MK_Get2DAInt(s2DA, "STRREF", nRow, 0);
// string sLabel = (nStrRef!=0 ? MK_TLK_GetStringByStrRef(nStrRef) : Get2DAString(s2DA, "LABEL", nRow));
// sLabel = MK_TLK_GetStringByStrRef( MK_HEAD_GetIsFilterSelected(oTarget, nRow) ? -39 : -40, GetGender(oTarget) ) + sLabel;
SetLocalString(OBJECT_SELF, MK_2DA_DISP_CALLBACK_LABEL, sLabel);
}

View File

@@ -0,0 +1,15 @@
// mk_cb_hd_label
#include "mk_inc_debug"
#include "mk_inc_2da_disp"
#include "mk_inc_tools"
void main()
{
// object oPC = GetPCSpeaker();
// object oTarget = OBJECT_SELF;
int nRow = GetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_ROW);
string sLabel = "Head " + MK_IntToString(nRow, 3, "0");
// MK_DEBUG_TRACE("mk_cb_hd_label: nRow="+IntToString(nRow)+", sLabel='"+sLabel+"'");
SetLocalString(OBJECT_SELF, MK_2DA_DISP_CALLBACK_LABEL, sLabel);
}

View File

@@ -0,0 +1,14 @@
#include "mk_inc_debug"
#include "mk_inc_itm_disp"
void main()
{
object oPC = OBJECT_SELF;
object oItem = GetLocalObject(oPC, MK_ITM_DISP_CALLBACK_OBJECT);
int bShowAllItems = GetLocalInt(oPC, "MK_CHEATS_SHOWALLITEMS");
int bCheck = bShowAllItems || (GetItemCharges(oItem)>0);
SetLocalInt(OBJECT_SELF, MK_ITM_DISP_CALLBACK_CHECK, bCheck);
}

View File

@@ -0,0 +1,22 @@
#include "mk_inc_itm_disp"
#include "mk_inc_cheats"
void main()
{
object oPC = OBJECT_SELF;
object oItem = GetLocalObject(oPC, MK_ITM_DISP_CALLBACK_OBJECT);
object oCurrentItem = MK_CHEATS_GetCurrentItem();
int bIsCurrentItem = (oItem == oCurrentItem);
string sColorTag = GetLocalString(oPC, (bIsCurrentItem ? "MK_2DA_DISP_CURRENT_COLOR" : "MK_2DA_DISP_DEFAULT_COLOR"));
string sLabel = sColorTag+GetName(oItem);
int nCharges = GetItemCharges(oItem);
if (nCharges>0)
{
sLabel += (" #" + IntToString(nCharges));
}
sLabel += "</c>";
SetLocalString(OBJECT_SELF, MK_ITM_DISP_CALLBACK_LABEL, sLabel);
}

View File

@@ -0,0 +1,36 @@
#include "mk_inc_debug"
#include "mk_inc_states"
#include "mk_inc_itm_disp"
void main()
{
object oPC = OBJECT_SELF;
object oItem = GetLocalObject(oPC, MK_ITM_DISP_CALLBACK_OBJECT);
int nState = MK_GenericDialog_GetState();
int bCheck = GetLocalInt(oPC, "MK_CHEATS_SHOWALLITEMS")
|| GetLocalInt(oItem, "MK_CHEATS_FLAG_" + IntToString(nState));
if (!bCheck)
{
switch (nState)
{
case MK_STATE_CHEATS_CURSEDFLAG:
bCheck = bCheck || GetItemCursedFlag(oItem);
break;
case MK_STATE_CHEATS_PLOTFLAG:
bCheck = bCheck || GetPlotFlag(oItem);
break;
case MK_STATE_CHEATS_STOLENFLAG:
bCheck = bCheck || GetStolenFlag(oItem);
break;
case MK_STATE_CHEATS_NOTIDENTIFIED:
bCheck = bCheck || !GetIdentified(oItem);
break;
}
}
// MK_DEBUG_TRACE("mk_cb_iflag_chk (nState="+IntToString(nState)+"): '"+GetName(oItem)+"', bCheck="+IntToString(bCheck));
SetLocalInt(OBJECT_SELF, MK_ITM_DISP_CALLBACK_CHECK, bCheck);
}

View File

@@ -0,0 +1,46 @@
#include "mk_inc_itm_disp"
#include "mk_inc_iprp"
#include "mk_inc_states"
void main()
{
object oPC = OBJECT_SELF;
object oItem = GetLocalObject(oPC, MK_ITM_DISP_CALLBACK_OBJECT);
string sLabel = MK_IPRP_GetItemName(oItem, TRUE);
string sColorTag = GetLocalString(oPC, "MK_CHEATS_FLAGS_COLOR");
string sCloseTag = "</c>";
int nState = MK_GenericDialog_GetState();
switch (nState)
{
case MK_STATE_CHEATS_CURSEDFLAG:
if (GetItemCursedFlag(oItem))
{
sLabel += (sColorTag + " *" + GetStringByStrRef(111874) + "*" + sCloseTag);
}
break;
case MK_STATE_CHEATS_PLOTFLAG:
if (GetPlotFlag(oItem))
{
sLabel += (sColorTag + " *" + GetStringByStrRef(6808) + "*" + sCloseTag); // or 7520?
}
break;
case MK_STATE_CHEATS_STOLENFLAG:
if (GetStolenFlag(oItem))
{
sLabel += (sColorTag + " *" + GetStringByStrRef(7102) + "*" + sCloseTag);
}
break;
case MK_STATE_CHEATS_NOTIDENTIFIED:
if (!GetIdentified(oItem))
{
// Postfix already done by MK_IPRP_GetItemName()
sLabel = sColorTag + sLabel + sCloseTag;
}
break;
}
SetLocalString(OBJECT_SELF, MK_ITM_DISP_CALLBACK_LABEL, sLabel);
}

View File

@@ -0,0 +1,50 @@
#include "mk_inc_debug"
#include "mk_inc_2da_disp"
#include "mk_inc_tlk"
#include "mk_inc_iprp"
#include "mk_inc_cheats"
#include "mk_inc_states"
const string s2DAfile = "itempropdef";
const string sColumnStrRef = "Name";
void main()
{
object oPC = OBJECT_SELF;
int bCheck=TRUE;
int bShowCurrentOnly = GetLocalInt(oPC, "MK_CHEATS_ITEMPROPS_SHOWCURRENTONLY");
if (bShowCurrentOnly)
{
int nRow = GetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_ROW);
object oItem = MK_CHEATS_GetCurrentItem();
int nIProp = MK_CHEATS_GetCurrentItemPropertyID();
int nSubType = MK_CHEATS_GetCurrentItemPropertySubType();
int nCostTableValue = MK_CHEATS_GetCurrentItemPropertyCostTableValue();
int nState = MK_GenericDialog_GetState();
itemproperty iProp;
switch (nState)
{
case MK_STATE_CHEATS_ITEMPROPS_PROPERTY:
iProp = MK_IPRP_GetItemProperty(oItem, nRow);
break;
case MK_STATE_CHEATS_ITEMPROPS_SUBTYPE:
iProp = MK_IPRP_GetItemProperty(oItem, nIProp, nRow);
break;
case MK_STATE_CHEATS_ITEMPROPS_COSTTABLE:
iProp = MK_IPRP_GetItemProperty(oItem, nIProp, nSubType, nRow);
break;
case MK_STATE_CHEATS_ITEMPROPS_PARAM1:
iProp = MK_IPRP_GetItemProperty(oItem, nIProp, nSubType, nCostTableValue, nRow);
break;
}
bCheck = GetIsItemPropertyValid(iProp);
}
SetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_CHECK, bCheck);
}

View File

@@ -0,0 +1,42 @@
///////////////////////////////////////////////////////////////////////////////
// mk_cb_iprp_ctlbl
///////////////////////////////////////////////////////////////////////////////
// callback itemproperty costtablevalue label
///////////////////////////////////////////////////////////////////////////////
#include "mk_inc_debug"
#include "mk_inc_2da_disp"
#include "mk_inc_tlk"
#include "mk_inc_iprp"
#include "mk_inc_cheats"
//const string s2DAfile = "itempropdef";
const string sColumnStrRef = "Name";
void main()
{
object oPC = OBJECT_SELF;
int nRow = GetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_ROW);
object oItem = MK_CHEATS_GetCurrentItem();
string s2DAFile = MK_2DA_DISPLAY_Get2DAFileName();
int nStrRef = MK_Get2DAInt(s2DAFile, sColumnStrRef, nRow, -1);
int nIPropID = MK_CHEATS_GetCurrentItemPropertyID();
int nSubType = MK_CHEATS_GetCurrentItemPropertySubType();
// int nParam1 = MK_CHEATS_GetCurrentItemPropertyParam1();
itemproperty iProp = MK_IPRP_GetItemProperty(oItem, nIPropID, nSubType, nRow);
int bHasIProp = GetIsItemPropertyValid(iProp);
// MK_DEBUG_TRACE("mk_cb_iprp_ctlbl: nIProp="+IntToString(nRow)
// +", nStrRef="+IntToString(nStrRef)
// +", bHasIProp="+IntToString(bHasIProp));
int nGender = GetGender(OBJECT_SELF);
string sColorTag = GetLocalString(oPC, (bHasIProp ? "MK_2DA_DISP_CURRENT_COLOR" : "MK_2DA_DISP_DEFAULT_COLOR"));
string sLabel = sColorTag + GetStringByStrRef(nStrRef, nGender) + " [#"+IntToString(nRow)+"]</c>";
SetLocalString(OBJECT_SELF, MK_2DA_DISP_CALLBACK_LABEL, sLabel);
}

View File

@@ -0,0 +1,21 @@
///////////////////////////////////////////////////////////////////////////////
// mk_cb_iprp_ftchk
///////////////////////////////////////////////////////////////////////////////
// callback itemproperty feat check
///////////////////////////////////////////////////////////////////////////////
#include "mk_inc_2da_disp"
#include "mk_inc_iprp"
void main()
{
object oPC = OBJECT_SELF;
int nRow = GetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_ROW);
int nFeatIndex = MK_Get2DAInt("iprp_feats", "FeatIndex", nRow);
object oItem = GetItemInSlot(INVENTORY_SLOT_CARMOUR, oPC);
int bCheck = !GetHasFeat(nFeatIndex, oPC) || MK_IPRP_GetItemHasFeat(oItem, nRow);
SetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_CHECK, bCheck);
}

View File

@@ -0,0 +1,41 @@
///////////////////////////////////////////////////////////////////////////////
// mk_cb_iprp_ftlbl
///////////////////////////////////////////////////////////////////////////////
// callback itemproperty feat label
///////////////////////////////////////////////////////////////////////////////
#include "mk_inc_debug"
#include "mk_inc_2da_disp"
#include "mk_inc_tlk"
#include "mk_inc_iprp"
const string s2DAfile = "iprp_feats";
const string sColumnFeatIndex = "FeatIndex";
const string sColumnStrRef = "Name";
void main()
{
object oPC = OBJECT_SELF;
int nRow = GetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_ROW);
int nFeat = nRow;
int nFeatIndex = MK_Get2DAInt(s2DAfile, sColumnFeatIndex, nRow, -1);
int nStrRef = MK_Get2DAInt(s2DAfile, sColumnStrRef, nRow, -1);
object oItem = GetItemInSlot(INVENTORY_SLOT_CARMOUR, oPC);
int bHasFeat = MK_IPRP_GetItemHasFeat(oItem, nFeat);
// MK_DEBUG_TRACE("mk_cb_iprp_ftlbl: nFeat="+IntToString(nFeat)
// +", nFeatIndex="+IntToString(nFeatIndex)
// +", nStrRef="+IntToString(nStrRef)
// +", bHasFeat="+IntToString(bHasFeat));
int nGender = GetGender(OBJECT_SELF);
string sColorTag = GetLocalString(oPC, (bHasFeat ? "MK_2DA_DISP_CURRENT_COLOR" : "MK_2DA_DISP_DEFAULT_COLOR"));
string sLabel = sColorTag + MK_TLK_GetStringByStrRef( bHasFeat ? -39 : -40, nGender )
+ GetStringByStrRef(nStrRef, nGender) + " [#"+IntToString(nFeatIndex)+"]</c>";
SetLocalString(OBJECT_SELF, MK_2DA_DISP_CALLBACK_LABEL, sLabel);
}

View File

@@ -0,0 +1,48 @@
///////////////////////////////////////////////////////////////////////////////
// mk_cb_iprp_iflbl
///////////////////////////////////////////////////////////////////////////////
// callback itemproperty item filter label
///////////////////////////////////////////////////////////////////////////////
#include "mk_inc_debug"
#include "mk_inc_2da_disp"
#include "mk_inc_tlk"
#include "mk_inc_cheats"
//#include "mk_inc_iprp"
const string s2DAfile = "iprp_feats";
const string sColumnFeatIndex = "FeatIndex";
const string sColumnStrRef = "Name";
void main()
{
object oPC = OBJECT_SELF;
int nRow = GetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_ROW);
int bSelected = MK_CHEATS_GetIsItemTypeSelected(oPC, nRow);
int nCol;
int nStrRef;
string sLabel="";
int nGender = GetGender(OBJECT_SELF);
for (nCol = 1; (nStrRef = MK_Get2DAInt("mk_iprp_cols", "StrRef"+IntToString(nCol), nRow, -1))!=-1; nCol++)
{
sLabel += (MK_TLK_GetStringByStrRef(nStrRef, nGender) + ", ");
}
if (sLabel!="")
{
sLabel = GetStringLeft(sLabel, GetStringLength(sLabel)-2);
}
// MK_DEBUG_TRACE("mk_cb_iprp_ftlbl: nFeat="+IntToString(nFeat)
// +", nFeatIndex="+IntToString(nFeatIndex)
// +", nStrRef="+IntToString(nStrRef)
// +", bHasFeat="+IntToString(bHasFeat));
string sColorTag = GetLocalString(oPC, (bSelected ? "MK_2DA_DISP_CURRENT_COLOR" : "MK_2DA_DISP_DEFAULT_COLOR"));
sLabel = sColorTag + MK_TLK_GetStringByStrRef( bSelected ? -39 : -40, nGender )
+ sLabel + "</c>";
SetLocalString(OBJECT_SELF, MK_2DA_DISP_CALLBACK_LABEL, sLabel);
}

View File

@@ -0,0 +1,15 @@
#include "mk_inc_itm_disp"
void main()
{
object oPC = OBJECT_SELF;
object oItem = GetLocalObject(oPC, MK_ITM_DISP_CALLBACK_OBJECT);
string sLabel = GetName(oItem);
int nBaseItemType = GetBaseItemType(oItem);
if ((GetItemStackSize(oItem)>1) || (MK_Get2DAInt("baseitems", "Stacking", nBaseItemType, 1) > 1))
{
sLabel += (" #" + IntToString(GetItemStackSize(oItem)));
}
SetLocalString(OBJECT_SELF, MK_ITM_DISP_CALLBACK_LABEL, sLabel);
}

View File

@@ -0,0 +1,31 @@
#include "mk_inc_debug"
#include "mk_inc_2da_disp"
#include "mk_inc_tlk"
#include "mk_inc_iprp"
#include "mk_inc_cheats"
const string s2DAfile = "itempropdef";
const string sColumnStrRef = "Name";
void main()
{
object oPC = OBJECT_SELF;
int nRow = GetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_ROW);
object oItem = MK_CHEATS_GetCurrentItem();
int nStrRef = MK_Get2DAInt(s2DAfile, sColumnStrRef, nRow, -1);
itemproperty iProp = MK_IPRP_GetItemProperty(oItem, nRow);
int bHasIProp = GetIsItemPropertyValid(iProp);
// MK_DEBUG_TRACE("mk_cb_iprp_iplbl: nIProp="+IntToString(nRow)
// +", nStrRef="+IntToString(nStrRef)
// +", bHasIProp="+IntToString(bHasIProp));
int nGender = GetGender(OBJECT_SELF);
string sColorTag = GetLocalString(oPC, (bHasIProp ? "MK_2DA_DISP_CURRENT_COLOR" : "MK_2DA_DISP_DEFAULT_COLOR"));
string sLabel = sColorTag + GetStringByStrRef(nStrRef, nGender) + " [#"+IntToString(nRow)+"]</c>";
SetLocalString(OBJECT_SELF, MK_2DA_DISP_CALLBACK_LABEL, sLabel);
}

View File

@@ -0,0 +1,15 @@
#include "mk_inc_debug"
#include "mk_inc_cheats"
#include "mk_inc_itm_disp"
void main()
{
object oPC = OBJECT_SELF;
object oItem = GetLocalObject(oPC, MK_ITM_DISP_CALLBACK_OBJECT);
int nBaseItemType = GetBaseItemType(oItem);
int nItemType = MK_Get2DAInt("baseitems", "PropColumn", nBaseItemType);
int bCheck = MK_CHEATS_GetIsItemTypeSelected(oPC, nItemType);
SetLocalInt(OBJECT_SELF, MK_ITM_DISP_CALLBACK_CHECK, bCheck);
}

View File

@@ -0,0 +1,40 @@
#include "mk_inc_debug"
#include "mk_inc_2da_disp"
#include "mk_inc_tlk"
#include "mk_inc_iprp"
#include "mk_inc_cheats"
//const string s2DAfile = "itempropdef";
const string sColumnStrRef = "Name";
void main()
{
object oPC = OBJECT_SELF;
int nRow = GetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_ROW);
object oItem = MK_CHEATS_GetCurrentItem();
string s2DAFile = MK_2DA_DISPLAY_Get2DAFileName();
int nStrRef = MK_Get2DAInt(s2DAFile, sColumnStrRef, nRow, -1);
int nIPropID = MK_CHEATS_GetCurrentItemPropertyID();
int nSubType = MK_CHEATS_GetCurrentItemPropertySubType();
int nCostTableValue = MK_CHEATS_GetCurrentItemPropertyCostTableValue();
itemproperty iProp = MK_IPRP_GetItemProperty(oItem, nIPropID, nSubType, nCostTableValue, nRow);
int bHasIProp = GetIsItemPropertyValid(iProp);
// MK_DEBUG_TRACE("mk_cb_iprp_p1lbl: nIProp="+IntToString(nIPropID)
// +", nSubType="+IntToString(nSubType)
// +", nCostTableValue="+IntToString(nCostTableValue)
// +", nParam1Value="+IntToString(nRow)
// +", nStrRef="+IntToString(nStrRef)
// +", bHasIProp="+IntToString(bHasIProp));
int nGender = GetGender(OBJECT_SELF);
string sColorTag = GetLocalString(oPC, (bHasIProp ? "MK_2DA_DISP_CURRENT_COLOR" : "MK_2DA_DISP_DEFAULT_COLOR"));
string sLabel = sColorTag + GetStringByStrRef(nStrRef, nGender) + " [#"+IntToString(nRow)+"]</c>";
SetLocalString(OBJECT_SELF, MK_2DA_DISP_CALLBACK_LABEL, sLabel);
}

View File

@@ -0,0 +1,32 @@
#include "mk_inc_debug"
#include "mk_inc_2da_disp"
#include "mk_inc_tlk"
#include "mk_inc_iprp"
#include "mk_inc_cheats"
const string s2DAfile = "skills";
const string sColumnStrRef = "Name";
void main()
{
object oPC = OBJECT_SELF;
int nRow = GetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_ROW);
int nSkill = nRow;
int nStrRef = MK_Get2DAInt(s2DAfile, sColumnStrRef, nRow, -1);
object oItem = GetItemInSlot(INVENTORY_SLOT_CARMOUR, oPC);
int nSkillBonus = MK_IPRP_GetSkillBonus(oItem, nSkill, FALSE);
int nCurrentSkill = MK_CHEATS_GetCurrentSkill();
int bHighlight = (nSkillBonus>0) || (nSkill==nCurrentSkill);
string sLabel = GetLocalString(oPC, (bHighlight ? "MK_2DA_DISP_CURRENT_COLOR" : "MK_2DA_DISP_DEFAULT_COLOR"))
+ GetStringByStrRef(nStrRef, GetGender(oPC))
+ (bHighlight ? " ("+IntToString(nSkillBonus)+")" : "")
+ "</c>";
SetLocalString(OBJECT_SELF, MK_2DA_DISP_CALLBACK_LABEL, sLabel);
}

View File

@@ -0,0 +1,35 @@
#include "mk_inc_debug"
#include "mk_inc_2da_disp"
#include "mk_inc_tlk"
#include "mk_inc_iprp"
#include "mk_inc_cheats"
//const string s2DAfile = "itempropdef";
const string sColumnStrRef = "Name";
void main()
{
object oPC = OBJECT_SELF;
int nRow = GetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_ROW);
object oItem = MK_CHEATS_GetCurrentItem();
string s2DAFile = MK_2DA_DISPLAY_Get2DAFileName();
int nStrRef = MK_Get2DAInt(s2DAFile, sColumnStrRef, nRow, -1);
int nIPropID = MK_CHEATS_GetCurrentItemPropertyID();
itemproperty iProp = MK_IPRP_GetItemProperty(oItem, nIPropID, nRow);
int bHasIProp = GetIsItemPropertyValid(iProp);
// MK_DEBUG_TRACE("mk_cb_iprp_stlbl: nIProp="+IntToString(nRow)
// +", nStrRef="+IntToString(nStrRef)
// +", bHasIProp="+IntToString(bHasIProp));
int nGender = GetGender(OBJECT_SELF);
string sColorTag = GetLocalString(oPC, (bHasIProp ? "MK_2DA_DISP_CURRENT_COLOR" : "MK_2DA_DISP_DEFAULT_COLOR"));
string sLabel = sColorTag + GetStringByStrRef(nStrRef, nGender) + " [#"+IntToString(nRow)+"]</c>";
SetLocalString(OBJECT_SELF, MK_2DA_DISP_CALLBACK_LABEL, sLabel);
}

View File

@@ -0,0 +1,16 @@
// mk_cb_hd_f_label
#include "mk_inc_tools"
#include "mk_inc_2da_disp"
#include "mk_inc_tlk"
#include "mk_inc_cheats"
void main()
{
object oPC = OBJECT_SELF;
int nRow = GetLocalInt(oPC, MK_2DA_DISP_CALLBACK_ROW);
string sLabel = MK_CHEATS_GetStoreNameByID(nRow);
SetLocalString(oPC, MK_2DA_DISP_CALLBACK_LABEL, sLabel);
}

View File

@@ -0,0 +1,38 @@
#include "mk_inc_debug"
#include "mk_inc_itm_disp"
#include "mk_inc_generic"
#include "mk_inc_states"
#include "mk_inc_swp_iprop"
void main()
{
object oPC = OBJECT_SELF;
object oItem = GetLocalObject(oPC, MK_ITM_DISP_CALLBACK_OBJECT);
int nState = MK_GenericDialog_GetState();
int nBaseItemType = GetBaseItemType(oItem);
int nCharges = GetItemCharges(oItem);
int nItemType = MK_Get2DAInt("baseitems", "PropColumn", nBaseItemType, -1);
int bCheck=FALSE;
switch (nState)
{
case MK_STATE_CHEATS_SWAPITEMPROPS_ITEM1:
bCheck = MK_Get2DAInt("mk_iprp_cols", "SwpIPrp", nItemType, 0);
break;
case MK_STATE_CHEATS_SWAPITEMPROPS_ITEM2:
{
object oItem1 = MK_SWAPIPROP_GetItem(MK_STATE_CHEATS_SWAPITEMPROPS_ITEM1);
if (GetIsObjectValid(oItem1) && (oItem1!=oItem))
{
int nItemType1 = MK_Get2DAInt("baseitems", "PropColumn", GetBaseItemType(oItem1), -1);
int nCharges1 = GetItemCharges(oItem1);
bCheck = (nItemType == nItemType1) && (((nCharges1==0) && (nCharges==0)) || ((nCharges1>0) && (nCharges>0)));
}
break;
}
}
SetLocalInt(OBJECT_SELF, MK_ITM_DISP_CALLBACK_CHECK, bCheck);
}

View File

@@ -0,0 +1,23 @@
#include "mk_inc_debug"
//#include "mk_inc_tools"
#include "mk_inc_vfx"
//#include "mk_inc_generic"
//#include "mk_inc_states"
#include "mk_inc_2da_disp"
void main()
{
object oPC = GetPCSpeaker();
object oTarget = OBJECT_SELF;
int nVFXMode = MK_VFX_GetVFXMode(oPC);
// MK_DEBUG_TRACE("Running mk_cb_vfx_check: );
int nRow = GetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_ROW);
int bCheck=MK_VFX_GetVFXIsValid(oPC, nVFXMode, nRow, oTarget);
// MK_DEBUG_TRACE("mk_cb_vfx_check: nVFXmode="+IntToString(nVFXmode)
// +", nRow="+IntToString(nRow)
// +", bCheck="+IntToString(bCheck));
SetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_CHECK, bCheck);
}

View File

@@ -0,0 +1,62 @@
#include "mk_inc_debug"
#include "mk_inc_generic"
#include "mk_inc_states"
#include "mk_inc_tools"
#include "mk_inc_2da_disp"
#include "mk_inc_version"
#include "mk_inc_cep"
#include "mk_inc_vfx"
void main()
{
int bReturn = TRUE;
int nState = MK_GenericDialog_GetState();
object oPC = GetPCSpeaker();
object oTarget = OBJECT_SELF;
switch (nState)
{
case MK_STATE_VFX_INIT_FILTER:
{
string s2DAFile = MK_VFX_Get_VFXModeFile(oPC);
int nRow = GetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_ROW);
int nMajor = MK_Get2DAInt(s2DAFile, "REQ_MAJ", nRow, -1);
int nMinor = MK_Get2DAInt(s2DAFile, "REQ_MIN", nRow, -1);
string sReqOther = Get2DAString(s2DAFile, "REQ_OTHER", nRow);
string s2DA = Get2DAString(s2DAFile, "2DAFILE", nRow);
int bDisable = MK_Get2DAInt(s2DAFile, "DISABLE", nRow, 0);
if (bDisable)
{
bReturn = FALSE;
}
else
{
if ((nMajor>=0) && (nMinor>=0))
{
bReturn = MK_VERSION_GetIsVersionGreaterEqual(OBJECT_SELF, nMajor, nMinor);
}
if (bReturn && (sReqOther!=""))
{
if (sReqOther=="CEP")
{
bReturn = MK_CEP_GetIsCEPInstalled();
}
}
if (bReturn && (s2DA!=""))
{
bReturn = (Get2DAString(s2DA, "Label", 0)!="");
}
// MK_DEBUG_TRACE("mk_cb_vfx_filter: nRow="+IntToString(nRow)+", nVersion="+IntToString(nMajor)+"."+IntToString(nMinor)+", other"+sReqOther
// +", s2DA="+s2DA
// +": bReturn="+IntToString(bReturn));
}
break;
}
}
SetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_CHECK, bReturn);
}

View File

@@ -0,0 +1,43 @@
#include "mk_inc_tools"
#include "mk_inc_2da_disp"
#include "mk_inc_states"
#include "mk_inc_vfx"
#include "mk_inc_generic"
#include "mk_inc_tlk"
void main()
{
object oPC = GetPCSpeaker();
object oTarget = OBJECT_SELF;
// SendMessageToPC(GetFirstPC(), "GetPCSpeaker()="+GetName(GetPCSpeaker()));
// SendMessageToPC(GetFirstPC(), "OBJECT_SELF="+GetName(OBJECT_SELF));
int nVFXMode = MK_VFX_GetVFXMode(oPC);
// MK_DEBUG_TRACE("Callback script is running! nVFXmode="+IntToString(nVFXmode)+" detected.");
string sLabel="";
if (nVFXMode!=-1)
{
string s2DAFile = MK_VFX_Get2DAFile(oPC, nVFXMode);
int nRow = GetLocalInt(OBJECT_SELF, MK_2DA_DISP_CALLBACK_ROW);
string sName = Get2DAString(s2DAFile, "Label", nRow);
int nVFX = MK_VFX_GetVFX(oPC, nVFXMode, nRow, oTarget);
// MK_DEBUG_TRACE("s2DAFile='"+s2DAFile+"', nRow="+IntToString(nRow)+", sName='"+sName+"', sColumn='"+sColumn+"', nVFX="+IntToString(nVFX));
string sDescription = MK_VFX_GetDescription(nVFXMode, nVFX, sName);
int bHasVFX = MK_VFX_GetHasVFX(oPC, nVFX, oTarget);
// MK_DEBUG_TRACE("s2DAFile='"+s2DAFile+"', nRow="+IntToString(nRow)+", sName='"+sName+"', sColumn='"
// +sColumn+"', nVFX="+IntToString(nVFX)+", sDescription='"+sDescription+"', bHasVFX="+IntToString(bHasVFX));
int nGender = GetGender(oTarget);
sLabel = MK_TLK_GetStringByStrRef( bHasVFX ? -39 : -40, nGender ) + sDescription;
// MK_DEBUG_TRACE("sLabel='"+sLabel+"'");
}
SetLocalString(OBJECT_SELF, MK_2DA_DISP_CALLBACK_LABEL, sLabel);
}

View File

@@ -0,0 +1,6 @@
#include "mk_inc_generic"
int StartingConditional()
{
return MK_GenericDialog_GetCondition(0);
}

View File

@@ -0,0 +1,7 @@
#include "mk_inc_generic"
int StartingConditional()
{
return MK_GenericDialog_GetCondition(1);
// return (GetLocalInt(OBJECT_SELF, "MK_CONDITION_1")==1);
}

View File

@@ -0,0 +1,7 @@
#include "mk_inc_generic"
int StartingConditional()
{
return MK_GenericDialog_GetCondition(2);
// return (GetLocalInt(OBJECT_SELF, "MK_CONDITION_2")==1);
}

View File

@@ -0,0 +1,7 @@
#include "mk_inc_generic"
int StartingConditional()
{
return MK_GenericDialog_GetCondition(3);
// return (GetLocalInt(OBJECT_SELF, "MK_CONDITION_3")==1);
}

View File

@@ -0,0 +1,7 @@
#include "mk_inc_generic"
int StartingConditional()
{
return MK_GenericDialog_GetCondition(4);
// return (GetLocalInt(OBJECT_SELF, "MK_CONDITION_4")==1);
}

View File

@@ -0,0 +1,7 @@
#include "mk_inc_generic"
int StartingConditional()
{
return MK_GenericDialog_GetCondition(5);
// return (GetLocalInt(OBJECT_SELF, "MK_CONDITION_5")==1);
}

View File

@@ -0,0 +1,7 @@
#include "mk_inc_generic"
int StartingConditional()
{
return MK_GenericDialog_GetCondition(6);
// return (GetLocalInt(OBJECT_SELF, "MK_CONDITION_6")==1);
}

View File

@@ -0,0 +1,7 @@
#include "mk_inc_generic"
int StartingConditional()
{
return MK_GenericDialog_GetCondition(7);
// return (GetLocalInt(OBJECT_SELF, "MK_CONDITION_7")==1);
}

View File

@@ -0,0 +1,7 @@
#include "mk_inc_generic"
int StartingConditional()
{
return MK_GenericDialog_GetCondition(8);
// return (GetLocalInt(OBJECT_SELF, "MK_CONDITION_8")==1);
}

View File

@@ -0,0 +1,7 @@
#include "mk_inc_generic"
int StartingConditional()
{
return MK_GenericDialog_GetCondition(9);
// return (GetLocalInt(OBJECT_SELF, "MK_CONDITION_9")==1);
}

View File

@@ -0,0 +1,7 @@
#include "mk_inc_generic"
int StartingConditional()
{
return MK_GenericDialog_GetCondition(10);
// return (GetLocalInt(OBJECT_SELF, "MK_CONDITION_10")==1);
}

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