Results 1 to 6 of 6

Thread: Fixed WalkToTileEx(reflection)

  1. #1
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default Fixed WalkToTileEx(reflection)

    It didn't work becouse WalkToTile now uses TPoints so i decided to fix it

    SCAR Code:
    Function WalkToTileEx(TileX, TileY, XTRandom, YTRandom, FFlag : Integer): Boolean;
    Var
    T1l : Tpoint;
    Begin
    T1l.X := TileX+random(XTRandom)
    T1l.Y := TileY+random(YTRandom)
      Walktotile(T1l,0,0);
      R_FFlag(FFlag);
    end;

  2. #2
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    umm ok .. May want other people to check but I dont think that an 'Ex' uses the other version I think it may be some compatibility issues

  3. #3
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Quote Originally Posted by NaumanAkhlaQ View Post
    umm ok .. May want other people to check but I dont think that an 'Ex' uses the other version I think it may be some compatibility issues
    It does and it works with me.

  4. #4
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    here you go fixed it up a bit
    SCAR Code:
    Function WalkToTileEx(Tiles : Tpoint; XTRandom, YTRandom, FlagDis : Integer): Boolean;
    Begin
      Tiles.X := Tiles.X+random(XTRandom)
      Tiles.Y := Tiles.Y+random(YTRandom)
      if TileOnMM(Tiles) then
        if Walktotile(Tiles,0,0) then
        begin
          FFlag(FlagDis);
          Result:= True;
        end;
    end;


    ~shut

    EDIT: oh wait you wanted it to NOT use TPA's
    here you go
    SCAR Code:
    Function WalkToTileEx(TileX, TileY, XTRandom, YTRandom, FlagDis : Integer): Boolean;
    var
    Tiles: Tpoint;
    Begin
      Tiles.X := TileX+random(XTRandom)
      Tiles.Y := TileY+random(YTRandom)
      if TileOnMM(Tiles) then
        if Walktotile(Tiles,0,0) then
        begin
          FFlag(FlagDis);
          Result:= True;
        end;
    end;

  5. #5
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    SCAR Code:
    Function WalkToTileEx(TileX, TileY, XTRandom, YTRandom, FlagDis : Integer): Boolean;
    var
    Tiles: Tpoint;
    Begin
      Tiles.X := TileX+random(XTRandom)
      Tiles.Y := TileY+random(YTRandom)
      if TileOnMM(Tiles) then
        if Walktotile(Tiles,0,0) then
        begin
          FFlag(FlagDis);
          Result:= True;
        end;
    end;
    Now it looks quite much same as mine

  6. #6
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    whoops forgot something
    SCAR Code:
    Function WalkToTileEx(TileX, TileY, XTRandom, YTRandom, FlagDis : Integer): Boolean;
    var
    Tiles: Tpoint;
    Begin
      Tiles.X := TileX+random(XTRandom)
      Tiles.Y := TileY+random(YTRandom)
      if TileOnMM(Tiles) then
        if Walktotile(Tiles,0,FlagDis) then
          Result:= True;
    end;
    there you go fixed

    ~shut

    EDIT:
    Quote Originally Posted by antti mies View Post
    Now it looks quite much same as mine
    mines more reliable though

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. reflection and non reflection scripts?
    By randy marsh in forum SRL Site Discussion
    Replies: 8
    Last Post: 01-08-2009, 04:05 PM

Posting Permissions

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