void DoDig(object oPC, location lChest, int iMapLevel, object oMap); void DoFailDig(object oPC, object oMap, location lTemp); void DoChest(object oPC, location lTemp, int iMapLevel, object oMap); void CreatePlaceable(location lTemp, string sResRef, float fDelay); void CreatePlaceable2(location lTemp, string sResRef, float fDelay, int iMapLevel, object oPC); void main() { object oPC = OBJECT_SELF; if (GetLocalInt(oPC,"iAmDiggingMap")!=0) { FloatingTextStringOnCreature("You are already digging a treasure map!",oPC,FALSE); return; } object oMapUsed = GetLocalObject(oPC,"oMapUsed"); if (GetStringLeft(GetResRef(oMapUsed),10)!="_uoa_tmap_") { FloatingTextStringOnCreature("That is not a decoded treasure map!",oPC,FALSE); DeleteLocalObject(oPC,"oMapUsed"); return; } SetLocalInt(oPC,"iAmDiggingMap",99); AssignCommand(GetArea(oPC),DelayCommand(31.0,DeleteLocalInt(oPC,"iAmDiggingMap"))); DeleteLocalObject(oPC,"oMapUsed"); if (GetLocalInt(oMapUsed,"iAmInUse")!=0) return; SetLocalInt(oMapUsed,"iAmInUse",99); AssignCommand(oMapUsed,DelayCommand(30.1,DeleteLocalInt(oMapUsed,"iAmInUse"))); //Determine Skills and chances int iDigSkill = GetCampaignInt("UOACraft","iDigSkill",oPC); int iDigChance=iDigSkill; if (iDigChance < 350) { iDigChance = GetAbilityScore(oPC,ABILITY_STRENGTH)*5; iDigChance = iDigChance + (GetAbilityScore(oPC,ABILITY_CONSTITUTION)*3); iDigChance = iDigChance + (GetAbilityScore(oPC,ABILITY_DEXTERITY)*2); iDigChance = iDigChance*3; if (iDigChance >350) iDigChance = 350; if (iDigSkill>iDigChance)iDigChance=iDigSkill; } //////////////////////////////////////////////////////////////// int iMapLevel = StringToInt(GetStringRight(GetResRef(oMapUsed),2)); int iDigChanceNeeded = iMapLevel*100; if (iDigChance