Results 1 to 24 of 24

Thread: Will Someone Please help? Having Trouble with script!

  1. #1
    Join Date
    Aug 2008
    Posts
    196
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Will Someone Please help? Having Trouble with script!

    Hi, I made this script today and I cant seem to get it to work properly. Please take a look at it and tell me what you think the problem is. Thanks!
    -Andy

  2. #2
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    sorted the standards added a proggy and declare players
    should work now but you won't pick up any bones or kill any skeletons cos you are using bitmaps *suicidal* use color
    SCAR Code:
    program SkeletonPwnage;
     {.include srl/srl.scar}

    //Hi, this is my 3rd script but its my most complex so far, Im having some troubles with it, please help
    //Made for autoing at the level 25 skeletons in karemja right after elvarag in the cave.
    //Srl Rev 27
    //I dont know how to make my character stop and pick up items right after the monster dies, and I also need help with delcare players.
    //Any and all feedback are welcomed and appreciated.
    //Im not sure how to make a logout/login part for the script
    //Sorry for the bitmaps, is 3 too many?
    //Thanks for the help
    //Andyz55
    //P.s  I also dont really know how to make a proggie, but thats not really important until everything else works

    var
    Invinbones, Bones, Skele1, k, bones, x, y, b, Killed: integer;

    Procedure declareplayers;
    Begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := '';//user
      Players[0].Pass := '';//pass
      Players[0].Nick := '';//3-4 letters of name in order except first
      Players[0].Active := True;//use this player?
    end;

    procedure loadbitmap;
    begin
      InvinBones := BitmapFromString(24, 18, 'beNpjYPhPDcDAgM8cNw' +
           'djBgZGIKLQHKAJi1oagWoMFBTABjLgMhPTHKAbPBxMIFqAaMf6dXD' +
           'GwimTcTkPq3sgVh/Yvn3jsqWLpk4NCwgAipw5emTT8uXTu7sYwkIw' +
           'jYKbA7EIgnZt2NDQ0dZRW9NUUV5XUgwUgfgL6J681BRRLg6ICKY5E' +
           'AeIMDDICAiwREYwQAHcZBC7QUMZJg4KLqzmQIwqysyAaATbzrBv29' +
           'Yl06dtWbnySE/PspkzwsG+w4rQwqervg5iCMQX6xYtnNDSvHLunMY' +
           'NmwrS0yry8oA+BYbPit6e4wf2X790CSibmZiAaQ7cEIj4pLbWmqIi' +
           'sCMZgI4BaqkqKADa1djZAXTktM5OmPshqQIlvuC+Rna2CCMDpl+Ac' +
           'ddWXR3g5QkLYQZcKZABAaDuREZIUUDAnGP79h3cubMkOwvicqzKQA' +
           'bCwgGXOcBU1NPYYGlqgj/v4M9fEGcDQ9LFzo4Sc5CCiJFCc+AhgCt' +
           'w0MyhDgAAM2DjIg==');
           
           
      Bones := BitmapFromString(17, 18, 'beNpjYPhPImBgYEDjYgI8Whg' +
           'IAVxawgMCmirKj+zZg0sXsl44SPD0mNnbs2P9OiAiUgsQZCYmdNXX' +
           'rVu0EIgunT6NqQXTAStbGhhkJRgsJRg0ObDagqZegIFpQktzgK0EC' +
           'AkIYGqBgAMnTiFLbVq+HKrFVmLftq19TU2YWnZt2AAMJQg60NFx4d' +
           'QpCLpz/fqaBQtaKisxtUxqawWKQxBDZkYRDMWFh03v7sJqCyYoSEg' +
           'AIqyBjAtAbcQRL7h0LZk+DU9UYo1QoMcP7twJQbi0YGrUUVDCbwsx' +
           'WYCBDAAAFl0yDw==');
           
      Skele1 := BitmapFromString(19, 19, 'beNrFkt9LwlAYhg9DYniTiY' +
           'ZsEJKmM8PULBUkzmz5qyFDM0EkDjlTS2Qs8ULEv73XDuxCtAld9PF' +
           'cHA7nOd933o2Qv1e9/qA/PaZSl0BRwooSlaSQ3++TQqEzWf7dlWVR' +
           'FAuAkPCmPB4iScTrPbB1tUJp2rNa2YvFFBDChsP+IWK//0yINZ9/z' +
           'Gbm9PNtsWDr9Zdtj11Fy3onJKPlAqPRK9xGg2IG4CrivCDQWj6IBS' +
           '5BU027B4c9lJpmo1J5MYyKrmt6TWOMqtRw1WybLZcWMgGl0g1/I8f' +
           'VxYSdThMgJdDrtXYewzxbz+T346/A+ifn3TUeM2fNmFkua+VyC5A7' +
           'H6VUVfdGmkpE+IsA8hRPT7pdw9lJJuOGUd8ncmBxHDGTiRaLOf4d2' +
           '219SxTEo+xV7PZaScbjsOhFALE0m1U04pRK+cmE7YzI6z2GyN3zWB' +
           'Si0x35INjBoIfNnQMLglDIRgrpRDhMgkGRW+i+gRoqUqKU/Fd9A0R' +
           'feNk=');
    end;

    procedure KillIt;
    begin
      K:=0;
      repeat
        if FindBitmapToleranceIn(Skele1, x, y, 560, 214, 734, 457,30) then
          Mouse(x, y, 10, 10, false);
          ChooseOption('keleton');
          Wait(9000+random(1121));
          Inc(Killed);
          case Random(45) of
            1 : RandomRclick;
            2 : BoredHuman;
            3 : Hoverskill('strength',false);
            4 : MMouse(1000,767,3,3);
          end;
          if FindBitmapToleranceIn(bones, x, y, 652, 222, 667, 230, 20) then
            Mouse(x, y, 5, 5, False);
            ChooseOption('ones');
      until k = 28;
    end;
           
    Procedure Antirandoms;
    begin
      if not LoggedIn then Exit;
        FindNormalRandoms;
        FindTalk;
        SolveNontalkingrandoms;
        FindLamp('strength');
    end;
           
    procedure FindBonesInvin;
    begin
      repeat
        if FindbitmapToleranceIn(Invinbones, x, y, mix1, miy1, mix2, miy2, 20) then
          Mouse(x,y,3,3,true);
          FindNormalRandoms;
      until InvEmpty;
    end;

    procedure Proggy;
    begin
      WriteLn('skeleton ownage!'
      WriteLn('Ran for '+timerunning)
      WriteLn('Killed '+(IntToStr(killed))+' skeletons');
      WriteLn('Post Proggies')
    end;
           
    begin
      SetupSrl;
      DecarePlayers;
      Loadbitmap;
      ActivateClient;
      LogiPlayer
      repeat
        KillIt;
        AntiRandoms;
        FindbonesInvin;
      until not(LoggedIn);
      Proggy;
    end.


  3. #3
    Join Date
    Oct 2007
    Location
    The deep web
    Posts
    2,496
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    yeh, use my bury bone function;

    SCAR Code:
    procedure bury;
    Begin
      If Not LoggedIn Then Exit;
      Begin
          GameTab(4);
      BonesInventory := DTMFromString('78DA631460606000612470FEDC1930CD08E53' +
           '30A03090E54356C5049B81A6620C18BAA8685014D0D485E12558D' +
           '201713AA1A6920218CDF1C00CA37033F');
        Repeat
          antirandom;
          Status('Looking For Bones...');
          If FindDTM(BonesInventory, X, Y, MIX1, MIY1, MIX2, MIY2) Then
          MMouse(X, Y, 5, 5);
          Wait(300+Random(100));
        If (IsUpText('ones')) Then
          Begin
            Mouse(X, Y, 5, 5, True);
            Inc(BonesBuried);
            Status('Burying Bones...');
            Wait(170+Random(50));
          End;
        Until (Not FindDTM(BonesInventory, X, Y, MIX1, MIY1, MIX2, MIY2))Or(Not LoggedIn);
        FreeDTM(BonesInventory);
      End;
    End;


    And look at this:

    SCAR Code:
    procedure KillIt;
           begin
           k:=0;
           repeat
           Mouse(x, y, 10, 10, false);
           ChooseOption('keleton'); // ChooseOption('ttack'); cause what u use is only a 1/3 chance it will attack.
           Wait(9000+random(1121));
            case random(45) of
           1 : RandomRclick; // these anti ban will be the same every time u kill a sceleton so it will be bannable.
           2 : BoredHuman; //
           3 : Hoverskill('strength',false); //
           4 : MMouse(0,0,1000,767); //
           FindbitmapToleranceIn(Bones, x, y, 652, 222, 667, 230: 20);
           Wait(200+random(100);
           Mouse(x, y, 5, 5, False);
           Wait(200+random(143));
           ChooseOption('ones'); // ChooseOption('ury'); again only 1/3 chance it will bury the bones.
           until k = 28;
           end;

    SCAR Code:
    function pick up item: boolean;
    var
      x, y, FeatherDTM: integer;
    begin
      FeatherDTM:= DTMFromString(//dtm of item to pick up here. );
      if FindDTM(//'nameof item to pick up' DTM, x, y, MSX1, MSY1, MSX2, MSY2) then
      begin
        Mouse(x, y, 0, 0, False);
        Wait(250 + Random(150));
        if ChooseOption('//item name here') then
        begin
          Flag;
          Result := True;
        end;
      end;
    end;
    Did someone say GDK?

  4. #4
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yeah i got rid of the errors jakey tells you what to do


  5. #5
    Join Date
    Oct 2007
    Location
    The deep web
    Posts
    2,496
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    lol thanks. :P
    Did someone say GDK?

  6. #6
    Join Date
    Aug 2008
    Posts
    196
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey thanks guys, Now im gonna try to re-write it again later using either DTMs or just regular color. Rep+ for both of your help!

  7. #7
    Join Date
    Aug 2008
    Posts
    196
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok here is my new one, Im having trouble with the declare players part, it doesnt log me in and it keeps fooling around with the textures.
    I used colors in this one, but the bone buryer has yet to work.
    I need help kinda configuring the last part of the script if isnt too much to ask...
    I cant get it to pick up the bones properly, and it seems like it fights forever, even when the invintory is full, it doesnt attempt to bury the bones..

    SCAR Code:
    program SkeletonPwnage;
     {.include srl/srl.scar}

    //Hi, this is my 3rd script but its my most complex so far, Im having some troubles with it, please help
    //Made for autoing at the level 25 skeletons in karemja right after elvarag in the cave.
    //Srl Rev 27
    Const
    SkeletonColor = 8489867;
    BonesInvin  = 7763583;
    BonesGround = 12698057;
    Screenresx = 1023;
    Screenresy = 767;

    var
    x, y, t, bones, Killed1, Killed2: integer;

    Procedure Declareplayers;
    Begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := ' ';//Your Username
      Players[0].Pass := ' ';//Your Password
      Players[0].Nick := ' ';//3-4 letters of name in order except first
      Players[0].Active := True;//use this player?
    end;

    procedure KillIt1;
    begin
    Killed1 := 0;
      repeat
          FindColorTolerance(x, y, SkeletonColor, MSX1, MSY1, MSX2, MSY2,  4)
          Wait(100+random(100));
          MMouse(x, y, 5, 5);
          Wait(50+random(100));
          Mouse(x, y, 5, 5, false);
          Wait(100+random(100));
          ChooseOption('ttack');
          Wait(13000+random(1121));
          FindNormalRandoms;
          FindTalk;
          FindColorTolerance(x, y, BonesGround, MSX1, MSY1, MSX2, MSY2, 4);
          Wait(600+random(150));
          MMouse(x, y, 2, 2);
          Wait(200+random(300));
          Mouse(x, y, 2, 2, false);
          Wait(200+random(300));
          ChooseOption('ake B');
          Wait(1500+random(1000));
          Inc(Killed1);
      until (Killed1 = 12 + random(4));
    end;

    Procedure Antirandoms;
    begin
      if not LoggedIn then Exit;
        FindNormalRandoms;
        FindTalk;
        SolveNontalkingrandoms;
        FindLamp('strength');
    end;

     procedure KillIt2;
    begin
      Killed2 := 28-Killed1;
      repeat
          FindColorTolerance(x, y, SkeletonColor, MSX1, MSY1, MSX2, MSY2,  4)
          Wait(20+random(40));
          MMouse(x, y, 5, 5);
          Wait(50+random(50));
          Mouse(x, y, 5, 5, false);
          Wait(50+random(50));
          ChooseOption('ttack');
          Wait(13000+random(2121));
          FindColorTolerance(x, y, BonesGround, MSX1, MSY1, MSX2, MSY2, 1);
          Wait(500+random(150));
          MMouse(x, y, 2, 2);
          Wait(200+random(300));
          Mouse(x, y, 2, 2, false);
          Wait(100+random(100));
          ChooseOption('ake B');
          Wait(1500+random(1500));
          Inc(Killed2);
      until (Killed2 = 27);
    end;

    Procedure Antiban;
      begin
      Wait(500+random(200+random(100)));
      case Random(52) of
            1 : RandomRclick;
            2 : BoredHuman;
            3 : Hoverskill('strength', false);
            4 : MMouse(0, 0, 1000, 700);
            5 : Hoverskill('Prayer', false);
            end;
            end;

      procedure BuryBonesInvin;
      begin
      If Killed2 = 28 then
      begin
      bones := 0;
          FindColorTolerance(x, y, BonesInvin, MSX1, MSY1, MSX2, MSY2, 1)
      repeat
          Wait(350+random(147));
          MMouse(x, y, 5, 5);
          Wait(100+random(40));
          Mouse(x, y, 5, 5, true);
          Wait(500+random(150));
          FindNormalRandoms;
      until bones = 27;//The number of bones you will be able to carry/bury.
      end;
      end;

    procedure Proggie;//Much thanks to Sandos1234 for Making the proggie!, I revised it a little.
      begin
      WriteLn('Thank You for using Andy''s Skeleton Ownage!');
      WriteLn('Ran for '+timerunning);
      WriteLn('Killed '+(IntToStr(killed2*t))+' Skeletons');
      WriteLn('Buried '+(IntToStr(bones))+' bones!');
      WriteLn('Total Prayer xp ='+(IntToStr(bones*5))+' exp');
      WriteLn('Total Combat xp ='+(IntToStr((killed2*t)*4))+' exp');;
      WriteLn('Please Post Proggies!');
      end;

      begin
      t := 0;
      SetupSrl;
      DeclarePlayers;
      ActivateClient;
      LoginPlayer;
      repeat
        KillIt1;
        AntiRandoms;
        Killit2;
        Antiban;
        BurybonesInvin;
        Inc(t);
       until (t = 1);//Times to kill # skeletons and bury # bones.
      Logout;
      Proggie;
    end.//Thanks to Jakeyboy29 For help with the script also!

  8. #8
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    procedure BuryBonesInvin;
    begin
      If Killed2 = 28 then
        begin
          bones := 0;
          if FindColorTolerance(x, y, BonesInvin, MSX1, MSY1, MSX2, MSY2, 1) then
            repeat
              Wait(350+random(147));
              MMouse(x, y, 5, 5);
              Wait(100+random(40));
              Mouse(x, y, 5, 5, true);
              Wait(500+random(150));
              FindNormalRandoms;
              bones:=bones+1;
            until bones = 27;//The number of bones you will be able to carry/bury.
        end;
    end;
    that should work
    SCAR Code:
    procedure KillIt2;
    begin
      Killed2 := 28-Killed1;
      repeat
        if FindColorTolerance(x, y, SkeletonColor, MSX1, MSY1, MSX2, MSY2,  4) then
          Wait(20+random(40));
          Mouse(x, y, 5, 5, false);
          Wait(50+random(50));
          ChooseOption('ttack');
          while infight do
          begin
            Wait(100);
            findnormalrandoms;
          end;
          if FindColorTolerance(x, y, BonesGround, MSX1, MSY1, MSX2, MSY2, 1) then
            Wait(500+random(150));
            Mouse(x, y, 2, 2, false);
            Wait(100+random(100));
            ChooseOption('ake');
            Wait(1500+random(1500));
            Inc(Killed2);
      until (Killed2 = 27);
    end;
    that will work also but i prefer
    SCAR Code:
    procedure KillIt2;
    begin
      Killed2 := 28-Killed1;
      repeat
        if FindColorTolerance(x, y, SkeletonColor, MSX1, MSY1, MSX2, MSY2,  4) then//could also be
          Wait(20+random(40));//used for finding skeles
          Mouse(x, y, 5, 5, false);
          Wait(50+random(50));
          ChooseOption('ttack');
          while infight do
          begin
            Wait(100);
            findnormalrandoms;
          end;
          if FindObjCustom(X, Y, ['one', 'ick'], [BonesGround], 3) then //this is really good
            Wait(500+random(150));//for finding items
            Mouse(x, y, 2, 2, false);
            Wait(100+random(100));
            ChooseOption('ake');
            Wait(1500+random(1500));
            Inc(Killed2);
      until (Killed2 = 27);
    end;
    it could be used for skeles by using
    SCAR Code:
    if FindObjCustom(X, Y, ['ack', 'tac'], [SkeletonColor], 3) then
    the first part declares x and y the second is the uptext,the third is the color and the "3" is the tolerance and 3 is good tolerance co it just finds that color, hope i helped.
    edit:make a dtm of the bone for burying them it works better


  9. #9
    Join Date
    Oct 2007
    Location
    The deep web
    Posts
    2,496
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    lol you beat me to it this time :P
    Did someone say GDK?

  10. #10
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yeah i know *owned* (cackles)


  11. #11
    Join Date
    Aug 2008
    Posts
    196
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks guys lol
    this really helps!
    but what should I do about the declare players bug thing?
    Also, the script doesn't recognise 'Infight'. Does that mean that I need to include the fighting skill?

  12. #12
    Join Date
    Aug 2008
    Posts
    196
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nevermind, I got the fight/srl thing included, but the declare players problem still exists...

  13. #13
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    have you put it in right?
    like
    'username'
    'password'
    'nickname' eg ser (u-ser-name) otherwise check youve got everything setu like youve dragged the crosshairs to the window etc etc


  14. #14
    Join Date
    Aug 2008
    Posts
    196
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ya, I put in my user name just like this
    'Username' ;
    'Password' ;
    'sern' ;
    if that was my user, pass, and nick..
    I also did mark the player as true

  15. #15
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    idk then maybe your script doesn't like you


  16. #16
    Join Date
    Aug 2008
    Posts
    196
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Lol, ya probably not
    idk why tho.. i didnt do anything to him..

    lol

  17. #17
    Join Date
    Sep 2008
    Location
    Adelaide, South Aust
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I don't know if it matters but do you generally ActivateClient before DeclarePlayers? Otherwise try using the DeclarePlayers function from one that already works.
    Sorry couldn't help more but great idea for script.Keep it up!!

  18. #18
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    theres no need for activate client tbh cos loginplayer already does it.


  19. #19
    Join Date
    Aug 2008
    Posts
    196
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks sand im gonna try that and see if it works.

  20. #20
    Join Date
    Sep 2008
    Location
    SWEDEN
    Posts
    363
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Is it a normal script or a S.M.A.R.T script?
    If it is a S.M.A.R.T script then you can't use it becuze runescape have been updated.

  21. #21
    Join Date
    Aug 2008
    Posts
    196
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Its just a normal script.. no smart
    Although you might have been able to find out if it was smart or not just by looking at it a few posts up..

  22. #22
    Join Date
    Sep 2008
    Location
    SWEDEN
    Posts
    363
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Then it should work...I can check it later.

  23. #23
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    loginplayer is broken anyway although zephyr posted a link in the public test corner


  24. #24
    Join Date
    Aug 2008
    Posts
    196
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    dang. When do you think it will be fixed?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Script trouble
    By mat555 in forum OSR Help
    Replies: 4
    Last Post: 11-27-2007, 01:11 AM
  2. My first script is giving me trouble...
    By aran armath in forum OSR Help
    Replies: 0
    Last Post: 11-23-2007, 07:24 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
  •