Results 1 to 9 of 9

Thread: How to detect...

  1. #1
    Join Date
    Apr 2012
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default How to detect...

    Hey, i thought with the easily exploitable nature of runespan, it would be a nice time to learn some more scripting

    Right now i have this (I'm a noob! i admit this wholeheartedly :P) It's a really simple script that just clicks on a law essling every 10 or so seconds (this is just the main procedure, i do have antiban and stuff)


    Procedure Findlawessling;
    var
    x, y: Integer;
    begin
    repeat
    if FindObj(x, y, 'Law', 14394158, 5)then
    mouse(x, y, 5, 5, true);
    Antiban;
    wait(5000+random(5000));
    Until(false);
    end;

    I don't really know what i'm doing and i'm sure both those "untils" are not gonna work xD


    Obviously, this is totally shit and will probably get you banned in about 5 minutes, regardless, it /works/ as even with my rubbish attempt i still have 124k xp upwards after a few hours My question is:

    Is there a simple way to detect when they spawn and click on them right away, rather then just automatically clicking it's color every set amount of seconds regardless of if you're already using it, or it hasn't even spawned yet and having to wait another 10-odd seconds to click again


    Should i be aiming for:

    Procedure Findlaw;
    var
    x, y: Integer;
    begin
    repeat
    if FindObj(x, y, 'Law', 14394158, 5)then
    mouse(x, y, 5, 5, true);
    Antiban;
    Until not isuptext('law');
    end;






    begin
    SetupSRL;
    ActivateClient;
    declareplayers;
    loginplayer;
    repeat
    Findlaw;
    until(false);
    end.

    (seems to work but clicks like crazy haha xD)

    I'd google it but i honestly have no idea what i should be looking for :P
    Last edited by rjk1990; 04-30-2012 at 07:07 PM.

  2. #2
    Join Date
    Mar 2012
    Location
    Over there
    Posts
    840
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    You can have it check your exp before you click it, when you click just do a loop until you don't gain exp after X amount of seconds.

  3. #3
    Join Date
    Apr 2012
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by TotalKillz View Post
    You can have it check your exp before you click it, when you click just do a loop until you don't gain exp after X amount of seconds.
    Sounds like that would work, but how exactly do i do that? Remember i'm pretttty new to this and only know the basics

  4. #4
    Join Date
    Mar 2012
    Location
    Over there
    Posts
    840
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    Simba Code:
    var
      CheckExp : Integer;
    begin
      repeat
        CheckExp := GetXPBarTotal;
        Wait(5000);
      until CheckExp = GetXPBarTotal;
    end;

    Something like that, just set a variable to your exp every time it goes through the loop and it will stop when your exp hasnt increased.

  5. #5
    Join Date
    Apr 2012
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Not sure i understand any of that but i shall try and use it anyway, trial and error never hurts xD thank you!

  6. #6
    Join Date
    Mar 2012
    Location
    Over there
    Posts
    840
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    It just checks if you gained any exp every 5 seconds, and if you haven't it will continue.

  7. #7
    Join Date
    Apr 2012
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Sigh, i can't figure it out

    I basically want it to click the essling, monitor the xp without anymore clicking until it stops increasing then when it detects stoppage it repeats the procedure. I just can't figure out how to put it in code xD In my head it's like (and not in actual code xD)

    Procedure Mainloop;
    Begin;
    Click Essling;
    checkXP;
    If XPstopsIncreasing then
    startfrombeginning;
    end;


    but i lack the vital skills to actually do it. i'm so dumb :/ *sadly goes back to tutorials*

  8. #8
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    This could turn out in a very nice first script! Start looks promising! If you really can't figure it out, I will help you, but it would be great to see you do it yourself. The trick is to think like a very stupid robot, how would it recognize certain things? When will it perform certain actions?

    Quote Originally Posted by rjk1990 View Post
    but i lack the vital skills to actually do it. i'm so dumb :/ *sadly goes back to tutorials*
    You ain't dumb, watch Jersey Shore, those people are dumb.

    edit:
    One piece of the puzzle:
    Simba Code:
    procedure WaitTillNoXP(interval:Integer;maxTime:Integer);
    var
      t:Integer;
    begin
      repeat
        CheckExp := GetXPBarTotal;
        Wait(interval);
        if CheckExp = GetXPBarTotal then
          Inc(t)
        else
          t := 0;
      until((t * interval) > maxTime);
    end;
    Last edited by masterBB; 04-30-2012 at 09:43 PM.
    Working on: Tithe Farmer

  9. #9
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Could use pixelshift and set it to a value of like 550 or something, which is what I'm currently using and it works pretty good. 550 gives a few false readings and sometimes it is slow so mess around with that maybe?
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

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
  •