PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
Method to execute script when vitals are regened

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Feature Suggestions
Display posts from previous:   

Author Message
tekproxy
Distro Developer


Joined: 06 Apr 2006
Posts: 350
Location: Nederland, Texas

PostPosted: Fri Apr 28, 2006 3:18 pm    Post subject: Method to execute script when vitals are regened Reply with quote

How difficult would it be to implement some sort of function that is called when a stat point is gained? Meditation is suposed to increase whenever a player gains a point of mana and it is also suposed to increase the rate at which the player regenerates.

Currently I understand that it would only be possible to affect the rate gain. Perhaps by calling RecalcVitals() on a player whenever they gain a point of intelligence or meditation, which then checks the regen rate of that stat, which could then be changed to reflect the new skill/stat. But getting Meditation to have a chance to increase whenever a point of mana is regenerated wouldn't be easy. The only way I can think of would be to have some sort of script sitting on the player checking every second and if it notices a change in mana from the time before, award some points.

Is there a way a more elegant solution could be afforded by the core? Something like defining a regen function in vitals.cfg that is called whenever that point is regenerated. This could also help in implementing Focus, which is the same thing except more for strength and stamina (but also affects meditation).

If I'm incorrect in any of this, please let me know.

Author Message
MuadDib
POL Developer


Joined: 13 Feb 2006
Posts: 830
Location: Indiana, USA

PostPosted: Sat Apr 29, 2006 12:11 am    Post subject: Reply with quote

Yeah, there is.

Have a passive med script fire on char logon etc, and use it to award points during it's loop, whenever mana is less than max. Be careful of the speed of your wait, make sure it's no to insanely fast.

Author Message
tekproxy
Distro Developer


Joined: 06 Apr 2006
Posts: 350
Location: Nederland, Texas

PostPosted: Sat Apr 29, 2006 12:56 am    Post subject: Re: Method to execute script when vitals are regened Reply with quote

tekproxy wrote:
The only way I can think of would be to have some sort of script sitting on the player checking every second and if it notices a change in mana from the time before, award some points.


I thought that wouldn't be very clean but you know what you're talking about so I'll believe you! Very Happy

Thanks.

Post new topic   Reply to topic    PenUltima Online Forum Index -> Feature Suggestions All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty