Eross Posted January 26 Group: Members Topic Count: 166 Topics Per Day: 0.09 Content Count: 377 Reputation: 12 Joined: 04/05/20 Last Seen: Monday at 11:47 AM Share Posted January 26 (edited) Hi can anyone help me make this script work ? Actually its working but when the event starts the rates turn to zero. Also some modification that for every 60minutes the rates will change and announcement when the event is over. Thank You ! Script credits to @Emistry prontera,155,181,5 script Sample 4_F_KAFRA1,{ mes "Donate zeny boost EXP?"; mes "Required Donation: "+F_InsertComma($DONATE_EXP_ZENY_AIM)+"z"; mes " "; mes "Current Donation: "+F_InsertComma($DONATE_EXP_ZENY)+"z"; mes "Current Rate: "+F_InsertComma($DONATE_EXP_RATE)+"X"; if (select("Continue", "Cancel") == 1) { if ($DONATE_EXP_DURATION > .@gettimetick) { mes "EXP bonus already started, you cant donate now."; } else { input .@zeny, 0, Zeny; if (.@zeny > 0) { Zeny -= .@zeny; $DONATE_EXP_ZENY += .@zeny; mes "You donated "+F_InsertComma(.@zeny)+"z"; if ($DONATE_EXP_ZENY >= $DONATE_EXP_ZENY_AIM && $DONATE_EXP_ZENY_AIM > 0) { $DONATE_EXP_RATE = rand(.rate_range[0], .rate_range[1]); $DONATE_EXP_DURATION = gettimetick(2) + .duration; callsub(L_rate, $DONATE_EXP_RATE); donpcevent strnpcinfo(3)+"::OnStart"; } } } } close; OnInit: setarray .zeny_range, 5000000, // minimum 1000000, // increasing rate 2000000000; // max donate amount .duration = (5 * 60 * 60); // 5 hours setarray .rate_range, 6, 10; // 6~10x exp boost .base_exp_rate = getbattleflag("base_exp_rate"); .job_exp_rate = getbattleflag("job_exp_rate"); if ($DONATE_EXP_ZENY_AIM < .zeny_range[0]) $DONATE_EXP_ZENY_AIM = .zeny_range[0]; if ($DONATE_EXP_ZENY_AIM > .zeny_range[2] && .zeny_range[1] > 0) $DONATE_EXP_ZENY_AIM = .zeny_range[2]; if ($DONATE_EXP_RATE < 1) $DONATE_EXP_RATE = 1; if ($DONATE_EXP_DURATION > gettimetick(2)) { callsub(L_rate, $DONATE_EXP_RATE); initnpctimer; } end; OnTimer60000: OnStart: stopnpctimer; if ($DONATE_EXP_DURATION > gettimetick(2)) { initnpctimer; } else if ($DONATE_EXP_DURATION && $DONATE_EXP_DURATION < .@gettimetick) { $DONATE_EXP_DURATION = 0; $DONATE_EXP_RATE = 1; $DONATE_EXP_ZENY_AIM += .zeny_range[1]; if ($DONATE_EXP_ZENY_AIM > .zeny_range[2] && .zeny_range[1] > 0) $DONATE_EXP_ZENY_AIM = .zeny_range[2]; callsub(L_rate, $DONATE_EXP_RATE); } end; L_rate: .@base_exp_rate = ( .@rate * .base_exp_rate ); .@job_exp_rate = ( .@rate * .job_exp_rate ); setbattleflag("base_exp_rate",.@base_exp_rate); setbattleflag("job_exp_rate",.@job_exp_rate); atcommand "@reloadmobdb"; announce "Current rates are: "+.@base_exp_rate+"x "+.@job_exp_rate+"x ", bc_all, 0xFF6060; return; } Edited January 26 by Eross Quote Link to comment Share on other sites More sharing options...
0 rokimoki Posted January 29 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 75 Reputation: 11 Joined: 12/16/11 Last Seen: Monday at 09:14 PM Share Posted January 29 You posted two floating rate scripts, do you need help on both? or...? Quote Link to comment Share on other sites More sharing options...
0 Eross Posted January 30 Group: Members Topic Count: 166 Topics Per Day: 0.09 Content Count: 377 Reputation: 12 Joined: 04/05/20 Last Seen: Monday at 11:47 AM Author Share Posted January 30 On 1/30/2025 at 6:46 AM, rokimoki said: You posted two floating rate scripts, do you need help on both? or...? Hi, i just saw this script ..and realized that my first script is stucked, just noticed that this one has more potential .. i dont know, but I badly need help sir I actually created one but im not confident and I think it has a lot of bugs Quote Link to comment Share on other sites More sharing options...
0 rokimoki Posted January 30 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 75 Reputation: 11 Joined: 12/16/11 Last Seen: Monday at 09:14 PM Share Posted January 30 You can describe the script you really want and may be easier than digest other script or easier to adapt the script, because I dont really understand what you really want. Quote Link to comment Share on other sites More sharing options...
0 Eross Posted January 30 Group: Members Topic Count: 166 Topics Per Day: 0.09 Content Count: 377 Reputation: 12 Joined: 04/05/20 Last Seen: Monday at 11:47 AM Author Share Posted January 30 1 hour ago, rokimoki said: You can describe the script you really want and may be easier than digest other script or easier to adapt the script, because I dont really understand what you really want. Hi! Okay Thank You ! The idea is there is an NPC that collects all players zeny donation and when the target amount has reached the rates will change like floating rates event every 60minutes for let's say 3 hours event period .. - NPC will only allow players to donate a minimum of 10,000z (Donation will grant agi and bless buff 3minutes buff for 10,000 and +1 minute for every 10,000z additional.) maximum donation is 80,000z only - Regardless the time the event has started, the rates should change every 60minutes. - Announcement when the target amount has reaced, everytime rates changes, 10minutes before the event ends and when the event ends - A cooldown of about 24hours after the event so players cant abuse the npc - While the event is active, players can check the remaining time on npc or using @command - This does not include droprates, only base and job exp. - The target donation will increase everytime an event ends, I dont think if it is possible to base the target amount from the current server total zeny ? IDK but that would be really good. The more zeny the server, the higher the target donation quota. That's all @rokimoki Thank You ! Quote Link to comment Share on other sites More sharing options...
0 rokimoki Posted January 31 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 75 Reputation: 11 Joined: 12/16/11 Last Seen: Monday at 09:14 PM Share Posted January 31 Okay I'm working on the script. - I configured something like 20% of total server zeny for zeny target. You can configure how much %. There are some ambiguity, I need more detailed data in this: - How much rate to increase? when to recover base rate? - If every 60 minutes rates change, why doing a event donation? 1 Quote Link to comment Share on other sites More sharing options...
0 Eross Posted January 31 Group: Members Topic Count: 166 Topics Per Day: 0.09 Content Count: 377 Reputation: 12 Joined: 04/05/20 Last Seen: Monday at 11:47 AM Author Share Posted January 31 8 hours ago, rokimoki said: Okay I'm working on the script. - I configured something like 20% of total server zeny for zeny target. You can configure how much %. There are some ambiguity, I need more detailed data in this: - How much rate to increase? when to recover base rate? - If every 60 minutes rates change, why doing a event donation? Hi ! reagarding how much rate, this event will range from 5x to 10x .. The reason why it has donation is because the rates are much higher than my official default rate of x3 only Quote Link to comment Share on other sites More sharing options...
0 rokimoki Posted January 31 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 75 Reputation: 11 Joined: 12/16/11 Last Seen: Monday at 09:14 PM Share Posted January 31 3 hours ago, Eross said: Hi ! reagarding how much rate, this event will range from 5x to 10x .. The reason why it has donation is because the rates are much higher than my official default rate of x3 only Okay sorry so, 3x base rate. Event from 5 to 10. But if event is not active changing rates even each hour, but, why? I don't understand this part. And how much random from 3 to 5 or what? Quote Link to comment Share on other sites More sharing options...
0 Eross Posted January 31 Group: Members Topic Count: 166 Topics Per Day: 0.09 Content Count: 377 Reputation: 12 Joined: 04/05/20 Last Seen: Monday at 11:47 AM Author Share Posted January 31 2 hours ago, rokimoki said: Okay sorry so, 3x base rate. Event from 5 to 10. But if event is not active changing rates even each hour, but, why? I don't understand this part. And how much random from 3 to 5 or what? When the event is not active the rates should be in normal only ..while the event is active,rates will change every 60minutes.. The even will last for 3 or 5 hours only. After the event, rates will return to the server's normal rates.. Sorry I have bad english Quote Link to comment Share on other sites More sharing options...
0 Eross Posted January 31 Group: Members Topic Count: 166 Topics Per Day: 0.09 Content Count: 377 Reputation: 12 Joined: 04/05/20 Last Seen: Monday at 11:47 AM Author Share Posted January 31 2 hours ago, rokimoki said: Okay sorry so, 3x base rate. Event from 5 to 10. But if event is not active changing rates even each hour, but, why? I don't understand this part. And how much random from 3 to 5 or what? When the event is not active the rates should be in normal only ..while the event is active,rates will change every 60minutes.. The even will last for 3 or 5 hours only. After the event, rates will return to the server's normal rates.. Sorry I have bad english Quote Link to comment Share on other sites More sharing options...
0 rokimoki Posted January 31 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 75 Reputation: 11 Joined: 12/16/11 Last Seen: Monday at 09:14 PM Share Posted January 31 Ok ok I get it, I understood something different. Well, maybe today I finish it. 1 Quote Link to comment Share on other sites More sharing options...
0 Eross Posted January 31 Group: Members Topic Count: 166 Topics Per Day: 0.09 Content Count: 377 Reputation: 12 Joined: 04/05/20 Last Seen: Monday at 11:47 AM Author Share Posted January 31 4 hours ago, rokimoki said: Ok ok I get it, I understood something different. Well, maybe today I finish it. Thank you! Quote Link to comment Share on other sites More sharing options...
0 rokimoki Posted January 31 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 75 Reputation: 11 Joined: 12/16/11 Last Seen: Monday at 09:14 PM Share Posted January 31 (edited) I tested but... test it before going production, read careful OnInit configurations. Need to be tested, event end and come back to normal, starting and reloading every 60 minutes its ok. EDIT: Updated script. EDIT 2: I don't know exactly when update the zeny aim limit, but should work good. super_floating_rates.txt Edited January 31 by rokimoki Quote Link to comment Share on other sites More sharing options...
0 Eross Posted February 2 Group: Members Topic Count: 166 Topics Per Day: 0.09 Content Count: 377 Reputation: 12 Joined: 04/05/20 Last Seen: Monday at 11:47 AM Author Share Posted February 2 On 2/1/2025 at 6:47 AM, rokimoki said: I tested but... test it before going production, read careful OnInit configurations. Need to be tested, event end and come back to normal, starting and reloading every 60 minutes its ok. EDIT: Updated script. EDIT 2: I don't know exactly when update the zeny aim limit, but should work good. super_floating_rates.txt 7.98 kB · 2 downloads Hello ! sorry for late response. I tried it thankyou for your efforts .. Just had an error and the npc got stucked after i donated aim limit. Quote Link to comment Share on other sites More sharing options...
0 rokimoki Posted February 2 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 75 Reputation: 11 Joined: 12/16/11 Last Seen: Monday at 09:14 PM Share Posted February 2 Okay, I will investigate. As far as I can see you modified the code to adap something I bet, mine is working good. I found a bug but that zenyDonated didn't reset properly, I'm fixing this but, when I reach donation everything works good. Everything works like a charm. I upload just in case you have a wrong version. EDIT: Fixed some issue about zeny limit aim update. Now should work like a charm xd. EDIT2: I realized that zeny changes may be affected if you configure short period of time between rates updates, for every hour is fine atm but... to improve the script we should get online people zeny, and offline people zeny, but, I won't for now, so consider the script finished, unless we find further bugs, which I hope not. super_floating_rates.txt 1 Quote Link to comment Share on other sites More sharing options...
0 Eross Posted February 25 Group: Members Topic Count: 166 Topics Per Day: 0.09 Content Count: 377 Reputation: 12 Joined: 04/05/20 Last Seen: Monday at 11:47 AM Author Share Posted February 25 On 2/3/2025 at 3:14 AM, rokimoki said: Okay, I will investigate. As far as I can see you modified the code to adap something I bet, mine is working good. I found a bug but that zenyDonated didn't reset properly, I'm fixing this but, when I reach donation everything works good. Everything works like a charm. I upload just in case you have a wrong version. EDIT: Fixed some issue about zeny limit aim update. Now should work like a charm xd. EDIT2: I realized that zeny changes may be affected if you configure short period of time between rates updates, for every hour is fine atm but... to improve the script we should get online people zeny, and offline people zeny, but, I won't for now, so consider the script finished, unless we find further bugs, which I hope not. super_floating_rates.txt 7.52 kB · 7 downloads Hi its working fine now ! Question, is there a difference in online player zeny to offline tho ?? Will this affect the npc script ??? Quote Link to comment Share on other sites More sharing options...
Question
Eross
Hi can anyone help me make this script work ? Actually its working but when the event starts the rates turn to zero. Also some modification that for every 60minutes the rates will change and announcement when the event is over.
Thank You ! Script credits to @Emistry
prontera,155,181,5 script Sample 4_F_KAFRA1,{ mes "Donate zeny boost EXP?"; mes "Required Donation: "+F_InsertComma($DONATE_EXP_ZENY_AIM)+"z"; mes " "; mes "Current Donation: "+F_InsertComma($DONATE_EXP_ZENY)+"z"; mes "Current Rate: "+F_InsertComma($DONATE_EXP_RATE)+"X"; if (select("Continue", "Cancel") == 1) { if ($DONATE_EXP_DURATION > .@gettimetick) { mes "EXP bonus already started, you cant donate now."; } else { input .@zeny, 0, Zeny; if (.@zeny > 0) { Zeny -= .@zeny; $DONATE_EXP_ZENY += .@zeny; mes "You donated "+F_InsertComma(.@zeny)+"z"; if ($DONATE_EXP_ZENY >= $DONATE_EXP_ZENY_AIM && $DONATE_EXP_ZENY_AIM > 0) { $DONATE_EXP_RATE = rand(.rate_range[0], .rate_range[1]); $DONATE_EXP_DURATION = gettimetick(2) + .duration; callsub(L_rate, $DONATE_EXP_RATE); donpcevent strnpcinfo(3)+"::OnStart"; } } } } close; OnInit: setarray .zeny_range, 5000000, // minimum 1000000, // increasing rate 2000000000; // max donate amount .duration = (5 * 60 * 60); // 5 hours setarray .rate_range, 6, 10; // 6~10x exp boost .base_exp_rate = getbattleflag("base_exp_rate"); .job_exp_rate = getbattleflag("job_exp_rate"); if ($DONATE_EXP_ZENY_AIM < .zeny_range[0]) $DONATE_EXP_ZENY_AIM = .zeny_range[0]; if ($DONATE_EXP_ZENY_AIM > .zeny_range[2] && .zeny_range[1] > 0) $DONATE_EXP_ZENY_AIM = .zeny_range[2]; if ($DONATE_EXP_RATE < 1) $DONATE_EXP_RATE = 1; if ($DONATE_EXP_DURATION > gettimetick(2)) { callsub(L_rate, $DONATE_EXP_RATE); initnpctimer; } end; OnTimer60000: OnStart: stopnpctimer; if ($DONATE_EXP_DURATION > gettimetick(2)) { initnpctimer; } else if ($DONATE_EXP_DURATION && $DONATE_EXP_DURATION < .@gettimetick) { $DONATE_EXP_DURATION = 0; $DONATE_EXP_RATE = 1; $DONATE_EXP_ZENY_AIM += .zeny_range[1]; if ($DONATE_EXP_ZENY_AIM > .zeny_range[2] && .zeny_range[1] > 0) $DONATE_EXP_ZENY_AIM = .zeny_range[2]; callsub(L_rate, $DONATE_EXP_RATE); } end; L_rate: .@base_exp_rate = ( .@rate * .base_exp_rate ); .@job_exp_rate = ( .@rate * .job_exp_rate ); setbattleflag("base_exp_rate",.@base_exp_rate); setbattleflag("job_exp_rate",.@job_exp_rate); atcommand "@reloadmobdb"; announce "Current rates are: "+.@base_exp_rate+"x "+.@job_exp_rate+"x ", bc_all, 0xFF6060; return; }
Link to comment
Share on other sites
15 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.