HristDead Posted June 11, 2013 Group: Members Topic Count: 66 Topics Per Day: 0.01 Content Count: 167 Reputation: 2 Joined: 08/01/12 Last Seen: October 9, 2019 Share 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 Link to comment Share on other sites More sharing options...
Capuche Posted June 11, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share 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 Link to comment Share on other sites More sharing options...
Brian Posted June 11, 2013 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 593 Joined: 10/26/11 Last Seen: June 2, 2018 Share 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 Link to comment Share on other sites More sharing options...
HristDead Posted June 12, 2013 Group: Members Topic Count: 66 Topics Per Day: 0.01 Content Count: 167 Reputation: 2 Joined: 08/01/12 Last Seen: October 9, 2019 Author Share Posted June 12, 2013 Thanks sir Brian I will try that! Quote Link to comment Share on other sites More sharing options...
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.
Link to comment
Share on other sites
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.