Added Skullkeep Mystic Forge / Combine system

Added Skullkeep Mystic Forge / Combine system., modified to use a single forge and combine for all item types.  Added new Magesmith shop & NPC in Town of Ascension.  Full compile.  Updated release archive.
This commit is contained in:
Jaysyn904
2024-11-10 20:06:52 -05:00
parent 1daebc10ef
commit 80d4b7c4d6
79 changed files with 31519 additions and 159 deletions

View File

@@ -1053,10 +1053,10 @@ void DropGold (object oMob, object oSack, int iBonus)
/////////////////////////////////////////////////////////////////////////
//Gold Debugging
//object oPC = GetFirstPC();
//object oKiller = GetFirstPC();
//sGold = IntToString(iGold);
//sLvl = IntToString(iHD);
//FloatingTextStringOnCreature(sGold+" Gold Spawned by lvl "+sLvl+" mob", oPC);
//FloatingTextStringOnCreature(sGold+" Gold Spawned by lvl "+sLvl+" mob", oKiller);
//
//
//
@@ -1957,17 +1957,16 @@ void DamageTypeImbue(object oItem, int iRange)
{
case 1:
{
iRoll = d3();
iRoll = d2();
if (iRoll==1)iDam = IP_CONST_DAMAGEBONUS_1d4;
if (iRoll==2)iDam = IP_CONST_DAMAGEBONUS_1;
if (iRoll==3)iDam = IP_CONST_DAMAGEBONUS_1d4;
}
break;
case 2:
{
iRoll = d4();
if (iRoll==1)iDam = IP_CONST_DAMAGEBONUS_1;
if (iRoll==2)iDam = IP_CONST_DAMAGEBONUS_1d4;
if (iRoll==2)iDam = IP_CONST_DAMAGEBONUS_2;
if (iRoll==3)iDam = IP_CONST_DAMAGEBONUS_1d4;
if (iRoll==4)iDam = IP_CONST_DAMAGEBONUS_1d4;
}
@@ -3571,7 +3570,6 @@ void DropMagicItem (object oMob, object oSack, int iRange, int SockChance, int i
}
//:: Chance for socketed item
oItem = CreateItemOnObject(sType, oSack, 1, "sf_socket_item");
iRoll = d100();
@@ -3608,7 +3606,7 @@ void DropMagicItem (object oMob, object oSack, int iRange, int SockChance, int i
///////////////////////////////////////////// Hench Reward Code
object oPC = GetFirstPC();
object oKiller = GetFirstPC();
if (GetMaster(oMob)!=OBJECT_INVALID)
{
@@ -3617,62 +3615,49 @@ void DropMagicItem (object oMob, object oSack, int iRange, int SockChance, int i
}
//////////////////////////////////////////// Lvls 1-5
if (iRange == 1)
//:: AC bonus for ammy, cloak & boots or ability bonus otherwise
if (iID == 1)
{
//:: AC bonus for ammy, cloak & boots or ability bonus otherwise
iRoll = d100();
if (iID == 1)
{
DelayCommand(0.2, ACmisc(oItem, iRange));
++iQual;
}
if (iID == 2) //:: Rings
{
if (iRoll > 94) //:: 5% Chance for Divinty / Wizardry
{
iRoll = d2(1);
if (iRoll == 1)
{
DelayCommand(0.2, ImbueWizardry(oItem, iRange));
iQual+=3;
}
else
{
DelayCommand(0.2, ImbueDivinity(oItem, iRange));
iQual+=3;
}
}
}
else
iRoll = d100();
if (iRoll > 60)
{
DelayCommand(0.2, AbilityImbue(oItem, iRange));
++iQual;
}
DelayCommand(0.2, ACmisc(oItem, iRange));
++iQual;
}
////////////////////////////////////////// Lvls 6-10
else
{
iRoll = d100();
if (iRoll > 94) //:: 5% Chance for Divinty / Wizardry
{
iRoll = d2(1);
if (iRoll == 1)
{
DelayCommand(0.2, ImbueWizardry(oItem, iRange));
iQual+=3;
}
else
{
DelayCommand(0.2, ImbueDivinity(oItem, iRange));
iQual+=3;
}
}
DelayCommand(0.2, AbilityImbue(oItem, iRange));
++iQual;
}
////////////////////////////////////////// Lvls 6-10
if (iRange == 2)
{
//:: Ability bonus &/or AC Bonus
iRoll = d100();
if (iRoll > 60)
{
DelayCommand(0.2, ACmisc(oItem, iRange));
++iQual;
}
iRoll = d100();
if (iRoll > 60)
{
//:: Ability bonus
iRoll = d100();
if (iRoll > 60)
{
DelayCommand(0.2, AbilityImbue(oItem, iRange));
++iQual;
}
//:: Rings ONLY
if (iID==2)
{
if (iID == 2)
{
iRoll = d100();
if (iRoll > 94) //:: 5% Chance for Divinty / Wizardry
{
@@ -3696,15 +3681,17 @@ void DropMagicItem (object oMob, object oSack, int iRange, int SockChance, int i
}
}
else
{//:: Else, Saving Throw bonuses
{
//:: Saving Throw bonus
iRoll = d100();
if (iRoll > 89)
DelayCommand(0.2, SaveImbue(oItem, iRange));
++iQual;
}
}
if (iRoll>90)
{
DelayCommand(0.2, SaveImbue(oItem, iRange));
++iQual;
}
}
}
////////////////////////////////////////// Lvls 11-20
if (iRange == 3)
@@ -3723,7 +3710,7 @@ void DropMagicItem (object oMob, object oSack, int iRange, int SockChance, int i
++iQual;
}
//:: Rings ONLY
if (iID==2)
if (iID == 2)
{
iRoll = d100();
if (iRoll > 89) //:: 10% Chance for Divinty / Wizardry
@@ -3748,7 +3735,7 @@ void DropMagicItem (object oMob, object oSack, int iRange, int SockChance, int i
}
}
else
{//:: Misc Immunity
{//:: Misc Bonus
iRoll = d100();
if (iRoll > 80)
{
@@ -3935,7 +3922,7 @@ void DropMagicItem (object oMob, object oSack, int iRange, int SockChance, int i
++iQual;
}
}
switch(iQual)
{
case 1: sName = ColorString("Magical "+sIName,255, 255, 255); break;
@@ -4739,7 +4726,16 @@ void DropWeapon (object oMob, object oSack, int iRange, int SockChance, int iChe
if (iRoll==2)sIName = "Twin Sabre";
if (iRoll==3)sIName = "Double Shamshir";
}
break;
break;
case 55:
{ //:: Sling
iWType = 1;
sType = "sdsling"; iRoll = d3();
if (iRoll==1)sIName = "Sling";
if (iRoll==2)sIName = "Strap";
if (iRoll==3)sIName = "Funda";
}
break;
}
//:: Chance for socketed item
@@ -4787,14 +4783,14 @@ void DropWeapon (object oMob, object oSack, int iRange, int SockChance, int iChe
SetIdentified(oItem, FALSE);
//////////////////////////////////////////// Lvls 1-5 ::Ranged::
//////////////////////////////////////////// Lvls 1-5 ::Ranged::
//:: Attack bonus
DelayCommand(0.2, BowEnhance(oItem, iRange));
++iQual;
////////////////////////////////////////// Lvls 6-10 ::Ranged::
////////////////////////////////////////// Lvls 6-10 ::Ranged::
if (iRange==2)
{
@@ -4807,28 +4803,28 @@ void DropWeapon (object oMob, object oSack, int iRange, int SockChance, int iChe
}
//:: Massive Crits
iRoll = d100();
if (iRoll>70)
if (iRoll > 70)
{
DelayCommand(0.2, MassCritImbue(oItem, iRange));
++iQual;
}
//:: Mighty
iRoll = d100();
if (iRoll>70)
if (iRoll > 70)
{
DelayCommand(0.2, MightyEnhance(oItem, iRange));
++iQual;
}
//:: Haste
iRoll = d100();
if (iRoll==95)
if (iRoll >= 98)
{
DelayCommand(0.2, HasteImbue(oItem));
iQual+=2;
}
}
////////////////////////////////////////// Lvls 11-20 ::Ranged::
////////////////////////////////////////// Lvls 11-20 ::Ranged::
if (iRange==3)
{
@@ -4876,7 +4872,7 @@ void DropWeapon (object oMob, object oSack, int iRange, int SockChance, int iChe
}
}
////////////////////////////////////////// Lvls 20-30 ::Ranged::
////////////////////////////////////////// Lvls 20-30 ::Ranged::
if (iRange==4)
{
@@ -5409,7 +5405,15 @@ void DropWeapon (object oMob, object oSack, int iRange, int SockChance, int iChe
//:: Enhancement bonus
DelayCommand(0.2, WeapEnhance(oItem, iRange));
++iQual;
switch (iRange)
{
case 1: iQual+=1;
case 2: iQual+=1;
case 3: iQual+=2;
case 4: iQual+=2;
case 5: iQual+=3;
}
////////////////////////////////////////// Lvls 6-10 ::Melee::
@@ -5901,42 +5905,35 @@ void DropAmmo (object oMob, object oSack, int iRange)
{
object oItem;
string sType, sName, sIName;
int iRoll = d4();
int iRoll = d3();
int iQual;
int iStack = d10()*9;
int iStack = d12()*5;
switch(iRoll)
{
//:: Ammo
case 1: {sType = "sdarrow"; iRoll = d3();
if (iRoll==1)sIName = "Arrow";
if (iRoll==2)sIName = "Steel Arrow";
if (iRoll==3)sIName = "Wind Cutter";}
if (iRoll==2)sIName = "Sagitta";
if (iRoll==3)sIName = "War Arrow";}
break;
case 2: {sType = "sdbolt"; iRoll = d3();
if (iRoll==1)sIName = "Bolt";
if (iRoll==2)sIName = "Deathpin";
if (iRoll==3)sIName = "Air Lance";}
if (iRoll==2)sIName = "Shaft";
if (iRoll==3)sIName = "Quarrel";}
break;
case 3: {sType = "sdarrow"; iRoll = d3();
if (iRoll==1)sIName = "Air Assassin";
if (iRoll==2)sIName = "Pegasus Horn";
if (iRoll==3)sIName = "Blood Seeker";}
break;
case 4: {sType = "sdbolt"; iRoll = d3();
if (iRoll==1)sIName = "Steel Bolt";
if (iRoll==2)sIName = "Stinger";
if (iRoll==3)sIName = "Blood Sparrow";}
case 3: {sType = "sdbullet"; iRoll = d3();
if (iRoll==1)sIName = "Bullet";
if (iRoll==2)sIName = "Slug";
if (iRoll==3)sIName = "Stone";}
break;
}
oItem = CreateItemOnObject(sType, oSack, iStack);
//:: Ammo
iRoll = d100();
if (iRoll<=10) // 10% chance of worn item ::Ammo::
if (iRoll <= 10) // 10% chance of worn item ::Ammo::
{
sName = ColorString("Worn "+sIName, 192, 192, 192);
SetName(oItem, sName);
@@ -5947,7 +5944,14 @@ void DropAmmo (object oMob, object oSack, int iRange)
//////////////////////////////////////////// Lvls 1-5 ::Ammo::
if (iRange==1)
{
//:: Damage bonus
DelayCommand(0.2, DamageTypeImbue(oItem, iRange));
++iQual;
//++iQual; // Debugging
}
////////////////////////////////////////// Lvls 6-10 ::Ammo::
@@ -6609,17 +6613,21 @@ void DropEpicSpellBook(object oMob, object oSack)
void sd_droploot (object oMob, object oSack)
{
object oPC = GetLastKiller();
effect eVFX = EffectVisualEffect(VFX_IMP_REMOVE_CONDITION);
effect eDust = EffectVisualEffect(VFX_IMP_DUST_EXPLOSION);
effect eLink = EffectLinkEffects(eVFX, eDust);
object oKiller = GetLastKiller();
//effect eVFX = EffectVisualEffect(VFX_IMP_REMOVE_CONDITION);
//effect eDust = EffectVisualEffect(VFX_IMP_DUST_EXPLOSION);
effect eLink /* = EffectLinkEffects(eVFX, eDust) */;
// no loot if killed in stonewatch
// no loot if spawned in Ascension
// chances are it was an uber guard
// and not the PC that did the killing.
// This is to prevent easy looting higher mobs
if (GetTag(GetArea(oMob))=="Stonewatch")return;
if (GetTag(GetArea(oMob))=="TownofAscension") return;
if (GetTag(GetArea(oMob))=="TrespassersTavern") return;
if (GetClassByPosition(1, oMob) == CLASS_TYPE_COMMONER) return;
// animals dont usually carry wares - but you can skin em!
// This is to prevent tiny rats dropping full plate mail - can't have that!
@@ -6639,10 +6647,10 @@ void sd_droploot (object oMob, object oSack)
if (iDiff==2)lMod = DROP_RATE;
// Make monk gloves a rare drop except when the player is a lvl 5+ monk
if (GetHasFeat(FEAT_SUPERIOR_UNARMED_STRIKE, oPC)) mMod = 4;
if (GetHasFeat(FEAT_SUPERIOR_UNARMED_STRIKE, oKiller)) mMod = 4;
if (GetLevelByClass(CLASS_TYPE_MONK, oPC)>5||
GetLevelByClass(CLASS_TYPE_MONK, GetMaster(oPC))>5)mMod = 8;
if (GetLevelByClass(CLASS_TYPE_MONK, oKiller)>5||
GetLevelByClass(CLASS_TYPE_MONK, GetMaster(oKiller))>5)mMod = 8;
else mMod=lMod-1;
@@ -6656,7 +6664,7 @@ void sd_droploot (object oMob, object oSack)
int MItemChance = 1; // % chance to drop a magic item
int RodWandChance = 1; // % chance to drop a wand/rod item
int AmmoChance = 1; // % chance to drop a bolt or an arrow
int GoldChance = 8; // % chance to drop some gold
int GoldChance = 0; // % chance to drop some gold
int PotChance = 1; // % chance to drop a potion
int ScrollChance = 1; // % chance to drop a magic scroll
int GemChance = lMod; // % chance to drop a socket gem
@@ -6714,7 +6722,7 @@ void sd_droploot (object oMob, object oSack)
}
if (iDice<GoldChance+1)
{
FloatingTextStringOnCreature("Your defeated foe has dropped gold!", oPC);
FloatingTextStringOnCreature("Your defeated foe has dropped gold!", oKiller);
}
if (iDice<GoldChance+1)
{
@@ -6729,7 +6737,7 @@ void sd_droploot (object oMob, object oSack)
}
if (iDice<RodWandChance+1)
{
FloatingTextStringOnCreature("Your defeated foe has dropped a wand!", oPC);
FloatingTextStringOnCreature("Your defeated foe has dropped a wand!", oKiller);
}
if (iDice<RodWandChance+1)
{
@@ -6745,29 +6753,29 @@ void sd_droploot (object oMob, object oSack)
if (iDice < WeapChance+1)
{
DropWeapon(oMob, oSack, iRange, SockChance, DamBroke);
FloatingTextStringOnCreature("Your defeated foe has dropped a weapon!", oPC);
FloatingTextStringOnCreature("Your defeated foe has dropped a weapon!", oKiller);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eLink, GetLocation(oSack));
}
//:: Monk Gloves Roll
iDice = d100();
if (iDice<MonkChance+1)
if (iDice<MonkChance + 1)
{
DropMonkGloves(oMob, oSack, iRange, SockChance, DamBroke);
FloatingTextStringOnCreature("Your defeated foe has dropped gloves!", oPC);
FloatingTextStringOnCreature("Your defeated foe has dropped gloves!", oKiller);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eLink, GetLocation(oSack));
}
//:: Armor or shield Roll
iDice = d100();
if (iDice < ArmorChance+1)
if (iDice < ArmorChance + 1)
{
iDice = d100();
if (iDice>59)DropShield(oMob, oSack, iRange, SockChance, DamBroke);
else DropArmor(oMob, oSack, iRange, SockChance, DamBroke);
if (iDice<ArmorChance+1) FloatingTextStringOnCreature("Your defeated foe has dropped armor!", oPC);
if (iDice<ArmorChance+1) FloatingTextStringOnCreature("Your defeated foe has dropped armor!", oKiller);
if (iDice<ArmorChance+1) ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eLink, GetLocation(oSack));
if (iDice>59) FloatingTextStringOnCreature("Your defeated foe has dropped armour!", oPC);
if (iDice>59) FloatingTextStringOnCreature("Your defeated foe has dropped armour!", oKiller);
if (iDice>59) ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eLink, GetLocation(oSack));
}
@@ -6776,7 +6784,7 @@ void sd_droploot (object oMob, object oSack)
if (iDice < MItemChance + 1)
{
DropMagicItem(oMob, oSack, iRange, SockChance, DamBroke);
FloatingTextStringOnCreature("Your defeated foe has dropped a magic item!", oPC);
FloatingTextStringOnCreature("Your defeated foe has dropped a magic item!", oKiller);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eLink, GetLocation(oSack));
}
@@ -6785,7 +6793,7 @@ void sd_droploot (object oMob, object oSack)
if (iDice < MiscChance + 1)
{
DropMisc(oMob, oSack);
FloatingTextStringOnCreature("Your defeated foe has dropped an artifact!", oPC);
FloatingTextStringOnCreature("Your defeated foe has dropped an artifact!", oKiller);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eLink, GetLocation(oSack));
}
@@ -6794,7 +6802,7 @@ void sd_droploot (object oMob, object oSack)
if (iDice < AmmoChance + 1)
{
DropAmmo(oMob, oSack, iRange);
FloatingTextStringOnCreature("Your defeated foe has dropped ranged ammunition!", oPC);
FloatingTextStringOnCreature("Your defeated foe has dropped ranged ammunition!", oKiller);
}
//:: Potion Roll
@@ -6802,7 +6810,7 @@ void sd_droploot (object oMob, object oSack)
if (iDice < PotChance + 1)
{
DropPotion(oMob, oSack);
FloatingTextStringOnCreature("Your defeated foe has dropped a potion!", oPC);
FloatingTextStringOnCreature("Your defeated foe has dropped a potion!", oKiller);
}
//:: Scroll Roll
@@ -6810,7 +6818,7 @@ void sd_droploot (object oMob, object oSack)
if (iDice < ScrollChance + 1)
{
DropScroll(oMob, oSack, iRange);
FloatingTextStringOnCreature("Your defeated foe has dropped a scroll!", oPC);
FloatingTextStringOnCreature("Your defeated foe has dropped a scroll!", oKiller);
}
//:: Alchemical Item Roll
@@ -6827,7 +6835,7 @@ void sd_droploot (object oMob, object oSack)
if (iDice < EpicSpellSeedChance + 1)
{
DropEpicSpellSeed(oMob, oSack);
FloatingTextStringOnCreature("Your defeated foe has dropped an epic spell seed!", oPC);
FloatingTextStringOnCreature("Your defeated foe has dropped an epic spell seed!", oKiller);
}
}
@@ -6838,14 +6846,14 @@ void sd_droploot (object oMob, object oSack)
if (iDice < EpicSpellBookChance + 1)
{
DropEpicSpellBook(oMob, oSack);
FloatingTextStringOnCreature("Your defeated foe has dropped an epic spell book!", oPC);
FloatingTextStringOnCreature("Your defeated foe has dropped an epic spell book!", oKiller);
}
}
}
void sd_dropboss(object oMob, object oSack)
{
object oPC = GetLastKiller();
object oKiller = GetLastKiller();
//:: Early exit if mob is killed in Stonewatch to prevent looting high-end mobs easily
if (GetTag(GetArea(oMob)) == "Stonewatch") return;
@@ -6860,7 +6868,7 @@ void sd_dropboss(object oMob, object oSack)
if(iDiff > 0) lMod = DROP_RATE; // No change needed if not default because all set to same
//:: Make monk gloves a rare drop unless the player/Master is a lvl 5+ monk
if (GetLevelByClass(CLASS_TYPE_MONK, oPC) > 5 || GetLevelByClass(CLASS_TYPE_MONK, GetMaster(oPC)) > 5)
if (GetLevelByClass(CLASS_TYPE_MONK, oKiller) > 5 || GetLevelByClass(CLASS_TYPE_MONK, GetMaster(oKiller)) > 5)
mMod = 8;
else
mMod = lMod - 1;
@@ -6993,7 +7001,7 @@ void sd_dropboss(object oMob, object oSack)
void wk_chestloot (object oSack)
{
object oPC = GetLastUsedBy();
object oKiller = GetLastUsedBy();
object oMob = GetLastUsedBy();
/////////////////////////////////////////
//::Droprate config::
@@ -7102,7 +7110,7 @@ void wk_chestloot (object oSack)
void hy_barrelloot (object oSack)
{
object oPC = GetLastUsedBy();
object oKiller = GetLastUsedBy();
object oMob = GetLastUsedBy();
/////////////////////////////////////////
//::Droprate config::
@@ -7155,7 +7163,7 @@ void hy_barrelloot (object oSack)
void hy_bookcaseloot (object oSack)
{
object oPC = GetLastUsedBy();
object oKiller = GetLastUsedBy();
object oMob = GetLastUsedBy();
/////////////////////////////////////////
//::Droprate config::
@@ -7199,4 +7207,4 @@ void hy_bookcaseloot (object oSack)
///////////////////////////
//: For test compiling only
//:: void main(){}
//::void main(){}