Hi! I just need a small help here guys .. I need some answers for me to finish my npc script ... I have a Donation base Floating Rates npc .. Wherein the players will donate zeny until they reach the target amount .. Like for example the Server need to donate 5,000,000z ... After they reach target donate amount these are how It should work :
1. The NPC will Enable the script of "OnMinute00" (Which we all know that'll change rate every hour) ..So while the event is active there will be changes every hour..
2. The said NPC will enable that script immidiately right after they reached 5m donation for only 24hours .. So, whether its Minute00 or not it should start right away.. (Ex. They reach 5m in 10:55pm, It will start right away but will change rates on 11:00pm and 12:00am so on....)
3. The players are able to check the remaining time of the Floating Rate Event ..And there will be an announcement If theres only hour left or minutes
4. After the timer ends , whether the last hour of event is done or not the server rate should return to its normal rate.
I have here a sample of script by @lupus ... I'm trying to modify it a little but im not good in adding timer .. Please help I really need to finish this one ... Or you can suggest or lecture me on my mistakes here ... Heres the script from rathena folder :
//===== rAthena Script =======================================
//= Floating Server Rates
//===== By: ==================================================
//= Lupus
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//= It's a simply example of setbattleflag
//= This script will change your server rates from 1x to 1.5x every 6 hours
//= Note: It doesn't affect Card granted drops, MVP & Treasure Chests drops ^_-
//= It also doesn't affect CARD drops, because they are just 0.01%
//===== Additional Comments: =================================
//= You can make incredible scripts with 'setbattleflag'!
//============================================================
//- script FloatingRates -1,{
prontera,123,209,6 script Broker#FloatingRates 84,{
OnInit:
set .@fr_targetdonation, 5000;
mes "[Broker]";
mes "Our server's current fund is:";
mes "" + callfunc("F_InsertComma",$fr_zeny) + " Zeny";
next;
mes "[Broker]";
mes "Would you like to make a donation?";
next;
switch(select("Yes:No")) {
case 1:
Change_Amount:
mes "[Broker]";
mes "Please input your donation amount.";
next;
input .@fr_zeny;
if (.@fr_zeny < 1){
mes "[Broker]";
mes "Input number greater than 0.";
end;
}
mes "[Broker]";
mes "Please confirm Zeny transfer..";
next;
switch(select("Cancel:Change Amount:Confirm")) {
case 1:
end;
case 2:
set .@fr_zeny,0;
next;
goto Change_Amount;
end;
case 3:
if (Zeny < .@fr_zeny) {
mes "[Broker]";
mes "Sorry, but you don't have enough";
mes "zeny to proceed on payment.";
end;
}
mes "[Broker]";
mes "Zeny has succesfully transfered.";
$fr_zeny += .@fr_zeny;
if ($fr_zeny >= .@fr_targetdonation) {
set $fr_zeny,0;
}
Zeny -= .@fr_zeny;
end;
}
case 2:
}
OnMinute00:
set $@brate,rand(500,800);
set $@jrate,rand(500,599);
//set $@drate,rand(100,150);
//Base exp
setbattleflag("base_exp_rate",$@brate);
//Job exp
setbattleflag("job_exp_rate",$@jrate);
set $@brateminus, ($@brate/100) * 100;
set $@jrateminus, ($@jrate/100) * 100;
announce "Current rates are: "+($@brate/100)+"."+($@brate-$@brateminus)+"x "+($@jrate/100)+"."+($@jrate-$@jrateminus)+"x ",bc_all,0xFF6060;
end;
}
Question
Eross
Hi! I just need a small help here guys .. I need some answers for me to finish my npc script ... I have a Donation base Floating Rates npc .. Wherein the players will donate zeny until they reach the target amount .. Like for example the Server need to donate 5,000,000z ... After they reach target donate amount these are how It should work :
1. The NPC will Enable the script of "OnMinute00" (Which we all know that'll change rate every hour) ..So while the event is active there will be changes every hour..
2. The said NPC will enable that script immidiately right after they reached 5m donation for only 24hours .. So, whether its Minute00 or not it should start right away.. (Ex. They reach 5m in 10:55pm, It will start right away but will change rates on 11:00pm and 12:00am so on....)
3. The players are able to check the remaining time of the Floating Rate Event ..And there will be an announcement If theres only hour left or minutes
4. After the timer ends , whether the last hour of event is done or not the server rate should return to its normal rate.
I have here a sample of script by @lupus ... I'm trying to modify it a little but im not good in adding timer .. Please help I really need to finish this one ... Or you can suggest or lecture me on my mistakes here ... Heres the script from rathena folder :
//===== rAthena Script ======================================= //= Floating Server Rates //===== By: ================================================== //= Lupus //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= It's a simply example of setbattleflag //= This script will change your server rates from 1x to 1.5x every 6 hours //= Note: It doesn't affect Card granted drops, MVP & Treasure Chests drops ^_- //= It also doesn't affect CARD drops, because they are just 0.01% //===== Additional Comments: ================================= //= You can make incredible scripts with 'setbattleflag'! //============================================================ //- script FloatingRates -1,{ prontera,123,209,6 script Broker#FloatingRates 84,{ OnInit: set .@fr_targetdonation, 5000; mes "[Broker]"; mes "Our server's current fund is:"; mes "" + callfunc("F_InsertComma",$fr_zeny) + " Zeny"; next; mes "[Broker]"; mes "Would you like to make a donation?"; next; switch(select("Yes:No")) { case 1: Change_Amount: mes "[Broker]"; mes "Please input your donation amount."; next; input .@fr_zeny; if (.@fr_zeny < 1){ mes "[Broker]"; mes "Input number greater than 0."; end; } mes "[Broker]"; mes "Please confirm Zeny transfer.."; next; switch(select("Cancel:Change Amount:Confirm")) { case 1: end; case 2: set .@fr_zeny,0; next; goto Change_Amount; end; case 3: if (Zeny < .@fr_zeny) { mes "[Broker]"; mes "Sorry, but you don't have enough"; mes "zeny to proceed on payment."; end; } mes "[Broker]"; mes "Zeny has succesfully transfered."; $fr_zeny += .@fr_zeny; if ($fr_zeny >= .@fr_targetdonation) { set $fr_zeny,0; } Zeny -= .@fr_zeny; end; } case 2: } OnMinute00: set $@brate,rand(500,800); set $@jrate,rand(500,599); //set $@drate,rand(100,150); //Base exp setbattleflag("base_exp_rate",$@brate); //Job exp setbattleflag("job_exp_rate",$@jrate); set $@brateminus, ($@brate/100) * 100; set $@jrateminus, ($@jrate/100) * 100; announce "Current rates are: "+($@brate/100)+"."+($@brate-$@brateminus)+"x "+($@jrate/100)+"."+($@jrate-$@jrateminus)+"x ",bc_all,0xFF6060; end; }
Link to comment
Share on other sites
4 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.