PandaLovesHamster Posted January 1, 2015 Posted January 1, 2015 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; } } Quote
Emistry Posted January 1, 2015 Posted January 1, 2015 you can follow this method https://rathena.org/board/topic/70442-question-regarding-to-isnight/#entry135576 or https://rathena.org/board/topic/71921-is-it-able-to-set-mapflag-on-daynight-change/?p=143269 Quote
PandaLovesHamster Posted January 1, 2015 Author Posted January 1, 2015 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? Quote
PandaLovesHamster Posted January 1, 2015 Author Posted January 1, 2015 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. Quote
PandaLovesHamster Posted January 1, 2015 Author Posted January 1, 2015 (edited) I'm sorry, what I meant is where do I actually put it in my RO source folder. Edited January 1, 2015 by PandaRapesHamster Quote
Question
PandaLovesHamster
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.
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.