Jump to content
  • 0

Mob Drop using OnNPCKillEvent


Question

Posted
OnNPCKillEvent:
		if (killedrid == 1751 && rand(0,1000) > 950) { // Valkyrie Randgris
			getmapxy(.@map$,.@x,.@y,UNITTYPE_PC);
			setarray .@OptID[0],RDMOPT_ATTR_TOLERACE_NOTHING,RDMOPT_RACE_TOLERACE_HUMAN;
			setarray .@OptVal[0],10,5;
			setarray .@OptParam[0],0;
			makeitem3 2115,1,.@map$,.@x,.@y,0,0,0,0,0,0,0,.@OptID,.@OptVal,.@OptParam;
		}
		end;

So ive seen this script on the docs, but i want to make it drop beside the location of the mob. how do i make it like that?

3 answers to this question

Recommended Posts

  • 0
Posted (edited)
1 hour ago, iubantot said:

OnNPCKillEvent:
		if (killedrid == 1751 && rand(0,1000) > 950) { // Valkyrie Randgris
			getmapxy(.@map$,.@x,.@y,UNITTYPE_PC);
			setarray .@OptID[0],RDMOPT_ATTR_TOLERACE_NOTHING,RDMOPT_RACE_TOLERACE_HUMAN;
			setarray .@OptVal[0],10,5;
			setarray .@OptParam[0],0;
			makeitem3 2115,1,.@map$,.@x,.@y,0,0,0,0,0,0,0,.@OptID,.@OptVal,.@OptParam;
		}
		end;

So ive seen this script on the docs, but i want to make it drop beside the location of the mob. how do i make it like that?

if (killedrid == 1751 && rand(0,1000) > 950 && strnpcinfo(4) == "map here") { // Valkyrie Randgris

or this

if (killedrid == 1751 && rand(0,1000) > 950 && strcharinfo(3) == "map here") { // Valkyrie Randgris

 

1st - not tested if working

2nd - check if player who killed the mob is at the map

Edited by pajodex

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