PenUltima Online

It is currently Sun Oct 12, 2008 4:33 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: boost??
PostPosted: Sun Mar 02, 2008 5:55 pm 
Offline

Joined: Sun Mar 02, 2008 5:52 pm
Posts: 12
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)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 03, 2008 2:36 am 
Offline

Joined: Fri Aug 25, 2006 8:06 am
Posts: 11
See in

pkg/skill/spell/bless.src


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 03, 2008 8:04 am 
Offline

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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 03, 2008 1:17 pm 
Offline
User avatar

Joined: Sat Feb 04, 2006 8:17 am
Posts: 146
Location: Illinois, USA
Did you unload or restart your server after you made the change?

_________________
2nd place is the 1st loser.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 03, 2008 2:16 pm 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 223
PlayObjectCenteredEffect() is not the function you are looking for.

This code snippet is from Distro 095, spells/bless.src:
Code:
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:
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:
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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 03, 2008 4:10 pm 
Offline

Joined: Sun Mar 02, 2008 5:52 pm
Posts: 12
ohh thx i change the magery/10 to magery/6 and the max of 10 to 65.. thxx!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl