Results 1 to 8 of 8

Thread: whats wrong with my script !?!?!?!!?

  1. #1
    Join Date
    Mar 2007
    Location
    Ohio
    Posts
    138
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    whats wrong with my script !?!?!?!!?

    I'm getting realy mad my miner will not work it just sits there it worked fine until i added multiplayer and messed with the main line... Can someone point me in the right direction because it used to work well... Just look it over and help me please.
    SCAR Code:
    { This Is Stamp's AutoMiner  )
    (  This is my first Script!  )
    (    The Only Setup is...    )
    (     Players!! NEW!!!!      }

       //  By Stampede10343  \\
       
    program StampMinerV2;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/skill/Mining.scar}


    /////////////////////////////////////
    ///////////////Setup/////////////////
    /////////////////////////////////////

    const
    StartPlayer =  0;//Player Number To Start with in array(Should be fine)
    RockTol     =  11;// Rock Tolerance
    TotalLoads  =  5;// Loads You Want Dropped
    WaitTime    =  8000;//Mseconds + Random 1000 until click again
    AntiBanness =  22;// How Much AntiBan You Want, 15-25ish Lower is More
    RunDir      =  'N';// Run if in fight where?
    //^^(Copper, Tin, Addy, Mith, iron, coal, Gold, Clay, Silver)^^

    // Dont Touch Below!!
    Const
      CopperColor       = 4418196;
      TinColor          = 7829375;
      ClayColor         = 5608886;
      IronColor         = 2569045;
      SilverColor       = 12434885;
      CoalColor         = 2834753;
      GoldColor         = 1881051;
      MithrilColor      = 7359564;
      AdamantColor      = 6322272;
     
    var
    o, Loads, Ore1, XX, YY : Integer;
    RockColor1, Waiting : Integer;

    procedure DeclarePlayers;
    begin
         HowManyPlayers := 2;//MAKE SURE THIS ONE IS CORRECT!

         CurrentPlayer := StartPlayer;
         NumberOfPlayers(HowManyPlayers);

         Players[0].Name    :='taco10343';
         Players[0].Pass    :='wsfghyu';
         Players[0].Active  := True;
         Players[0].Nick    :='rio';//Set This for talking randoms, middle of name
         Players[0].String1 := 'Copper';

         
    NickNameBMP:= CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
    end;


    Procedure AntiBann;
     Begin
       Case Random(AntiBanness) of
        0 : FTWait(5);
        2 : AlmostLogOut;
        4 : GameTab(1 + random(5));
        6 : HoverSkill('Smithing', false);
        8 : RandomRClick;
        10: begin SleepAndMoveMouse(15000)end
       end;
     end;
     
    procedure AntiRandoms;
    Begin
      FindNormalRandoms;
       FindTalk;
      MakeCompass('N');
    end;

    procedure UseAutoColors;
    Begin
      case LowerCase(Players[CurrentPlayer].String1) of
        'copper' : RockColor1 := CopperColor;
        'tin'    : RockColor1 := TinColor;
        'clay'   : RockColor1 := ClayColor;
        'iron'   : RockColor1 := IronColor;
        'silver' : RockColor1 := SilverColor;
        'coal'   : RockColor1 := CoalColor;
        'gold'   : RockColor1 := GoldColor;
        'mithril': RockColor1 := MithrilColor;
        'adamant': RockColor1 := AdamantColor;
      end;
    end;

    Procedure ChopDemRockz;
    Begin
    if not (LoggedIn)then exit;
    MakeCompass('N');
     AntiRandoms;
     FindPick;
     AntiBann;
     If FindGas(xx, yy - 10) Then
      Begin
       RunAwayDirection(RunDir);
       wait(10000 - random(1000));
       RunBack;
       FindPick;
      repeat
     if(FindColorSpiralTolerance(xx, yy, RockColor1,0, 0, 700, 700, RockTol))then
      begin
      MarkTime(Waiting);
        MMouse(xx, yy, 8, 8);
         wait(100+random(200));
        getmousepos(xx, yy);
        end
       if(IsUpText('ine'))then
       begin
      Mouse(xx, yy, 0, 0, true);
      end
     until(Inchat('anage')) or (TimeFromMark(Waiting)>= WaitTime);
    end;
    end;

    procedure DropOres;
    Begin
    if(not(InvFull))then Exit;
     if(InvFull)then
    Begin
    FindPick;
    AntiRandoms;
    x := 0;
    y := 0;
    AntiBann;
    GameTab(4);

    repeat
    if(FindDTM(Ore1, x, y , MIX1, MIY1, MIX2, MIY2))then
    begin
    MMouse(x, y, 2, 2);
    wait(100 + random(100));
    Mouse(x + 2, y, 2, 2, false);
    wait(120 + random(100));
    ChooseOption(x, y, 'rop');
    wait(655 + random(100));
    o := o + 1;
    end;
    until not(FindDTM(Ore1, x, y, MIX1, MIY1, MIX2, MIY2));
    Loads := Loads + 1;
    Players[CurrentPlayer].Banked := Players[CurrentPlayer].Banked + 1;
    end;
    end;

    Procedure Proggy;
    Begin
    ClearDebug;
    Wait(300);
    WriteLn('<==================================>       ');
    wait(300);
    WriteLn('       Mined '+inttostr(o)+' Ores          ');
    wait(300);
    WriteLn('       Mined '+inttostr(Loads)+' Loads     ');
    wait(300);
    WriteLn('       By Stampede10343!                   ');
    wait(300);
    Writeln('Worked For: '+ ScriptTime2(2)               );
    WriteLn('<==================================>       ');
    wait(100+random(100));
    end;

    begin
    SetUpSRL;
    DeclarePlayers;
    UseAutoColors;
    Loads := 0
    o     := 0
    MouseSpeed := 3;
    ActivateClient;
    SetupSRLMining;
    Ore1 := DTMFromString('78DA634C66626078CE800618914820DD08547' +
           '38F809A5AA09A37B8D580712150CD274C352CC86A72816A6EE236' +
           '87198801CA5906DE');
    repeat;
    if(not(LoggedIn))then
    begin
    LoginPlayer;
    MakeCompass('N');
    HighestAngle;
    end;

    repeat;
    FindPick;
    ChopDemRockz;
    if(not(LoggedIn))then
    begin
    NextPlayer(false);
    end;
    until(InvFull);
    DropOres;
    Proggy;
    until(false);
    end.

  2. #2
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    u dont have login
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  3. #3
    Join Date
    Oct 2006
    Posts
    161
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    no he has loginplayer;but he has next player false also please dont put your RS username/pass into posts, it is dangerous, and i have seen ppl get hacked for it.(plus if a rs mod reads post.................)

  4. #4
    Join Date
    Mar 2007
    Location
    Ohio
    Posts
    138
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  5. #5
    Join Date
    Apr 2007
    Location
    California
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I ran through your script and fixed some errors. First of all, use scripting standards. It'll make it easier for people to help you. Also, try not to capitalize any letters in bold words. Make sure to put ;s after each end (i found one or two that were just "end"). I fixed the standards and some small errors, here's the fixed version.

    SCAR Code:
    { This Is Stamp's AutoMiner  )
    (  This is my first Script!  )
    (    The Only Setup is...    )
    (     Players!! NEW!!!!      }

       //  By Stampede10343  \\

    program StampMinerV2;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/skill/Mining.scar}


    /////////////////////////////////////
    ///////////////Setup/////////////////
    /////////////////////////////////////

    const
    StartPlayer =  0;//Player Number To Start with in array(Should be fine)
    RockTol     =  11;// Rock Tolerance
    TotalLoads  =  5;// Loads You Want Dropped
    WaitTime    =  8000;//Mseconds + Random 1000 until click again
    AntiBanness =  22;// How Much AntiBan You Want, 15-25ish Lower is More
    RunDir      =  'N';// Run if in fight where?
    //^^(Copper, Tin, Addy, Mith, iron, coal, Gold, Clay, Silver)^^

    // Dont Touch Below!!
    Const
      CopperColor       = 4418196;
      TinColor          = 7829375;
      ClayColor         = 5608886;
      IronColor         = 2569045;
      SilverColor       = 12434885;
      CoalColor         = 2834753;
      GoldColor         = 1881051;
      MithrilColor      = 7359564;
      AdamantColor      = 6322272;

    var
    o, Loads, Ore1, XX, YY : Integer;
    RockColor1, Waiting : Integer;

    procedure DeclarePlayers;
    begin
         HowManyPlayers := 2;//MAKE SURE THIS ONE IS CORRECT!

         CurrentPlayer := StartPlayer;
         NumberOfPlayers(HowManyPlayers);

         Players[0].Name    :='taco10343';
         Players[0].Pass    :='wsfghyu';
         Players[0].Active  := True;
         Players[0].Nick    :='rio';//Set This for talking randoms, middle of name
         Players[0].String1 := 'Copper';


    NickNameBMP:= CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
    end;


    procedure AntiBann;
    begin
      Case Random(AntiBanness) of
        0 : FTWait(5);
        2 : AlmostLogOut;
        4 : GameTab(1 + random(5));
        6 : HoverSkill('Smithing', false);
        8 : RandomRClick;
        10: begin SleepAndMoveMouse(15000)end
      end;
    end;

    procedure AntiRandoms;
    begin
      FindNormalRandoms;
      FindTalk;
      MakeCompass('N');
    end;

    procedure UseAutoColors;
    begin
      case LowerCase(Players[CurrentPlayer].String1) of
        'copper' : RockColor1 := CopperColor;
        'tin'    : RockColor1 := TinColor;
        'clay'   : RockColor1 := ClayColor;
        'iron'   : RockColor1 := IronColor;
        'silver' : RockColor1 := SilverColor;
        'coal'   : RockColor1 := CoalColor;
        'gold'   : RockColor1 := GoldColor;
        'mithril': RockColor1 := MithrilColor;
        'adamant': RockColor1 := AdamantColor;
      end;
    end;

    procedure ChopDemRockz;
    begin
      if not (LoggedIn)then exit;
      MakeCompass('N');
      AntiRandoms;
      FindPick;
      AntiBann;
      if FindGas(xx, yy - 10) Then
      begin
        RunAwayDirection(RunDir);
        wait(10000 - random(1000));
        RunBack;
        FindPick;
        repeat
          if(FindColorSpiralTolerance(xx, yy, RockColor1,0, 0, 700, 700, RockTol))then
          begin
            MarkTime(Waiting);
            MMouse(xx, yy, 8, 8);
            Wait(100+random(200));
            GetMousePos(xx, yy);
          end;
          if(IsUpText('ine'))then
          begin
            Mouse(xx, yy, 0, 0, true);
          end;
        until(Inchat('anage')) or (TimeFromMark(Waiting)>= WaitTime);
      end;
    end;

    procedure DropOres;
    begin
      if(not(InvFull))then Exit;
      if(InvFull)then
      begin
        FindPick;
        AntiRandoms;
        x := 0;
        y := 0;
        AntiBann;
        GameTab(4);
        repeat
          if(FindDTM(Ore1, x, y , MIX1, MIY1, MIX2, MIY2))then
          begin
            MMouse(x, y, 2, 2);
            Wait(100 + random(100));
            Mouse(x + 2, y, 2, 2, false);
            Wait(120 + random(100));
            ChooseOption(x, y, 'rop');
            Wait(655 + random(100));
            o := o + 1;
          end;
        until not(FindDTM(Ore1, x, y, MIX1, MIY1, MIX2, MIY2));
        Loads := Loads + 1;
        Players[CurrentPlayer].Banked := Players[CurrentPlayer].Banked + 1;
      end;
    end;

    procedure Proggy;
    begin
      ClearDebug;
      Wait(300);
      WriteLn('<==================================>       ');
      Wait(300);
      WriteLn('       Mined '+inttostr(o)+' Ores          ');
      Wait(300);
      WriteLn('       Mined '+inttostr(Loads)+' Loads     ');
      Wait(300);
      WriteLn('       By Stampede10343!                   ');
      Wait(300);
      Writeln('Worked For: '+ ScriptTime2(2)               );
      WriteLn('<==================================>       ');
      Wait(100+random(100));
    end;

    begin
      SetUpSRL;
      DeclarePlayers;
      UseAutoColors;
      Loads := 0
      o     := 0
      MouseSpeed := 3;
      ActivateClient;
      SetupSRLMining;
      Ore1 := DTMFromString('78DA634C66626078CE800618914820DD08547' +
           '38F809A5AA09A37B8D580712150CD274C352CC86A72816A6EE236' +
           '87198801CA5906DE');
      repeat;
        if(not(LoggedIn))then
        begin
          LoginPlayer;
          MakeCompass('N');
          HighestAngle;
        end;
        repeat;
          FindPick;
          ChopDemRockz;
          if(not(LoggedIn))then
          begin
            NextPlayer(false);
          end;
        until(InvFull);
        DropOres;
        Proggy;
      until(false);
    end.

    Also, you can make the main loop a little less cluttered by doing this.
    SCAR Code:
    procedure LoadImages; //This makes it easier if you add more bitmaps or
    begin                 // DTMs later on.
      Ore1 := DTMFromString('78DA634C66626078CE800618914820DD08547' +
           '38F809A5AA09A37B8D580712150CD274C352CC86A72816A6EE236' +
           '87198801CA5906DE');
    end;

    procedure SetUpScript;
    begin
      SetUpSRL;
      SetUpSRLMining;
      DeclarePlayers;
      LoadImages;
      UseAutoColors;
      Loads := 0
      o     := 0
      MouseSpeed := 3;
    end;

    procedure FreeImages; //You didn't free the bitmap aftewards.
    begin
      FreeBitmap(Ore1);
    end;

    begin
      SetUpScript;
      ActivateClient;
      repeat;
        if(not(LoggedIn))then
        begin
          LoginPlayer;
          MakeCompass('N');
          HighestAngle;
        end;
        repeat;
          FindPick;
          ChopDemRockz;
          if(not(LoggedIn))then
          begin
            NextPlayer(false);
          end;
        until(InvFull);
        DropOres;
        Proggy;
      until(false);
    end.

    And as i said above, you need to free the images too. To help explain standards, from what i remember, it's

    • Two spaces after every begin
    • Two spaces after every repeat
    • Back two spaces for every end
    • Back two spaces for every until


    or something like that.

  6. #6
    Join Date
    Mar 2007
    Location
    Ohio
    Posts
    138
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  7. #7
    Join Date
    Feb 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Line 432: [Hint] (10382:1): Variable 'OLDMS' never used in script C:\Program Files\SCAR 3.12\includes\SRL/SRL/Core/AntiRandoms/AntiRandoms.scar

    Line 52: [Error] (12901:12): Unknown identifier 'STRING1' in script

    help pls

  8. #8
    Join Date
    Mar 2007
    Location
    Ohio
    Posts
    138
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    dont gravedig this script is so old its not even on my computer, and theres not even 400 some lines in it

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. whats wrong with this script
    By psychojamesd in forum OSR Help
    Replies: 3
    Last Post: 08-02-2007, 01:59 AM
  2. Script, whats wrong
    By Camaro' in forum OSR Help
    Replies: 10
    Last Post: 06-01-2007, 01:15 AM
  3. Whats wrong in my script?
    By Intef i i i in forum OSR Help
    Replies: 2
    Last Post: 04-10-2007, 03:29 PM
  4. whats wrong with this script?
    By fugate in forum OSR Help
    Replies: 14
    Last Post: 01-16-2007, 04:44 AM
  5. Replies: 7
    Last Post: 11-26-2006, 03:39 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
  •