Jump to content
  • 0

Will the floating rates script revert after 1 hour?


Question

Posted

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.

2 answers to this question

Recommended Posts

  • 0
Posted
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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...