Jump to content
  • 0

Help with Syncing Rates during Night and Day Cycle


Question

Posted

Hi, I'm trying to Sync my Day and Night cycles, but this script does not follow my cycle which is 2 hours day, and then 2 hours night.

It's suppose to automatically change rates depending if its day or night in-game.

-	script	FloatingRates	-1,{
OnInit:
OnMinute00:
if (isday()==1) {
	set $@brate,2500;
	set $@jrate,2500;
	set $@drate,1500;

	setbattleflag("base_exp_rate",$@brate);
	setbattleflag("job_exp_rate",$@jrate);
	setbattleflag("item_rate_common",$@drate);
	setbattleflag("item_rate_heal",$@drate);
	setbattleflag("item_rate_use",$@drate);
	setbattleflag("item_rate_equip",$@drate);
	atcommand "@reloadmobdb";
	announce "Current rates are: "+($@brate-2475)+"x / "+($@jrate-2475)+"x / "+($@drate-1485)+"x",bc_all,0xFF6060;
	announce "MVP Cards are not affected.",bc_all,0xFF6060;
	end;
}
if (isnight()==1) {
	set $@brate,1500;
	set $@jrate,1500;
	set $@drate,2500;

	setbattleflag("base_exp_rate",$@brate);
	setbattleflag("job_exp_rate",$@jrate);
	setbattleflag("item_rate_common",$@drate);
	setbattleflag("item_rate_heal",$@drate);
	setbattleflag("item_rate_use",$@drate);
	setbattleflag("item_rate_equip",$@drate);
	atcommand "@reloadmobdb";
	announce "Current rates are: "+($@brate-1485)+"x / "+($@jrate-1485)+"x / "+($@drate-2475)+"x",bc_all,0xFF6060;
	announce "Cards are not affected.",bc_all,0xFF6060;
	end;
}
}

6 answers to this question

Recommended Posts

Posted

Thanks for always helping me out Emistry.

I've followed what you've given and gave it a try, here's the code.

 

-	script	FloatingRates	-1,{
OnInit:
OnMinute00:
//if (isday()==1) {
OnDay:
	set $@brate,2500;
	set $@jrate,2500;
	set $@drate,1500;

	setbattleflag("base_exp_rate",$@brate);
	setbattleflag("job_exp_rate",$@jrate);
	setbattleflag("item_rate_common",$@drate);
	setbattleflag("item_rate_heal",$@drate);
	setbattleflag("item_rate_use",$@drate);
	setbattleflag("item_rate_equip",$@drate);
	atcommand "@reloadmobdb";
	atcommand "@reloaditemdb";
	announce "Current rates are: "+($@brate-2475)+"x / "+($@jrate-2475)+"x / "+($@drate-1485)+"x",bc_all,0xFF6060;
	announce "Cards are not affected.",bc_all,0xFF6060;
	end;
//}
//if (isnight()==1) {
OnNight:
	set $@brate,1500;
	set $@jrate,1500;
	set $@drate,2500;

	setbattleflag("base_exp_rate",$@brate);
	setbattleflag("job_exp_rate",$@jrate);
	setbattleflag("item_rate_common",$@drate);
	setbattleflag("item_rate_heal",$@drate);
	setbattleflag("item_rate_use",$@drate);
	setbattleflag("item_rate_equip",$@drate);
	atcommand "@reloadmobdb";
	atcommand "@reloaditemdb";
	announce "Current rates are: "+($@brate-1485)+"x / "+($@jrate-1485)+"x / "+($@drate-2475)+"x",bc_all,0xFF6060;
	announce "Cards are not affected.",bc_all,0xFF6060;
	end;
//}
}

Well, the result was practically just the same. When I change it to day. there's no message that the rates were changed, and when I changed it to night, still the same.

Do I have to wait that the server naturally goes into day/night?

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...