SphereCommunity
Happy Train Hours - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Happy Train Hours (/Thread-Happy-Train-Hours)



Happy Train Hours - Lazarus - 11-29-2012 03:21 AM

Hi! I need help with a script of happy Hour

I made this functions to change the adv_rate [it's right?]

Code:
[FUNCTION F_SKILLSNUMBER]
serv.skill.0.adv_rate=10,1000,3000 // ALCHEMY
serv.skill.1.adv_rate=10,1000,2200 // ANATOMY
serv.skill.2.adv_rate=10,1000,3000 // ANIMALLORE

[FUNCTION F_HAPPYHOUR]
serv.skill.0.adv_rate=10,900,2800 // ALCHEMY
serv.skill.1.adv_rate=10,500,1500 // ANATOMY
serv.skill.2.adv_rate=10,800,2500 // ANIMALLORE

Now, I had think in a happy hour every 1 day on 1 hour, like:

Code:
[function f_starthappyhour]
timerf 1,f_happyhour
timerf 3600,f_skillnumber
timerf 86400,f_starthappyhour


Any idea?
-The serv.skill.0.adv_rate it's right? 2800 its 280.0 in the script. [That is what I had tested]
-It's right the function f_starthappyhour?


Thanks!

Lazarus.


RE: Happy Train Hours - Lazarus - 12-15-2012 02:22 AM

up plz Sad?


RE: Happy Train Hours - Shaklaban - 12-16-2012 12:25 AM

using timerf is not good for this purpose, you can use f_on_servertimer with timercall=1 in sphere.ini. then f_on_servertimer will called every minute so you can look to the time with serv.rtime format.

then for example:

if time is 22.00 gains go up, when time is 23.00 gains go down again.