EN4_PRC8/_module/nss/evil_specialrwd.nss

46 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

#include "prc_x2_itemprop"
void main()
{
object oPC;
object oItem;
itemproperty ip;
string sTag;
int iReward;
oPC = GetPCSpeaker();
sTag = GetLocalString(oPC,"QuestItemTag");
CreateItemOnObject(sTag,oPC);
iReward = GetLocalInt(oPC,"EvilSpecial");
if (iReward == 0)
oItem=CreateItemOnObject("en3_evilrod",oPC);
else
oItem = GetItemPossessedBy(oPC, "en3_evilrod");
iReward++;
if (iReward>4)
iReward = 4;
IPRemoveAllItemProperties(oItem,DURATION_TYPE_PERMANENT);
switch(iReward)
{
case 1: ip = ItemPropertyCastSpell(IP_CONST_CASTSPELL_ANIMATE_DEAD_5,IP_CONST_CASTSPELL_NUMUSES_1_USE_PER_DAY);
IPSafeAddItemProperty(oItem,ip);
break;
case 2: ip = ItemPropertyCastSpell(IP_CONST_CASTSPELL_CREATE_UNDEAD_11,IP_CONST_CASTSPELL_NUMUSES_1_USE_PER_DAY);
IPSafeAddItemProperty(oItem,ip);
break;
case 3: ip = ItemPropertyCastSpell(IP_CONST_CASTSPELL_CREATE_UNDEAD_14,IP_CONST_CASTSPELL_NUMUSES_1_USE_PER_DAY);
IPSafeAddItemProperty(oItem,ip);
break;
case 4: ip = ItemPropertyCastSpell(IP_CONST_CASTSPELL_CREATE_GREATER_UNDEAD_15,IP_CONST_CASTSPELL_NUMUSES_1_USE_PER_DAY);
IPSafeAddItemProperty(oItem,ip);
break;
}
SetLocalInt(oPC,"EvilSpecial",iReward);
}