Jump to content
  • 0
Sign in to follow this  
Mythryx

Will the floating rates script revert after 1 hour?

Question

Hi! just wanted to ask if the script floating_rates will revert back to normal after 1 hour? 

If no, can someone teach me on how to make that so?

Really wanted to try and add Happy Hours to my server. like 2 times a day or so.

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
On 3/21/2020 at 4:55 AM, Mythryx said:

Hi! just wanted to ask if the script floating_rates will revert back to normal after 1 hour? 

If no, can someone teach me on how to make that so?

Really wanted to try and add Happy Hours to my server. like 2 times a day or so.

You can try below

-	script	FloatExp	-1,{
	OnMinute00:
		if (.floated) {
			setbattleflag "base_exp_rate", .currentRates[0];
			setbattleflag "job_exp_rate", .currentRates[1];
			announce "Server rates are now back to normal. Rates are " + getbattleflag("base_exp_rate") + "/" + getbattleflag("job_exp_rate"), bc_all;
			.floated = 0;
		}
		end;
	OnTrig:
		setarray .@i[ 0 ], 100, 150, 200;
		.@a = .@i[ rand( getarraysize( .@i ) ) ];
		setbattleflag "base_exp_rate", .@a;
		setbattleflag "job_exp_rate", .@a;
		announce "Server rates are adjusted. New rates are " + getbattleflag("base_exp_rate") + "/" + getbattleflag("job_exp_rate"), bc_all;
		.floated = 1;
		end;
	OnInit:
		bindatcmd "floatexp", strnpcinfo(0) + "::OnTrig";
		setarray .currentRates[0], getbattleflag("base_exp_rate"), getbattleflag("job_exp_rate");
		end;
}

Use @floatexp to readjust the base/job exp rates

Share this post


Link to post
Share on other sites
  • 0

Thanks! Will try this out.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.