Results 1 to 6 of 6

Thread: walkToTileMS/walkToTileMM

  1. #1
    Join Date
    Aug 2007
    Location
    Hawaii
    Posts
    3,880
    Mentioned
    7 Post(s)
    Quoted
    152 Post(s)

    Default walkToTileMS/walkToTileMM

    Is there any particular reason on to why there's no randomization when Reflect.Mouse.Move is initiated within the two functions? The randomness is at 0,0 for both functions. So with the way things currently stand, if you use walkToTileMS/walkToTileMM, your mouse coordinates will always be static when the mouse clicks on the specified tile. Meaning, it'll click on the tile but with the same mouse coordinates each time. So you'll be a big ban risk if your script has a short walking path or simply deals with specific tiles.

    The fix for this is just to increase the randomness from the current values of 0,0.

    Simba Code:
    function TReflectLocalPlayer.WalkToTileMM(Tile: TTile): Boolean;
    var
      Point: TPoint;
    begin
      Result := False;
      if not Reflect.Map.TileOnMM(Tile) then
        Exit;
      Point := Reflect.Tiles.TileToMM(Tile);
      Reflect.Mouse.Move(Point, 0, 0);
      Wait(RandomRange(150, 220));
      Reflect.Mouse.Click(Mouse_Left);
      Result := True;
    end;

    function TReflectLocalPlayer.WalkToTileMS(Tile: TTile): Boolean;
    var
      Point: TPoint;
      Timer: TReflectTimer;
    begin
      if not IsLoggedIn then
        Exit;
      Point := Reflect.Tiles.TileToMS(Tile);
      if (Point.X = -1) or (Point.Y = -1) then
        Exit;
      Reflect.Mouse.Move(Point, 0, 0);
      Wait(RandomRange(50, 100));
      if Reflect.Text.IsUpText('Walk here', 50) then
        Reflect.Mouse.Click(Mouse_Left)
      else
      begin
        Reflect.Mouse.Click(Mouse_Right);
        Wait(RandomRange(400, 500));
        if not Reflect.Text.ChooseOption('Walk here') then
          Reflect.Text.ChooseOption('Cancel')
      end;
      Timer.Start;
      while not Self.IsMoving do
      begin
        if Timer.ElapsedTime > 2500 then
          Break;
        Wait(150);
      end;
      Timer.Restart;
      while Self.IsMoving do
        Wait(250);
      Result := Timer.ElapsedTime < 30000;
    end;
    Faith is an oasis in the heart which will never be reached by the caravan of thinking.

  2. #2
    Join Date
    Jun 2013
    Location
    Scranton
    Posts
    496
    Mentioned
    5 Post(s)
    Quoted
    220 Post(s)

    Default

    Why not just pm a reflection dev and ask them? For WalkToTileMM it makes more sense to have it accurately click a tile on the minimap. Just look at how it is used in the include... Blindwalk functions paired with WindPath (adds randomness). And WalkStraightPathMM (emphasis on StraightPath). Now for WalkToTileMS I do agree with you, it could use some randomness. But imo you are better off adding randomness via the TileToMS parameter offsets, instead of reflect.mouse.move. Nothing is stopping anyone from editing the include to their liking/preferences though...

  3. #3
    Join Date
    Aug 2007
    Location
    Hawaii
    Posts
    3,880
    Mentioned
    7 Post(s)
    Quoted
    152 Post(s)

    Default

    Quote Originally Posted by jstemper View Post
    Why not just pm a reflection dev and ask them? For WalkToTileMM it makes more sense to have it accurately click a tile on the minimap. Just look at how it is used in the include... Blindwalk functions paired with WindPath (adds randomness). And WalkStraightPathMM (emphasis on StraightPath). Now for WalkToTileMS I do agree with you, it could use some randomness. But imo you are better off adding randomness via the TileToMS parameter offsets, instead of reflect.mouse.move. Nothing is stopping anyone from editing the include to their liking/preferences though...
    I have no idea what you just said.

    The point here is that walkToTileMS/walkToTileMM do not have a problem with clicking tiles. They have a problem in that the Tile is being clicked on at the same MOUSE COORDS.

    Example of clicking a tile without randomization within the walkToTileMS function:

    Code:
    ClickTileMousePointsArray[
    {X = 288, Y = 174}, 
    {X = 288, Y = 174}, 
    {X = 288, Y = 174}, 
    {X = 288, Y = 174},
    {X = 288, Y = 174},
    {X = 288, Y = 174}, 
    {X = 288, Y = 174},
    {X = 288, Y = 174},
    {X = 288, Y = 174},
    {X = 288, Y = 174}]
    Example of clicking a tile with randomization within the walkToTileMS function:

    Code:
    ClickTileMousePointsArray[
    {X = 263, Y = 168}, 
    {X = 295, Y = 175}, 
    {X = 292, Y = 175}, 
    {X = 287, Y = 175}, 
    {X = 288, Y = 178}, 
    {X = 289, Y = 169}, 
    {X = 286, Y = 177}, 
    {X = 283, Y = 172}, 
    {X = 289, Y = 176}, 
    {X = 287, Y = 171}, 
    {X = 284, Y = 171},
    Both instances, the tile is 100% accurately clicked. However, one instance (the first one) is clicking the tile with the same mouse coordinates each time. That's a big flag if you're simply using walkToTileMS/walkToTileMM
    Faith is an oasis in the heart which will never be reached by the caravan of thinking.

  4. #4
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    I'll tell you why! It's because we want reflection include users/scripters to be banned!
    [PS: That's not the only place last I checked - All Reflection scripters must be banished, long live color, reflection sucks, learn to script, /slacky out]

    - Happy scripting
    Last edited by slacky; 07-27-2017 at 07:07 AM.
    !No priv. messages please

  5. #5
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by slacky View Post
    I'll tell you why! It's because we want reflection include users/scripters to be banned!
    [PS: That's not the only place last I checked - All Reflection scripters must be banished, long live color, reflection sucks, learn to script, /slacky out]

    - Happy scripting
    Hahaha that caught me off guard...

    My assumption is because the Reflection include is official so pretty much custom or random anything is out of the question because otherwise it might cause arguments from users whose game play doesn't mimic the way it functions. For example, you might have something like "walkToTile()" that, by default, adds a 5 pixel randomness to that exact point on the minimap in which it clicks. Some users might say "That's great, +/-5 is a perfect amount of randomness considering inaccurate (actual) player clicking" while others would argue "Far too random, I never get to the exact tile I need to walk to". Having none, even though it's unwise and may not be favored by some, puts the include in a neutral zone, hopefully avoiding criticism. At least this is my theory, I've nothing to do with the Reflection include so it's just my $0.02.

    It's related to one of the biggest reasons AeroLib exists rather than my personal work going into an official include: I can make it as custom, as random, and as human-like as I want without forcing anyone to utilize my code for their scripts. AeroLib is simply an alternative to script with.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  6. #6
    Join Date
    Aug 2007
    Location
    Hawaii
    Posts
    3,880
    Mentioned
    7 Post(s)
    Quoted
    152 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Hahaha that caught me off guard...

    My assumption is because the Reflection include is official so pretty much custom or random anything is out of the question because otherwise it might cause arguments from users whose game play doesn't mimic the way it functions. For example, you might have something like "walkToTile()" that, by default, adds a 5 pixel randomness to that exact point on the minimap in which it clicks. Some users might say "That's great, +/-5 is a perfect amount of randomness considering inaccurate (actual) player clicking" while others would argue "Far too random, I never get to the exact tile I need to walk to". Having none, even though it's unwise and may not be favored by some, puts the include in a neutral zone, hopefully avoiding criticism. At least this is my theory, I've nothing to do with the Reflection include so it's just my $0.02.

    It's related to one of the biggest reasons AeroLib exists rather than my personal work going into an official include: I can make it as custom, as random, and as human-like as I want without forcing anyone to utilize my code for their scripts. AeroLib is simply an alternative to script with.
    I understand the neutral stance. But there should at least be an argument within the function to adjust the randomness so users will know that there is none. Just as we do with the old school SRL functions (MMouse(x,y) etc).
    Faith is an oasis in the heart which will never be reached by the caravan of thinking.

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
  •