Jump to content
  • 0

Bottom message if monster drops an item.


HristDead

Question


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.01
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

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;
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   616
  • Joined:  07/05/12
  • Last Seen:  

You can't check if a monster drop an item when killed by script command only, you need a source mod for this

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.01
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

Thanks sir Brian I will try that!

Link to comment
Share on other sites

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.

×
×
  • Create New...