Jump to content
  • 0

OnNPCKillEvent drop item on floor


Question

Posted

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?

2 answers to this question

Recommended Posts

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

 

  • 0
Posted
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?

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