Jump to content
  • 0

Help with Syncing Rates during Night and Day Cycle


PandaLovesHamster

Question


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   35
  • Joined:  12/18/14
  • Last Seen:  

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;
}
}

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2369
  • Joined:  10/28/11
  • Last Seen:  


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   35
  • Joined:  12/18/14
  • Last Seen:  

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?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2369
  • Joined:  10/28/11
  • Last Seen:  

did you add the source mod ??

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   35
  • Joined:  12/18/14
  • Last Seen:  

I'm sorry, but where can I do that again? If I need to add a source mod, this would probably be the first time I'm doing it.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2369
  • Joined:  10/28/11
  • Last Seen:  

refer Cydh post in the link above /swt

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   35
  • Joined:  12/18/14
  • Last Seen:  

I'm sorry, what I meant is where do I actually put it in my RO source folder.

Edited by PandaRapesHamster
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...