EN6_PRC8/_module/nss/qp_vregen.nss
Jaysyn904 a6f6db7303 Initial commit
Initial commit.  Updated release archive.
2024-06-13 15:08:33 -04:00

37 lines
990 B
Plaintext

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