boost??

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 095. Note: Core 095 is no longer officially supported.
Post Reply
mastadava1
New User
Posts: 12
Joined: Sun Mar 02, 2008 5:52 pm

boost??

Post 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)
cucciola3000
New User
Posts: 12
Joined: Fri Aug 25, 2006 8:06 am

Post by cucciola3000 »

See in

pkg/skill/spell/bless.src
mastadava1
New User
Posts: 12
Joined: Sun Mar 02, 2008 5:52 pm

Post 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...
User avatar
Tritan
Grandmaster Poster
Posts: 147
Joined: Sat Feb 04, 2006 8:17 am

Post by Tritan »

Did you unload or restart your server after you made the change?
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

Post 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.
mastadava1
New User
Posts: 12
Joined: Sun Mar 02, 2008 5:52 pm

Post by mastadava1 »

ohh thx i change the magery/10 to magery/6 and the max of 10 to 65.. thxx!
Post Reply