Jump to content
  • 0

Bottom message if monster drops an item.


Question

Posted

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;

3 answers to this question

Recommended Posts

Posted

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;
  • Upvote 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...