Jump to content
  • 0

Drop item checking cell_chkpass


badneko

Question


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  37
  • Reputation:   1
  • Joined:  06/09/14
  • Last Seen:  

im done i can make this work.

Someone Die, then drop some item, but first check if the item can be droped.

And im still missing something here.

 

OnPCDieEvent:

getmapxy(@m$,@x,@y,0); 
 
set .@x,@x +rand(-3,3);
set .@y,@y +rand(-3,3);
while (!checkcell(@m$,.@x,.@y,cell_chkpass));
makeitem 7793,1,@m$,.@x,.@y;

end;

 

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

OnPCDieEvent:
	getmapxy(.@m$,.@x,.@y,0); 
	while (!checkcell(.@m$,.@x,.@y,cell_chkpass)){
		set .@x += rand(-3,3);
		set .@y += rand(-3,3);
	}
	makeitem 7793,1,.@m$,.@x,.@y;
end;

thats what your looking for i think,

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  37
  • Reputation:   1
  • Joined:  06/09/14
  • Last Seen:  

This forum in kinda dead ?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   0
  • Joined:  11/01/15
  • Last Seen:  

is there a way to set an area where the items are dropped? like if i want a square area where the items will be found after the npc makes them, is that possible?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  37
  • Reputation:   1
  • Joined:  06/09/14
  • Last Seen:  

is there a way to set an area where the items are dropped? like if i want a square area where the items will be found after the npc makes them, is that possible?

Actually i did that in other script.

first get the map where is your npc.

with getmapxy or setupd yourself.

 

makeitem 547,1,"yourmap",49+rand(-7,7),49+rand(-7,7); 

 

so, the item will be created in a square 14x14 around that point.

  • Upvote 1
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...