2024-06-14 10:48:20 -04:00
|
|
|
//#include "_persist_01a"
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
object oPC = GetLastOpenedBy();
|
|
|
|
SetLocalObject(oPC,"oLastOpened",OBJECT_SELF);
|
|
|
|
//int iAlchemySkill = GetTokenPair(oPC,14,12);
|
2024-09-16 23:40:48 -04:00
|
|
|
int iAlchemySkill = GetCampaignInt("UOACraft","iAlchemySkill",oPC);
|
2024-06-14 10:48:20 -04:00
|
|
|
int iAlchemyChance = iAlchemySkill;
|
|
|
|
|
|
|
|
if (iAlchemyChance <350)
|
|
|
|
{
|
|
|
|
iAlchemyChance = GetAbilityScore(oPC,ABILITY_WISDOM)*5;
|
|
|
|
iAlchemyChance = iAlchemyChance +(GetAbilityScore(oPC,ABILITY_INTELLIGENCE)*3);
|
|
|
|
iAlchemyChance = iAlchemyChance +(GetAbilityScore(oPC,ABILITY_DEXTERITY)*2);
|
|
|
|
iAlchemyChance = iAlchemyChance * 3;
|
|
|
|
if (iAlchemyChance >350) iAlchemyChance = 350;
|
|
|
|
if (iAlchemySkill > iAlchemyChance) iAlchemyChance = iAlchemySkill;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (GetItemPossessedBy(oPC,"NoDrop_SkillLogBook")==OBJECT_INVALID)
|
|
|
|
//if (GetItemPossessedBy(oPC,"SkillLogBook")==OBJECT_INVALID)
|
|
|
|
{
|
|
|
|
CreateItemOnObject("skilllogbook",oPC,1);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Create tokens for items which are 24.0 skill or below, as all characters can make these.
|
|
|
|
CreateItemOnObject("pattern015",OBJECT_SELF,1); //Tanning Salt
|
|
|
|
CreateItemOnObject("pattern013",OBJECT_SELF,1); //Tanning Oil
|
|
|
|
CreateItemOnObject("pattern014",OBJECT_SELF,1); //Tanic Acid
|
|
|
|
CreateItemOnObject("pattern034",OBJECT_SELF,1); //Weak Acid
|
|
|
|
if (iAlchemyChance>450) CreateItemOnObject("pattern076",OBJECT_SELF,1); //Moderate Acid
|
|
|
|
if (iAlchemyChance>550) CreateItemOnObject("pattern077",OBJECT_SELF,1); //Strong Acid
|
|
|
|
if (iAlchemyChance>650) CreateItemOnObject("pattern078",OBJECT_SELF,1); //Very Strong Acid
|
|
|
|
CreateItemOnObject("pattern035",OBJECT_SELF,1); //Coarse Grit
|
|
|
|
CreateItemOnObject("pattern036",OBJECT_SELF,1); //Medium Grit
|
|
|
|
CreateItemOnObject("pattern037",OBJECT_SELF,1); //Fine Grit
|
|
|
|
CreateItemOnObject("pattern071",OBJECT_SELF,1); //Pulp Bleach (Corrected ResRef issue Aug. 19, 2003)
|
|
|
|
CreateItemOnObject("pattern068",OBJECT_SELF,1); //Black Ink
|
|
|
|
CreateItemOnObject("pattern088",OBJECT_SELF,1); //Mapmaker's Ink
|
|
|
|
CreateItemOnObject("essence_001",OBJECT_SELF,1); //Essence of Acid
|
|
|
|
CreateItemOnObject("essence_002",OBJECT_SELF,1); //Essence of Necrosis
|
|
|
|
CreateItemOnObject("essence_003",OBJECT_SELF,1); //Essence of Luck
|
|
|
|
CreateItemOnObject("essence_004",OBJECT_SELF,1); //Essence of the 5 Senses
|
|
|
|
CreateItemOnObject("essence_005",OBJECT_SELF,1); //Essence of Ability
|
|
|
|
CreateItemOnObject("essence_006",OBJECT_SELF,1); //Essence of Electricity
|
|
|
|
CreateItemOnObject("essence_007",OBJECT_SELF,1); //Essence of the Mind
|
|
|
|
CreateItemOnObject("essence_008",OBJECT_SELF,1); //Essence of Venom
|
|
|
|
CreateItemOnObject("essence_009",OBJECT_SELF,1); //Essence of The Trickster
|
|
|
|
CreateItemOnObject("essence_010",OBJECT_SELF,1); //Essence of Light
|
|
|
|
CreateItemOnObject("essence_011",OBJECT_SELF,1); //Essence of Fire
|
|
|
|
CreateItemOnObject("essence_012",OBJECT_SELF,1); //Essence of The Planes
|
|
|
|
CreateItemOnObject("essence_013",OBJECT_SELF,1); //Essence of Power
|
|
|
|
CreateItemOnObject("essence_014",OBJECT_SELF,1); //Essence of The Elements
|
|
|
|
CreateItemOnObject("essence_015",OBJECT_SELF,1); //Essence of Energy
|
|
|
|
CreateItemOnObject("essence_016",OBJECT_SELF,1); //Essence of Protection
|
|
|
|
CreateItemOnObject("essence_017",OBJECT_SELF,1); //Essence of Cold
|
|
|
|
CreateItemOnObject("essence_018",OBJECT_SELF,1); //Essence of Nature
|
|
|
|
CreateItemOnObject("essence_019",OBJECT_SELF,1); //Essence of Spirit
|
|
|
|
CreateItemOnObject("essence_020",OBJECT_SELF,1); //Essence of Transmutation
|
|
|
|
if (iAlchemyChance>300) CreateItemOnObject("pattern084",OBJECT_SELF,1); //Potion of Cure Light Wounds
|
|
|
|
if (iAlchemyChance>300) CreateItemOnObject("pattern114",OBJECT_SELF,1); //Bakers Yeast
|
|
|
|
if (iAlchemyChance>350) CreateItemOnObject("pattern115",OBJECT_SELF,1); //Brewers Top-Growing Yeast
|
|
|
|
if (iAlchemyChance>400) CreateItemOnObject("pattern085",OBJECT_SELF,1); //Potion of Cure Moderate Wounds
|
|
|
|
if (iAlchemyChance>400) CreateItemOnObject("pattern116",OBJECT_SELF,1); //Brewers Bottom-Growing Yeast
|
|
|
|
if (iAlchemyChance>550) CreateItemOnObject("pattern086",OBJECT_SELF,1); //Potion of Cure Serious Wounds
|
|
|
|
if (iAlchemyChance>700) CreateItemOnObject("pattern087",OBJECT_SELF,1); //Potion of Cure Critical Wounds
|
|
|
|
if (iAlchemyChance>350) CreateItemOnObject("pattern090",OBJECT_SELF,1); //Alchemist's Fire
|
|
|
|
CreateItemOnObject("pattern091",OBJECT_SELF,1); //Weak Poison
|
|
|
|
if (iAlchemyChance>200) CreateItemOnObject("pattern092",OBJECT_SELF,1); //Moderate Poison
|
|
|
|
if (iAlchemyChance>400) CreateItemOnObject("pattern093",OBJECT_SELF,1); //Strong Poison
|
|
|
|
if (iAlchemyChance>600) CreateItemOnObject("pattern094",OBJECT_SELF,1); //Very Strong Poison
|
|
|
|
if (iAlchemyChance>800) CreateItemOnObject("pattern095",OBJECT_SELF,1); //Deadly Poison
|
|
|
|
|
|
|
|
}
|