Results 1 to 14 of 14

Thread: Can't really get any script to work =( plz help

  1. #1
    Join Date
    Jun 2007
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Can't really get any script to work =( plz help

    Hey, I really can't get any SCAR scripts to work and I have the latest and installed everything correctly. Most of my scripts seem to be working but it doesn't do what it's suppose to. Please msg me on msn if you know your ways around and can show me a few things : Darkrazor02@aol.com

    Thanks

  2. #2
    Join Date
    May 2007
    Location
    Some where fun.
    Posts
    2,891
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by blindman View Post
    Hey, I really can't get any SCAR scripts to work and I have the latest and installed everything correctly. Most of my scripts seem to be working but it doesn't do what it's suppose to. Please msg me on msn if you know your ways around and can show me a few things : Darkrazor02@aol.com

    Thanks
    1. Did you drag cross hair to runescape.
    2. Fill out the const and declare players?
    3. See the feedback and make sure its a good script?
    4. Try to fix the problems in the script yourself.
    5. You should learn how to script so you dont get those problems
    ... (ANTI LEACHER) When you make your own scripts they wont have those errors
    6. Hope I helped
    7. I like posting numbers

  3. #3
    Join Date
    Jun 2007
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, if I knew how to code my own scripts, I wouldn't use other ppl's scripts in the first place. It's not as easy as you say, I tried to understand some few lines and I got lost, there is no way I will learn how to script my own problem. Autofighting script used to work good few months back before SRL and all this other stuff. Now, nothing seems to work or that I can get it to work. =/

  4. #4
    Join Date
    Feb 2007
    Posts
    93
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by blindman View Post
    Yeah, if I knew how to code my own scripts, I wouldn't use other ppl's scripts in the first place. It's not as easy as you say, I tried to understand some few lines and I got lost, there is no way I will learn how to script my own problem. Autofighting script used to work good few months back before SRL and all this other stuff. Now, nothing seems to work or that I can get it to work. =/
    just re-install everything

  5. #5
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

  6. #6
    Join Date
    Sep 2006
    Location
    Great Britain
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Post one of the scripts here so we can have a look

  7. #7
    Join Date
    Mar 2007
    Location
    In your computer
    Posts
    244
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Its already fixed..Well there is a temp fix.

  8. #8
    Join Date
    Jun 2007
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    {_________________________________________________________
    [ Autofighter by Gofez0r aka. GoF                         ]
    [ Set the info and start script logged in                 ]
    [ Report errors and tell me what u think :D               ]
    [                                                         ]
    [ Enjoy :D                                                ]
    [ Version: 2.00                                           ]
    [ Updates:                                                ]
    [  Now supports many players (tell me if bugs in that.)   ]
    [  Fightstyle choosing.                                   ]
    [  Eating bug SHOULD be fixed, tell me if something wrong ]
    [  with it. But i used a SRL procedure for that.          ]
    [  Mousespeed changing... (better antibans).              ]
    [  And had to move some procedures around(errors cause    ]
    [  of the spots (unknown identifier.)                     ]
    [  And that text over this box ( u noticed? :P)           ]
    [_________________________________________________________}




    program MyAutoFighter;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Fighting.scar}
    {.include SRL/SRL/Skill/Ranging.scar}

    var x1,y1,Enemies :Integer;

    //--------------SETUP UNDER THIS-----------------//

    const
      HowManyEnemies = 100; //Amount of enemies u want to fight at time before switching.
      Startplayer    = 0; //Player to start with.
      Monstercol1    = 9278344; // A color from a enemy.
      Monstercol2    = 7502715; // Another color from a enemy.
      foodcol        = 0; // Color of ur food.
      HPtoeat        = 10; // Hp to eat at
      LogoutHP       = 5; // HP to run and log out at.
      HPToStopEat    = 15; // HP to stop eating at.
      Tolerance      = 10; //Tolerance of finding the enemy
      RunDir         = 'N'; //Direction to run when low HP and no food
      Fightwait      = 2300; //Wait time for fighting.
      PartName       = 'Giant'; //Part of the monsters name. "arri" is from warrior.
      Pickarrows     = false; // Set to false if u dont use arrows.
      Arrowcolor     = 0; //Color of the arrow on ground.
      FightStyle     = 2; //NEW: From 1 to 4...
      DoGambleBox    = true; //NEW: Set to true if u lag when using solvenewbox.
     SwitchPlayers   = false; //NEW: Set to true if u want the script to change players.
    LoggedInAtStart  = true; //NEW: If u are logged in at start... Creates a pic of ur nick for
                             //Rands and doesnt set the fightinstyle.

    {________
    [[1] [2]]
    [       ]   <-- The spots for the number for FightStyle
    [[3] [4]]        As i wanted to do it myself, not use only SRL stuff :)
    [_______}


    //----------------^^ SETUP ^^--------------------//

    procedure DeclarePlayers;
    begin
      HowManyPlayers :=8;   //Note: 0 counts as a player too ;)
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:=0;

      Players[0].Name :='user';
      Players[0].Pass :='pw';
      Players[0].Nick :='nick'; //Few letters from the name for antirandoms.
      Players[0].Active:=True;


      Players[1].Name :='Namehere';
      Players[1].Pass :='PassHere';
      Players[1].Nick :='ame'; //Few letters from the name for antirandoms.
      Players[1].Active:=True;


      Players[2].Name :='Namehere';
      Players[2].Pass :='PassHere';
      Players[2].Nick :='ame'; //Few letters from the name for antirandoms.
      Players[2].Active:=True;


      Players[3].Name :='Namehere';
      Players[3].Pass :='PassHere';
      Players[3].Nick :='ame'; //Few letters from the name for antirandoms.
      Players[3].Active:=True;


      Players[4].Name :='Namehere';
      Players[4].Pass :='PassHere';
      Players[4].Nick :='ame'; //Few letters from the name for antirandoms.
      Players[4].Active:=True;


      Players[5].Name :='Namehere';
      Players[5].Pass :='PassHere';
      Players[5].Nick :='ame'; //Few letters from the name for antirandoms.
      Players[5].Active:=True;


      Players[6].Name :='Namehere';
      Players[6].Pass :='PassHere';
      Players[6].Nick :='ame'; //Few letters from the name for antirandoms.
      Players[6].Active:=True;


      Players[7].Name :='Namehere';
      Players[7].Pass :='PassHere';
      Players[7].Nick :='ame'; //Few letters from the name for antirandoms.
      Players[7].Active:=True;

    end;


    //-----------------------------------------------//

    procedure FindRandoms;
    begin
     FindLamp('hitpoints');
      wait(5); //No need for random timers on these, jagex cant track when we are checking :)
       ClickToContinue;           //Just removes lag.
       wait(5);
       FindDead;
       wait(5);
       FindMod;
       wait(5);
       ClickToContinue;
      wait(5);
     CloseWindow;
    end;

    //-----------------------------------------------//

    Procedure RandomRandoms;
    var    RNFR :Integer;

    begin
     writeln('Randomly choosing if a bigger random check is used.');
     RNFR:=0;
    begin
     RNFR:=Random(8);
       case RNFR of
       3: FindNormalRandoms;
      end;
     end;
    end;

    //-----------------------------------------------//

    function Arrowpickup: boolean;
    begin
     if (Pickarrows=true) then
      begin
      repeat
       wait(400+random(210))
        if(FindObj(x,y,'ake',arrowcolor,0))then
         begin
         mouse(x,y,3,2,true)
         flag;
        end;
      until(not(FindObj(x,y,'ake',arrowcolor,0)))
     end;
    end;

    //-----------------------------------------------//

    function PutArrowsOn: Boolean; //By Freddy1990 .. Edited a bit.
    var
      xx, yy: Integer;
    begin
    if (Pickarrows=true) then
     begin
      Result := FindInvArrows(xx, yy);
       Wait(100 + Random(250));
       Mouse(xx, yy, 0, 0, True);
      end;
    end;

    //-----------------------------------------------//

    Procedure SetFightingStyle;
    Begin
     Gametab(1);
     Wait(500+Random(500))
      Begin
       if (FightStyle=1) then
        begin
          Mouse(600,270,10,10,true)
          Wait(1000+Random(500))
          writeln('Fightstyle chosen.');
        End;
        if (FightStyle=2) then
        Begin
          Mouse(695,270,10,10,true)
          Wait(1000+Random(500))
        End;
        if (FightStyle=3) then
        Begin
           Mouse(610,325,10,10,true)
           Wait(1000+Random(500))
        End;
        if (FightStyle=4) then
        Begin
           Mouse(690,320,10,10,true)
           Wait(1000+Random(500))
        End;
      End;
    End;

    //-----------------------------------------------//

    procedure AntiBans;
    begin
      LeaveScreenEvery(5 + random(5));
       RotateEvery(4 + random(3));
        BoredEvery(50+random(10));
       PickUpMouseEvery(64+random(13));
      RandomRClickEvery(15 + random(5));
    end;

    //-----------------------------------------------//

    procedure ProgressReport;
    begin
      ClearDebug;
      Writeln(' ______________________________________________ ');
      Writeln('|  Autofighter v1.00 by Gofez0r.               |');
      Writeln('|                                              |');
      Writeln('|  Killed '+IntToStr(Enemies)+' Enemies                                    |');
      Writeln('|______________________________________________|');
    end;


    //-----------------------------------------------//

    procedure setupzz;
    begin
      writeln('Changing mousespeed...')
        MouseSpeed := 6 +random(3)
        if (random (3)= 0) then
       MouseSpeed:= 6 + random(4);
      HighestAngle;
    end;

    //-----------------------------------------------//

    procedure SetUpPlayer;
    begin
     wait(4500+random(1000));
      writeln('Setting up player');
       SetFightingStyle;
        setupzz;
       writeln('Done.');
       writeln('');
     writeln('Now starting to fight.');
    end;

    //-----------------------------------------------//

    procedure login;
    begin
     if (loggedIn=true) then
      begin
       exit;
        end;
        wait(125+random(45))
        if LoggedIn=false then
        LoginPlayer;
      SetUpPlayer;
    end;

    //-----------------------------------------------//

    function Attackenemy1: boolean;
    begin
     if (not (LoggedIn))then
      Login;
       If (InFight) then
       result:= True
        if (result = true) then
        exit;
         repeat
          FindRandoms;
          Findtalk;
          if (FindColorTolerance(x1,y1,Monstercol1,197,61,384,204,Tolerance))Then
           MMouse(x1,y1,3,3);
            until (FindObj(x1,y1,partname,Monstercol1,Tolerance))

        if (FindObj(x1,y1,partname,Monstercol1,Tolerance))then
       repeat
        FindObj(x1,y1,partname,Monstercol1,Tolerance)
        Mouse(x1,y1,2,3,true)
       wait(1000+random(364))
        if (InFight) then
       Result:= true;
     until (result = true)
    end;

    //-----------------------------------------------//

    function Attackenemy2: boolean;
    begin
      if (not (LoggedIn))then
      Login;
       If (InFight) then
       result:= True
        if (result = true) then
         exit;
          repeat
           Findtalk;
           if (FindColorTolerance(x,y,Monstercol1,197,61,384,204,Tolerance))or
              (FindColorTolerance(x,y,Monstercol2,197,61,384,204,Tolerance))then
           MMouse(x1,y1,3,3);
            until (FindObj(x,y,partname,Monstercol2,Tolerance))

           if (FindObj(x,y,partname,Monstercol2,Tolerance))then
            repeat
            RealEatIfNeeded(foodcol,HPToEat,true)
              FindObj(x,y,partname,Monstercol2,Tolerance)
               Mouse(x,y,2,3,true)
              Findtalk;
             wait(2000+random(364))
           if (InFight) then
         Result:= true;
      until (result = true)
    end;

    //-----------------------------------------------//

    function WaitForEnd: boolean;
    var    WaitTime :Integer;

    begin
    if (Attackenemy1=true) or
       (AttackEnemy2=true) then
    begin
       If (InFight) Then
       Marktime(WaitTime)
       If (not (InFight)) Then
        result := true;
         if (result = true) then
         Attackenemy1;
          repeat
         AntiBans;
        wait(131 + random(63));
        Findrandoms;
       until(not(InFight))
      Enemies:= Enemies +1;
     end;
    end;

    //-----------------------------------------------//

    procedure mainloop;
    begin
     if (LoggedInAtStart=true) then
      begin
       Writeln('As u start the script logged in theres no need for setting the fightinstyle.');
        Writeln('');
         Writeln('So i assume u have set it urself.');
        end;
      repeat
        Attackenemy1;
         wait(45 + random(45));
          WaitForEnd;
           wait(45+random(73));
           Attackenemy2;
           wait(130 + random(145));
           WaitForEnd;
           wait(120+random(33));
           Attackenemy2;
           WaitForEnd;
           AntiBans;
           FindRandoms;
           RandomRandoms;
           if (pickarrows=true) then
           begin
           ArrowPickup;
           PutArrowsOn;
          end;
         progressreport;
        mainloop;
       FindNormalRandoms;
    until(Enemies = HowManyEnemies)
    writeln ('Done... Switching players...');
     logout;
    if (SwitchPlayers=false) then
     begin
      writeln('Apparently u dont want to change players.');
       writeln('')
       writeln('But still all done. Now terminating.');
      terminatescript;
     if (SwitchPlayers=true) then
       begin
         NextPlayer(true);
         if (not (LoggedIn)) then NextPlayer(False);
         Wait(9000+random(5500));
         writeln('Switched player, now doing setup.');
        SetUpPlayer;
      mainloop;
    end;
    end;
    end;

    //-----------------------------------------------//

    begin
      activateclient;
      MouseSpeed:= 7;
      ChatsOff
      SetUpSRL;
      ClearDebug;
      HighestAngle
      SetUpSRL;
      DeclarePlayers;
      Mainloop;
    end.

    //-----The end.-----//

    That's the autofighting script, when I try to run it, it says:

    Failed when compiling
    Line 24: [Error] (14863:11): Unknown identifier 'GetAmount' in script C:\Program Files\SCAR 3.06\includes\SRL/SRL/Skill/Ranging.scar


    This is my Ranging.scar :

    SCAR Code:
    //-----------------------------------------------------------------//
    //--               Scar Standard Resource Library                --//
    //--                      Ranging routines                       --//
    //-----------------------------------------------------------------//
    //
    // * function arrowamount: Integer;
    // * function getarrowcolor: Boolean;                             // *??/Freddy1900
    // * function findinvarrows(var arrowx, arrowy: Integer): Boolean;
    // * function invarrows: Integer;
    // * function EquipArrows: Boolean; // * Freddy1990

    var
      headcolorar, tailcolor: Integer;

    {*******************************************************************************
    function ArrowAmount: Integer;
    By: masquerader
    Description: Returns the number of equiped arrows.
    *******************************************************************************}


    function ArrowAmount: Integer;
    begin
      GameTab(5);
      Result := GetAmount(673, 249);
    end;

    {*******************************************************************************
    function GetArrowColor: Boolean;
    By: masquerader | Fixed by Freddy1990
    Description: Returns the number of equiped arrows.
    *******************************************************************************}


    function GetArrowColor: Boolean;
    begin
      if (ArrowAmount > 0) then
      begin
        Result := True;
        headcolorar := GetColor(700, 257);
        tailcolor := GetColor(688, 271);
        WriteLn('arrow head color: ' + IntToStr(headcolorar));
        WriteLn('tail color: ' + IntToStr(tailcolor));
      end;
    end;

    {*******************************************************************************
    function FindInvArrows(var arrowx, arrowy: Integer): Boolean;
    By: masquerader
    Description: Returns true if arrows are found in the inventory and the coordinates.
    *******************************************************************************}


    function FindInvArrows(var arrowx, arrowy: Integer): Boolean;
    var
      tailcoords: TPointArray;
      i, headx, heady: Integer;
    begin
      GameTab(4);
      tailcoords := ItemCoordsColor('inv', tailcolor, 0); //finds all arrow stacks
      if (GetArrayLength(tailcoords) > 0) then
      begin
        for i := 0 to GetArrayLength(tailcoords) - 1 do
        begin
          if (FindColor(headx, heady, headcolorar, tailcoords[i].x, tailcoords[i].y,
            tailcoords[i].x + 36, tailcoords[i].y + 42)) then
          begin //only one stack of headcolorar :)
            Result := True;
            arrowx := tailcoords[i].x;
            arrowy := tailcoords[i].y;
            Exit;
          end;
        end;
      end;
    end;

    {*******************************************************************************
    function InvArrows: Integer;
    By: masquerader
    Description: Returns the number of arrows in the inventory.
    *******************************************************************************}


    function InvArrows: Integer;
    var
      arrowx, arrowy: Integer;
    begin
      if (FindInvArrows(arrowx, arrowy)) then
        Result := GetAmount(arrowx, arrowy);
    end;

    {*******************************************************************************
    function EquipArrows: Boolean;
    By: Freddy1990
    Description: Equips arrows if they are found in the inventory.
    *******************************************************************************}


    function EquipArrows: Boolean;
    var
      xx, yy: Integer;
    begin
      Result := FindInvArrows(xx, yy);
      Wait(100 + Random(250));
      Mouse(xx, yy, 0, 0, True);
    end;

    Thanks to everyone trying to help. Please let me know what I need to do.

  9. #9
    Join Date
    Jun 2007
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  10. #10
    Join Date
    Jun 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well, try SRL 8.1 its fixed

  11. #11
    Join Date
    Jun 2007
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I installed SRL 8.1 by overwriting my old one. But it didn't seem to fix the problem. I am not sure if I installed it correctly, can someone please tell me the directions? Thanks

  12. #12
    Join Date
    Jun 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hi where didt u download SRL 8.1 from?

  13. #13
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  14. #14
    Join Date
    Jun 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Tq

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help getting this script to work
    By kollmann in forum OSR Help
    Replies: 3
    Last Post: 03-31-2008, 09:09 PM
  2. My script won't work???
    By Zeta in forum OSR Help
    Replies: 2
    Last Post: 08-07-2007, 07:32 AM
  3. cant get script to work
    By jones264 in forum OSR Help
    Replies: 1
    Last Post: 08-06-2007, 12:28 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
  •