Jump to content
  • 0

Zeny on mobs


DemonChuck

Question


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  61
  • Reputation:   0
  • Joined:  10/14/12
  • Last Seen:  

Monster drop zeny for a low chance and can edit by monster?

poring = 1% chance of dropping zeny
poporing = 2% chance of dropping zeny

Thanks

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

On 8/17/2021 at 8:50 AM, DemonChuck said:

Monster drop zeny for a low chance and can edit by monster?

poring = 1% chance of dropping zeny
poporing = 2% chance of dropping zeny

Thanks

Another way that's a little more involved but probably better for the server. Would be to just add an item that the mob could drop which when consumed increases the players zeny by a specific amount. You could make an item for each amount like 1k 10k 100k etc.

-	script	sampledrop	-1,{
OnInit:
	addmonsterdrop 1002,90000,100; // 1% Poring Zeny Bag
}

Example item_db_usable

  - Id: 90000
    AegisName: Zeny Bag
    Name: Zeny Bag
    Type: Cash
    Buy: 10
    Weight: 10
    EquipLevelMin: 1
    Script: |
      Zeny += 10000;

-----------------------------------------------------------

Again another way that you might accomplish this would be to enable:

// Zeny from mobs
zeny_from_mobs: yes

In monster.conf

And then edit the formula in mob.cpp to follow some kind of curve based on mob level.

			if(battle_config.zeny_from_mobs && md->level) {
				 // zeny calculation moblv + random moblv [Valaris]
				zeny=(int) ((md->level+rnd()%md->level)*per*bonus/100.);
				if(md->db->mexp > 0)
					zeny*=rnd()%250;
			}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

-	script	sampledrop	-1,{


OnNPCKillEvent:
		if (killedrid == 1002) { // changemobid
			if (rand(1,100) < 1){
				Zeny += 10000;
			}
			end;
		}
		end;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  659
  • Reputation:   663
  • Joined:  11/12/12
  • Last Seen:  

if (rand(1,100) < 1){

^ is an impossible condition. Use

if (rand(100) < 1) {

instead.

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

8 hours ago, Tokei said:
if (rand(1,100) < 1){

^ is an impossible condition. Use

if (rand(100) < 1) {

instead.

ah yeah thanks for correct me 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...