Jump to content
  • 0
mrlongshen

R>Zeny from mobs

Question

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

5 answers to this question

Recommended Posts

  • 0

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 by Via

Share this post


Link to post
Share on other sites
  • 0

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;        }

Share this post


Link to post
Share on other sites
  • 0

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 by Via

Share this post


Link to post
Share on other sites
  • 0

 

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;

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.