HristDead Posted June 11, 2013 Posted June 11, 2013 I want a message appearing when a monster drops a item, in this case, a sticky mucus. Sticky mucus is however not a 100% drop rate... right now the problem is that the message appears every time that i kill a monster and i have sticky mucus below 16. I know why too, because it doesnt have a check for getting the item id... but i dont know the script for that... :/ Can anyone help me get what i want? This is what I have so far.. help is truly appreciated. onNPCKillEvent: if(Q88003 == 1 && countitem(938) < 16){ dispbottom "You have [ "+ ( countitem(938) ) +" / 15 ] Sticky Mucus"; end; Quote
Capuche Posted June 11, 2013 Posted June 11, 2013 You can't check if a monster drop an item when killed by script command only, you need a source mod for this Quote
Brian Posted June 11, 2013 Posted June 11, 2013 You could use a temporary (or permanent) char variable to keep track of how many Sticky Mucus they currently have. The script could check when that number changes, meaning the monster they just killed dropped one. OnNPCKillEvent: if (Q88003 == 1) { if (countitem(938)<=15 && countitem(938)!=@count_938) { set @count_938, countitem(938); dispbottom "You have [ "+ ( @count_938 ) +" / 15 ] Sticky Mucus"; } } end; OnPCLoginEvent: set @count_938, countitem(938); end; 1 Quote
Question
HristDead
I want a message appearing when a monster drops a item, in this case, a sticky mucus.
Sticky mucus is however not a 100% drop rate...
right now the problem is that the message appears every time that i kill a monster and i have sticky mucus below 16.
I know why too, because it doesnt have a check for getting the item id... but i dont know the script for that... :/
Can anyone help me get what i want? This is what I have so far.. help is truly appreciated.
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.