REKT 10 Posted May 18, 2013 (edited) Hello, i just wanna asked if the one i made is correct or wrong? please correct if it is wrong. Or if you have a better way or optimized this script to make it better. please feel free to post http://pastebin.com/3Fkf7K9B Thank you! Edited May 18, 2013 by Emistry Quote Share this post Link to post Share on other sites
0 mleo1 36 Posted May 18, 2013 (edited) function script checkclass { if( Class==Job_Assassin || Class==Job_Assassin_Cross ) goto Lskillssin; if( Class==Job_Bard || Class==Job_Clown ) goto Lskillsbard; if( Class==Job_Knight || Class==Job_Lord_Knight ) goto Lskillsknight; return; Lskillssin: bonus2 bAddRace,7,20; bonus bIntravision,0; if(getrefine()>=10) { bonus bAllStats,5; } return;Lskillsknight: bonus2 bAddRace,7,20; bonus bIntravision,0; if(getrefine()>=10) { bonus bAllStats,5; } return;Lskillsbard: bonus2 bAddRace,7,20; bonus bIntravision,0; if(getrefine()>=10) { bonus bAllStats,5; } return;}function script checkclass { if( Class==Job_Assassin || Class==Job_Assassin_Cross ) goto Lskillssin; if( Class==Job_Bard || Class==Job_Clown ) goto Lskillsbard; if( Class==Job_Knight || Class==Job_Lord_Knight ) goto Lskillsknight; return; Lskillssin: bonus2 bAddRace,7,20; bonus bIntravision,0; if(getrefine()>=10) { bonus bAllStats,5; } return;Lskillsknight: bonus2 bAddRace,7,20; bonus bIntravision,0; if(getrefine()>=10) { bonus bAllStats,5; } return;Lskillsbard: bonus2 bAddRace,7,20; bonus bIntravision,0; if(getrefine()>=10) { bonus bAllStats,5; } return;} 1599,Angra_Manyu,Angra Manyu,4,1,,10,200,,2,0,0xFFFFFFFF,7,2,2,1,1,1,8,{ callfunc "checkclass"; },{},{}1599,Angra_Manyu,Angra Manyu,4,1,,10,200,,2,0,0xFFFFFFFF,7,2,2,1,1,1,8,{ callfunc "checkclass"; },{},{} Edited June 3, 2013 by mleo1 Quote Share this post Link to post Share on other sites
0 REKT 10 Posted May 18, 2013 (edited) Hi, thanks for the respond, much appreciated! i will try to test this out. Thank you Again.! Opps, after i wear the item. [Error]: script:getarg: index <idx=0> out of range <nargs=0> and no default value found script: function script Classes_Check { if( getarg(0)==Job_Assassin || getarg(0)==Job_Assassin_Cross ) goto Lskillssin; if( getarg(0)==Job_Bard || getarg(0)==Job_Clown ) goto Lskillsbard; if( getarg(0)==Job_Knight || getarg(0)==Job_Lord_Knight ) goto Lskillsknight; end; Lskillssin: bonus2 bAddRace,7,20; bonus bIntravision,0; if(getrefine()>=10) { bonus bAllStats,5; } end;Lskillsknight: bonus2 bAddRace,7,20; bonus bIntravision,0; if(getrefine()>=10) { bonus bAllStats,5; } end; Lskillsbard: bonus2 bAddRace,7,20; bonus bIntravision,0; if(getrefine()>=10) { bonus bAllStats,5; } end; } function script Classes_Check { if( getarg(0)==Job_Assassin || getarg(0)==Job_Assassin_Cross ) goto Lskillssin; if( getarg(0)==Job_Bard || getarg(0)==Job_Clown ) goto Lskillsbard; if( getarg(0)==Job_Knight || getarg(0)==Job_Lord_Knight ) goto Lskillsknight; end; Lskillssin: bonus2 bAddRace,7,20; bonus bIntravision,0; if(getrefine()>=10) { bonus bAllStats,5; } end;Lskillsknight: bonus2 bAddRace,7,20; bonus bIntravision,0; if(getrefine()>=10) { bonus bAllStats,5; } end; Lskillsbard: bonus2 bAddRace,7,20; bonus bIntravision,0; if(getrefine()>=10) { bonus bAllStats,5; } end; } Edited May 18, 2013 by Vlync Quote Share this post Link to post Share on other sites
0 Joseph 6 Posted May 18, 2013 (edited) You can use BaseJob instead, but this will also include baby classes and 3rd job classes for Assassin, Bard and Knight. Not necessary to create a function, if you're using this for like 1 or 2 equipment(s). {callfunc("Classes_Check");},{},{}{callfunc("Classes_Check");},{},{} function script Classes_Check { .@baseJob = BaseJob; if (.@baseJob == Job_Assassin || .@baseJob == Job_Bard || .@baseJob == Job_Knight) { bonus2 bAddRace,7,20; bonus bIntravision,0; if(getrefine()>=10) bonus bAllStats,5; } return;}function script Classes_Check { .@baseJob = BaseJob; if (.@baseJob == Job_Assassin || .@baseJob == Job_Bard || .@baseJob == Job_Knight) { bonus2 bAddRace,7,20; bonus bIntravision,0; if(getrefine()>=10) bonus bAllStats,5; } return;} Edited May 18, 2013 by Joseph Quote Share this post Link to post Share on other sites
0 REKT 10 Posted May 18, 2013 On 5/18/2013 at 4:17 PM, Joseph said: You can use BaseJob instead, but this will also include baby classes and 3rd job classes for Assassin, Bard and Knight. Not necessary to create a function, if you're using this for like 1 or 2 equipment(s). {callfunc("Classes_Check");},{},{}{callfunc("Classes_Check");},{},{} function script Classes_Check { .@baseJob = BaseJob; if (.@baseJob == Job_Assassin || .@baseJob == Job_Bard || .@baseJob == Job_Knight) { bonus2 bAddRace,7,20; bonus bIntravision,0; if(getrefine()>=10) bonus bAllStats,5; } return;}function script Classes_Check { .@baseJob = BaseJob; if (.@baseJob == Job_Assassin || .@baseJob == Job_Bard || .@baseJob == Job_Knight) { bonus2 bAddRace,7,20; bonus bIntravision,0; if(getrefine()>=10) bonus bAllStats,5; } return;} This script looks nice, BTW, i'm making this kind of bonuses because i wanted to make each classes has different bonuses. e.g Mage or High Wizard +1 INT so on and so forth, how can i add another class? with different bonuses? Thank you.! Quote Share this post Link to post Share on other sites
0 Joseph 6 Posted May 18, 2013 How you want to categorize those classes? I'll give you an example. Add this in the function: // Baby Wizard, Wizard, High Wizard, Warlock, Baby Warlockif (.@baseJob == Job_Wizard) { // Your effects here... // ...}// Baby Wizard, Wizard, High Wizard, Warlock, Baby Warlockif (.@baseJob == Job_Wizard) { // Your effects here... // ...} Quote Share this post Link to post Share on other sites
0 REKT 10 Posted May 18, 2013 I will try it, i'll feedback ASAP. Thank you for support! much appreciated!! Quote Share this post Link to post Share on other sites
Hello, i just wanna asked if the one i made is correct or wrong?
please correct if it is wrong.
Or if you have a better way or optimized this script to make it better.
please feel free to post
http://pastebin.com/3Fkf7K9B
Thank you!
Share this post
Link to post
Share on other sites