//#include "_persist_01a" void main() { object oItem = GetInventoryDisturbItem(); object oPC = GetLastDisturbed(); object oSelf = OBJECT_SELF; string sTag = GetTag(oItem); string sName = GetName(oItem); if (GetInventoryDisturbType()== INVENTORY_DISTURB_TYPE_ADDED) { // The following 3 lines are to ensure compatability with UOAbigal's Persistent Token System. // You can replace them with whatever 'no-drop' code you have or comment them out. string sNoDropFlag = (GetStringLeft(GetTag(oItem),6)); if (sNoDropFlag == "NoDrop" || sNoDropFlag == "TOKEN_"||sNoDropFlag=="_TBOX_") return; if (GetBaseItemType(oItem)==BASE_ITEM_LARGEBOX) { DestroyObject(oItem); SendMessageToPC(oPC,"To avoid possible dupe exploits, the container placed in this bag may be destroyed."); return; } // End of compatability portion. CopyObject(oItem,GetLocation(oPC),oPC,GetTag(oItem)); DestroyObject(oItem); FloatingTextStringOnCreature("You can only use this for raising skills for testing purposes.",oPC,FALSE); } int iSkillGain = 1; //Ensure no more than 1 skill gain every 10 seconds to avoid token droppage. if (iSkillGain ==1) { if (GetLocalInt(oPC,"iSkillGain")!= 0) { iSkillGain = 0; } else { SetLocalInt(oPC,"iSkillGain",99); DelayCommand(1.0,SetLocalInt(oPC,"iSkillGain",0)); } } CopyObject(oItem,GetLocation(oSelf),oSelf,GetTag(oItem)); DestroyObject(oItem); int iSkillValue = 0; if (iSkillGain==1) { int iSkillType = StringToInt(GetStringRight(sTag,2)); switch (iSkillType) { case 1: { //iSkillValue = GetTokenPair(oPC,14,1); iSkillValue = GetCampaignInt("UOACraft","iMiningSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,14,1,iSkillValue); SetCampaignInt("UOACraft","iMiningSkill",iSkillValue,oPC); break; } case 2: { //iSkillValue = GetTokenPair(oPC,14,2); iSkillValue = GetCampaignInt("UOACraft","iSmeltSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,14,2,iSkillValue); SetCampaignInt("UOACraft","iSmeltSkill",iSkillValue,oPC); break; } case 3: { //iSkillValue = GetTokenPair(oPC,14,3); iSkillValue = GetCampaignInt("UOACraft","iDigSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,14,3,iSkillValue); SetCampaignInt("UOACraft","iDigSkill",iSkillValue,oPC); break; } case 4: { //iSkillValue = GetTokenPair(oPC,14,4); iSkillValue = GetCampaignInt("UOACraft","iGlassSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,14,4,iSkillValue); SetCampaignInt("UOACraft","iGlassSkill",iSkillValue,oPC); break; } case 5: { //iSkillValue = GetTokenPair(oPC,14,5); iSkillValue = GetCampaignInt("UOACraft","iTinkerSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,14,5,iSkillValue); SetCampaignInt("UOACraft","iTinkerSkill",iSkillValue,oPC); break; } case 6: { //iSkillValue = GetTokenPair(oPC,14,6); iSkillValue = GetCampaignInt("UOACraft","iFarmSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,14,6,iSkillValue); SetCampaignInt("UOACraft","iFarmSkill",iSkillValue,oPC); break; } case 7: { //iSkillValue = GetTokenPair(oPC,14,7); iSkillValue = GetCampaignInt("UOACraft","iLumberjackSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,14,7,iSkillValue); SetCampaignInt("UOACraft","iLumberjackSkill",iSkillValue,oPC); break; } case 8: { //iSkillValue = GetTokenPair(oPC,14,8); iSkillValue = GetCampaignInt("UOACraft","iSkinningSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,14,8,iSkillValue); SetCampaignInt("UOACraft","iSkinningSkill",iSkillValue,oPC); break; } case 9: { //iSkillValue = GetTokenPair(oPC,14,9); iSkillValue = GetCampaignInt("UOACraft","iCureSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,14,9,iSkillValue); SetCampaignInt("UOACraft","iCureSkill",iSkillValue,oPC); break; } case 10: { //iSkillValue = GetTokenPair(oPC,14,10); iSkillValue = GetCampaignInt("UOACraft","iTanSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,14,10,iSkillValue); SetCampaignInt("UOACraft","iTanSkill",iSkillValue,oPC); break; } case 11: { //iSkillValue = GetTokenPair(oPC,14,11); iSkillValue = GetCampaignInt("UOACraft","iLeatherSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,14,11,iSkillValue); SetCampaignInt("UOACraft","iLeatherSkill",iSkillValue,oPC); break; } case 12: { //iSkillValue = GetTokenPair(oPC,14,12); iSkillValue = GetCampaignInt("UOACraft","iAlchemySkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; SetCampaignInt("UOACraft","iAlchemySkill",iSkillValue,oPC); //SetTokenPair(oPC,14,12,iSkillValue); break; } case 13: { //iSkillValue = GetTokenPair(oPC,14,13); iSkillValue = GetCampaignInt("UOACraft","iFishingSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,14,13,iSkillValue); SetCampaignInt("UOACraft","iFishingSkill",iSkillValue,oPC); break; } case 14: { //iSkillValue = GetTokenPair(oPC,13,1); iSkillValue = GetCampaignInt("UOACraft","iBeeSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,13,1,iSkillValue); SetCampaignInt("UOACraft","iBeeSkill",iSkillValue,oPC); break; } case 15: { //iSkillValue = GetTokenPair(oPC,13,2); iSkillValue = GetCampaignInt("UOACraft","iFletchingSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,13,2,iSkillValue); SetCampaignInt("UOACraft","iFletchingSkill",iSkillValue,oPC); break; } case 16: { //iSkillValue = GetTokenPair(oPC,13,3); iSkillValue = GetCampaignInt("UOACraft","iBowSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,13,3,iSkillValue); SetCampaignInt("UOACraft","iBowSkill",iSkillValue,oPC); break; } case 17: { //iSkillValue = GetTokenPair(oPC,13,4); iSkillValue = GetCampaignInt("UOACraft","iSmithSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,13,4,iSkillValue); SetCampaignInt("UOACraft","iSmithSkill",iSkillValue,oPC); break; } case 18: { //iSkillValue = GetTokenPair(oPC,13,5); iSkillValue = GetCampaignInt("UOACraft","iArmorSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,13,5,iSkillValue); SetCampaignInt("UOACraft","iArmorSkill",iSkillValue,oPC); break; } case 19: { //iSkillValue = GetTokenPair(oPC,13,6); iSkillValue = GetCampaignInt("UOACraft","iPolishSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,13,6,iSkillValue); SetCampaignInt("UOACraft","iPolishSkill",iSkillValue,oPC); break; } case 20: { //iSkillValue = GetTokenPair(oPC,13,7); iSkillValue = GetCampaignInt("UOACraft","iGemSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,13,7,iSkillValue); SetCampaignInt("UOACraft","iGemSkill",iSkillValue,oPC); break; } case 21: { //iSkillValue = GetTokenPair(oPC,13,8); iSkillValue = GetCampaignInt("UOACraft","iGemQuarrySkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,13,8,iSkillValue); SetCampaignInt("UOACraft","iGemQuarrySkill",iSkillValue,oPC); break; } case 22: { //iSkillValue = GetTokenPair(oPC,13,9); iSkillValue = GetCampaignInt("UOACraft","iTailorSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,13,9,iSkillValue); SetCampaignInt("UOACraft","iTailorSkill",iSkillValue,oPC); break; } case 23: { //iSkillValue = GetTokenPair(oPC,13,10); iSkillValue = GetCampaignInt("UOACraft","iSpindleSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,13,10,iSkillValue); SetCampaignInt("UOACraft","iSpindleSkill",iSkillValue,oPC); break; } case 24: { //iSkillValue = GetTokenPair(oPC,13,11); iSkillValue = GetCampaignInt("UOACraft","iClothSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,13,11,iSkillValue); SetCampaignInt("UOACraft","iClothSkill",iSkillValue,oPC); break; } case 25: { //iSkillValue = GetTokenPair(oPC,13,12); iSkillValue = GetCampaignInt("UOACraft","iDyeSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,13,12,iSkillValue); SetCampaignInt("UOACraft","iDyeSkill",iSkillValue,oPC); break; } case 26: { //iSkillValue = GetTokenPair(oPC,13,13); iSkillValue = GetCampaignInt("UOACraft","iPaperSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,13,13,iSkillValue); SetCampaignInt("UOACraft","iPaperSkill",iSkillValue,oPC); break; } case 27: { //iSkillValue = GetTokenPair(oPC,12,1); iSkillValue = GetCampaignInt("UOACraft","iShroomSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,12,1,iSkillValue); SetCampaignInt("UOACraft","iShroomSkill",iSkillValue,oPC); break; } case 28: { //iSkillValue = GetTokenPair(oPC,12,1); iSkillValue = GetCampaignInt("UOACraft","iScribeSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,12,1,iSkillValue); SetCampaignInt("UOACraft","iScribeSkill",iSkillValue,oPC); break; } case 29: { //iSkillValue = GetTokenPair(oPC,12,1); iSkillValue = GetCampaignInt("UOACraft","iCookSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,12,1,iSkillValue); SetCampaignInt("UOACraft","iCookSkill",iSkillValue,oPC); break; } case 30: { //iSkillValue = GetTokenPair(oPC,12,1); iSkillValue = GetCampaignInt("UOACraft","iJewelSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,12,1,iSkillValue); SetCampaignInt("UOACraft","iJewelSkill",iSkillValue,oPC); break; } case 31: { //iSkillValue = GetTokenPair(oPC,12,1); iSkillValue = GetCampaignInt("UOACraft","iMapSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,12,1,iSkillValue); SetCampaignInt("UOACraft","iMapSkill",iSkillValue,oPC); break; } case 32: { //iSkillValue = GetTokenPair(oPC,12,1); iSkillValue = GetCampaignInt("UOACraft","iCarpentrySkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,12,1,iSkillValue); SetCampaignInt("UOACraft","iCarpentrySkill",iSkillValue,oPC); break; } case 33: //iSkillValue = GetTokenPair(oPC,12,1); iSkillValue = GetCampaignInt("UOACraft","iBrewSkill",oPC); iSkillValue = iSkillValue+50; if (iSkillValue>1000) iSkillValue = 1000; //SetTokenPair(oPC,12,1,iSkillValue); SetCampaignInt("UOACraft","iBrewSkill",iSkillValue,oPC); break; default:{iSkillGain==0; break;} } if (iSkillValue<1000) FloatingTextStringOnCreature("Your skill in "+sName+" has gone up by 5.0!",oPC,FALSE); if (iSkillValue==1000) FloatingTextStringOnCreature("Your skill in "+sName+" has maxxed at 100.0!",oPC,FALSE); } }