Fixed CCOH, Fixed starting GP, Fixed DMFI languages, Fix cep weapon appearances, Fixed new player start up system. Added PC deleter. Added ACP 4.1. Full compile. Updated release archive.
133 lines
7.0 KiB
Plaintext
133 lines
7.0 KiB
Plaintext
//#include "_persist_01a"
|
|
|
|
void main()
|
|
{
|
|
object oPC = GetLastOpenedBy();
|
|
//int iJewelSkill = GetTokenPair(oPC,12,4); // JewelCraft
|
|
int iJewelSkill = GetCampaignInt("UOACraft","iJewelSkill",oPC);
|
|
int iJewelChance = iJewelSkill;
|
|
|
|
int iIngotType = GetLocalInt(oPC,"iUseIngotType");
|
|
int iIngotMod = iIngotType*25;
|
|
int iJewelType = GetLocalInt(oPC,"iUseJewelType");
|
|
int iJewelMod = 0;
|
|
|
|
if (GetItemPossessedBy(oPC,"NoDrop_SkillLogBook")==OBJECT_INVALID)
|
|
{
|
|
CreateItemOnObject("skilllogbook",oPC,1);
|
|
}
|
|
|
|
if (iJewelChance < 350)
|
|
{
|
|
iJewelChance = GetAbilityScore(oPC,ABILITY_DEXTERITY)*5;
|
|
iJewelChance = iJewelChance+(GetAbilityScore(oPC,ABILITY_WISDOM)*3);
|
|
iJewelChance = iJewelChance+(GetAbilityScore(oPC,ABILITY_CHARISMA)*2);
|
|
iJewelChance = iJewelChance*3;
|
|
if (iJewelChance>350)iJewelChance=350;
|
|
if (iJewelSkill > iJewelChance) iJewelChance=iJewelSkill;
|
|
}
|
|
|
|
// Create Ingot Type FlagSwitches
|
|
if (iIngotType != 0)CreateItemOnObject("flagswitch010",OBJECT_SELF,1);
|
|
if (iIngotType != 1)CreateItemOnObject("flagswitch011",OBJECT_SELF,1);
|
|
if (iIngotType != 2)CreateItemOnObject("flagswitch012",OBJECT_SELF,1);
|
|
if (iIngotType != 3)CreateItemOnObject("flagswitch013",OBJECT_SELF,1);
|
|
if (iIngotType != 4)CreateItemOnObject("flagswitch014",OBJECT_SELF,1);
|
|
if (iIngotType != 5)CreateItemOnObject("flagswitch015",OBJECT_SELF,1);
|
|
if (iIngotType != 6)CreateItemOnObject("flagswitch016",OBJECT_SELF,1);
|
|
if (iIngotType != 7)CreateItemOnObject("flagswitch017",OBJECT_SELF,1);
|
|
if (iIngotType != 8)CreateItemOnObject("flagswitch018",OBJECT_SELF,1);
|
|
if (iIngotType != 9)CreateItemOnObject("flagswitch019",OBJECT_SELF,1);
|
|
if (iIngotType != 10)CreateItemOnObject("flagswitch020",OBJECT_SELF,1);
|
|
if (iIngotType != 11)CreateItemOnObject("flagswitch021",OBJECT_SELF,1);
|
|
if (iIngotType != 12)CreateItemOnObject("flagswitch022",OBJECT_SELF,1);
|
|
|
|
//Create Gem Selction Flagswitches
|
|
if (iJewelType != 0) CreateItemOnObject("flagswitch1000",OBJECT_SELF,1);
|
|
if (iJewelType != 1) CreateItemOnObject("flagswitch101",OBJECT_SELF,1);
|
|
if (iJewelType != 2) CreateItemOnObject("flagswitch102",OBJECT_SELF,1);
|
|
if (iJewelType != 3) CreateItemOnObject("flagswitch103",OBJECT_SELF,1);
|
|
if (iJewelType != 4) CreateItemOnObject("flagswitch104",OBJECT_SELF,1);
|
|
if (iJewelType != 5) CreateItemOnObject("flagswitch105",OBJECT_SELF,1);
|
|
if (iJewelType != 6) CreateItemOnObject("flagswitch106",OBJECT_SELF,1);
|
|
if (iJewelType != 7) CreateItemOnObject("flagswitch107",OBJECT_SELF,1);
|
|
if (iJewelType != 8) CreateItemOnObject("flagswitch108",OBJECT_SELF,1);
|
|
if (iJewelType != 9) CreateItemOnObject("flagswitch109",OBJECT_SELF,1);
|
|
if (iJewelType != 10) CreateItemOnObject("flagswitch110",OBJECT_SELF,1);
|
|
if (iJewelType != 11) CreateItemOnObject("flagswitch111",OBJECT_SELF,1);
|
|
if (iJewelType != 12) CreateItemOnObject("flagswitch112",OBJECT_SELF,1);
|
|
if (iJewelType != 13) CreateItemOnObject("flagswitch113",OBJECT_SELF,1);
|
|
if (iJewelType != 14) CreateItemOnObject("flagswitch114",OBJECT_SELF,1);
|
|
if (iJewelType != 15) CreateItemOnObject("flagswitch115",OBJECT_SELF,1);
|
|
if (iJewelType != 16) CreateItemOnObject("flagswitch116",OBJECT_SELF,1);
|
|
if (iJewelType != 17) CreateItemOnObject("flagswitch117",OBJECT_SELF,1);
|
|
if (iJewelType != 18) CreateItemOnObject("flagswitch118",OBJECT_SELF,1);
|
|
if (iJewelType != 19) CreateItemOnObject("flagswitch119",OBJECT_SELF,1);
|
|
if (iJewelType != 20) CreateItemOnObject("flagswitch120",OBJECT_SELF,1);
|
|
if (iJewelType != 21) CreateItemOnObject("flagswitch121",OBJECT_SELF,1);
|
|
if (iJewelType != 22) CreateItemOnObject("flagswitch122",OBJECT_SELF,1);
|
|
if (iJewelType != 23) CreateItemOnObject("flagswitch123",OBJECT_SELF,1);
|
|
if (iJewelType != 24) CreateItemOnObject("flagswitch124",OBJECT_SELF,1);
|
|
if (iJewelType != 25) CreateItemOnObject("flagswitch125",OBJECT_SELF,1);
|
|
if (iJewelType != 26) CreateItemOnObject("flagswitch126",OBJECT_SELF,1);
|
|
if (iJewelType != 27) CreateItemOnObject("flagswitch127",OBJECT_SELF,1);
|
|
if (iJewelType != 28) CreateItemOnObject("flagswitch128",OBJECT_SELF,1);
|
|
if (iJewelType != 29) CreateItemOnObject("flagswitch129",OBJECT_SELF,1);
|
|
if (iJewelType != 30) CreateItemOnObject("flagswitch130",OBJECT_SELF,1);
|
|
if (iJewelType != 31) CreateItemOnObject("flagswitch131",OBJECT_SELF,1);
|
|
if (iJewelType != 32) CreateItemOnObject("flagswitch132",OBJECT_SELF,1);
|
|
if (iJewelType != 33) CreateItemOnObject("flagswitch133",OBJECT_SELF,1);
|
|
if (iJewelType != 34) CreateItemOnObject("flagswitch134",OBJECT_SELF,1);
|
|
if (iJewelType != 35) CreateItemOnObject("flagswitch135",OBJECT_SELF,1);
|
|
if (iJewelType != 36) CreateItemOnObject("flagswitch136",OBJECT_SELF,1);
|
|
if (iJewelType != 37) CreateItemOnObject("flagswitch137",OBJECT_SELF,1);
|
|
if (iJewelType != 38) CreateItemOnObject("flagswitch138",OBJECT_SELF,1);
|
|
if (iJewelType != 39) CreateItemOnObject("flagswitch139",OBJECT_SELF,1);
|
|
if (iJewelType != 40) CreateItemOnObject("flagswitch140",OBJECT_SELF,1);
|
|
if (iJewelType != 41) CreateItemOnObject("flagswitch141",OBJECT_SELF,1);
|
|
if (iJewelType != 42) CreateItemOnObject("flagswitch142",OBJECT_SELF,1);
|
|
if (iJewelType != 43) CreateItemOnObject("flagswitch143",OBJECT_SELF,1);
|
|
if (iJewelType != 44) CreateItemOnObject("flagswitch144",OBJECT_SELF,1);
|
|
if (iJewelType != 45) CreateItemOnObject("flagswitch145",OBJECT_SELF,1);
|
|
if (iJewelType != 46) CreateItemOnObject("flagswitch146",OBJECT_SELF,1);
|
|
if (iJewelType != 47) CreateItemOnObject("flagswitch147",OBJECT_SELF,1);
|
|
if (iJewelType != 48) CreateItemOnObject("flagswitch148",OBJECT_SELF,1);
|
|
if (iJewelType != 49) CreateItemOnObject("flagswitch149",OBJECT_SELF,1);
|
|
if (iJewelType != 50) CreateItemOnObject("flagswitch150",OBJECT_SELF,1);
|
|
if (iJewelType != 51) CreateItemOnObject("flagswitch151",OBJECT_SELF,1);
|
|
if (iJewelType != 52) CreateItemOnObject("flagswitch152",OBJECT_SELF,1);
|
|
if (iJewelType != 53) CreateItemOnObject("flagswitch153",OBJECT_SELF,1);
|
|
if (iJewelType != 54) CreateItemOnObject("flagswitch154",OBJECT_SELF,1);
|
|
if (iJewelType != 55) CreateItemOnObject("flagswitch155",OBJECT_SELF,1);
|
|
if (iJewelType != 56) CreateItemOnObject("flagswitch156",OBJECT_SELF,1);
|
|
|
|
|
|
if (iIngotType==9) iIngotMod = 90; // Silver is little easier than Bronze
|
|
if (iIngotType==10) iIngotMod = 175; // Mithril is hard as Verite
|
|
if (iIngotType==11) iIngotMod = 200; // Adamantite is hard as Valorite
|
|
if (iIngotType==12) iIngotMod = 150; // Platinum is hard as Agapite
|
|
|
|
// Modify the skill based on current ingot selection
|
|
if (iIngotMod >0) iIngotMod = iIngotMod + 250;
|
|
iJewelChance = iJewelChance - iIngotMod;
|
|
|
|
if (iJewelType>0) iJewelMod = 50;
|
|
if (iJewelType>12) iJewelMod = 100;
|
|
if (iJewelType>25) iJewelMod = 150;
|
|
if (iJewelType>36) iJewelMod = 200;
|
|
if (iJewelType>42) iJewelMod = 250;
|
|
if (iJewelType>51) iJewelMod = 300;
|
|
|
|
iJewelChance = iJewelChance - iJewelMod;
|
|
|
|
//Now decide if the ability to craft a specific piece of Jewelry Exists
|
|
//And create the patterns for the jewelry
|
|
|
|
if (iJewelChance>0) CreateItemOnObject("pattern075",OBJECT_SELF,1); //Craft Ring
|
|
if (iJewelChance>50) CreateItemOnObject("pattern097",OBJECT_SELF,1); //Craft Necklace
|
|
if (iJewelChance>100) CreateItemOnObject("pattern096",OBJECT_SELF,1); //Craft Amulet
|
|
|
|
|
|
|
|
}
|