mrlongshen 22 Posted August 6, 2013 can someone make a zeny from mobs, we can set the ratio or maybe some conf how much from a list mobs. because the official one, i see some player spam it ! please help~ Quote Share this post Link to post Share on other sites
0 Mumbles 193 Posted August 6, 2013 Fill the array .monster with monster IDs that you would like to be affected by the zeny bonus; you can set the zeny range with .min and .max. If you load this script on a live server, whisper anything to npc:mobzeny to initialize the settings; you will have to do this every time you manually load the script into your server. - script mobzeny -1,{ OnNPCKillEvent: // Get zeny if monster killed is listed for (.@i = 0; .@i < getarraysize(.monster); .@i++) { if(killedrid == .monster[.@i]) { .@mobzeny = rand(.min, .max); Zeny += .@mobzeny; message strcharinfo(0), "You received "+ .@mobzeny +" for killing "+ getmonsterinfo(.monster[.@i], 0) +"!"; } } end; OnWhisperGlobal: // Whisper anything to initialize settings message strcharinfo(0), strnpcinfo(1) +" : 'OnInit' label has been intialized."; OnInit: // List of monster IDs setarray .monster[0], 1001, 1002 , 1004, 1005; // Set zeny range .min = 1; // Minimum .max = 100; // Maximum end; } Quote Share this post Link to post Share on other sites
0 mrlongshen 22 Posted August 6, 2013 is this .min = 1; // Minimum .max = 100; // Maximum?? is that a percent or 1 to 100 z free ? Quote Share this post Link to post Share on other sites
0 Mumbles 193 Posted August 6, 2013 (edited) is this .min = 1; // Minimum .max = 100; // Maximum?? is that a percent or 1 to 100 z free ? That sets the range of a random number from 1 to 100 to be rewarded in zeny. Edited August 6, 2013 by Via Quote Share this post Link to post Share on other sites
0 mrlongshen 22 Posted August 6, 2013 is this .min = 1; // Minimum .max = 100; // Maximum?? is that a percent or 1 to 100 z free ? That sets the range of a random number from 1 to 100 to be rewarded in zeny. oic, sir how about the set all mobs in mob_db ? but i would like to have this function too to specific another zeny prize. can ? setarray .monster[0], 1001, 1002 , 1004, 1005; Quote Share this post Link to post Share on other sites
0 Mumbles 193 Posted August 6, 2013 (edited) If you want a second list, just make a new array for your list and name it .monster2 or something more clever. You'll probably want to make a .min2 and .max2, then copy the for loop with the new variables. If you wanted a zeny reward for all monsters in your database, just add this code without the for loop or if statement under the OnNPCKillEvent label: .@mobzeny = rand(.min, .max); Zeny += .@mobzeny; message strcharinfo(0), "You received "+ .@mobzeny +" for killing "+ getmonsterinfo(.monster[.@i], 0) +"!"; Edited August 6, 2013 by Via Quote Share this post Link to post Share on other sites
can someone make a zeny from mobs, we can set the ratio or maybe some conf how much from a list mobs.
because the official one, i see some player spam it ! please help~
Share this post
Link to post
Share on other sites