Jump to content
  • 0

Will the floating rates script revert after 1 hour?


Mythryx

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  10/23/19
  • Last Seen:  

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.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  10/23/19
  • Last Seen:  

Thanks! Will try this out.

 

Link to comment
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.

×
×
  • Create New...