Results 1 to 6 of 6

Thread: Tile Arrays, Checking if character is in certain tile array?

  1. #1
    Join Date
    Mar 2015
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    16 Post(s)

    Default Tile Arrays, Checking if character is in certain tile array?

    I'm trying to write a script in reflection, but there's not too much on it on these forums so I'm kind of lost..

    For my script I need to do the following:

    Check if my character is in a certain tile array
    Check if my player is currently in combat
    If not in combat, attack

    Also, how would you go about finding other player ID's?

  2. #2
    Join Date
    Aug 2014
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  3. #3
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by Vowel View Post
    I'm trying to write a script in reflection, but there's not too much on it on these forums so I'm kind of lost..

    For my script I need to do the following:

    Check if my character is in a certain tile array
    Check if my player is currently in combat
    If not in combat, attack

    Also, how would you go about finding other player ID's?
    Item debugging is coming soon. Just finished writing it

    So you can go:

    Simba Code:
    Reflect.Smart.Graphics.DebugNPCs;
    Reflect.Smart.Graphics.DebugInvItems;
    Reflect.Smart.Graphics.DebugPlayers;
    // objects, ground items, etc




    E: Realised you had other questions. I applied this method to reflection, so you can easily check your player is inside any shape with 100% accuracy:

    Simba Code:
    procedure Example();
    var
      MyPolygon: TPointArray;
    begin
      MyPolygon := [[3203, 3253], [3212, 3254], [3218, 3246], [3217, 3240]];

      if Reflect.Tiles.InPolygon(MyPolygon) then
        WriteLn('We are inside the polygon');

      // You can also draw a polygon with: (you would need to convert to MM points in below pic)
      Reflect.Smart.Graphics.DrawPolygon(MyPolygon);
    end;

    Last edited by The Mayor; 03-27-2015 at 09:07 AM.

  4. #4
    Join Date
    Mar 2013
    Location
    Argentina
    Posts
    758
    Mentioned
    27 Post(s)
    Quoted
    365 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    ...
    Awesome name!
    Formerly known as Undorak7

  5. #5
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

  6. #6
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •