Added CCOH and missing areas Changed some areas to be craftable, Fixed some on death issues, Fixed the Gaurd
78 lines
4.1 KiB
Plaintext
78 lines
4.1 KiB
Plaintext
//#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 = GetPersistentInt(oPC,"iTailorSkill","UOACraft"
|
|
);
|
|
int iTailorChance = iTailorSkill;
|
|
|
|
if (GetItemPossessedBy(oPC,"NoDrop_SkillLogBook")==OBJECT_INVALID)
|
|
{
|
|
CreateItemOnObject("skilllogbook",oPC,1);
|
|
}
|
|
|
|
if (iTailorChance < 350)
|
|
{
|
|
iTailorChance = GetAbilityScore(oPC,ABILITY_DEXTERITY)*5;
|
|
iTailorChance = iTailorChance+(GetAbilityScore(oPC,ABILITY_STRENGTH)*3);
|
|
iTailorChance = iTailorChance+(GetAbilityScore(oPC,ABILITY_WISDOM)*2);
|
|
iTailorChance = iTailorChance*3;
|
|
if (iTailorChance>350)iTailorChance=350;
|
|
if (iTailorSkill > iTailorChance) iTailorChance=iTailorSkill;
|
|
}
|
|
|
|
int iLeatherType = GetLocalInt(oPC,"iUseLeatherType");
|
|
|
|
|
|
if (iLeatherType != 0)CreateItemOnObject("flagswitch023",OBJECT_SELF,1);
|
|
if (iLeatherType != 1)CreateItemOnObject("flagswitch024",OBJECT_SELF,1);
|
|
if (iLeatherType != 2)CreateItemOnObject("flagswitch025",OBJECT_SELF,1);
|
|
|
|
if (iLeatherType ==2) iTailorChance = iTailorChance - 100;
|
|
if (iLeatherType ==3) iTailorChance = iTailorChance - 200;
|
|
|
|
if (iTailorChance>200)CreateItemOnObject("aarcl314",OBJECT_SELF,1); // Padded Armor
|
|
if (iTailorChance>300)CreateItemOnObject("aarcl313",OBJECT_SELF,1); // Leather Armor
|
|
if (iTailorChance>400)CreateItemOnObject("gloves010",OBJECT_SELF,1); // Leather Gloves
|
|
if (iTailorChance>450)CreateItemOnObject("pattern052",OBJECT_SELF,1); // Soft Leather Boots
|
|
if (iTailorChance>500)CreateItemOnObject("aarcl312",OBJECT_SELF,1); // Studded Leather Armor
|
|
if (iTailorChance>510)CreateItemOnObject("pattern038",OBJECT_SELF,1); // Small Leather Bag
|
|
if (iTailorChance>520)CreateItemOnObject("aarcl346",OBJECT_SELF,1); // Silver Studded Leather Armor
|
|
if (iTailorChance>520)CreateItemOnObject("aarcl318",OBJECT_SELF,1); // Dull Copper Studded Leather Armor
|
|
if (iTailorChance>540)CreateItemOnObject("aarcl322",OBJECT_SELF,1); // Shadow Iron Studded Leather Armor
|
|
if (iTailorChance>550)CreateItemOnObject("belt010",OBJECT_SELF,1); // Leather Belt
|
|
if (iTailorChance>560)CreateItemOnObject("aarcl326",OBJECT_SELF,1); // Copper Studded Leather Armor
|
|
if (iTailorChance>575)CreateItemOnObject("pattern054",OBJECT_SELF,1); // Hard Leather Boots
|
|
if (iTailorChance>580)CreateItemOnObject("aarcl330",OBJECT_SELF,1); // Bronze Studded Leather Armor
|
|
if (iTailorChance>600)CreateItemOnObject("aarcl362",OBJECT_SELF,1); // Gold Studded Leather Armor
|
|
if (iTailorChance>625)CreateItemOnObject("pattern047",OBJECT_SELF,1); // Medium Leather Bag
|
|
if (iTailorChance>650)CreateItemOnObject("aarcl334",OBJECT_SELF,1); // Agapite Studded Leather Armor
|
|
if (iTailorChance>650)CreateItemOnObject("aarcl358",OBJECT_SELF,1); // Platinum Studded Leather Armor
|
|
|
|
if (iTailorChance>700)CreateItemOnObject("aarcl338",OBJECT_SELF,1); // Verite Studded Leather Armor
|
|
if (iTailorChance>700)CreateItemOnObject("aarcl350",OBJECT_SELF,1); // Mithril Studded Leather Armor
|
|
if (iTailorChance>750)CreateItemOnObject("aarcl342",OBJECT_SELF,1); // Valorite Studded Leather Armor
|
|
if (iTailorChance>750)CreateItemOnObject("aarcl354",OBJECT_SELF,1); // Adamantite Studded Leather Armor
|
|
if (iTailorChance>750)CreateItemOnObject("pattern051",OBJECT_SELF,1); // Large Leather Bag
|
|
|
|
// 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);
|
|
}
|
|
}
|