Initial Commit
Initial Commit [v1.32PRC8]
This commit is contained in:
45
_module/nss/evil_specialrwd.nss
Normal file
45
_module/nss/evil_specialrwd.nss
Normal file
@@ -0,0 +1,45 @@
|
||||
#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);
|
||||
}
|
Reference in New Issue
Block a user