Results 1 to 18 of 18

Thread: AreWeMoving: Boolean;

  1. #1
    Join Date
    Feb 2007
    Location
    @ SRL
    Posts
    402
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default AreWeMoving: Boolean;

    Hey guys!

    I've found a way to find out if our runescape charactor is moving around.

    It takes 2 color's from various spots on the mainscreen, then it wait's 200 milliseconds and then check's for that color in a very small 20px by 20px box with 5 tolerance.

    I've tested it for the last 30 minutes and it's worked perfect everytime!!!


    NOTE: The only flaw I can see with this is, if a NPC is in the exact spot at the exact time when colors were taken and then 200 milliseconds later it moves then it would think we are moving..

    I'm going to test it with NO waiting time, so as SOON as it takes the colors it checks for the same color in the box. But then it could/might lag and think we arn't moving, if I can get the waiting time spot on.. Then I think this might just work

    PLEASE HELP ME TEST IT, AND IF YOU HAVE ANY SUGGESTIONS TO MAKE IT BETTER THEN PLEASE POST

    SCAR Code:
    Function WeAreMoving: Boolean;
    Var
      Color1, Color2: Integer;
      rx, ry: Integer;
    Begin
      Color1 := GetColor(500, 320); // Bottom Right Corner
      Color2 := GetColor(500, 20);  // Top Right Corner
      Wait(200);
      If Not FindColorTolerance(rx, ry, Color1, 490, 310, 510, 330, 5) And
      Not FindColorTolerance(rx, ry, Color2, 490, 10, 510, 30, 5) Then
      Begin
        WriteLn('We are moving.');
        Result := True;
        Exit;
      End Else
      Begin
        WriteLn('We are standing still.');
        Result := False;
        Exit;
      End;
    End;

    Thanks,
    TurboBk.
    The game has an unexplainable attraction that convinces the player they are having fun, despite the fact that all they are doing is performing repetitive tasks to increase their statistics. "The game is actually a graphical nightmare and its gameplay is simple at best. Yet something, perhaps by subliminal means, forces the player - against his will - to play the game, and to believe that they are having fun".

  2. #2
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Filter the npc color,
    ~Hermen

  3. #3
    Join Date
    Feb 2007
    Location
    @ SRL
    Posts
    402
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Hermpie View Post
    Filter the npc color,
    Oooh, and how would I do that, could you please explain this to me?
    The game has an unexplainable attraction that convinces the player they are having fun, despite the fact that all they are doing is performing repetitive tasks to increase their statistics. "The game is actually a graphical nightmare and its gameplay is simple at best. Yet something, perhaps by subliminal means, forces the player - against his will - to play the game, and to believe that they are having fun".

  4. #4
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Don't feel trying but, many functions like this made check also reflection stuff
    ~Hermen

  5. #5
    Join Date
    Feb 2007
    Location
    @ SRL
    Posts
    402
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Hermpie View Post
    Don't feel trying but, many functions like this made check also reflection stuff
    Ahh ok lol.. fair enough, but Reflection is only for SMART and some people dont use SMART, so it could be useful for Non-SMART scripts.. Somehow lol
    The game has an unexplainable attraction that convinces the player they are having fun, despite the fact that all they are doing is performing repetitive tasks to increase their statistics. "The game is actually a graphical nightmare and its gameplay is simple at best. Yet something, perhaps by subliminal means, forces the player - against his will - to play the game, and to believe that they are having fun".

  6. #6
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    reflection is awesome, but i feel like sticking to SRL normal stuff. Reflection jkust makes thuings way too easy. Come on! Make yourself a nice flawless walk...

    WalkTile(1230, 1532);

    Done! But what about the old way?

    RoadColor := FindVarrockRoadColor;
    if RoadColor <= 0 then
    RoadColor := FindRoadColor
    if (RadialRoadWalk(etc...)) then
    begin
    end else
    begin
    FailSafe

  7. #7
    Join Date
    Feb 2007
    Location
    @ SRL
    Posts
    402
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Deathscytex View Post
    reflection is awesome, but i feel like sticking to SRL normal stuff. Reflection jkust makes thuings way too easy. Come on! Make yourself a nice flawless walk...

    WalkTile(1230, 1532);

    Done! But what about the old way?

    RoadColor := FindVarrockRoadColor;
    if RoadColor <= 0 then
    RoadColor := FindRoadColor
    if (RadialRoadWalk(etc...)) then
    begin
    end else
    begin
    FailSafe
    Thanks for the Information.. But please don't go off topic
    The game has an unexplainable attraction that convinces the player they are having fun, despite the fact that all they are doing is performing repetitive tasks to increase their statistics. "The game is actually a graphical nightmare and its gameplay is simple at best. Yet something, perhaps by subliminal means, forces the player - against his will - to play the game, and to believe that they are having fun".

  8. #8
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Your way works, but it's a bit unreliable if you either 1. are in a place with a lot of NPCs, or 2. are in a place with a lot of the same color in it (such as Ardougne [I think it has a lot of road color in one place?]).

    I don't want to hijack this thread with mine, so if you want to see my way of doing it, just go here. Mine is about halfway down. I explained how it works on the bottom of the first page if you are interested.

  9. #9
    Join Date
    May 2008
    Posts
    203
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Wouldn't it be safer to check for the flag color on the minimap? I mean, if the flag color is there, you should be moving

  10. #10
    Join Date
    Nov 2007
    Location
    The Netherlands
    Posts
    1,490
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Queso View Post
    Wouldn't it be safer to check for the flag color on the minimap? I mean, if the flag color is there, you should be moving
    Nope
    Sometimes you get stuck, and the flagg is there, but you arn't moving

    PvH

  11. #11
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    And sometimes you can't rely on the flag if you're walking around something and it goes off the MM.

  12. #12
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by bullzeye95 View Post
    ..if you're walking around something and it goes off the MM.
    SCAR Code:
    Procedure MyFlag;
    begin
      While FlagPresent do wait(100);
      While Not FlagPresent do Wait(100);
      FFlag(0)
    end;

  13. #13
    Join Date
    Feb 2007
    Location
    @ SRL
    Posts
    402
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Mylesmadness View Post
    SCAR Code:
    Procedure MyFlag;
    begin
      While FlagPresent do wait(100);
      While Not FlagPresent do Wait(100);
      FFlag(0)
    end;
    But that could be a never ending loop couldn't it?

    I've been in a few occasions where the Flag is still visible on the MM, but the charactor is stuck and therefore it would Wait(100); forever?

    And thanks bullzeye95.. I'll take a look
    The game has an unexplainable attraction that convinces the player they are having fun, despite the fact that all they are doing is performing repetitive tasks to increase their statistics. "The game is actually a graphical nightmare and its gameplay is simple at best. Yet something, perhaps by subliminal means, forces the player - against his will - to play the game, and to believe that they are having fun".

  14. #14
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    So it would

  15. #15
    Join Date
    Mar 2007
    Posts
    3,681
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Deathscytex View Post
    reflection is awesome, but i feel like sticking to SRL normal stuff. Reflection jkust makes thuings way too easy. Come on! Make yourself a nice flawless walk...

    WalkTile(1230, 1532);

    Done! But what about the old way?

    RoadColor := FindVarrockRoadColor;
    if RoadColor <= 0 then
    RoadColor := FindRoadColor
    if (RadialRoadWalk(etc...)) then
    begin
    end else
    begin
    FailSafe
    Old way Fails, when the hooks are working reflection is much more reliable.

  16. #16
    Join Date
    Feb 2007
    Location
    @ SRL
    Posts
    402
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Hugolord View Post
    Old way Fails, when the hooks are working reflection is much more reliable.
    The old way doesn't fail..
    It's just as you said, reflection is more reliable..
    The game has an unexplainable attraction that convinces the player they are having fun, despite the fact that all they are doing is performing repetitive tasks to increase their statistics. "The game is actually a graphical nightmare and its gameplay is simple at best. Yet something, perhaps by subliminal means, forces the player - against his will - to play the game, and to believe that they are having fun".

  17. #17
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Hugolord View Post
    Old way Fails, when the hooks are working reflection is much more reliable.
    More reliable. More easy. Less SCAR.

  18. #18
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I made one of these too, mine was more reliable but stopped working after a update. I never bothered to fix it because heck, reflection does the same thing!

    Good job for trying though, its good practice!

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
  •