Jump to content
  • 0

Mob Drop using OnNPCKillEvent


iubantot

Question


  • Group:  Members
  • Topic Count:  117
  • Topics Per Day:  0.03
  • Content Count:  312
  • Reputation:   34
  • Joined:  10/15/12
  • Last Seen:  

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?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  117
  • Topics Per Day:  0.03
  • Content Count:  312
  • Reputation:   34
  • Joined:  10/15/12
  • Last Seen:  

1 minute ago, pajodex said:

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

not tested

you did not get the question 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

1 minute ago, iubantot said:

you did not get the question 

sorry if I didn't anyways, you can ignore it if it is not useful

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