Jump to content
  • 0

OnNPCKillEvent drop item on floor


Dragonis1701

Question


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  96
  • Reputation:   7
  • Joined:  05/25/12
  • Last Seen:  

I'm trying to use OnNPCKillEvent to make an item appear on the floor where the monster that was killed died. I don't really know what the command is to do so, though. I saw that I could also just use addmonsterdrop but that would require me to write a line for every single monster. Does anyone know if what I'm asking for already exists?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

-	script	sample	-1,{
	
	OnNPCKillEvent:
		if (rand(100) < 10) { // 10% drop
			getmapxy(.@map$, .@x, .@y);
			makeitem 512, 1, .@map$, .@x, .@y;
		}
		end;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  96
  • Reputation:   7
  • Joined:  05/25/12
  • Last Seen:  

24 minutes ago, Emistry said:

-	script	sample	-1,{
	
	OnNPCKillEvent:
		if (rand(100) < 10) { // 10% drop
			getmapxy(.@map$, .@x, .@y);
			makeitem 512, 1, .@map$, .@x, .@y;
		}
		end;
}

 

Hiya, Emistry. This works to make the item at the player's feet but not where the monster died. Is it possible to make the loot drop around the monster?

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