#include "utl_i_sqluuid" #include "prc_x2_itemprop" void main() { object oPC; object oItem; int iQuestPoints; int iResist; itemproperty ip; string sTag; oPC=GetPCSpeaker(); sTag = SQLocalsUUID_GetString(oPC,"QPTag"); oItem = GetItemPossessedBy(oPC, sTag); if(GetIsObjectValid(oItem) != 0) { iResist=SQLocalsUUID_GetInt(oPC,"QP_SpellResist"); if (iResist < 11) { iQuestPoints = SQLocalsUUID_GetInt(oPC,"QuestPoints"); iQuestPoints = iQuestPoints - 10; SQLocalsUUID_SetInt(oPC,"QuestPoints",iQuestPoints); SQLocalsUUID_SetInt(oPC,"QP_SpellResist",iResist+1); ip=ItemPropertyBonusSpellResistance(iResist); IPSafeAddItemProperty(oItem,ip); DelayCommand(1.0,AssignCommand(OBJECT_SELF,ActionCastFakeSpellAtObject(SPELL_CURE_SERIOUS_WOUNDS,oPC))); } else { SendMessageToPC(oPC,"Resistance can't be raised higher."); } } else { SendMessageToPC(oPC,"Could not find item."); } }