Jump to content
  • 0

Mvp announcer when killed with custom item drop=%


Question

Posted (edited)

Request for MVP announcer when killed to all map,getitem # by drop rate chance..Thanks for advance

Edited by harley

11 answers to this question

Recommended Posts

  • 0
Posted (edited)
4 hours ago, harley said:

Request for MVP announcer when killed to all map,getitem # by drop rate chance..Thanks for advance

-	script	#mvp_drop	-1,{
OnNPCKillEvent:
if (getmonsterinfo(killedrid,22)) // If mob has MOB_MVPEXP, it's an MVP.
	if (rand(100) < 50) //chnage % as your needs
		getitem 512,1;  // your item id here
		announce "Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" and Got Apple at "+ strcharinfo(3),0,0x00FF00;	}
end;
}

 

Edited by Cyro
  • Upvote 1
  • 0
Posted
7 hours ago, Cyro said:

-	script	#mvp_drop	-1,{
OnNPCKillEvent:
if (getmonsterinfo(killedrid,22)) // If mob has MOB_MVPEXP, it's an MVP.
	if (rand(100) < 50) //chnage % as your needs
		getitem 512,1;  // your item id here
		announce "Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" and Got Apple at "+ strcharinfo(3),0,0x00FF00;	}
end;
}

 

Thank you so much..  it's working but  can you make a script for Boss monster only and not for mini boss or monster? and Announce only when the player get the item with yellow letters? Thanks :)

  • 0
Posted
13 minutes ago, harley said:

Thank you so much..  it's working but  can you make a script for Boss monster only and not for mini boss or monster? and Announce only when the player get the item with yellow letters? Thanks :)

you tested it with mini boss? i dont think mini boos give MOB_MVPEXP so it must be working for MVP only

announce "Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" and Got Apple at "+ strcharinfo(3),0,0x00FF00;	}

change above line to

announce "Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" and Got Apple at "+ strcharinfo(3),0;	}


 

  • 0
Posted
On 10/31/2017 at 9:32 AM, Corsario said:

how u fixed?, when i use this scrip and kill a kasa o salamander. The scrip dropme a item D;{

 

16 minutes ago, K1NGRAFFY said:

How did you fix this?

try this

-	script	#mvp_drop	-1,{
OnNPCKillEvent:
if (getmonsterinfo( killedrid, MOB_MVPEXP )) // If mob has MOB_MVPEXP, it's an MVP.
	if (rand(100) < 50) //chnage % as your needs
		getitem 512,1;  // your item id here
		announce "Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" and Got Apple at "+ strcharinfo(3),0,0x00FF00;	}
end;
}

 

  • 0
Posted
7 minutes ago, K1NGRAFFY said:

Same script but what I mean is how did he fix the announcer because if I killed poring my name will be announcer I want to put it only in MVP and remove the apple etc.

Ops sory, change this

announce "Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" and Got Apple at "+ strcharinfo(3),0,0x00FF00;	}

into this

announce "Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" and Got Apple at "+ strcharinfo(3),0;	}

 

  • 0
Posted (edited)
-	script	#mvp_drop	-1,{
OnNPCKillEvent:
set .itemrew, 7539;
if (getmonsterinfo( killedrid, MOB_MVPEXP )) {// If mob has MOB_MVPEXP, it's an MVP.
	if (rand(100) < 50) {//chnage % as your needs
		getitem .itemrew,1;  // your item id here
		announce "Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" and Got "+getitemname(.itemrew)+" at "+ strcharinfo(3),0;
	}
	end;
}
end;
}

 

Edited by hendra814

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