Nagad Posted July 11, 2015 Posted July 11, 2015 Actually I'm using this script: - script FloatingRates -1,{ OnSat0000: OnMon0000: OnInit: if ( gettime(4) == 6 || gettime(4) == 0 ) { setbattleflag "base_exp_rate", 4000; setbattleflag "job_exp_rate", 4000; } else if ( gettime(4) == 1 && gettime(3) == 0 && gettime(2) == 0 ) { setbattleflag "base_exp_rate", 2000; setbattleflag "job_exp_rate", 2000; } end; } I want to modify it in such a way that specific classes (like assassin, ninja, etc..) have: exp (base/job) 8000 instead of 4000 if ( gettime(4) == 6 || gettime(4) == 0 ) exp (base/job) 4000 instead of 2000 if ( gettime(4) == 1 && gettime(3) == 0 && gettime(2) == 0 ) Any suggestion? Quote
Nagad Posted July 12, 2015 Author Posted July 12, 2015 (edited) In this case, if for example an Assassin become high novice without logging out, will still have the bonus? Is this script consuming high resources? EDIT: Definitely solved in this way: - script FloatingClassRates -1,{ OnRefresh: OnPCLoginEvent: addtimer( 10000, strnpcinfo(3) + "::OnRefresh" ); .@boostActive = getstatus( SC_CASH_PLUSEXP, 0 ); .@classBonusApplies = ( Class == 10 || Class == 12 || Class == 16 || Class == 4046 || Class == 4047 || Class == 4048 || Class == 4049 || Class == 23 || Class == 24 || Class == 25 ); if( .@classBonusApplies && .@boostActive ) end; if( .@classBonusApplies ) sc_start( SC_CASH_PLUSEXP, -1, 100 ); else if( .@boostActive ) sc_end( SC_CASH_PLUSEXP ); } Thanks everyone for your help Edited July 12, 2015 by Nagad Quote
Stolao Posted July 12, 2015 Posted July 12, 2015 Try using onpccalcevent combined with a class check and the item bonus for exp (on phone can't write) Quote
Nagad Posted July 12, 2015 Author Posted July 12, 2015 Hi Stolao! What onpccalcevent does? I can not find any documentation about it Quote
Emistry Posted July 12, 2015 Posted July 12, 2015 Hi Stolao! What onpccalcevent does? I can not find any documentation about it doc/script_commands.txt#L971 OnPCStatCalcEvent: This special label triggers when a player's stats are recalculated, such as when changing stats, equipment, or maps, as well as when logging in, leveling up, and mounting a job mount. This can be used to grant additional item bonuses to certain player groups, for instance. 1 Quote
Nagad Posted July 12, 2015 Author Posted July 12, 2015 (edited) I did this: - script FloatingClassRates -1,{ OnRefresh: if( Class != 10 || Class != 12 || Class != 16 || Class != 4046 || Class != 4047 || Class != 4048 || Class != 4049 || Class != 23 || Class != 24 || Class != 25 ) { sc_end( SC_CASH_PLUSEXP); } OnPCLoginEvent: if( Class == 10 || Class == 12 || Class == 16 || Class == 4046 || Class == 4047 || Class == 4048 || Class == 4049 || Class == 23 || Class == 24 || Class == 25 ) { sc_start( SC_CASH_PLUSEXP, -1, 100 ); addtimer( 60000, strnpcinfo(3) + "::OnRefresh" ); } } and seems that it is working perfectly! In this way I do not have the icon in cooldown all the time neither the annoyng message "your exp is increased by" spammed in chat every minute What do you think about it? Any suggestion? Edited July 12, 2015 by Nagad Quote
Emistry Posted July 12, 2015 Posted July 12, 2015 OnPCStatCalcEvent: if( Class == Job_Blacksmith || Class == Job_Assassin || Class == Job_Sage || Class == Job_Taekwon || Class == Job_Star_Gladiator || Class == Job_Star_Gladiator2 || Class == Job_Soul_Linker || Class == Job_SuperNovice || Class == Job_Gunslinger || Class == Job_Ninja ) bonus2 bExpAddRace,RC_All,100; end; Quote
Question
Nagad
Actually I'm using this script:
I want to modify it in such a way that specific classes (like assassin, ninja, etc..) have:
exp (base/job) 8000 instead of 4000 if ( gettime(4) == 6 || gettime(4) == 0 )
exp (base/job) 4000 instead of 2000 if ( gettime(4) == 1 && gettime(3) == 0 && gettime(2) == 0 )
Any suggestion?
6 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.