Jump to content
  • 0

Custom Mob Drops


Limestone

Question


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

can i request a custom mob drop via script that all of normal monsters (excepts Low level monster lvl 50 below) has a 2.5% chance of dropping a (red potion) and 5% chance on all mvp bosses and mini bosses. thanks!

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  410
  • Reputation:   29
  • Joined:  04/04/12
  • Last Seen:  

I don't think there's a script command that reads the level of a monster.  You'd have to do this via the source, or have a huge list of all mobs above level 50.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

my goodness. -_- can someone help me!!!

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

-	script	fsdddg	-1,{
OnNPCKillEvent:
	if ( getmonsterinfo( killedrid,1 ) > 50 ) {	// if the lvl > 50
		.@boss = getmonsterinfo( killedrid,21 )& 0x0020;	// check if b is boss
		.@percent_gift = .@boss ? 50 : 25;	// 5% for boss, 2.5% for other
		.@random_number = rand(1000);
		if ( .@random_number < .@percent_gift ) {
			getmapxy .@map$, .@x, .@y, 0;
			makeitem 501, 1, .@map$, .@x, .@y;
		}
	}
	end;
}

 

I don't think there's a script command that reads the level of a monster.

There is getmonsterinfo(<mob ID>,<type>)

Valid types are listed in const.txt:

    MOB_NAME    0

    MOB_LV    1

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

Thanks capuche, Woriking great!

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...