Jump to content
  • 0

Drop item checking cell_chkpass


Question

Posted

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;

 

 

4 answers to this question

Recommended Posts

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

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?

  • 0
Posted

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

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