Results 1 to 7 of 7

Thread: Need help setting up antirandoms;

  1. #1
    Join Date
    Sep 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Need help setting up antirandoms;

    I'm currently doing a personal script (I tend not to leech scripts from other users), and I'm having some trouble setting up the antirandoms.
    SCAR Code:
    program Ogrefighter;
    {.include SRL/SRL.Scar}


    var
    z: Integer;
    w: Integer;


    const
      Nickk = 'shock';


    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1; //Number of players
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:= 0;

      Players[0].Name :='Shock_Norris';
      Players[0].Pass :='xxxxxxxxxxxx';
      Players[0].Nick :='shock';
      Players[0].Active:=True;
    end;


    procedure FindClickOgre;
    begin
    If (FindColor(x,y, 4473929, 22,30,517,337) or FindColor(x,y, 9352394, 22, 30,517,337))=True
    then
    Movemousesmoothex(x, y, 3, 10, 7, 15, 1);
    z := z + 1;
    end;


    procedure ClickOgre;
    begin
    z := 0;
    Wait(100+randomrange(100, 500));
    ClickMouse(x+random(5), y+random(5), true)
    Wait(20000+randomrange(3000, 4500))
    w := w + 1;
    FindNormalRandoms
    end;



    procedure CheckOgres;
    begin
    Writeln(InttoStr(w))
    end;

    begin
    SetUpSRL
    DeclarePlayers
    LoginPlayer
    NickNameBMP := CreateBitmapMaskFromText(Nickk, UpChars);
    FindNormalRandoms
    Writeln('A')
    Repeat
    Repeat
    FindClickOgre
    WriteLn('B')
    Until(z = 10)
    ClickOgre
    WriteLn('C')
    FindNormalRandoms
    CheckOgres
    FindNormalRandoms
    Until(false)
    end.

    I used WhiteShadow's tutorial to insert the antirandoms, but now when I run the script it just logs in and stands there doing nothing.
    Before it had antirandoms it worked fine.
    I tried inserting the "Writeln" commands to know where and why the script got stuck, but it doesn't even get to "A".

    Would somebody help me?

  2. #2
    Join Date
    Jun 2007
    Location
    La Mirada, CA
    Posts
    2,484
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    first of all, look at more tuts, NEVER use clickmouse it gets use banned, use Mouse, then use fawakis findfastrandoms procedures, look in other scripts for it,

    PS: YOU NEED SEMICOLONS ( ; )

    "Failure is the opportunity to begin again more intelligently" (Henry Ford)


  3. #3
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    133
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Right, first of all. Standards, have a look in the beginners tut section for a standards tut. Also your missing some semicolons. Put a semicolon after nearly everything. I see you are using scar's functions not SRL's. SRL's function's for MoveMouse and ClickMouse are MMouse and Mouse. These are far better as they move the mouse human like and you can add random coordinates to it. You have LoginPlayer in your main loop. Take that out and put this at the bottom of your player array:

    SCAR Code:
    if (not(LoggedIn)) then LoginPlayer


    This will check if your players logged in and if he is not then it will log him in. You should put that at the start of every procedure to be safe.
    The reason your script isn't doing anything is because it's not finding the color. Try using a FindObj, instead of FindColor, as it looks for a color or colors with tolerance and also get's the UpText. It is much better. You could also use KAttack monster. If you really want to stay with FindColor, then change the color, and use a high/er tolerance.

    Good luck.

    PS: You said you were gunna do a private script. Does that mean you won't be posting it up here? But your gunna get our help to make it?? I think if you need our assistance then you should give something to the community that helped you, even if we can just se how it turned out.

    Good job anyway, keep it up.
    Quote Originally Posted by The Un-Named View Post
    You can do this a few times before mods catch on...

    "oh fuck, I think the icecream truck just knocked a kid over, brb".

  4. #4
    Join Date
    Jun 2007
    Location
    La Mirada, CA
    Posts
    2,484
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    hairy first of all you must not read the whole scipt, it should type A after it logs in, findcolor will still send back to scar saying that it found the color he just has it split into procedures...kinda and he is trying to just plain out get the script to type back 'A' 'B' and 'C'

    SCAR Code:
    program Ogrefighter;
    {.include SRL/SRL.Scar}
     
     
    var
    z: Integer;
    w: Integer;
     
     
    const
      Nickk = 'shock';
     
     
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1; //Number of players
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:= 0;
     
      Players[0].Name :='Shock_Norris';
      Players[0].Pass :='xxxxxxxxxxxx';
      Players[0].Nick :='shock';
      Players[0].Active:=True;
    end;
     
     
    procedure FindClickOgre;
    begin
    If (FindColor(x,y, 4473929, 22,30,517,337)) or (FindColor(x,y, 9352394, 22, 30,517,337)) then
    Movemousesmoothex(x, y, 3, 10, 7, 15, 1);
    z := z + 1;
    end;
     
     
    procedure ClickOgre;
    begin
    z := 0;
    Wait(100+randomrange(100, 500));
    ClickMouse(x+random(5), y+random(5), true);
    Wait(20000+randomrange(3000, 4500));
    w := w + 1;
    FindNormalRandoms;
    end;
     
     
     
    procedure CheckOgres;
    begin
    Writeln(InttoStr(w));
    end;
     
    begin
    SetUpSRL;
    DeclarePlayers;
    LoginPlayer;
    NickNameBMP := CreateBitmapMaskFromText(Nickk, UpChars);
    FindNormalRandoms;
    Writeln('A');
    Repeat;
    Repeat;
    FindClickOgre;
    WriteLn('B');
    Until(z = 10);
    ClickOgre;
    WriteLn('C');
    FindNormalRandoms;
    CheckOgres;
    FindNormalRandoms;
    Until(false)
    end.

    that should run now and type back A B and C for you, but that is not good to have click mouse...this would make it more simple

    SCAR Code:
    program Ogrefighter;
    {.include SRL/SRL.Scar}
     
     
    var
    z: Integer;
     
    const
      Nickk = 'shock';
     
     
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1; //Number of players
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:= 0;
     
      Players[0].Name :='Shock_Norris';
      Players[0].Pass :='xxxxxxxxxxxx';
      Players[0].Nick :='shock';
      Players[0].Active:=True;
    end;
     
     
    procedure FindClickOgre;
    begin
    If (FindColor(x,y, 4473929, MSx1,MSy1,MSx2,MSy2)) or (FindColor(x,y, 9352394, MSx1,MSy1,MSx2,MSy2)) then
    Mouse( x, y, 3, 3, true);
    z := z + 1;
    FindNormalRandoms;
    end;
     
    begin
    SetUpSRL;
    repeat;
    z := 0;
    DeclarePlayers;
    LoginPlayer;
    NickNameBMP := CreateBitmapMaskFromText(Nickk, UpChars);
    Writeln('A');
    Repeat;
    FindClickOgre;
    WriteLn('B');
    Until(z = 10);
    WriteLn('C');
    Until(false)
    end.

    the MSx1,MSy1,MSx2,MSy2 looks for that color in the runescape mainscreen

    BIG PS: nickname would not be shock it would be ock or hoc ...

    "Failure is the opportunity to begin again more intelligently" (Henry Ford)


  5. #5
    Join Date
    Sep 2007
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ugh this seems complicated to me but im slowly gettin there glad to see how you guys are helping him out with his creation ive yet to start one from scratch im still trying to understand from choppin up scriots that wrked hard to find ones that still do but i am gettin there on edditing the ones im trying to use ey is there a reasone i cant get any thing from http://www.villavu.com/forum/showthr...?t=2802?t=3410 places like that says i dont have permission>?

  6. #6
    Join Date
    Jun 2007
    Location
    La Mirada, CA
    Posts
    2,484
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    ^^ where did you get that link? i dont even have access to that link so you shouldnt even be able to find that link...lol but no you cant access that page

    "Failure is the opportunity to begin again more intelligently" (Henry Ford)


  7. #7
    Join Date
    Sep 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the help guys, I appreciate it.


    Quote Originally Posted by HairyDuncan2 View Post
    PS: You said you were gunna do a private script. Does that mean you won't be posting it up here? But your gunna get our help to make it?? I think if you need our assistance then you should give something to the community that helped you, even if we can just se how it turned out.
    Its kind of homebrew.
    I'm making a script pack with scripts that help pures (autoalcher, ogrefighter, autocurser), and I'll release it as soon as I find that it is good enough to be released.
    I use Scar's functions because I started scripting before Srl... This is my first step onto the "new wave".

    Also, shouldn't the MoveMouseSmoothEx and ClickMouse act together to perform a human like click?
    You can add random offsets in original scar too.



    If anybody could link me up to a page with all (or the most useful) Srl functions I'd appreciate.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Setting TPA help plz!
    By Drakan in forum OSR Help
    Replies: 10
    Last Post: 05-20-2008, 12:07 AM
  2. Setting Run
    By faster789 in forum OSR Help
    Replies: 9
    Last Post: 04-17-2008, 05:55 AM

Posting Permissions

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