Hi I tried to revise happy hour base on my needs .. but the thing is its always bugging ... my normal rates are 15x 15x 5x ... But some times it multiplies upto 135x 135x etc ... Kindly check whats wrong ... Ive added reload mob and reload battleconf OnInit: to prevent this incase I globally reload scripts but still bugging ... Thanks
Question
Eross
Hi I tried to revise happy hour base on my needs .. but the thing is its always bugging ... my normal rates are 15x 15x 5x ... But some times it multiplies upto 135x 135x etc ... Kindly check whats wrong ... Ive added reload mob and reload battleconf OnInit: to prevent this incase I globally reload scripts but still bugging ... Thanks
- script HappyHour -1,{ OnInit: atcommand ("@reloadbattleconf"); atcommand ("@reloadmobdb"); bindatcmd("starthappyhour2", strnpcinfo(0) +"::OnHappyHour2", 93, 99); bindatcmd("starthappyhour3", strnpcinfo(0) +"::OnHappyHour3", 93, 99); bindatcmd("endhappyhour", strnpcinfo(0) +"::OnEndHappyHour", 93, 99); .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"); end; OnHappyHour2: //add any other HOURS OnHour09: OnHour21: atcommand ("@reloadbattleconf"); atcommand ("@reloadmobdb"); announce("Happy Hour x2 has started!Happygaming everyone!", bc_all,0xFF6060); $@dispbottom = 2; callsub(server_rate,2); end; OnHappyHour3: OnHour03: OnHour15: atcommand ("@reloadbattleconf"); atcommand ("@reloadmobdb"); announce("Happy Hour has ended!", bc_all,0xFF6060); $@dispbottom = 3; callsub(server_rate,3); end; OnEndHappyHour: OnHour11: OnHour12: OnHour13: OnHour14: OnHour18: OnHour19: OnHour20: OnHour00: OnHour01: OnHour02: OnHour05: OnHour06: OnHour07: OnHour08: atcommand ("@reloadbattleconf"); atcommand ("@reloadmobdb"); announce("Happy Hour x2 has started!Happygaming everyone!", bc_all,0xFF6060); $@dispbottom = 1; callsub(server_rate,1); end; /*//Saturdays OnSat0900: OnSat1100: OnSat0900: OnSat1100: //Sundays OnSun0900: OnSun1100: OnSun2100: OnSun2300: callsub(server_rate,3);*/ OnPCLoginEvent: if ($@dispbottom == 1) { dispbottom "Current Rune-Midgard rates are: 15x 15x 5x",0xFF6060; end; } if ($@dispbottom == 2) { dispbottom "Current Rune-Midgard rates are: 30x 30x 10x",0xFF6060; end; } if ($@dispbottom == 3) { dispbottom "Current Rune-Midgard rates are: 45x 45x 15x",0xFF6060; end; } //------------------- server_rate: //set $@brate,2; //set $@jrate,2; //set $@drate,2; $@rate = getarg(0,2); //Base exp setbattleflag("base_exp_rate",$@rate * .base_exp_rate); //Job exp setbattleflag("job_exp_rate",$@rate * .job_exp_rate); //Drops setbattleflag("item_rate_common",$@rate * .item_rate_common); setbattleflag("item_rate_heal",$@rate * .item_rate_heal); setbattleflag("item_rate_use",$@rate * .item_rate_use); setbattleflag("item_rate_equip",$@rate * .item_rate_equip); // Apply new rates to configs set above //we don't change card drops rate, because these values won't change them anyway announce "Current Rune-Midgard rates are: "+($@rate * .base_exp_rate /100)+"x "+($@rate * .job_exp_rate /100)+"x "+($@rate * .item_rate_common /100)+"x",bc_all,0xFF6060; end; }
Link to comment
Share on other sites
0 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.