bigwasanro Posted October 11, 2016 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 10 Reputation: 0 Joined: 09/24/16 Last Seen: January 11, 2017 Share Posted October 11, 2016 need help for floating Double Exp and Drop rate on the week ends friday saturday sunday thank you in advance Quote Link to comment Share on other sites More sharing options...
0 _Okuz_ Posted October 14, 2016 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 92 Reputation: 17 Joined: 08/11/12 Last Seen: August 30, 2017 Share Posted October 14, 2016 (edited) Why so rude? I'm using so many variables cause I thought it was better than repeating the setbattleflag / getbattleflag for each flag he wants do edit, but you're right there's no need for that. EDIT-- Euraka! Now I remember why I needed to use so many variables... I can't get the original rates to reset the event on monday =/ I followed your instructions but correct me if I did something wrong. // Author: Lupus // Edited: _Okuz_ - script Weekend Floating Exp -1,{ OnInit: // To force the event to run even if you have to shutdown your server for some reason... if (gettime(4) != 5 && gettime(4) != 6 && gettime(4) != 0) end; OnFri0000: // start double rates on Friday 00:00 setbattleflag "base_exp_rate", getbattleflag("base_exp_rate") * 2; setbattleflag "job_exp_rate", getbattleflag("job_exp_rate") * 2; setbattleflag "item_rate_heal", getbattleflag("item_rate_heal") * 2; setbattleflag "item_rate_use", getbattleflag("item_rate_use") * 2; setbattleflag "item_rate_equip", getbattleflag("item_rate_equip") * 2; setbattleflag "item_rate_card", getbattleflag("item_rate_card") * 2; setbattleflag "item_rate_mvp", getbattleflag("item_rate_mvp") * 2; setbattleflag "item_rate_adddrop", getbattleflag("item_rate_adddrop") * 2; setbattleflag "item_rate_treasure", getbattleflag("item_rate_treasure") * 2; atcommand "@reloadmobdb"; announce "[Event] : Double rates enabled!",bc_all,0xFF6060; end; OnMon0000: // stop double rates on Monday 00:00 setbattleflag "base_exp_rate", getbattleflag("base_exp_rate"); setbattleflag "job_exp_rate", getbattleflag("job_exp_rate"); setbattleflag "item_rate_heal", getbattleflag("item_rate_heal"); setbattleflag "item_rate_use", getbattleflag("item_rate_use"); setbattleflag "item_rate_equip", getbattleflag("item_rate_equip"); setbattleflag "item_rate_card", getbattleflag("item_rate_card"); setbattleflag "item_rate_mvp", getbattleflag("item_rate_mvp"); setbattleflag "item_rate_adddrop", getbattleflag("item_rate_adddrop"); setbattleflag "item_rate_treasure", getbattleflag("item_rate_treasure"); atcommand "@reloadmobdb"; announce "[Event] : Double rates disabled!",bc_all,0xFF6060; end; } Test results:http://imgur.com/a/lyLI5 Edited October 14, 2016 by _Okuz_ 1 Quote Link to comment Share on other sites More sharing options...
0 _Okuz_ Posted October 11, 2016 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 92 Reputation: 17 Joined: 08/11/12 Last Seen: August 30, 2017 Share Posted October 11, 2016 (edited) Hey, whats up!?Here is your request: // Author: _Okuz_ // Version: 1.0.2 - 20:40 14/10/2016 - script Weekend Floating Exp -1,{ OnInit: // Setup the rates you want to double here... setarray .server_conf$[0], "base_exp_rate", getbattleflag("base_exp_rate"), "job_exp_rate", getbattleflag("job_exp_rate"), "item_rate_common", getbattleflag("item_rate_common"), "item_rate_heal", getbattleflag("item_rate_heal"), "item_rate_use", getbattleflag("item_rate_use"), "item_rate_equip", getbattleflag("item_rate_equip"), "item_rate_card", getbattleflag("item_rate_card"), "item_rate_mvp", getbattleflag("item_rate_mvp"), "item_rate_adddrop", getbattleflag("item_rate_adddrop"), "item_rate_treasure", getbattleflag("item_rate_treasure"); // To force the event to run even if you have to shutdown your server for some reason... if (gettime(4) != 5 && gettime(4) != 6 && gettime(4) != 0) end; OnFri0000: // start double rates on Friday 00:00 if (!.active) callsub(S_changeRates, 2); end; OnMon0000: // stop double rates on Monday 00:00 callsub(S_changeRates, 1); end; // Arg(0): mult S_changeRates: set .@size, getarraysize(.server_conf$); for (set .@i, 0; .@i < .@size; set .@i, .@i + 2) { setbattleflag .server_conf$[.@i], atoi(.server_conf$[.@i + 1]) * getarg(0); } set .active, !.active; atcommand "@reloadmobdb"; announce "[Event] : Rates " + (.active ? "increased" : "restored") + "!",bc_all,0xFF6060; return; } EDIT-- Tested and working. Edited October 15, 2016 by _Okuz_ 2 Quote Link to comment Share on other sites More sharing options...
0 bigwasanro Posted October 12, 2016 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 10 Reputation: 0 Joined: 09/24/16 Last Seen: January 11, 2017 Author Share Posted October 12, 2016 hey, what up bro the script is not working Quote Link to comment Share on other sites More sharing options...
0 _Okuz_ Posted October 14, 2016 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 92 Reputation: 17 Joined: 08/11/12 Last Seen: August 30, 2017 Share Posted October 14, 2016 What do you mean by "is not working"? Did you get any error or something? Quote Link to comment Share on other sites More sharing options...
0 Akkarin Posted October 14, 2016 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1630 Joined: 03/26/12 Last Seen: April 15 Share Posted October 14, 2016 There's a floating rates NPC script already in the rA repo: https://github.com/rathena/rathena/blob/master/npc/custom/etc/floating_rates.txt Just change the OnHour labels to something else: OnClock<hour><minute>: OnMinute<minute>: OnHour<hour>: On<weekday><hour><minute>: OnDay<month><day>: This will execute when the server clock hits the specified date or time. Hours and minutes are given in military time. ('0105' will mean 01:05 AM). Weekdays are Sun,Mon,Tue,Wed,Thu,Fri,Sat. Months are 01 to 12, days are 01 to 31. Remember the zero. So You'd use OnFri0000: and then use OnMon0000: to set the specific rates back again. Quote Link to comment Share on other sites More sharing options...
0 _Okuz_ Posted October 14, 2016 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 92 Reputation: 17 Joined: 08/11/12 Last Seen: August 30, 2017 Share Posted October 14, 2016 There's a floating rates NPC script already in the rA repo: https://github.com/rathena/rathena/blob/master/npc/custom/etc/floating_rates.txt Just change the OnHour labels to something else: OnClock<hour><minute>: OnMinute<minute>: OnHour<hour>: On<weekday><hour><minute>: OnDay<month><day>: This will execute when the server clock hits the specified date or time. Hours and minutes are given in military time. ('0105' will mean 01:05 AM). Weekdays are Sun,Mon,Tue,Wed,Thu,Fri,Sat. Months are 01 to 12, days are 01 to 31. Remember the zero. So You'd use OnFri0000: and then use OnMon0000: to set the specific rates back again. Hello Akkarin!He wants to double the rates, so he needs to edit a little bit more than just the clock events. And I have tested the script that I left before and guess what... it is working...Thank you! 1 Quote Link to comment Share on other sites More sharing options...
0 Akkarin Posted October 14, 2016 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1630 Joined: 03/26/12 Last Seen: April 15 Share Posted October 14, 2016 And I have tested the script that I left before and guess what... it is working... I have no doubt that it works, i'm just baffled by the unnecessary use of an array and so many variables where a very simple script would do the same job. I see no valid reason to reinvent the wheel when there's a perfectly good wheel in the repo that can be tweaked to requirements, that's all. Quote Link to comment Share on other sites More sharing options...
0 Felten Posted October 15, 2016 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 104 Reputation: 15 Joined: 01/18/16 Last Seen: July 15, 2024 Share Posted October 15, 2016 Hey, whats up!? Here is your request: // Author: _Okuz_ // Version: 1.0.2 - 20:40 14/10/2016 - script Weekend Floating Exp -1,{ OnInit: // Setup the rates you want to double here... setarray .server_conf$[0], "base_exp_rate", getbattleflag("base_exp_rate"), "job_exp_rate", getbattleflag("job_exp_rate"), "item_rate_common", getbattleflag("item_rate_common"), "item_rate_heal", getbattleflag("item_rate_heal"), "item_rate_use", getbattleflag("item_rate_use"), "item_rate_equip", getbattleflag("item_rate_equip"), "item_rate_card", getbattleflag("item_rate_card"), "item_rate_mvp", getbattleflag("item_rate_mvp"), "item_rate_adddrop", getbattleflag("item_rate_adddrop"), "item_rate_treasure", getbattleflag("item_rate_treasure"); // To force the event to run even if you have to shutdown your server for some reason... if (gettime(4) != 5 && gettime(4) != 6 && gettime(4) != 0) end; OnFri0000: // start double rates on Friday 00:00 if (!.active) callsub(S_changeRates, 2); end; OnMon0000: // stop double rates on Monday 00:00 callsub(S_changeRates, 1); end; // Arg(0): mult S_changeRates: set .@size, getarraysize(.server_conf$); for (set .@i, 0; .@i < .@size; set .@i, .@i + 2) { setbattleflag .server_conf$[.@i], atoi(.server_conf$[.@i + 1]) * getarg(0); } set .active, !.active; atcommand "@reloadmobdb"; announce "[Event] : Rates " + (.active ? "increased" : "restored") + "!",bc_all,0xFF6060; return; } EDIT-- Tested and working. thank you, works fine here. Quote Link to comment Share on other sites More sharing options...
0 bigwasanro Posted October 19, 2016 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 10 Reputation: 0 Joined: 09/24/16 Last Seen: January 11, 2017 Author Share Posted October 19, 2016 thank you so much you are the best _okuz_ Quote Link to comment Share on other sites More sharing options...
0 hadie Posted November 2, 2019 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 86 Reputation: 1 Joined: 03/11/12 Last Seen: January 11 Share Posted November 2, 2019 How to set everyday 9am to 11am floating rate Quote Link to comment Share on other sites More sharing options...
0 Akkarin Posted November 3, 2019 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1630 Joined: 03/26/12 Last Seen: April 15 Share Posted November 3, 2019 Use the OnClock or OnHour labels. Quote Link to comment Share on other sites More sharing options...
0 hadie Posted November 4, 2019 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 86 Reputation: 1 Joined: 03/11/12 Last Seen: January 11 Share Posted November 4, 2019 13 hours ago, Akkarin said: Use the OnClock or OnHour labels. Thank you sir Quote Link to comment Share on other sites More sharing options...
0 lyndonros Posted September 20, 2020 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 3 Reputation: 0 Joined: 07/25/20 Last Seen: November 12, 2020 Share Posted September 20, 2020 On 10/12/2016 at 3:59 AM, _Okuz_ said: Hey, whats up!? Here is your request: // Author: _Okuz_ // Version: 1.0.2 - 20:40 14/10/2016 - script Weekend Floating Exp -1,{ OnInit: // Setup the rates you want to double here... setarray .server_conf$[0], "base_exp_rate", getbattleflag("base_exp_rate"), "job_exp_rate", getbattleflag("job_exp_rate"), "item_rate_common", getbattleflag("item_rate_common"), "item_rate_heal", getbattleflag("item_rate_heal"), "item_rate_use", getbattleflag("item_rate_use"), "item_rate_equip", getbattleflag("item_rate_equip"), "item_rate_card", getbattleflag("item_rate_card"), "item_rate_mvp", getbattleflag("item_rate_mvp"), "item_rate_adddrop", getbattleflag("item_rate_adddrop"), "item_rate_treasure", getbattleflag("item_rate_treasure"); // To force the event to run even if you have to shutdown your server for some reason... if (gettime(4) != 5 && gettime(4) != 6 && gettime(4) != 0) end; OnFri0000: // start double rates on Friday 00:00 if (!.active) callsub(S_changeRates, 2); end; OnMon0000: // stop double rates on Monday 00:00 callsub(S_changeRates, 1); end; // Arg(0): mult S_changeRates: set .@size, getarraysize(.server_conf$); for (set .@i, 0; .@i < .@size; set .@i, .@i + 2) { setbattleflag .server_conf$[.@i], atoi(.server_conf$[.@i + 1]) * getarg(0); } set .active, !.active; atcommand "@reloadmobdb"; announce "[Event] : Rates " + (.active ? "increased" : "restored") + "!",bc_all,0xFF6060; return; } EDIT-- Tested and working. Hello sir @_Okuz_, I want to only modify the rates to plus 30% but when I enter 1.3 it does give me an error. Can you help me please? Quote Link to comment Share on other sites More sharing options...
Question
bigwasanro
need help for floating Double Exp and Drop rate on the week ends friday saturday sunday thank you in advance
Link to comment
Share on other sites
13 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.