aasr_spsn.01
Member
Without having to use an unrelated BaseClass like MagicalFood.cs or Spells.cs….
Below I have assigned the buffs I need for each item at random on doubleclick. What I would like is the ability to have those buffs reverted to their original state on the player who used the item after a duration. I know very little about how timers work and so I was wondering if someone could help me out here if possible.
Below I have assigned the buffs I need for each item at random on doubleclick. What I would like is the ability to have those buffs reverted to their original state on the player who used the item after a duration. I know very little about how timers work and so I was wondering if someone could help me out here if possible.
Double Click An Item And Gain A Stat Buff:
else if (pm is PlayerMobile)
{
switch (Utility.Random(4))
{
case 3:
{
int strBonus4 = (int)((double)pm.Str * 1.00);
pm.Str = pm.Str + strBonus4;
int dexBonus4 = (int)((double)pm.Dex * 0.25);
pm.Dex = pm.Dex + dexBonus4;
break;
}
case 2:
{
int strBonus3 = (int)((double)pm.Str * 0.75);
pm.Str = pm.Str + strBonus3;
break;
}
case 1:
{
int strBonus2 = (int)((double)pm.Str * 0.50);
pm.Str = pm.Str + strBonus2;
break;
}
case 0:
{
int strBonus1 = (int)((double)pm.Str * 0.25);
pm.Str = pm.Str + strBonus1;
break;
}
}