Page 1 of 1

boost??

Posted: Sun Mar 02, 2008 5:55 pm
by mastadava1
ok, with 100 magery i boost my stats with agility of 10!.. then, i boost my magery to 1000 and i boost of 10 too!! did someone know why? (its the same thing with all boost spell)

Posted: Mon Mar 03, 2008 2:36 am
by cucciola3000
See in

pkg/skill/spell/bless.src

Posted: Mon Mar 03, 2008 8:04 am
by mastadava1
ok.. i change the line 17 "PlayObjectCenteredEffect( cast_on, FX_BLESS_EFFECT, 10,10);" to "PlayObjectCenteredEffect( cast_on, FX_BLESS_EFFECT, 100,100);"and compiled after... and notthing change...

Posted: Mon Mar 03, 2008 1:17 pm
by Tritan
Did you unload or restart your server after you made the change?

Posted: Mon Mar 03, 2008 2:16 pm
by ncrsn
PlayObjectCenteredEffect() is not the function you are looking for.

This code snippet is from Distro 095, spells/bless.src:

Code: Select all

var magery := GetEffectiveSkill(caster, SKILLID_MAGERY);
  var mod_amount := GetModAmount(magery);
  var duration := GetModDuration(magery);
  if(CanMod(cast_on, "str"))
	DoTempMod(cast_on, "str", mod_amount, duration);
  endif
  if(CanMod(cast_on, "dex"))
	DoTempMod(cast_on, "dex", mod_amount, duration);
  endif
  if(CanMod(cast_on, "int"))
	DoTempMod(cast_on, "int", mod_amount, duration);
  endif
If you want to change amount of strength, dexterity and/or intelligence casting should give, mod_amount is the variable to do that. It is return value of GetModAmount()-function, so look into it; or, if you want to add only local boost, change mod_amount to something else, like this:

Code: Select all

var magery := GetEffectiveSkill(caster, SKILLID_MAGERY);
  var mod_amount := 10 * GetModAmount(magery);
  var duration := GetModDuration(magery);
  if(CanMod(cast_on, "str"))
	DoTempMod(cast_on, "str", mod_amount, duration);
  endif
  if(CanMod(cast_on, "dex"))
	DoTempMod(cast_on, "dex", mod_amount, duration);
  endif
  if(CanMod(cast_on, "int"))
	DoTempMod(cast_on, "int", mod_amount, duration);
  endif
Now, in theory, you would get ten times more boost out of bless-spell (might be just a little overpowered, but what do I know).

If you want to change this easily for all instances, check out and modify pol/scripts/include/statMod.inc.

Edit:
Function GetModAmount():

Code: Select all

function GetModAmount(magery)
  var mod_amount := CInt(RandomInt(3) +(magery/10));
  if(mod_amount > 10)
    mod_amount := 10;
  endif
  return mod_amount;
endfunction
Notice that if mod_amount is higher than 10 (because your magery is 1000, this if will be true), it's value will be lowered to 10. Changing this might have unexpectable results in other scripts relying on this if-statement, so you should carefully check other scripts using this function if you are to modify it.

Posted: Mon Mar 03, 2008 4:10 pm
by mastadava1
ohh thx i change the magery/10 to magery/6 and the max of 10 to 65.. thxx!