prontera.gat,128,193,6 script Floating Rates#2 402,{
//-------------------------
//Main Configuration
set $oribrate,30000;
//Your Original Base Exp Rate.
set $orijrate,30000;
//Your Original Job Exp Rate.
set $zenyneeded,50000000;
//Zeny needed to activate Floating Rates.
set .@curzeny,readparam(20);
//Reads the current zeny of the player.
set .@bfloatrate,rand(30000,40000);
//Floating Base Exp.
set .@jfloatrate,rand(30000,40000);
//Floating Job Exp.
set @nn$,"[Floating Rates]";
//NPC Name.
//-------------------------
//Main Script
if ( getgmlevel() >= 60 ) goto L_GM;
L_Normal:
mes @nn$;
mes "Hello!";
mes "If we reach the ^00ff0050,000,000^000000 Zeny balance then we start a floating rates!";
next;
mes @nn$;
mes "Current Balance : ^00ff00"+$fzeny+"^000000 Zeny.";
mes "We need more ^ff0000"+($zenyneeded-$fzeny)+" ^000000Zeny before we can start the floating rates";
mes "Do you want to contribute some zeny?";
next;
menu "Yes",-,"No",L_End;
mes @nn$;
mes "Currently you have ^0000ff"+Zeny+"^000000 Zeny.";
mes "So,what do you say?";
next;
menu "I would like to contribute some zeny!",L_Contribute,"Sorry I need that zeny.",L_End;
L_Contribute:
mes @nn$;
mes "How many zeny do you like to spend?";
input .@zcontribute;
if ( .@zcontribute == 0 ) {
next;
mes @nn$;
mes "I don't think you contribute something";
mes "Please be serious.";
goto L_End;
}
if ( .@zcontribute > .@curzeny ) {
next;
mes @nn$;
mes "Sorry you don't have that much Zeny.";
goto L_End;
}
mes "Thanks for your contribution!";
set $fzeny,$fzeny+.@zcontribute;
set Zeny,Zeny-.@zcontribute;
if ($fzeny >= $zenyneeded) {
set $fzeny,$fzeny - $zenyneeded;
set $frate2,1;
set $bexp,.@bfloatrate;
set $jexp,.@jfloatrate;
setbattleflag "base_exp_rate",$bexp;
setbattleflag "job_exp_rate",$jexp;
atcommand "@reloadmobdb";
mes "Floating Base Exp rate: "+$bexp/100+"";
mes "Floating Base Exp rate: "+$jexp/100+"";
set $rema2,gettimetick(2) + 3600;
set $time2, $rema2 - gettimetick(2);
set $min2, $time2 % (24*60*60) % (60*60) / (60);
set $sec2, $time2 % (24*60*60) % (60*60) % (60);
announce "Floating Rates were sponsored by many players for 1 hour. The Floating Rates are :",0;
close2;
// sleep2 3000;
announce "Base EXP Rate : "+getbattleflag("base_exp_rate")/100+"",0;
// sleep2 3000;
announce "Job EXP Rate : "+getbattleflag("job_exp_rate")/100+"",0;
goto L_room;
end;
}
next;
goto L_Normal;
L_fix:
setbattleflag "base_exp_rate",$oribrate;
setbattleflag "job_exp_rate",$orijrate;
atcommand "@rates";
close2;
end;
L_GM:
mes @nn$;
mes "How can I help you?";
next;
menu "Stop the floating rates",L_StopFR,"Start the floating rates",L_StartFR,"Bring me to normal menu",L_Normal;
L_StopFR:
if ($frate2 == 1) {
set $gmstop,1;
set $rema2,0;
set $frate2,0;
announce "The Floating Rates where stoped by the Game Master. Thanks to many people for Floating Rates!",0;
delwaitingroom;
setbattleflag("base_exp_rate",$oribrate);
setbattleflag("job_exp_rate",$orijrate);
atcommand "@reloadmobdb";
end;
}
next;
mes @nn$;
mes "The floating rates haven't started yet.";
next;
goto L_GM;
L_StartFR:
if ($frate2 == 0) {
set $frate2,1;
set $bexp,.@bfloatrate;
set $jexp,.@jfloatrate;
setbattleflag "base_exp_rate",$bexp;
setbattleflag "job_exp_rate",$jexp;
atcommand "@reloadmobdb";
mes "Floating Base Exp rate: "+$bexp/100+"";
mes "Floating Base Exp rate: "+$jexp/100+"";
set $rema2,gettimetick(2) + 3600;
set $time2, $rema2 - gettimetick(2);
set $min2, $time2 % (24*60*60) % (60*60) / (60);
set $sec2, $time2 % (24*60*60) % (60*60) % (60);
announce "Floating Rates were sponsored by GM for 1 hour. The Floating Rates are :",0;
close2;
// sleep2 3000;
announce "Base EXP Rate : "+getbattleflag("base_exp_rate")/100+"",0;
// sleep2 3000;
announce "Job EXP Rate : "+getbattleflag("job_exp_rate")/100+"",0;
goto L_room;
}
next;
mes @nn$;
mes "The floating rates already started.";
goto L_GM;
L_End:
next;
mes @nn$;
mes "Goodbye!";
close;
end;
L_room:
sleep 1000;
delwaitingroom;
set $time2, $rema2 - gettimetick(2);
set $min2, $time2 % (24*60*60) % (60*60) / (60);
set $sec2, $time2 % (24*60*60) % (60*60) % (60);
if ($rema2 <= 59 && $rema2 >= 1) {
delwaitingroom;
waitingroom ""+$sec2+" Seconds remaining.",0;
goto L_room;
} else if ($rema2 == gettimetick(2)) {
delwaitingroom;
announce "The Floating Rates ended. Thanks to many people for Floating Rates!",0;
setBattleFlag "base_exp_rate",$oribrate;
setBattleFlag "job_exp_rate",$orijrate;
set $frate2,0;
atcommand "@reloadmobdb";
end;
} else if ($rema2 >= 60) {
delwaitingroom;
waitingroom ""+$min2+" min "+$sec2+" sec remaining.",0;
goto L_room;
}
end;
OnPcLoginEvent:
if ($frate2 == 1) {
announce "Floating Rates were sponsored by many players for 1 hour. The Floating Rates are : ",bc_self;
// sleep2 3000;
announce "Base EXP Rate : "+getbattleflag("base_exp_rate")/100+"",bc_self;
// sleep2 3000;
announce "Job EXP Rate : "+getbattleflag("job_exp_rate")/100+"",bc_self;
// sleep2 3000;
announce "The remaining time of the Floating Rates : "+$min2+" minutes "+$sec2+" seconds.",bc_self;
end;
} else {end;}
OnInit:
if ($rema2 <= 59) {
if ($frate2 == 0) end;
delwaitingroom;
waitingroom ""+$sec2+" Seconds remaining.",0;
goto L_room;
} else if ($rema2 == gettimetick(2)) {
if ($frate2 == 0) end;
delwaitingroom;
if ($sp$ == "") end;
announce "The Floating Rates ended. Thanks to many people for Floating Rates!",0;
setBattleFlag "base_exp_rate",$oribrate;
setBattleFlag "job_exp_rate",$orijrate;
set $frate2,0;
atcommand "@reloadmobdb";
end;
} else if ($rema2 >= 60) {
if ($frate2 == 0) end;
delwaitingroom;
waitingroom ""+$min2+" min "+$sec2+" sec remaining.",0;
goto L_room;
}
}
- script frate#2 -1,{
OnWhisperGlobal:
if (@whispervar0$ == "end" || @whispervar0$ == "e") {
if (getgmlevel() >= 60) {
if ($frate2 == 1) {
set $gmstop,1;
set $rema2,0;
set $frate2,0;
announce "The Floating Rates where stoped by the Game Master. Thanks to many people for Floating Rates!",0;
delwaitingroom;
setbattleflag("base_exp_rate",$oribrate);
setbattleflag("job_exp_rate",$orijrate);
atcommand "@reloadmobdb";
end;
}
}
}
}
coz i got this error
[Error]: npc_parsesrcfile: Unknown syntax in file 'npc/custom/floating_rates.txt', line '200'. Stopping...
Question
chromus28
guys can anyone help me with this one?
coz i got this error
Link to comment
Share on other sites
1 answer 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.