Try this at the end
int nMax;
if ( "AmuletofNaturalHealing" == GetTag(GetItemInSlot(INVENTORY_SLOT_NECK, OBJECT_SELF)) )
{
nMax = 10; // (5 * 8 / 4)
}
else
{
nMax = 8;
}
spellsCure(d8() * nMax / 8, 5, nMax, VFX_IMP_SUNSTRIKE, VFX_IMP_HEALING_S, GetSpellId());
EDIT: One problem that Squatting Monk didn't pick up on, is that your nExtra that you used will always be 0. This is because the variable you defined outside of the if statements was not the variable you updated within the if statements. Instead you defined a new variable with the same name gave it a value and then never used it.
For example
int nVar;
if(0==0)
{
int nVar = 1;
}
defines two variables with the same name. The first one will be used outside of the if statement, while the second is used only within the if statement starting from when it is defined. Since when an integer is defined, its starting value is zero, any call to that variable after the if statement has been concluded will find the value 0.
However
int nVar;
if(0==0)
{
nVar = 1;
}
Defines only one variable and then updates it to a new value. Calls outside the if statement can now properly find the value one.
Modifié par WhiZard, 04 février 2014 - 05:26 .