This is what I put in OnAcquire:
-----
//Magic Runes
//Checks to see if Player has a Level 4 Magic Rune
if (sTag == "av_itm_magerune4")
{SetLocalInt(oPC, "PC_SPELL_BONUS", 4);}
//Checks to see if Player has a Level 3 Magic Rune
else if (sTag == "av_itm_magerune3")
{SetLocalInt(oPC, "PC_SPELL_BONUS", 3);}
//Checks to see if Player has a Level 2 Magic Rune
else if (sTag == "av_itm_magerune2")
{SetLocalInt(oPC, "PC_SPELL_BONUS", 2);}
//Checks to see if Player has a Level 1 Magic Rune
else if (sTag == "av_itm_magerune1")
{SetLocalInt(oPC, "PC_SPELL_BONUS", 1);}
-----
Then in the core function i use:
-----
//Checks to see if Player has a Level 4 Magic Rune
if(GetLocalInt(OBJECT_SELF, "PC_SPELL_BONUS") == 4)
{fBonus *= 2.0;} //2% bonus per post40 lvl
//Checks to see if Player has a Level 3 Magic Rune
else if(GetLocalInt(OBJECT_SELF, "PC_SPELL_BONUS") == 3)
{fBonus *= 1.75;} //1.75% bonus per post40 lvl
//Checks to see if Player has a Level 2 Magic Rune
else if(GetLocalInt(OBJECT_SELF, "PC_SPELL_BONUS") == 2)
{fBonus *= 1.5;} //1.5% bonus per post40 lvl
//Checks to see if Player has a Level 1 Magic Rune
else if(GetLocalInt(OBJECT_SELF, "PC_SPELL_BONUS") == 1)
{fBonus *= 1.25;} //1.25% bonus per post40 lvl
-----
All the items are undroppable/plot and can only have one at any given time. So the above should work fine right? I plan on players having to improve their runes as they progress through content and succeed at certain challenges. So the transition from a lvl 1 rune to a lvl 2 rune should work fine without even editting the unacquire event unless I am missing something >.>
I appreciate your feedback fellas, trying to refine this relic system as much as a can. Aventia has been around a very long time and needs a few updates here and there to make things more efficient.
I also added this little section for NPCs, if I wanted to give certain monsters increased dmg. Any thoughts? All spells are uncapped, so they already gain a little advantage by having 60 caster lvls on damage dice, etc.. but I figured for my more elite areas I wanted a little something special in place to compensate for the fact that I haven't found a way to give them more than 60 caster lvls. I was hoping to do this by editting monster blueprints in leto but it hasnt seemed to produce any results yet.
-----
else if (!GetIsPC(oPlayer) && nHD >= 60)
{
nBonus = ( nHD - 60 );
fBonus = IntToFloat( nBonus ) / 100.0;
//NPC Level 5 Spell Bonus
if (GetLocalInt(OBJECT_SELF, "NPC_SPELL_BONUS") == 5)
{fBonus *= 25.00;} //25% bonus per post60 lvl
//NPC Level 4 Spell Bonus
else if (GetLocalInt(OBJECT_SELF, "NPC_SPELL_BONUS") == 4)
{fBonus *= 20.00;} //20% bonus per post60 lvl
//NPC Level 3 Spell Bonus
else if (GetLocalInt(OBJECT_SELF, "NPC_SPELL_BONUS") == 3)
{fBonus *= 15.00;} //15% bonus per post60 lvl
//NPC Level 2 Spell Bonus
else if (GetLocalInt(OBJECT_SELF, "NPC_SPELL_BONUS") == 2)
{fBonus *= 10.00;} //10% bonus per post60 lvl
//NPC Level 1 Spell Bonus
else if (GetLocalInt(OBJECT_SELF, "NPC_SPELL_BONUS") == 1)
{fBonus *= 5.00;} //5% bonus per post60 lvl
nNumber = FloatToInt( IntToFloat( nNumber ) * ( fBonus + 1.0 ));
}
return nNumber;
Modifié par SKIPPNUTTZ, 28 novembre 2011 - 12:04 .