legion 0 Posted March 13, 2014 Hi, this script is complicated, I tried doing this with what I see in item_bonus.txt but can't get it to work, please help. If base STR is 90+, All State +1, MaxHP,MaxSP +1%, STR + 1 for each refine upgrade. When hunting monsters, EXP and DROP rate increased by 10%. Quote Share this post Link to post Share on other sites
0 evilpuncker 503 Posted March 13, 2014 (edited) if(readparam(bStr)>=90) bonus bAllStats,1;bonus bMaxHPrate,1;bonus bMaxSPrate,1;bonus bStr,getrefine();sc_start SC_CASH_RECEIVEITEM,-1,10;sc_start SC_CASH_PLUSEXP,-1,10; and on unequip add those: sc_end SC_CASH_RECEIVEITEM;sc_end SC_CASH_PLUSEXP; PS: I'm not sure of the green value, you need to test it @edited thanks mumbles Edited March 13, 2014 by evilpuncker Quote Share this post Link to post Share on other sites
0 Mumbles 193 Posted March 13, 2014 Item script: // Item scriptif (readparam(bStr) >= 90) { bonus bAllStats, 1; bonus bMaxHPrate, 1; bonus bMaxSPrate, 1; bonus bStr, getrefine();}ModDrop = 150;ModExp = 150; Unequip script: // Unequip scriptModDrop = 100;ModExp = 100; Login / logout check (separate file): - script check_items -1,{ // Login check OnPCLoginEvent: if (isequipped(Knife)) { ModDrop = 150; ModExp = 150; } end; // Logout reset OnPCLogoutEvent: ModDrop = 100; ModExp = 100; end; } I guess @evilpuncker beat me to this haha, but I suppose either solution would work. @evilpuncker: You can use getrefine() to return the value of the invoking equipment's refine level. 1 evilpuncker reacted to this Quote Share this post Link to post Share on other sites
0 legion 0 Posted March 13, 2014 Item script: // Item scriptif (readparam(bStr) >= 90) { bonus bAllStats, 1; bonus bMaxHPrate, 1; bonus bMaxSPrate, 1; bonus bStr, getrefine();}ModDrop = 150;ModExp = 150; Unequip script: // Unequip scriptModDrop = 100;ModExp = 100; Login / logout check (separate file): - script check_items -1,{ // Login check OnPCLoginEvent: if (isequipped(Knife)) { ModDrop = 150; ModExp = 150; } end; // Logout reset OnPCLogoutEvent: ModDrop = 100; ModExp = 100; end; } I guess @evilpuncker beat me to this haha, but I suppose either solution would work. @evilpuncker: You can use getrefine() to return the value of the invoking equipment's refine level. Either solution works, but as you say it, evilpuncker beat you to this, since his solution doesn't require to add additional script for login/logout, but your solution works as flawless as his, Thanks to both of you! Quote Share this post Link to post Share on other sites
0 Mumbles 193 Posted March 13, 2014 The only benefit I could see in using my version would be its immunity to this sc_end SC_ALL; as it is not a status condition and would not terminate unexpectedly if a player were to encounter such a script command. Disclaimer: I've never actually bothered to use SC_CASH_* bonuses, so I'm not entirely sure if SC_ALL includes these as well; it may or may not be affected by sc_end SC_ALL;. Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted March 13, 2014 why use OnPCLoginEvent / OnPCLogoutEvent ? update item_db_re setscript = 'if ( readparam(bStr) >= 90 ) { bonus bAllStats,1; bonus bMaxHPrate,1; bonus bMaxSPrate,1; bonus bStr, getrefine(); }',equip_script = 'if ( readparam(bStr) >= 90 ) { ModExp = ModDrop = 110; }',unequip_script = 'if ( readparam(bStr) >= 90 ) { ModExp = ModDrop = 100; }'where id = 1201; 1 Mumbles reacted to this Quote Share this post Link to post Share on other sites
0 Mumbles 193 Posted March 13, 2014 why use OnPCLoginEvent / OnPCLogoutEvent ? update item_db_re setscript = 'if ( readparam(bStr) >= 90 ) { bonus bAllStats,1; bonus bMaxHPrate,1; bonus bMaxSPrate,1; bonus bStr, getrefine(); }',equip_script = 'if ( readparam(bStr) >= 90 ) { ModExp = ModDrop = 110; }',unequip_script = 'if ( readparam(bStr) >= 90 ) { ModExp = ModDrop = 100; }'where id = 1201; Interesting shorthand. o.o I added the login/logout events because Ind said it's an account-wide modifications, even though the parameter appears to be character-based; the modification would (in theory) linger for other characters on the account, even if the item is not equipped. [21:01:41] <Luciano> its not a script command its a param like set zeny [21:01:46] <Luciano> set BaseExp,value; [21:02:11] <Luciano> ops [21:02:12] <Luciano> ModExp 125 1 [21:02:13] <Luciano> ModDrop 126 1 [21:02:13] <Luciano> ModDeath 127 1 [21:02:20] <Luciano> ModExp, ModDrop [21:02:24] <Luciano> e.g. [21:02:27] <Luciano> set ModExp,150; [21:02:30] <Mumbles> interesting [21:02:34] <Luciano> account gets +50% erxp [21:02:40] <Mumbles> account or char? [21:03:16] <Luciano> account [21:03:24] <Luciano> there isnt a built in char exp mod Quote Share this post Link to post Share on other sites
0 legion 0 Posted March 13, 2014 The only benefit I could see in using my version would be its immunity to this sc_end SC_ALL; as it is not a status condition and would not terminate unexpectedly if a player were to encounter such a script command. Disclaimer: I've never actually bothered to use SC_CASH_* bonuses, so I'm not entirely sure if SC_ALL includes these as well; it may or may not be affected by sc_end SC_ALL;. Actually what I did is to combine evilpuncker's and your script and ended up like this: Script: <" if(readparam(bStr)>=90) bonus bAllStats,1; if(readparam(bStr)>=90) bonus bMaxHPrate,1; if(readparam(bStr)>=90) bonus bMaxSPrate,1; if(readparam(bStr)>=90) bonus bStr,(getrefine()); ModDrop = 110; ModExp = 110; "> OnUnequipScript: <" ModDrop = 100; ModExp = 100; "> And works totally great! Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted March 13, 2014 no it doesn't Mumbles is right when I read the source I saw SP_MOD_EXP and I thought it is like a *bonus type command but it actually store the data in `account_data` table which this table alter the value for the whole account using my script, or the script in post#8, will have an exploit that equip the item, logout, login another char in the same account then that character will be having increased exp/drop rate without equipping the item (you'll get the brown color announcement upon login ... very easy to spot this bug) no, this ModDrop, ModExp and ModDeath is not meant for item bonuses, its meant for VIP accounts has to do like EvilPunker did Quote Share this post Link to post Share on other sites
0 legion 0 Posted March 14, 2014 no it doesn't Mumbles is right when I read the source I saw SP_MOD_EXP and I thought it is like a *bonus type command but it actually store the data in `account_data` table which this table alter the value for the whole account using my script, or the script in post#8, will have an exploit that equip the item, logout, login another char in the same account then that character will be having increased exp/drop rate without equipping the item (you'll get the brown color announcement upon login ... very easy to spot this bug) no, this ModDrop, ModExp and ModDeath is not meant for item bonuses, its meant for VIP accounts has to do like EvilPunker did Oh yeah, it does give the other characters the exp bonus too when one character is wearing the item. Thanks AnnieRuru, gonna use sc_start SC_CASH_RECEIVEITEM,-1,10; sc_start SC_CASH_PLUSEXP,-1,10; and sc_end SC_CASH_RECEIVEITEM; sc_end SC_CASH_PLUSEXP; then. Quote Share this post Link to post Share on other sites
Share this post
Link to post
Share on other sites