void CreateADecodedMap(object oPC, int iMapLevel); void CreateMapCopy(object oPC, object oMap); void main() { object oPC = OBJECT_SELF; object oMapUsed = GetLocalObject(oPC,"oMapUsed"); DeleteLocalObject(oPC,"oMapUsed"); int iMapSkill = GetCampaignInt("UOACraft","iMapSkill",oPC); int iMapChance = iMapSkill; if (iMapChance <350) { iMapChance = GetAbilityScore(oPC,ABILITY_INTELLIGENCE)*5; iMapChance = iMapChance +(GetAbilityScore(oPC,ABILITY_WISDOM)*3); iMapChance = iMapChance +(GetAbilityScore(oPC,ABILITY_DEXTERITY)*2); iMapChance = iMapChance * 3; if (iMapChance >350) iMapChance = 350; if (iMapSkill > iMapChance) iMapChance = iMapSkill; } int iMapLevel = StringToInt(GetStringRight(GetTag(oMapUsed),2)); if (iMapLevel==0) iMapLevel=10; int iMapChanceNeeded = iMapLevel*100; AssignCommand(oPC,ActionPlayAnimation(ANIMATION_FIREFORGET_READ,0.5,5.0)); AssignCommand(oPC,PlaySound("as_na_grassmove3")); AssignCommand(oPC,DelayCommand(6.0,PlaySound("as_na_grassmove1"))); AssignCommand(oPC,DelayCommand(5.0,ActionPlayAnimation(ANIMATION_FIREFORGET_READ,0.5,4.0))); FloatingTextStringOnCreature("You begin decoding the map.",oPC,FALSE); if (iMapChance1) iMapLocation = Random(iMaxLocations)+1; string sNewTag = "_UOA_TMAP_"+IntToString(iMapLocation); CopyObject(oMap,GetLocation(oPC),oPC,sNewTag); DestroyObject(oMap,2.0); DelayCommand(1.0,FloatingTextStringOnCreature("You carefully decode the treasure map, noting the location of the buried treasure.",oPC,FALSE)); return; }