Results 1 to 12 of 12

Thread: I have a REALLY big problem.... please help!

  1. #1
    Join Date
    Dec 2007
    Location
    Michigan, USA
    Posts
    280
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default I have a REALLY big problem.... please help!

    ok, my script worked fine about a week ago, but ever sense rev 14 update.... my script has just moved the mouse to 0,0 and not do anything... can someone help me out and mabey see why its doing it? heres the script:
    (btw its not finished, i havent implied my sleep in or fixed up responeder, just was testing and then was like WTF?!?!)
    SCAR Code:
    {/////|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\\\\\
    /////|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\\\\\
    |||||/                                                                   \|||||
    |||||                   PowerCutter Ver 4 Mikevskater                   |||||
    |||||          BIG Shout Out to JAD for his great tuts and advice!        |||||
    |||||            Thanks ALOT to pwnaz0r for fixing my cut procedure!      |||||
    |||||  Also big thanks to Timer, as well as richk1693 for all their help  |||||
    |||||     WORKING TREES ARE REGULAR, OAK, WILLOW, MAPLE, YEW, AND MAGIC   |||||
    |||||\                 Start by trees with axe equppied                  /|||||
    \\\\\|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||/////
     \\\\\|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||/////
    }

    program FirstScript;
    {.include srl/srl.scar}
    {.include srl/srl/skill/woodcutting.scar}
    {.include srl/srl/misc/Users.scar}

    var
      x, y, Logs, Clicks, TreeColor, xp, SleepCount, SleepOften, SleepTime: Integer;
      TreeName, Log: String;
      UseSleep: Boolean;
     
    ////////////////////////////////////////////////////////////////////////////////
    procedure DeclarePlayers;
    begin
      SRLPlayerForm(True, ['Use Sleeps', 'Use Responder'],
        ['Sleep How Often[mins]', 'How Long To Sleep[mins]'],
        ['Type of tree', 'SRL ID', 'SRL PASSWORD'], []);

      Usesleep := Players[CurrentPlayer].Booleans[0];
      SleepOften := Players[CurrentPlayer].Integers[0];
      SleepTime := Players[CurrentPlayer].Integers[1];
      SRLID := Players[CurrentPlayer].Strings[1];
      SRLPassword := Players[CurrentPlayer].Strings[2];

    end;
    ////////////////////////////////////////////////////////////////////////////////
    procedure Anti;
    begin
      FindNormalRandoms;
      if FindFight then
        RunAway('N', True, 1, 9000+random(1000));
    end;
    ////////////////////////////////////////////////////////////////////////////////
    procedure Antiban;
    begin
      case random(20) of
        0,3,6: BoredHuman;
        4,7,10: RandomMovement;
        8,11,14: PickUpMouse;
        12,15,18: HoverSkill('woodcutting', false);
        16,19: begin
                 Gametab(random(13+1));
                 wait(random(1000)+random(500));
                 Gametab(random(13+1));
                 wait(random(1000)+random(500));
                 Gametab(random(13+1));
                 wait(random(1000)+random(500));
                 gametab(4);
               end;
      end;
    end;
    ////////////////////////////////////////////////////////////////////////////////
    Function FindAxeIn: Boolean;
    var
      axe: Integer;
    begin
      axe := DTMFromString('78DA63B463626078C880021A9304C1342394C' +
           'FE80054739D010D30A2AAF101AAB949408D27A65D186AAC816A3E' +
           '1050630154F31EBF1A00027307E9');
      Gametab(5);
      wait(1000);
      If  finddtm(axe, x, y, MIX1, MIY1, MIX2, MIY2) then
        begin
          Writeln('Axe Found');
          result := true;
          exit;
        end;
      Gametab(4);
      wait(1000);
      If finddtm(axe, x, y, MIX1, MIY1, MIX2, MIY2) then
        begin
          Writeln('Axe Found');
          result := true;
        end;
      freedtm(axe);
    end;
    ////////////////////////////////////////////////////////////////////////////////
    Procedure CheckForBrokenAxe;
    var
      x, y, BrokenAxe: Integer;
    begin
      BrokenAxe := DTMFromString('78DA636C616260E0636440061D697C601A26C' +
      'AD80354C38FAA06260B57D30754C34D404D2F508D080135CD4035' +
      '5C04D4D400D5A8E05703008C0604B4');
      Gametab(4);
      wait(1000);
      if finddtm(BrokenAxe, x, y, MIX1, MIY1, MIX2, MIY2) then
        Logout;
      freedtm(BrokenAxe);
    end;
    ////////////////////////////////////////////////////////////////////////////////
    procedure Cut;
    var
      Inv, z: Integer;
    begin
      repeat
        CheckForBrokenAxe;
        if FindColorTolerance(x, y, treecolor, MSX1, MSY1, MSX2, MSY2, 15) then
        begin
          mmouse(x,y,0,0);
          wait(500);
          if isuptext(treename) and not(findent(x, y, true)) then
          begin
            Inv := InvCount;
            Mouse(x, y, 0, 0, True);
            z := 0;
            FFlag(0);
            Clicks := Clicks + 1
            ReportVars[1] := ReportVars[1] + 1;
            Anti;
            repeat
              wait(250+random(250));
              z := z+1;
              Anti;
            until(InvCount > Inv) or (z > 100) or InvFull;
            Anti;
          end;
        end;
      until(InvFull);
    end;
    ////////////////////////////////////////////////////////////////////////////////
    Procedure Drop;// By Timer150
    var
      i: Integer;
      ItemPoint: TPoint;
    begin
      GameTab(4);
      Wait(500 + Random(500));
      for i := 1 to 28 do
        if (ExistsItem(i)) then
        begin
          ItemPoint := ItemCoords(i);
          MMouse(ItemPoint.x, ItemPoint.y, 5, 5);
          Wait(250 + Random(60));
          if IsUpText(Log) then
          begin
            Mouse(ItemPoint.x, ItemPoint.y, 5, 5, False);
            Wait(250 + Random(50));
            ChooseOption('rop');
            logs := logs + 1;
            ReportVars[0] := ReportVars[0] + 1;
            case Treename of
            'ree': begin
                     xp := xp + 25;
                     ReportVars[2] := ReportVars[2] + 25;
                   end;
            'ak': begin
                    xp := xp + 37;
                    ReportVars[2] := ReportVars[2] + 37;
                  end;
            'illow': begin
                       xp := xp + 67;
                       ReportVars[2] := ReportVars[2] + 67;
                     end;
            end;
          end;
        end;
      ArrangeInv;
    end;
    ////////////////////////////////////////////////////////////////////////////////
    procedure Proggy;
    begin
      ClearDebug;
      Writeln('/-----------------------------------\');
      Writeln('|    PowerCutter by MikeVSkater     |');
      Writeln('\-----------------------------------/');
      Writeln('/-----------------------------------\');
      writeln('Clicks: ' + inttostr(clicks));
      Writeln('Logs: ' + inttostr(logs));
      Writeln('Time: ' + TimeRunning);
      Writeln('Xp Gaind: ' + inttostr(xp));
      Writeln('\-----------------------------------/');
    end;
    ////////////////////////////////////////////////////////////////////////////////
    procedure Signature;
    begin
      ClearDebug;
      Writeln('PowerCutter ver4 made by Mikevskater');
      wait(1000);
      Writeln('This is my first script so please help me '+
       'on anything you know that I dont?');
      Wait(5000+random(1000))
    end;
    ////////////////////////////////////////////////////////////////////////////////
    procedure Setup;
    begin
      case LowerCase(Players[CurrentPlayer].Strings[0]) of
      'tree': begin
                TreeColor := 1190181;
                TreeName := 'ree';
                Log := 'ogs';
              end;
      'oak': begin
               TreeColor := 2317131;
               TreeName := 'ak';
               Log := 'ak logs';
             end;
      'willow': begin
                  TreeColor := 5078394;
                  TreeName := 'illow';
                  Log := 'illow logs';
                end;
      'maple': begin
                 TreeColor := 11361;
                 TreeName := 'aple tree';
                 Log := 'aple logs';
               end;
      'yew': begin
               TreeColor := 4095344;
               TreeName := 'ew';
               Log := 'ew logs';
             end;
      'magic': begin
                 TreeColor := 10677746;
                 TreeName := 'agic tree';
                 Log := 'agic logs';
               end;
      end;
    end;
    ////////////////////////////////////////////////////////////////////////////////
    procedure LevelRespond;
    var
      Level, loop : Integer;
      LvLookfor : TStringArray;
    begin
      if not (Players[CurrentPlayer].Booleans[1] = false) then
        Exit;
      LvLookfor := ['oodcutting l', 'cuttin lv', 'odcut le', 'cutin lvl'];
      for loop := 0 to 3 do
      begin
        if InChat(LvLookFor[loop]) then
        begin
          Level := GetSkillInfo('fletching', False);
          case Random(5) of
            0: TypeSend(IntToStr(Level));
            1: TypeSend(IntToStr(Level)+'FTW');
            2: TypeSend(IntToStr(Level) + ' here');
            3: TypeSend('Im ' + IntToStr(Level));
            4: TypeSend('...'+IntToStr(Level));
          end;
        end;
      end;
      if inchat(Players[CurrentPlayer].Nick) then
        case random(3) of
          0: Typesend('???');
          1: typesend('Hi?');
          2: Typesend('You!');
        end;
    end;
    ////////////////////////////////////////////////////////////////////////////////
    begin
      SetupSRL;
      ScriptID := '599';
      DeclarePlayers;
      Setup;
      Signature;
      If SRLID = '' then
      begin
        ClearDebug;
        Writeln('Register at SRL now and stop Leech`n');
        Writeln('Please go to : http://www.srl-forums.com/forum/register.php');
        TerminateScript;
      end;
      wait(100 + Random(500));
      ActivateClient;
      Writeln('Found RuneScape');
      Wait(500 + random(50));
      If (not Loggedin) then
        LoginPlayer;
      SetAngle(True);
      MakeCompass('N');
      wait(2000);
      MarkTime(SleepCount);
      FindAxeIn;
      if FindAxein = false then
      begin
        Writeln('Axe not found');
        Logout;
        TerminateScript;
      end;
      repeat
        Cut;
        AntiBan;
        Anti;
        LevelRespond;
        Drop;
        Anti;
        AntiBan;
        Proggy;
        SRLRandomsReport;
      until(False)
    end.
    Thanks to anyone who helps me out also, mind tellin me if this script can be member material once im finished?
    Kindof Inactive...

  2. #2
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    lol you didnt set the variable 'treecolor" to anything...
    METAL HEAD FOR LIFE!!!

  3. #3
    Join Date
    Dec 2007
    Location
    Michigan, USA
    Posts
    280
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by gerauchert View Post
    lol you didnt set the variable 'treecolor" to anything...
    umm yeah lol... here look
    SCAR Code:
    procedure Setup;
    begin
      case LowerCase(Players[CurrentPlayer].Strings[0]) of
      'tree': begin
                TreeColor := 1190181;
                TreeName := 'ree';
                Log := 'ogs';
              end;
      'oak': begin
               TreeColor := 2317131;
               TreeName := 'ak';
               Log := 'ak logs';
             end;
      'willow': begin
                  TreeColor := 5078394;
                  TreeName := 'illow';
                  Log := 'illow logs';
                end;
      'maple': begin
                 TreeColor := 11361;
                 TreeName := 'aple tree';
                 Log := 'aple logs';
               end;
      'yew': begin
               TreeColor := 4095344;
               TreeName := 'ew';
               Log := 'ew logs';
             end;
      'magic': begin
                 TreeColor := 10677746;
                 TreeName := 'agic tree';
                 Log := 'agic logs';
               end;
      end;
    end;
    lol, did i screw somthin up or somthin?
    Kindof Inactive...

  4. #4
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default



    sry its early here and i guess i skimmed past that lol.

    ill keep looking and edit when i find it

    EDIT: Cant seem to find anything that is wrong with the coding...so try picking a better color for the tree you are trying to find i guess. If the script doesnt find the color it will move the mouse to the upper right corner.

    Maybe try making an array of colors and doing a for to do loop when looking for the tree...
    METAL HEAD FOR LIFE!!!

  5. #5
    Join Date
    Dec 2006
    Location
    .̿̂̔͋͗̎̆ͥ̍̒ͤ͂̾̌̀̅
    Posts
    3,012
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    It might be moving mouse to 0,0 because you make it to move mouse to a coordinate even if a color is not found, which means the returned coordinates are 0,0? ...

    For example..
    SCAR Code:
    Colorfindingcrap;
    MoveMouseToTheColorCrap;

    ...
    if (ColorFoundCrap) then
      MoveMouseToTheColorCrap;

    Dunno though, I'll take a better look at the script a bit later.. Busy atm.

  6. #6
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Try a different color, or higher tol.

  7. #7
    Join Date
    Dec 2007
    Location
    Michigan, USA
    Posts
    280
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i dont think its the color.... becuase if it doesnt find the color, it shouldnt move the mouse then right?!
    Kindof Inactive...

  8. #8
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by gerauchert View Post
    : If the script doesnt find the color it will move the mouse to the upper right corner.
    yes. pick some different colors and make an array lol
    METAL HEAD FOR LIFE!!!

  9. #9
    Join Date
    Dec 2007
    Location
    Michigan, USA
    Posts
    280
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    alright, ill make an array, and post if the problem is fixed
    ps. gerauchert what township do you live in!?!?
    Kindof Inactive...

  10. #10
    Join Date
    Feb 2008
    Location
    Australia
    Posts
    253
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yeh i feel ur pain i get the problem

  11. #11
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Not sure, debug it.
    I think FindEnt screws it up

    Try to replace Cut with this

    SCAR Code:
    procedure Cut;
    var
      Inv, z, tx, ty: Integer;
    begin
      repeat
        CheckForBrokenAxe;
        if FindColorTolerance(x, y, treecolor, MSX1+5, MSY1+5, MSX2, MSY2, 15) then
        begin
          Writeln('FindColorTolerance returned true,'+#13+' X = '+inttostr(x)+', Y = '+inttostr(y));
          mmouse(x,y,0,0);
          wait(500);
          tx := x;
          ty := y;
          if isuptext(treename) and not(findent(tx, ty, true)) then
          begin
            Inv := InvCount;
            Mouse(x, y, 0, 0, True);
            z := 0;
            FFlag(0);
            Clicks := Clicks + 1
            ReportVars[1] := ReportVars[1] + 1;
            Anti;
            repeat
              wait(250+random(250));
              z := z+1;
              Anti;
            until(InvCount > Inv) or (z > 100) or InvFull;
            Anti;
          end;
        end else Writeln('FindColorTolerance returned false,'+#13+' X = '+inttostr(x)+', Y = '+inttostr(y));
      until(InvFull);
    end;
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

  12. #12
    Join Date
    Dec 2007
    Location
    Michigan, USA
    Posts
    280
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok... i added an array, and it clicks on trees, but the first array always moves mouse to 0,0, then secound moves to the top rightish.... then it clicks ona tree... so i guess i fixed? or should i try somthing else? I was thinking of putting in tpa's would that be better?
    Kindof Inactive...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. problem...
    By Blumblebee in forum OSR Help
    Replies: 4
    Last Post: 12-28-2008, 07:22 AM
  2. help big problem
    By goblanca in forum OSR Help
    Replies: 3
    Last Post: 05-19-2007, 10:41 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
  •