generated from Jaysyn/ModuleTemplate
2025/12/27
Hooked up new GUI module event. Hooked up NUI module event. Updated merge 2DAs. Updated PRC8 includes. Updated merge TLK.
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Brent, Andrew
|
||||
//:: Created On: November - May
|
||||
//::
|
||||
//:: Updated for .35 by Jaysyn 2023/03/10
|
||||
//:://////////////////////////////////////////////
|
||||
// :: MODS
|
||||
// April 23 2002: Removed animal parts. They were silly.
|
||||
@@ -22,64 +24,65 @@
|
||||
// Moved nymph cloak +4 to treasure bracket 6
|
||||
// Added Monk Enhancement items to random treasure
|
||||
|
||||
#include "prc_class_const"
|
||||
|
||||
// * ---------
|
||||
// * CONSTANTS
|
||||
// * ---------
|
||||
|
||||
|
||||
// * tweaking constants
|
||||
|
||||
// * SIX LEVEL RANGES
|
||||
int RANGE_1_MIN = 0;
|
||||
int RANGE_1_MAX = 5;
|
||||
int RANGE_2_MIN = 6;
|
||||
int RANGE_2_MAX = 8;
|
||||
const int RANGE_1_MIN = 0;
|
||||
const int RANGE_1_MAX = 5;
|
||||
const int RANGE_2_MIN = 6;
|
||||
const int RANGE_2_MAX = 8;
|
||||
|
||||
int RANGE_3_MIN = 9;
|
||||
int RANGE_3_MAX = 10;
|
||||
const int RANGE_3_MIN = 9;
|
||||
const int RANGE_3_MAX = 10;
|
||||
|
||||
int RANGE_4_MIN = 11;
|
||||
int RANGE_4_MAX = 13;
|
||||
const int RANGE_4_MIN = 11;
|
||||
const int RANGE_4_MAX = 13;
|
||||
|
||||
int RANGE_5_MIN = 14;
|
||||
int RANGE_5_MAX = 16;
|
||||
const int RANGE_5_MIN = 14;
|
||||
const int RANGE_5_MAX = 16;
|
||||
|
||||
int RANGE_6_MIN = 17;
|
||||
int RANGE_6_MAX = 100;
|
||||
const int RANGE_6_MIN = 17;
|
||||
const int RANGE_6_MAX = 100;
|
||||
|
||||
// * NUMBER OF ITEMS APPEARING
|
||||
int NUMBER_LOW_ONE = 100; int NUMBER_MED_ONE = 60; int NUMBER_HIGH_ONE = 40; int NUMBER_BOSS_ONE = 100;
|
||||
int NUMBER_LOW_TWO = 0; int NUMBER_MED_TWO = 30; int NUMBER_HIGH_TWO = 40; int NUMBER_BOSS_TWO = 0;
|
||||
int NUMBER_LOW_THREE = 0; int NUMBER_MED_THREE = 10; int NUMBER_HIGH_THREE = 20; int NUMBER_BOSS_THREE = 0;
|
||||
const int NUMBER_LOW_ONE = 100; const int NUMBER_MED_ONE = 60; const int NUMBER_HIGH_ONE = 40; const int NUMBER_BOSS_ONE = 100;
|
||||
const int NUMBER_LOW_TWO = 0; const int NUMBER_MED_TWO = 30; const int NUMBER_HIGH_TWO = 40; const int NUMBER_BOSS_TWO = 0;
|
||||
const int NUMBER_LOW_THREE = 0; const int NUMBER_MED_THREE = 10; const int NUMBER_HIGH_THREE = 20; const int NUMBER_BOSS_THREE = 0;
|
||||
|
||||
int NUMBER_BOOK_ONE = 75;
|
||||
int NUMBER_BOOK_TWO = 20;
|
||||
int NUMBER_BOOK_THREE = 5;
|
||||
const int NUMBER_BOOK_ONE = 75;
|
||||
const int NUMBER_BOOK_TWO = 20;
|
||||
const int NUMBER_BOOK_THREE = 5;
|
||||
|
||||
// * AMOUNT OF GOLD BY VALUE
|
||||
float LOW_MOD_GOLD = 0.5; float MEDIUM_MOD_GOLD = 1.0; float HIGH_MOD_GOLD = 3.0;
|
||||
const float LOW_MOD_GOLD = 0.5; const float MEDIUM_MOD_GOLD = 1.0; const float HIGH_MOD_GOLD = 3.0;
|
||||
// * FREQUENCY OF ITEM TYPE APPEARING BY TREASURE TYPE
|
||||
int LOW_PROB_BOOK = 1; int MEDIUM_PROB_BOOK = 1; int HIGH_PROB_BOOK =1;
|
||||
int LOW_PROB_ANIMAL = 0; int MEDIUM_PROB_ANIMAL = 0; int HIGH_PROB_ANIMAL = 0;
|
||||
int LOW_PROB_JUNK = 2; int MEDIUM_PROB_JUNK = 1; int HIGH_PROB_JUNK = 1;
|
||||
int LOW_PROB_GOLD = 43; int MEDIUM_PROB_GOLD = 38; int HIGH_PROB_GOLD = 15;
|
||||
int LOW_PROB_GEM = 9; int MEDIUM_PROB_GEM = 15; int HIGH_PROB_GEM = 15;
|
||||
int LOW_PROB_JEWEL = 4; int MEDIUM_PROB_JEWEL = 6; int HIGH_PROB_JEWEL = 15;
|
||||
int LOW_PROB_ARCANE = 3; int MEDIUM_PROB_ARCANE = 3; int HIGH_PROB_ARCANE = 3;
|
||||
int LOW_PROB_DIVINE = 3; int MEDIUM_PROB_DIVINE = 3; int HIGH_PROB_DIVINE = 3;
|
||||
int LOW_PROB_AMMO = 10; int MEDIUM_PROB_AMMO = 5; int HIGH_PROB_AMMO = 3;
|
||||
int LOW_PROB_KIT = 5; int MEDIUM_PROB_KIT = 5; int HIGH_PROB_KIT = 5;
|
||||
int LOW_PROB_POTION =17; int MEDIUM_PROB_POTION = 20; int HIGH_PROB_POTION= 9;
|
||||
int LOW_PROB_TABLE2 = 3; int MEDIUM_PROB_TABLE2 = 3; int HIGH_PROB_TABLE2= 30;
|
||||
const int LOW_PROB_BOOK = 1; const int MEDIUM_PROB_BOOK = 1; const int HIGH_PROB_BOOK =1;
|
||||
const int LOW_PROB_ANIMAL = 0; const int MEDIUM_PROB_ANIMAL = 0; const int HIGH_PROB_ANIMAL = 0;
|
||||
const int LOW_PROB_JUNK = 2; const int MEDIUM_PROB_JUNK = 1; const int HIGH_PROB_JUNK = 1;
|
||||
const int LOW_PROB_GOLD = 43; const int MEDIUM_PROB_GOLD = 38; const int HIGH_PROB_GOLD = 15;
|
||||
const int LOW_PROB_GEM = 9; const int MEDIUM_PROB_GEM = 15; const int HIGH_PROB_GEM = 15;
|
||||
const int LOW_PROB_JEWEL = 4; const int MEDIUM_PROB_JEWEL = 6; const int HIGH_PROB_JEWEL = 15;
|
||||
const int LOW_PROB_ARCANE = 3; const int MEDIUM_PROB_ARCANE = 3; const int HIGH_PROB_ARCANE = 3;
|
||||
const int LOW_PROB_DIVINE = 3; const int MEDIUM_PROB_DIVINE = 3; const int HIGH_PROB_DIVINE = 3;
|
||||
const int LOW_PROB_AMMO = 10; const int MEDIUM_PROB_AMMO = 5; const int HIGH_PROB_AMMO = 3;
|
||||
const int LOW_PROB_KIT = 5; const int MEDIUM_PROB_KIT = 5; const int HIGH_PROB_KIT = 5;
|
||||
const int LOW_PROB_POTION =17; const int MEDIUM_PROB_POTION = 20; const int HIGH_PROB_POTION= 9;
|
||||
const int LOW_PROB_TABLE2 = 3; const int MEDIUM_PROB_TABLE2 = 3; const int HIGH_PROB_TABLE2= 30;
|
||||
|
||||
|
||||
// * readability constants
|
||||
|
||||
int TREASURE_LOW = 1;
|
||||
int TREASURE_MEDIUM = 2;
|
||||
int TREASURE_HIGH = 3;
|
||||
int TREASURE_BOSS = 4;
|
||||
int TREASURE_BOOK = 5;
|
||||
const int TREASURE_LOW = 1;
|
||||
const int TREASURE_MEDIUM = 2;
|
||||
const int TREASURE_HIGH = 3;
|
||||
const int TREASURE_BOSS = 4;
|
||||
const int TREASURE_BOOK = 5;
|
||||
|
||||
|
||||
// * JUMP_LEVEL is used in a Specific item function
|
||||
@@ -88,7 +91,7 @@ int TREASURE_BOOK = 5;
|
||||
// * hit die for the purposes of the treasure evaluation.
|
||||
// * May 2002: Lowered JUMP_LEVEL from 3 to 2
|
||||
|
||||
int JUMP_LEVEL = 2;
|
||||
const int JUMP_LEVEL = 2;
|
||||
|
||||
|
||||
//* Declarations
|
||||
@@ -115,11 +118,13 @@ void dbSpeak(string s)
|
||||
//* made this function to help with debugging
|
||||
void dbCreateItemOnObject(string sItemTemplate, object oTarget = OBJECT_SELF, int nStackSize = 1)
|
||||
{
|
||||
/*
|
||||
if (sItemTemplate == "")
|
||||
{
|
||||
PrintString("blank item passed into dbCreateItemOnObject. Please report as bug to Brent.");
|
||||
}
|
||||
dbSpeak(sItemTemplate);
|
||||
*/
|
||||
|
||||
//sItemTemplate = GetStringLowerCase
|
||||
|
||||
@@ -129,13 +134,14 @@ void dbCreateItemOnObject(string sItemTemplate, object oTarget = OBJECT_SELF, in
|
||||
// * it creates more
|
||||
|
||||
string sRoot = GetSubString(sItemTemplate, 0, 6);
|
||||
dbSpeak("ROOT: " + sRoot);
|
||||
//dbSpeak("ROOT: " + sRoot);
|
||||
if (GetStringLowerCase(sRoot) == "nw_wth")
|
||||
{
|
||||
nStackSize = Random(30) + 1;
|
||||
}
|
||||
}
|
||||
object oItem = CreateItemOnObject(sItemTemplate, oTarget, nStackSize);
|
||||
/*
|
||||
if (GetIsObjectValid(oItem) == FALSE && sItemTemplate != "NW_IT_GOLD001")
|
||||
{
|
||||
|
||||
@@ -148,6 +154,7 @@ void dbCreateItemOnObject(string sItemTemplate, object oTarget = OBJECT_SELF, in
|
||||
PrintString("*******");
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -160,16 +167,16 @@ object GetLastOpener()
|
||||
{
|
||||
if (GetIsObjectValid(GetLastOpenedBy()) == TRUE)
|
||||
{
|
||||
dbSpeak("LastOpener: GetLastOpenedBy " + GetTag(GetLastOpenedBy()));
|
||||
//dbSpeak("LastOpener: GetLastOpenedBy " + GetTag(GetLastOpenedBy()));
|
||||
return GetLastOpenedBy();
|
||||
}
|
||||
else
|
||||
if (GetIsObjectValid(GetLastKiller()) == TRUE)
|
||||
{
|
||||
dbSpeak("LastOpener: GetLastAttacker");
|
||||
//dbSpeak("LastOpener: GetLastAttacker");
|
||||
return GetLastKiller();
|
||||
}
|
||||
dbSpeak("LastOpener: The Object is Invalid you weenie!");
|
||||
//dbSpeak("LastOpener: The Object is Invalid you weenie!");
|
||||
return OBJECT_INVALID;
|
||||
}
|
||||
|
||||
@@ -200,9 +207,9 @@ int GetRange(int nCategory, int nHD)
|
||||
case 1: nMin = RANGE_1_MIN; nMax = RANGE_1_MAX; break;
|
||||
}
|
||||
|
||||
dbSpeak("nMin = " + IntToString(nMin));
|
||||
dbSpeak("nMax = " + IntToString(nMax));
|
||||
dbSpeak("GetRange.nHD = " + IntToString(nHD));
|
||||
//dbSpeak("nMin = " + IntToString(nMin));
|
||||
//dbSpeak("nMax = " + IntToString(nMax));
|
||||
//dbSpeak("GetRange.nHD = " + IntToString(nHD));
|
||||
if (nHD >= nMin && nHD <= nMax)
|
||||
{
|
||||
return TRUE;
|
||||
@@ -312,7 +319,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
{
|
||||
sRes = "NW_IT_BOOK0" + IntToString(nBook1);
|
||||
}
|
||||
dbSpeak("Create book");
|
||||
//dbSpeak("Create book");
|
||||
dbCreateItemOnObject(sRes, oTarget);
|
||||
}
|
||||
|
||||
@@ -327,7 +334,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
case 2: sRes = "NW_IT_MMIDMISC05"; break;
|
||||
case 3: sRes = "NW_IT_MMIDMISC06"; break;
|
||||
}
|
||||
dbSpeak("animal");
|
||||
//dbSpeak("animal");
|
||||
dbCreateItemOnObject(sRes, oTarget);
|
||||
}
|
||||
|
||||
@@ -346,7 +353,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
case 5: sRes = "NW_IT_MPOTION022"; break; // spirits
|
||||
case 6: sRes = "NW_IT_TORCH001"; break; //torch
|
||||
}
|
||||
dbSpeak("CreateJunk");
|
||||
//dbSpeak("CreateJunk");
|
||||
dbCreateItemOnObject(sRes, oTarget);
|
||||
}
|
||||
// *
|
||||
@@ -392,7 +399,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
{
|
||||
nAmount = 1;
|
||||
}
|
||||
dbSpeak("gold");
|
||||
//dbSpeak("gold");
|
||||
dbCreateItemOnObject("NW_IT_GOLD001", oTarget, nAmount);
|
||||
}
|
||||
void CreateGem(object oTarget, object oAdventurer, int nTreasureType, int nModifier = 0)
|
||||
@@ -476,7 +483,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
case 8: sGem = "nw_it_gem012"; break;
|
||||
}
|
||||
}
|
||||
dbSpeak("Create Gem");
|
||||
//dbSpeak("Create Gem");
|
||||
dbCreateItemOnObject(sGem, oTarget, 1);
|
||||
}
|
||||
void CreateJewel(object oTarget, object oAdventurer, int nTreasureType, int nModifier = 0)
|
||||
@@ -547,7 +554,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
case 5: case 6: sJewel = "nw_it_mneck022"; break;
|
||||
}
|
||||
}
|
||||
dbSpeak("Create Jewel");
|
||||
//dbSpeak("Create Jewel");
|
||||
|
||||
dbCreateItemOnObject(sJewel, oTarget, 1);
|
||||
|
||||
@@ -697,7 +704,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
case 7: sScroll = "nw_it_spdvscr702"; break;
|
||||
}
|
||||
}
|
||||
dbSpeak("Divine Scroll");
|
||||
//dbSpeak("Divine Scroll");
|
||||
|
||||
dbCreateItemOnObject(sScroll, oTarget, 1);
|
||||
|
||||
@@ -784,7 +791,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
case 20: sAmmo = "nw_wammbu007"; break;
|
||||
}
|
||||
}
|
||||
dbSpeak("ammo");
|
||||
//dbSpeak("ammo");
|
||||
dbCreateItemOnObject(sAmmo, oTarget, Random(30) + 1); // create up to 30 of the specified ammo type
|
||||
}
|
||||
|
||||
@@ -935,7 +942,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
}
|
||||
|
||||
}
|
||||
dbSpeak("Create Trapkit");
|
||||
//dbSpeak("Create Trapkit");
|
||||
dbCreateItemOnObject(sKit, oTarget, 1);
|
||||
|
||||
}
|
||||
@@ -1001,7 +1008,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
}
|
||||
|
||||
}
|
||||
dbSpeak("Create Healing Kit");
|
||||
//dbSpeak("Create Healing Kit");
|
||||
|
||||
dbCreateItemOnObject(sKit, oTarget, 1);
|
||||
|
||||
@@ -1076,7 +1083,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
}
|
||||
|
||||
}
|
||||
dbSpeak("Create Lockpick");
|
||||
//dbSpeak("Create Lockpick");
|
||||
|
||||
dbCreateItemOnObject(sKit, oTarget, 1);
|
||||
|
||||
@@ -1213,7 +1220,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
case 29: sPotion = "nw_it_mpotion006"; break;
|
||||
}
|
||||
}
|
||||
dbSpeak("Create Potion");
|
||||
//dbSpeak("Create Potion");
|
||||
dbCreateItemOnObject(sPotion, oTarget, 1);
|
||||
}
|
||||
//::///////////////////////////////////////////////
|
||||
@@ -1476,7 +1483,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
case 30: sItem = "nw_it_mneck018"; break;
|
||||
}
|
||||
}
|
||||
dbSpeak("Create Misc");
|
||||
//dbSpeak("Create Misc");
|
||||
|
||||
dbCreateItemOnObject(sItem, oTarget, 1);
|
||||
}
|
||||
@@ -1536,7 +1543,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
else
|
||||
if (GetLevelByClass(CLASS_TYPE_MONK, oAdventurer)>= 1)
|
||||
{
|
||||
dbSpeak("in monk function");
|
||||
//dbSpeak("in monk function");
|
||||
if (nSpecific == 0)
|
||||
{
|
||||
CreateGenericMonkWeapon(oTarget, oAdventurer);
|
||||
@@ -1631,7 +1638,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
}
|
||||
|
||||
}
|
||||
dbSpeak("Generic Rod staff wand");
|
||||
//dbSpeak("Generic Rod staff wand");
|
||||
|
||||
dbCreateItemOnObject(sItem, oTarget, 1);
|
||||
}
|
||||
@@ -1747,7 +1754,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
case 13: sItem = "nw_waxmhn011"; break;
|
||||
}
|
||||
}
|
||||
dbSpeak("Generic Monk Weapon");
|
||||
//dbSpeak("Generic Monk Weapon");
|
||||
|
||||
dbCreateItemOnObject(sItem, oTarget, 1);
|
||||
}
|
||||
@@ -1888,7 +1895,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
}
|
||||
|
||||
}
|
||||
dbSpeak("Specific Monk Weapon");
|
||||
//dbSpeak("Specific Monk Weapon");
|
||||
|
||||
dbCreateItemOnObject(sItem, oTarget, 1);
|
||||
|
||||
@@ -2004,7 +2011,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
}
|
||||
|
||||
}
|
||||
dbSpeak("Generic Druid weapon");
|
||||
//dbSpeak("Generic Druid weapon");
|
||||
|
||||
dbCreateItemOnObject(sItem, oTarget, 1);
|
||||
|
||||
@@ -2082,7 +2089,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
}
|
||||
|
||||
}
|
||||
dbSpeak("specific druid weapon");
|
||||
//dbSpeak("specific druid weapon");
|
||||
|
||||
dbCreateItemOnObject(sItem, oTarget, 1);
|
||||
|
||||
@@ -2168,7 +2175,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
}
|
||||
|
||||
}
|
||||
dbSpeak("Generic Wizard or Sorcerer Weapon");
|
||||
//dbSpeak("Generic Wizard or Sorcerer Weapon");
|
||||
|
||||
dbCreateItemOnObject(sItem, oTarget, 1);
|
||||
|
||||
@@ -2241,7 +2248,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
}
|
||||
|
||||
}
|
||||
dbSpeak("Specific Wizard or Sorcerer Weapon");
|
||||
//dbSpeak("Specific Wizard or Sorcerer Weapon");
|
||||
|
||||
dbCreateItemOnObject(sItem, oTarget, 1);
|
||||
|
||||
@@ -2410,7 +2417,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
|
||||
}
|
||||
}
|
||||
dbSpeak("Create Generic SImple; Specific = " + IntToString(nModifier));
|
||||
//dbSpeak("Create Generic SImple; Specific = " + IntToString(nModifier));
|
||||
|
||||
dbCreateItemOnObject(sItem, oTarget, 1);
|
||||
}
|
||||
@@ -2594,7 +2601,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
|
||||
}
|
||||
|
||||
dbSpeak("Create Generic Martial");
|
||||
//dbSpeak("Create Generic Martial");
|
||||
|
||||
dbCreateItemOnObject(sItem, oTarget, 1);
|
||||
}
|
||||
@@ -2726,7 +2733,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
}
|
||||
|
||||
}
|
||||
dbSpeak("Create generic exotic");
|
||||
//dbSpeak("Create generic exotic");
|
||||
|
||||
dbCreateItemOnObject(sItem, oTarget, 1);
|
||||
}
|
||||
@@ -2825,7 +2832,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
}
|
||||
|
||||
}
|
||||
dbSpeak("Create Generic light");
|
||||
//dbSpeak("Create Generic light");
|
||||
|
||||
dbCreateItemOnObject(sItem, oTarget, 1);
|
||||
}
|
||||
@@ -2952,7 +2959,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
}
|
||||
|
||||
}
|
||||
dbSpeak("Create Generic medium");
|
||||
//dbSpeak("Create Generic medium");
|
||||
|
||||
dbCreateItemOnObject(sItem, oTarget, 1);
|
||||
}
|
||||
@@ -3058,7 +3065,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
}
|
||||
|
||||
}
|
||||
dbSpeak("Create Generic heavy");
|
||||
// dbSpeak("Create Generic heavy");
|
||||
|
||||
dbCreateItemOnObject(sItem, oTarget, 1);
|
||||
}
|
||||
@@ -4007,7 +4014,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
// * if nSpecific is = 1 then spawn in 'named' items at the higher levels
|
||||
void CreateTable2Item(object oTarget, object oAdventurer, int nSpecific=0)
|
||||
{
|
||||
dbSpeak("In CreateTable2Item");
|
||||
//dbSpeak("In CreateTable2Item");
|
||||
string sItem = "";
|
||||
int nProbMisc = 0;
|
||||
int nProbClass = 0;
|
||||
@@ -4042,9 +4049,12 @@ int GetNumberOfItems(int nTreasureType)
|
||||
|
||||
|
||||
//* SETUP probabilities based on Class
|
||||
if ( nClass == CLASS_TYPE_FIGHTER || nClass == CLASS_TYPE_PALADIN || nSpecialRanger == 1)
|
||||
if ( nClass == CLASS_TYPE_FIGHTER || nClass == CLASS_TYPE_PALADIN || nSpecialRanger == 1
|
||||
|| nClass == CLASS_TYPE_ANTI_PALADIN || nClass == CLASS_TYPE_BRAWLER || nClass == CLASS_TYPE_CRUSADER
|
||||
|| nClass == CLASS_TYPE_DUSKBLADE || nClass == CLASS_TYPE_KNIGHT || nClass == CLASS_TYPE_MARSHAL
|
||||
|| nClass == CLASS_TYPE_PSYWAR || nClass == CLASS_TYPE_SOHEI)
|
||||
{
|
||||
dbSpeak("I am fighter or paladin or heavy ranger");
|
||||
//dbSpeak("I am fighter or paladin or heavy ranger");
|
||||
nProbMisc = 20;
|
||||
nProbClass = 0;
|
||||
nProbRodStaffWand = 5;
|
||||
@@ -4058,7 +4068,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
else
|
||||
if (nClass == CLASS_TYPE_WIZARD || nClass == CLASS_TYPE_SORCERER)
|
||||
{
|
||||
dbSpeak("I am wizard or sorcerer");
|
||||
//dbSpeak("I am wizard or sorcerer");
|
||||
nProbMisc = 40;
|
||||
nProbClass = 30;
|
||||
nProbRodStaffWand = 15;
|
||||
@@ -4070,9 +4080,10 @@ int GetNumberOfItems(int nTreasureType)
|
||||
nProbHeavy = 2;
|
||||
}
|
||||
else
|
||||
if (nClass == CLASS_TYPE_BARBARIAN || nSpecialRanger == 2)
|
||||
if (nClass == CLASS_TYPE_BARBARIAN || nSpecialRanger == 2 || nClass == CLASS_TYPE_BOWMAN
|
||||
|| nClass == CLASS_TYPE_HEXBLADE || nClass == CLASS_TYPE_WARBLADE)
|
||||
{
|
||||
dbSpeak("I am barbarian or light ranger");
|
||||
//dbSpeak("I am barbarian or light ranger");
|
||||
|
||||
nProbMisc = 20;
|
||||
nProbClass = 0;
|
||||
@@ -4085,9 +4096,97 @@ int GetNumberOfItems(int nTreasureType)
|
||||
nProbHeavy = 3;
|
||||
}
|
||||
else
|
||||
if (nClass == CLASS_TYPE_ARCHIVIST || nClass == CLASS_TYPE_DRAGON_SHAMAN || nClass == CLASS_TYPE_FAVOURED_SOUL
|
||||
|| nClass == CLASS_TYPE_MYSTIC || nClass == CLASS_TYPE_WARMAGE || nClass == CLASS_TYPE_TEMPLAR)
|
||||
{
|
||||
//type 1
|
||||
nProbMisc = 25;
|
||||
nProbClass = 0;
|
||||
nProbRodStaffWand = 15;
|
||||
nProbSimple = 15;
|
||||
nProbMartial = 8;
|
||||
nProbExotic = 6;
|
||||
nProbLight = 15;
|
||||
nProbMedium = 10;
|
||||
nProbHeavy = 6;
|
||||
}
|
||||
else
|
||||
if (nClass == CLASS_TYPE_NOBLE || nClass == CLASS_TYPE_SWASHBUCKLER || nClass == CLASS_TYPE_SWORDSAGE
|
||||
|| nClass == CLASS_TYPE_ULTIMATE_RANGER)
|
||||
{
|
||||
//type 2
|
||||
nProbMisc = 27;
|
||||
nProbClass = 0;
|
||||
nProbRodStaffWand = 5;
|
||||
nProbSimple = 15;
|
||||
nProbMartial = 20;
|
||||
nProbExotic = 10;
|
||||
nProbLight = 10;
|
||||
nProbMedium = 8;
|
||||
nProbHeavy = 5;
|
||||
}
|
||||
else
|
||||
if (nClass == CLASS_TYPE_BEGUILER || nClass == CLASS_TYPE_DREAD_NECROMANCER || nClass == CLASS_TYPE_HEALER
|
||||
|| nClass == CLASS_TYPE_SCOUT || nClass == CLASS_TYPE_SHAMAN || nClass == CLASS_TYPE_SOULKNIFE
|
||||
|| nClass == CLASS_TYPE_TRUENAMER || nClass == CLASS_TYPE_WARLOCK || nClass == CLASS_TYPE_WILDER)
|
||||
{
|
||||
//type 3
|
||||
nProbMisc = 45;
|
||||
nProbClass = 0;
|
||||
nProbRodStaffWand = 7;
|
||||
nProbSimple = 15;
|
||||
nProbMartial = 5;
|
||||
nProbExotic = 5;
|
||||
nProbLight = 15;
|
||||
nProbMedium = 4;
|
||||
nProbHeavy = 4;
|
||||
}
|
||||
else
|
||||
if (nClass == CLASS_TYPE_DRAGONFIRE_ADEPT || nClass == CLASS_TYPE_PSION || nClass == CLASS_TYPE_WITCH)
|
||||
{
|
||||
//type 4
|
||||
nProbMisc = 50;
|
||||
nProbClass = 0;
|
||||
nProbRodStaffWand = 10;
|
||||
nProbSimple = 20;
|
||||
nProbMartial = 5;
|
||||
nProbExotic = 5;
|
||||
nProbLight = 4;
|
||||
nProbMedium = 3;
|
||||
nProbHeavy = 3;
|
||||
}
|
||||
else
|
||||
if (nClass == CLASS_TYPE_NINJA)
|
||||
{
|
||||
//type 5
|
||||
nProbMisc = 45;
|
||||
nProbClass = 0;
|
||||
nProbRodStaffWand = 2;
|
||||
nProbSimple = 12;
|
||||
nProbMartial = 6;
|
||||
nProbExotic = 26;
|
||||
nProbLight = 3;
|
||||
nProbMedium = 3;
|
||||
nProbHeavy = 3;
|
||||
}
|
||||
else
|
||||
if (nClass == CLASS_TYPE_CW_SAMURAI || nClass == CLASS_TYPE_SAMURAI)
|
||||
{
|
||||
//type 6
|
||||
nProbMisc = 25;
|
||||
nProbClass = 0;
|
||||
nProbRodStaffWand = 5;
|
||||
nProbSimple = 5;
|
||||
nProbMartial = 10;
|
||||
nProbExotic = 20;
|
||||
nProbLight = 10;
|
||||
nProbMedium = 20;
|
||||
nProbHeavy = 5;
|
||||
}
|
||||
else
|
||||
if (nClass == CLASS_TYPE_CLERIC)
|
||||
{
|
||||
dbSpeak("I am cleric");
|
||||
//dbSpeak("I am cleric");
|
||||
|
||||
nProbMisc = 20;
|
||||
nProbClass = 10;
|
||||
@@ -4102,7 +4201,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
else
|
||||
if (nClass == CLASS_TYPE_DRUID)
|
||||
{
|
||||
dbSpeak("I am druid");
|
||||
//dbSpeak("I am druid");
|
||||
|
||||
nProbMisc = 20;
|
||||
nProbClass = 25;
|
||||
@@ -4117,7 +4216,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
else
|
||||
if (nClass == CLASS_TYPE_MONK)
|
||||
{
|
||||
dbSpeak("I am monk");
|
||||
//dbSpeak("I am monk");
|
||||
nProbMisc = 20;
|
||||
nProbClass = 50;
|
||||
nProbRodStaffWand = 2;
|
||||
@@ -4129,9 +4228,9 @@ int GetNumberOfItems(int nTreasureType)
|
||||
nProbHeavy = 4;
|
||||
}
|
||||
else
|
||||
if (nClass == CLASS_TYPE_ROGUE)
|
||||
if (nClass == CLASS_TYPE_ROGUE || nClass == CLASS_TYPE_PSYCHIC_ROGUE)
|
||||
{
|
||||
dbSpeak("I am rogue");
|
||||
//dbSpeak("I am rogue");
|
||||
|
||||
nProbMisc = 25;
|
||||
nProbClass = 10;
|
||||
@@ -4146,7 +4245,7 @@ int GetNumberOfItems(int nTreasureType)
|
||||
else
|
||||
if (nClass == CLASS_TYPE_BARD)
|
||||
{
|
||||
dbSpeak("I am bard");
|
||||
//dbSpeak("I am bard");
|
||||
|
||||
nProbMisc = 25;
|
||||
nProbClass = 5;
|
||||
@@ -4158,11 +4257,11 @@ int GetNumberOfItems(int nTreasureType)
|
||||
nProbMedium = 5;
|
||||
nProbHeavy = 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
dbSpeak("No Valid Class");
|
||||
}
|
||||
dbSpeak("Table2Item: After Class Distribution");
|
||||
//else
|
||||
//{
|
||||
// dbSpeak("No Valid Class");
|
||||
//}
|
||||
//dbSpeak("Table2Item: After Class Distribution");
|
||||
//* Create Items based on Probabilities
|
||||
int nRandom = d100();
|
||||
if (nRandom <= nProbMisc)
|
||||
@@ -4219,10 +4318,10 @@ int GetNumberOfItems(int nTreasureType)
|
||||
if (nSpecific == 0) CreateGenericHeavyArmor(oTarget, oAdventurer);
|
||||
else CreateSpecificHeavyArmor(oTarget, oAdventurer);
|
||||
}
|
||||
else
|
||||
{
|
||||
dbSpeak("Generic Generic or Specific; error: 3524");
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// dbSpeak("Generic Generic or Specific; error: 3524");
|
||||
//}
|
||||
}
|
||||
|
||||
//::///////////////////////////////////////////////
|
||||
@@ -4251,12 +4350,12 @@ int GetNumberOfItems(int nTreasureType)
|
||||
void GenerateTreasure(int nTreasureType, object oLastOpener, object oCreateOn)
|
||||
{
|
||||
|
||||
dbSpeak("*********************NEW TREASURE*************************");
|
||||
//dbSpeak("*********************NEW TREASURE*************************");
|
||||
|
||||
// * abort treasure if no one opened the container
|
||||
if (GetIsObjectValid(oLastOpener) == FALSE)
|
||||
{
|
||||
dbSpeak("Aborted. No valid Last Opener");
|
||||
//dbSpeak("Aborted. No valid Last Opener");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4334,7 +4433,7 @@ void GenerateTreasure(int nTreasureType, object oLastOpener, object oCreateOn)
|
||||
nProbTable2 = HIGH_PROB_TABLE2;
|
||||
}
|
||||
else if (nTreasureType == TREASURE_BOSS)
|
||||
{ dbSpeak("boss");
|
||||
{ //dbSpeak("boss");
|
||||
nProbTable2 = 100;
|
||||
nSpecific = 1;
|
||||
}
|
||||
@@ -4345,7 +4444,7 @@ void GenerateTreasure(int nTreasureType, object oLastOpener, object oCreateOn)
|
||||
nProbDivine = 4;
|
||||
}
|
||||
|
||||
dbSpeak("Generate Treasure nSpecific = " + IntToString(nSpecific));
|
||||
//dbSpeak("Generate Treasure nSpecific = " + IntToString(nSpecific));
|
||||
|
||||
for (i = 1; i <= nNumberItems; i++)
|
||||
{
|
||||
@@ -4376,8 +4475,8 @@ void GenerateTreasure(int nTreasureType, object oLastOpener, object oCreateOn)
|
||||
{
|
||||
CreateTable2Item(oCreateOn, oLastOpener, nSpecific); // * Weapons, Armor, Misc - Class based
|
||||
}
|
||||
else
|
||||
dbSpeak("other stuff");
|
||||
//else
|
||||
// dbSpeak("other stuff");
|
||||
|
||||
|
||||
|
||||
@@ -4385,23 +4484,23 @@ void GenerateTreasure(int nTreasureType, object oLastOpener, object oCreateOn)
|
||||
}
|
||||
void GenerateLowTreasure(object oLastOpener, object oCreateOn=OBJECT_INVALID)
|
||||
{
|
||||
//GenerateTreasure(TREASURE_LOW, oLastOpener, oCreateOn);
|
||||
GenerateTreasure(TREASURE_LOW, oLastOpener, oCreateOn);
|
||||
}
|
||||
void GenerateMediumTreasure(object oLastOpener, object oCreateOn=OBJECT_INVALID)
|
||||
{
|
||||
//GenerateTreasure(TREASURE_MEDIUM, oLastOpener, oCreateOn);
|
||||
GenerateTreasure(TREASURE_MEDIUM, oLastOpener, oCreateOn);
|
||||
}
|
||||
void GenerateHighTreasure(object oLastOpener, object oCreateOn=OBJECT_INVALID)
|
||||
{
|
||||
//GenerateTreasure(TREASURE_HIGH, oLastOpener, oCreateOn);
|
||||
GenerateTreasure(TREASURE_HIGH, oLastOpener, oCreateOn);
|
||||
}
|
||||
void GenerateBossTreasure(object oLastOpener, object oCreateOn=OBJECT_INVALID)
|
||||
{
|
||||
//GenerateTreasure(TREASURE_BOSS, oLastOpener, oCreateOn);
|
||||
GenerateTreasure(TREASURE_BOSS, oLastOpener, oCreateOn);
|
||||
}
|
||||
void GenerateBookTreasure(object oLastOpener, object oCreateOn=OBJECT_INVALID)
|
||||
{
|
||||
//GenerateTreasure(TREASURE_BOOK, oLastOpener, oCreateOn);
|
||||
GenerateTreasure(TREASURE_BOOK, oLastOpener, oCreateOn);
|
||||
}
|
||||
//::///////////////////////////////////////////////
|
||||
//:: GenerateNPCTreasure
|
||||
@@ -4443,23 +4542,23 @@ void GenerateNPCTreasure(int nTreasureValue=1, object oTreasureGetter=OBJECT_SEL
|
||||
// if a creature
|
||||
if (Random(100)+1 >= 75)
|
||||
{
|
||||
//GenerateTreasure(TREASURE_LOW, oTreasureGetter, oKiller);
|
||||
GenerateTreasure(TREASURE_LOW, oTreasureGetter, oKiller);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (nTreasureValue == 2)
|
||||
{
|
||||
//GenerateTreasure(TREASURE_MEDIUM, oTreasureGetter, oKiller);
|
||||
GenerateTreasure(TREASURE_MEDIUM, oTreasureGetter, oKiller);
|
||||
}
|
||||
else
|
||||
if (nTreasureValue == 3)
|
||||
{
|
||||
//GenerateTreasure(TREASURE_HIGH, oTreasureGetter, oKiller);
|
||||
GenerateTreasure(TREASURE_HIGH, oTreasureGetter, oKiller);
|
||||
}
|
||||
else
|
||||
if (nTreasureValue == 4)
|
||||
{
|
||||
//GenerateBossTreasure(oKiller, oTreasureGetter);
|
||||
GenerateBossTreasure(oKiller, oTreasureGetter);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4518,6 +4617,47 @@ void ShoutDisturbed()
|
||||
}
|
||||
}
|
||||
|
||||
int nGetIsBaseClass(int nClass)
|
||||
{
|
||||
return (nClass <= CLASS_TYPE_WIZARD ||
|
||||
nClass == CLASS_TYPE_ANTI_PALADIN ||
|
||||
nClass == CLASS_TYPE_ARCHIVIST ||
|
||||
nClass == CLASS_TYPE_BEGUILER ||
|
||||
nClass == CLASS_TYPE_BOWMAN ||
|
||||
nClass == CLASS_TYPE_BRAWLER ||
|
||||
nClass == CLASS_TYPE_CRUSADER ||
|
||||
nClass == CLASS_TYPE_DRAGON_SHAMAN ||
|
||||
nClass == CLASS_TYPE_DRAGONFIRE_ADEPT ||
|
||||
nClass == CLASS_TYPE_DREAD_NECROMANCER ||
|
||||
nClass == CLASS_TYPE_DUSKBLADE ||
|
||||
nClass == CLASS_TYPE_FAVOURED_SOUL ||
|
||||
nClass == CLASS_TYPE_HEALER ||
|
||||
nClass == CLASS_TYPE_HEXBLADE ||
|
||||
nClass == CLASS_TYPE_KNIGHT ||
|
||||
nClass == CLASS_TYPE_MARSHAL ||
|
||||
nClass == CLASS_TYPE_MYSTIC ||
|
||||
nClass == CLASS_TYPE_NINJA ||
|
||||
nClass == CLASS_TYPE_NOBLE ||
|
||||
nClass == CLASS_TYPE_PSION ||
|
||||
nClass == CLASS_TYPE_PSYWAR ||
|
||||
nClass == CLASS_TYPE_PSYCHIC_ROGUE ||
|
||||
nClass == CLASS_TYPE_SAMURAI ||
|
||||
nClass == CLASS_TYPE_CW_SAMURAI ||
|
||||
nClass == CLASS_TYPE_SCOUT ||
|
||||
nClass == CLASS_TYPE_SHAMAN ||
|
||||
nClass == CLASS_TYPE_SOHEI ||
|
||||
nClass == CLASS_TYPE_SOULKNIFE ||
|
||||
nClass == CLASS_TYPE_SWASHBUCKLER ||
|
||||
nClass == CLASS_TYPE_SWORDSAGE ||
|
||||
nClass == CLASS_TYPE_TRUENAMER ||
|
||||
nClass == CLASS_TYPE_ULTIMATE_RANGER ||
|
||||
nClass == CLASS_TYPE_WARBLADE ||
|
||||
nClass == CLASS_TYPE_WARLOCK ||
|
||||
nClass == CLASS_TYPE_WARMAGE ||
|
||||
nClass == CLASS_TYPE_WILDER ||
|
||||
nClass == CLASS_TYPE_WITCH ||
|
||||
nClass == CLASS_TYPE_TEMPLAR);
|
||||
}
|
||||
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Determine Class to Use
|
||||
@@ -4536,35 +4676,96 @@ int nDetermineClassToUse(object oCharacter)
|
||||
{
|
||||
int nClass;
|
||||
int nTotal = GetHitDice(oCharacter);
|
||||
dbSpeak("Hit dice " + IntToString(nTotal));
|
||||
//dbSpeak("Hit dice " + IntToString(nTotal));
|
||||
if (nTotal < 1)
|
||||
{
|
||||
nTotal = 1;
|
||||
}
|
||||
/*
|
||||
float fTotal = IntToFloat(nTotal);
|
||||
if (GetIsObjectValid(oCharacter) == FALSE)
|
||||
{
|
||||
dbSpeak("DetermineClassToUse: This character is invalid");
|
||||
}
|
||||
//if (GetIsObjectValid(oCharacter) == FALSE)
|
||||
//{
|
||||
// dbSpeak("DetermineClassToUse: This character is invalid");
|
||||
//}
|
||||
|
||||
int nClass1 = GetClassByPosition(1, oCharacter);
|
||||
int nState1 = FloatToInt((IntToFloat(GetLevelByClass(nClass1, oCharacter)) / fTotal) * 100);
|
||||
dbSpeak("Level 1 Class Level = " + IntToString(GetLevelByClass(nClass1,oCharacter)));
|
||||
//dbSpeak("Level 1 Class Level = " + IntToString(GetLevelByClass(nClass1,oCharacter)));
|
||||
|
||||
PrintString("GENERIC SCRIPT DEBUG STRING ********** " + GetTag(oCharacter) + "Class 1 " + IntToString(nState1));
|
||||
dbSpeak("State 1 " + IntToString(nState1));
|
||||
//PrintString("GENERIC SCRIPT DEBUG STRING ********** " + GetTag(oCharacter) + "Class 1 " + IntToString(nState1));
|
||||
//dbSpeak("State 1 " + IntToString(nState1));
|
||||
int nClass2 = GetClassByPosition(2, oCharacter);
|
||||
int nState2 = FloatToInt((IntToFloat(GetLevelByClass(nClass2, oCharacter)) / fTotal) * 100) + nState1;
|
||||
PrintString("GENERIC SCRIPT DEBUG STRING ********** " + GetTag(oCharacter) + "Class 2 " + IntToString(nState2));
|
||||
//PrintString("GENERIC SCRIPT DEBUG STRING ********** " + GetTag(oCharacter) + "Class 2 " + IntToString(nState2));
|
||||
|
||||
int nClass3 = GetClassByPosition(3, oCharacter);
|
||||
int nState3 = FloatToInt((IntToFloat(GetLevelByClass(nClass3, oCharacter)) / fTotal) * 100) + nState2;
|
||||
PrintString("GENERIC SCRIPT DEBUG STRING ********** " + GetTag(oCharacter) + "Class 3 " + IntToString(nState3));
|
||||
//PrintString("GENERIC SCRIPT DEBUG STRING ********** " + GetTag(oCharacter) + "Class 3 " + IntToString(nState3));
|
||||
*/
|
||||
int nClass1 = GetClassByPosition(1, oCharacter);
|
||||
int nClass2 = GetClassByPosition(2, oCharacter);
|
||||
int nClass3 = GetClassByPosition(3, oCharacter);
|
||||
int nClass4 = GetClassByPosition(4, oCharacter);
|
||||
int nClass5 = GetClassByPosition(5, oCharacter);
|
||||
int nClass6 = GetClassByPosition(6, oCharacter);
|
||||
int nClass7 = GetClassByPosition(7, oCharacter);
|
||||
int nClass8 = GetClassByPosition(8, oCharacter);
|
||||
|
||||
int nState1 = GetLevelByClass(nClass1, oCharacter) * 100 / nTotal;
|
||||
int nState2 = GetLevelByClass(nClass2, oCharacter) * 100 / nTotal + nState1;
|
||||
int nState3 = GetLevelByClass(nClass3, oCharacter) * 100 / nTotal + nState2;
|
||||
int nState4 = GetLevelByClass(nClass4, oCharacter) * 100 / nTotal + nState3;
|
||||
int nState5 = GetLevelByClass(nClass5, oCharacter) * 100 / nTotal + nState4;
|
||||
int nState6 = GetLevelByClass(nClass6, oCharacter) * 100 / nTotal + nState5;
|
||||
int nState7 = GetLevelByClass(nClass7, oCharacter) * 100 / nTotal + nState6;
|
||||
|
||||
// nState8 will always be 100 if there is an eigth class, or 0 if there isn't
|
||||
//int nState8 = GetLevelByClass(nClass3, oCharacter) * 100 / nTotal + nState7;
|
||||
|
||||
// correct for unrecognized classes - assumes the first class will be a non-prestige player class
|
||||
if(nClass2 != CLASS_TYPE_INVALID && !nGetIsBaseClass(nClass2))
|
||||
{
|
||||
nClass2 = CLASS_TYPE_INVALID;
|
||||
nState1 = nState2;
|
||||
}
|
||||
if(nClass3 != CLASS_TYPE_INVALID && !nGetIsBaseClass(nClass3))
|
||||
{
|
||||
nClass3 = CLASS_TYPE_INVALID;
|
||||
nState1 = nState3;
|
||||
}
|
||||
if(nClass4 != CLASS_TYPE_INVALID && !nGetIsBaseClass(nClass4))
|
||||
{
|
||||
nClass4 = CLASS_TYPE_INVALID;
|
||||
nState1 = nState4;
|
||||
}
|
||||
if(nClass5 != CLASS_TYPE_INVALID && !nGetIsBaseClass(nClass5))
|
||||
{
|
||||
nClass5 = CLASS_TYPE_INVALID;
|
||||
nState1 = nState5;
|
||||
}
|
||||
if(nClass6 != CLASS_TYPE_INVALID && !nGetIsBaseClass(nClass6))
|
||||
{
|
||||
nClass6 = CLASS_TYPE_INVALID;
|
||||
nState1 = nState6;
|
||||
}
|
||||
if(nClass7 != CLASS_TYPE_INVALID && !nGetIsBaseClass(nClass7))
|
||||
{
|
||||
nClass7 = CLASS_TYPE_INVALID;
|
||||
nState1 = nState7;
|
||||
}
|
||||
if(nClass8 != CLASS_TYPE_INVALID && !nGetIsBaseClass(nClass8))
|
||||
{
|
||||
nClass8 = CLASS_TYPE_INVALID;
|
||||
if(nClass7 != CLASS_TYPE_INVALID)
|
||||
nState7 = 100;
|
||||
else nState1 = 100;
|
||||
}
|
||||
|
||||
int nUseClass = d100();
|
||||
PrintString("GENERIC SCRIPT DEBUG STRING ********** " + "D100 Roll " +IntToString(nUseClass));
|
||||
//PrintString("GENERIC SCRIPT DEBUG STRING ********** " + "D100 Roll " +IntToString(nUseClass));
|
||||
|
||||
|
||||
dbSpeak("Before comparison : " + IntToString(nClass1));
|
||||
//dbSpeak("Before comparison : " + IntToString(nClass1));
|
||||
if(nUseClass <= nState1)
|
||||
{
|
||||
nClass = nClass1;
|
||||
@@ -4575,11 +4776,16 @@ int nDetermineClassToUse(object oCharacter)
|
||||
}
|
||||
else
|
||||
{
|
||||
nClass = nClass3;
|
||||
// might be possible to end up here by accident because of a rounding error
|
||||
// so just in case...
|
||||
if(nClass3 == CLASS_TYPE_INVALID) nClass = nClass1;
|
||||
else nClass = nClass3;
|
||||
}
|
||||
dbSpeak("Class from determineClass " + IntToString(nClass));
|
||||
|
||||
//dbSpeak("Class from determineClass " + IntToString(nClass));
|
||||
return nClass;
|
||||
}
|
||||
|
||||
|
||||
//:: Test Void
|
||||
//void main () {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user