Jump to content
  • 0

script request ( mvp custom drop )


Question

Posted

hey, i would like to request a script... i found a similar script but its buggy.

anyway the script i want to request is mvp custom drop.

 

i want all mvps to drop 1 item at 80% chance. lets say itemID 7771

i found a script somewhere but its buggy because mvp slaves also drop it and mini bosses. i just want the mvp to drop it.

 

anyone? thanks in advance

2 answers to this question

Recommended Posts

Posted (edited)

If not mistaken MVP and mini boss does considered both as MD_BOSS. You can try to use this but you had to add the MVP ID yourself.

-	script	MobExtraDrops	-1,{
OnNPCKillEvent:
	// Configuration
	// How it works? - Incubus (1374) will drop 28307 (Item ID) at a rate of 75 (0.75%)
	setarray .@MobID[0], 1374, 1370, 1754, 1492, 1871, 1150, 1147, 1243, 1039, 1115, 1148, 1167, 1159, 1163, 1276, 1685, 1369, 1110; // Monsters ID
	setarray .@DropID[0], 28307, 28308, 28108, 28304, 28209, 28114, 28102, 28319, 28134, 28135, 28136, 28137, 28142, 28143, 28143, 28221, 28322, 28132; // Items ID
	setarray .@Chance[0], 75, 75, 250, 250, 250, 250, 250, 75, 250, 250, 100, 75, 250, 75, 75, 250, 75, 75; // Drop Rate, as in percentage (100 = 1%)
	// End of Config
	for(set .@c,0; .@c < getarraysize(.@MobID); set .@c, .@c + 1) {
		if (killedrid == .@MobID[.@c]){
			set .@d, rand(0,10000);
			if (.@d <= .@Chance[.@c]) {
				getitem .@DropID[.@c],1;
				announce strcharinfo(0) + " obtained a " + getmonsterinfo(.@MobID[.@c],MOB_NAME) + "!",BC_SELF;
			}
		}
	}
	end;
}

// MVP ID Backup
// setarray @MobID,1038,1039,1046,1150,1511,1647,1785,1630,1874,1272,
// 1719,1389,1112,1115,1418,1871,1252,1768,1086,1990,
// 1649,1651,1832,1492,1734,1779,1251,1688,1646,1373,
// 1147,1059,1150,1087,1190,1157,1159,1623,1650,1708,
// 1583,1991,1312,1751,1685,1658,1648,1917,1885;
Edited by Bin4ry
Posted (edited)

Use Mine, is better, and simplified you dont need to think a lot. add id range or set arrays.

-	script	#mvp_drop	-1,{

OnNPCKillEvent:
if (getmonsterinfo(killedrid,22)) // if grant exp MOB_MVPEXP, is a MVP.
if (rand(100) < 10) // 10% drop chace.
getitem 7929,1; // Item ID and Ammount
end;

}
Edited by iraciz
  • Upvote 1
  • Love 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...