Jump to content
  • 0

How to set don't use item in cell ?


Question

2 answers to this question

Recommended Posts

Posted

function script XY_Check {
getmapxy(.@m$,.@x,.@y,0);
if( .@m$ == getarg(0) &&
( .@x >= ((getarg(1)>getarg(3))?getarg(3):getarg(1)) && .@x <= ((getarg(1)<getarg(3))?getarg(3):getarg(1)) ) &&
( .@y >= ((getarg(2)>getarg(4))?getarg(4):getarg(2)) && .@y <= ((getarg(2)<getarg(4))?getarg(4):getarg(2)) )
) return 1;
return 0;
}

if(callfunc("XY_Check", "map", x1, y1, x2, y2)) end;

Add this to the beggining of your script, xy1 and 2 work kind of like setcell.

  • Upvote 2

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