Jump to content

Question

Posted

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!

4 answers to this question

Recommended Posts

Posted

-	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

 

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...