Results 1 to 12 of 12

Thread: Basic problems with a nice script.

  1. #1
    Join Date
    Jul 2007
    Location
    New Zealand FTW!
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Basic problems with a nice script.

    Code:
    EDIT: FIXED BUGS BUT SOME HELP STILL NEEDED. TY DA_OWNER FOR HELP ON SOME BUGS! NOW ON V1.3! PROBLEMS I STILL NEED HELP WITH ARE IN RED!!
    
    EDITV2: FIXED BUGS BUT SOME HELP STILL NEEDED. TY DA_OWNER FOR HELP ON SOME BUGS! NOW ON V1.4! PROBLEMS I STILL NEED HELP WITH ARE IN RED!! ALSO TY FLOOR66 FOR HELP ON DROPING AND AXE EQUIPT!!!


    Ok iv been working on this script today from scratch reading tuts, other peoples scripts and seeing hoe they use various things.

    Also some methods i use may easily be bannable to links to tuts to improve these or tips are much appreciated. now to the script. I was trying to make it to the SRL standards and i think my Anti ban + Anti randoms are in good order.

    I only need help on player switching, Fail safes, Auto responder.

    SCAR Code:
    program Powercutt0rpl0x;
    {.include SRL/SRL/Misc/Smart.scar}
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Woodcutting.scar}

    var
      TreeCol,cut,justtalked,chatmsg,x,y,Rested,Worked,Loads : integer;
      Proggystr: String;



    const

    YourSRLStatsID   =  ''; // Not currently working however put yours in if you wish
    YourSRLStatsPass =  ''; // Password for the SRL stats
    SmartWorld = 11;   //world you want smart to load
    TreeType = 'yew'; //set tree type. vaild arguemants are ~normal, willow, yew~
    Loadstodo = 10; // Amout of logs to powercut/drop.

      ScriptName = 'Powercutt0rpl0x';
      Versionn = '1.4'; //do not change!

    procedure DeclarePlayers;
     begin
      HowManyPlayers := 2; //change according to how many players needed
      CurrentPlayer := 0; //player to start with
      NumberOfPlayers(HowManyPlayers); //dont touche

      Players[0].Name := ''; //user name
      Players[0].Pass := ''; //pass
      Players[0].Nick := ''; //3-4 letters of user
      Players[0].Booleans[0] := False; //Axe equipped?
      Players[0].BoxRewards := ['ostume'];
      Players[0].Active := True; //true=active   false=not active

      Players[1].Name := '';
      Players[1].Pass := '';
      Players[1].Nick := '';
      Players[1].Booleans[0] := False; //Axe equipped?
      Players[0].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal'];
      Players[1].Active := False;
     end;



    procedure Sig;
    begin
      ClearDebug;
      Writeln('__________                    .___    ^^^             Presents...');
      Wait(200);
      Writeln('\______   \____________     __| _/   (O.o)|}                        POWER');
      wait(200);
      Writeln('|    |  _/\_  __ \__  \   / __ |     _ | _|');
      Wait(200);
      Writeln('|    |   \ |  | \// __ \_/ /_/ |      \|/ |                    Cutt0r');
      wait(200);
      Writeln('|______  / |__|  (____  /\____ |       |');
      Wait(200);
      Writeln('       \/             \/      \/       -                                          PL0x?!');
      Wait(200);
      Writeln('                         Brad734     _/ \_');
      Wait(2000);


    end;

    procedure proggy;
    begin
      ClearDebug;
      Writeln('====== '+Padr(ScriptName+' '+Versionn, 27)+' ======');
      Writeln('==================================================');
      Writeln('    [         By Brad734        ]');
      Writeln('' + Padr('Current Player: ' + Players[CurrentPlayer].Nick, 40) + '');
      Writeln('logs cut n Dropped:' + IntToStr(Cut));
      Writeln('Worked for '+TimeRunning);
      Writeln('==================================================');
    end;

    procedure VerCheck;
    var
      Version, Ver : string;
      begin
      Ver:= '1.4'; //DO NOT CHANGE THIS!! (not currently working)
      Version:= GetPage('http://powercutt0rpl0x.webs.com/Version.txt');
      if Version <> Ver then

      begin
        ClearDebug;
        WriteLn('------------------------------------------------------------');
        WriteLn('Your version is not the latest. Get the latest version from:');
        WriteLn('http://villavu.com/forum/showthread.php?p=603765#post603765 ');
        WriteLn('------------------------------------------------------------');
        TerminateScript;
      end else
      WriteLn('The script is up to date.');
      Wait(3500);
      ClearDebug;
      end;

      procedure NewsFlash;
    var
      News : string;

    begin
      News:= GetPage('http://powercutt0rpl0x.webs.com/News.txt');
      WriteLn(News);
      Wait(5000);
      ClearDebug;
    end;

    Procedure AntiRandoms;
    begin
      FindNormalRandoms;
      If(FindFight) then
      begin
        RunAway('N', True,1,15000);
        Disguise('Found random... RUNNING!');
        Wait(5000+random(5000));

      end;
      FindLamp('woodcutting');
    end;

    Procedure AntiBan;
    begin
      case(Random(100)) of
        1: HoverSkill('woodcutting', false);
        2: BoredHuman;
        3: MMouse(Random(750), Random(750), Random(100), Random(100));
        4: PickupMouse;
        5: Gametab(random(12));
        6: begin
             case(random(5)) of
               0: makecompass('N');
               1: makecompass('S');
               2: makecompass('E');
               3: makecompass('W');
             end;
           end;

        7: Pickupmouse;
        8: wait(5000+random(10000));
        9: RandomRClick;
        10: RandomMovement;
      end;
    end;

    procedure Treecolor;
    begin
      case lowercase(TreeType) of
        'normal':
       begin
         case random(3) of
           0 : TreeCol := 2186319;
           1 : TreeCol := 4488562;
           2 : TreeCol := 3893086;
         end;
       end;
       
       'willow' :
      begin
         case random(3) of
           0 : Treecol := 3098941;
           1 : Treecol := 2312763;
           2 : Treecol := 4157534;
           
           end;
          end;
         
          'yew' :
        begin
          case random(3) of
           0 : Treecol := 1988171;
           1 : Treecol := 2183239;
           2 : Treecol := 2975578 ;
          end;
        end;
       end;
      end;
     

    Procedure WaitWhileChop;
    Var mrk : Integer;
    Begin
    if not LoggedIn then Exit;
      MarkTime(mrk);
     Repeat
       antirandoms;
       FindEnt(x, y, True);
         Case Random(4) Of
           0 : GameTab(1 + Random(12));
            end;
           Wait(900 + Random(100));
           GameTab(4);
           SleepAndMoveMouse(4000 + Random(3000));
           FindEnt(x, y, True);
          antirandoms;
         Until(Not IsUpText('own')) Or (TimeFromMark(mrk) > 13000 + Random(3000));
         end;


    procedure CutTree;
    var
      X, Y: Integer;
    begin
    antirandoms;
    FindEnt(x, y, True);
    Disguise('cutting tree');
     if FindColorSpiral(X, Y, Treecol, MSX1, MSY1, MSX2, MSY2) then
      begin
        mmouse( x, y, 4, 4 );
        wait(80+random(60));

          GetMousePos(X, Y);
          Wait(50+random(75));
          Mouse(X, Y, 0, 0, True);
          waitwhilechop;
          wait(2 + random(3));
          antirandoms;

      end;
    end;

    Procedure DropLogs;
    Var
      i : Integer;
    Begin
      For i := (Integer(Not(Players[CurrentPlayer].Booleans[0])) + 1) To 28 Do
        DropItem(i);
    End;

    procedure beginplayer;
     begin
      SetRun(True);
       MakeCompass('N');
     end;


    procedure mainloop;
    begin
     ClearDebug;
      Disguise('Calculator');
     //  Vercheck; (not currently working.)
        NewsFlash;
         sig;
          SetupSRL;
           Writeln('Waiting For SMART to Start...');
            wait(2000);
           SRLID := YourSRLSTATSID;
         SRLPassword:= YOURSRLSTATSPASS;
        DeclarePlayers;
       ActivateClient;
      Loginplayer;
     beginplayer;
      Treecolor;
      repeat
       repeat
        Cuttree;
        until Invfull;
       if invfull then
        begin
         droplogs;
        cut := cut + 27;
       proggy;
       end;
      until False;
    end;

     begin
     mainloop;
     end.

    Keep in mind this is my first script and im proud of it and all its flaws means im learning.

    Hard copy of the same script is attached below

    ~Brad
    Last edited by brad734; 07-21-2009 at 05:15 PM.
    The SRL team brings all the mods to the yard,
    And their like, "We kno u bot hard",
    "Damn right, We DO bot hard",
    "But you cant catch us, cos we use S.M.A.R.T!"

  2. #2
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    How would we find a problem in such a big script, you are just saying it doesn't click trees.. But did you test the cutting tree procedure alone? Like opening an empty scar file, put in you procedure and a basic mainloop. And delete al things like SRL-ID, declare players, Smart....

    Like this;

    Code:
    program Powercutt0rpl0x;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Woodcutting.scar}
    
    procedure CutTree;
    var
      X, Y: Integer;
    begin
     if FindColorSpiral(X, Y, 3098941 , MSX1, MSY1, MSX2, MSY2) then //I replaced the Treecol var with 3098941 (your willow color)
      begin
        Writeln('found tree');
        mmouse( x, y, 4, 4 );
        wait(80+random(60));
        Writeln('Move Mouse');
        if isuptext('hop') then
        begin
          Writeln('click!');
          GetMousePos(X, Y);
          Wait(50+random(75));
          Mouse(X, Y, 4, 4, True);
          wait(200)
        end;
      end;
    end;
    
    begin
     CutTree;
    end.
    And its "Chop down" not "Cut down" So looking for uptext tut is worthless!!!

  3. #3
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by masterBB View Post
    How would we find a problem in such a big script, you are just saying it doesn't click trees.. But did you test the cutting tree procedure alone? Like opening an empty scar file, put in you procedure and a basic mainloop. And delete al things like SRL-ID, declare players, Smart....

    Like this;

    Code:
    program Powercutt0rpl0x;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Woodcutting.scar}
    
    procedure CutTree;
    var
      X, Y: Integer;
    begin
     if FindColorSpiral(X, Y, 3098941 , MSX1, MSY1, MSX2, MSY2) then //I replaced the Treecol var with 3098941 (your willow color)
      begin
        Writeln('found tree');
        mmouse( x, y, 4, 4 );
        wait(80+random(60));
        Writeln('Move Mouse');
        if isuptext('hop') then
        begin
          Writeln('click!');
          GetMousePos(X, Y);
          Wait(50+random(75));
          Mouse(X, Y, 4, 4, True);
          wait(200)
        end;
      end;
    end;
    
    begin
     CutTree;
    end.
    And its "Chop down" not "Cut down" So looking for uptext tut is worthless!!!

    harsh he was jsut looking for osme help hang on ill look at it in a sec

  4. #4
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    your uptext was bad i didnt test it but it should wrok if it deosnt add my msn and ill help u more

    Code:
    program Powercutt0rpl0x;
    {.include SRL/SRL/Misc/Smart.scar}
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Woodcutting.scar}
    
    var
      TreeCol,cut,justtalked,chatmsg,x,y,Rested,Worked,Loads : integer;
      Proggystr: String;
    
    
    
    const
    
    YourSRLStatsID   =  '';    // Not currently working however put yours in if you wish
    YourSRLStatsPass =  '';    // Password for the SRL stats
    SmartWorld = 11;   //world you want smart to load
    TreeType = 'normal'; //set tree type. vaild arguemants are ~normal, willow, yew~
    Loadstodo = 10; // Amout of logs to powercut/drop.
    
      ScriptName = 'Powercutt0rpl0x';
      Version = '1.2';
    
    procedure DeclarePlayers;
     begin
      HowManyPlayers := 2; //change according to how many players needed
      CurrentPlayer := 0; //player to start with
      NumberOfPlayers(HowManyPlayers); //dont touche
    
      Players[0].Name := ''; //user name
      Players[0].Pass := ''; //pass
      Players[0].Nick := ''; //3-4 letters of user
      Players[0].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal'];
      Players[0].Active := True; //true=active   false=not active
    
      Players[1].Name := '';
      Players[1].Pass := '';
      Players[1].Nick := '';
      Players[0].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal'];
      Players[1].Active := True;
     end;
    
    
    
    procedure Sig;
    begin
      ClearDebug;
      Writeln('_____  ___    ___ _____       ^^^  ');
      Wait(200);
      Writeln('|    \/   \  /   \     \     (O.o)|}');
      wait(200);
      Writeln('| `|  \ |  \/  |  \  \  \    _ | _|');
      Wait(200);
      Writeln('|     <    <       \  \  \    \|/ |');
      wait(200);
      Writeln('|  |  /     \       \  \  \    |');
      Wait(200);
      Writeln('|__  /|__^__ \__^____\_____\   -');
      Wait(200);
      Writeln('   |/       |/      |/    |/ _/ \_');
      Wait(200);
      Writeln('                      Brad734 ');
      Wait(200)
    end;
    
    procedure proggy;
    begin
      ClearDebug;
      Writeln('====== '+Padr(ScriptName+' '+Version, 27)+' ======');
      Writeln('==================================================');
      Writeln('    [         By Brad734        ]');
      Writeln('' + Padr('Current Player: ' + Players[CurrentPlayer].Nick, 40) + '');
      Writeln('logs cut n Dropped:' + IntToStr(Cut));
      Writeln('Worked for '+TimeRunning);
      Writeln('==================================================');
    end;
    
    procedure VerCheck;
    var
      Versionn, Ver : string;
      begin
      Ver:= '1.2'; //DO NOT CHANGE THIS!!
      Versionn:= GetPage('http://powercutt0rpl0x.webs.com/Version.txt');
      if Versionn <> Ver then
    
      begin
        ClearDebug;
        WriteLn('------------------------------------------------------------');
        WriteLn('Your version is not the latest. Get the latest version from:');
        WriteLn('Villavu.com');
        WriteLn('------------------------------------------------------------');
        TerminateScript;
      end else
      WriteLn('The script is up to date.');
      Wait(3500);
      ClearDebug;
      end;
    
      procedure NewsFlash;
    var
      News : string;
    
    begin
      News:= GetPage('http://powercutt0rpl0x.webs.com/News.txt');
      WriteLn(News);
      Wait(5000);
      ClearDebug;
    end;
    
    Procedure AntiRandoms;
    begin
      FindNormalRandoms;
      If(FindFight) then
      begin
        RunAway('N', True,1,15000);
        Disguise('Found random... RUNNING!');
        Wait(5000+random(5000));
      end;
      FindLamp('woodcutting');
    end;
    
    Procedure AntiBan;
    begin
      case(Random(100)) of
        1: HoverSkill('woodcutting', false);
        2: BoredHuman;
        3: MMouse(Random(750), Random(750), Random(100), Random(100));
        4: PickupMouse;
        5: Gametab(random(12));
        6: begin
             case(random(5)) of
               0: makecompass('N');
               1: makecompass('S');
               2: makecompass('E');
               3: makecompass('W');
             end;
           end;
    
        7: Pickupmouse;
        8: wait(5000+random(10000));
        9: RandomRClick;
        10: RandomMovement;
      end;
    end;
    
    procedure Treecolor;
    begin
      case lowercase(TreeType) of
       'normal': TreeCol := 2186319 or 4488562 or 3893086;
       'willow': TreeCol := 3098941 or 2312763 or 4157534;
       'yew': TreeCol := 1988171    or 2183239 or 2975578;
      end;
    end;
    
    Procedure WaitWhileChop;
    Var mrk : Integer;
    Begin
    if not LoggedIn then Exit;
      MarkTime(mrk);
     Repeat
       antirandoms;
       FindEnt(x, y, True);
         Case Random(4) Of
           0 : GameTab(1 + Random(12));
            end;
           Wait(900 + Random(100));
           GameTab(4);
           SleepAndMoveMouse(4000 + Random(3000));
           FindEnt(x, y, True);
          antirandoms;
         Until(Not IsUpText('own')) Or (TimeFromMark(mrk) > 13000 + Random(3000));
         end;
    
    
    procedure CutTree;
    var
      X, Y: Integer;
    begin
    antirandoms;
    Disguise('cutting tree');
     if FindColorSpiral(X, Y, Treecol, MSX1, MSY1, MSX2, MSY2) then
      begin
        mmouse( x, y, 4, 4 );
        wait(80+random(60));
        if isuptext('op') then
        begin
          GetMousePos(X, Y);
          Wait(50+random(75));
          Mouse(X, Y, 0, 0, True);
          waitwhilechop;
          wait(2 + random(3));
          antirandoms;
        end;
      end;
    end;
    
    procedure beginplayer;
     begin
      SetRun(True);
       MakeCompass('N');
     end;
    
    
    procedure mainloop;
    begin
     ClearDebug;
      Disguise('Calculator');
       Vercheck;
        NewsFlash;
         sig;
          Writeln('Waiting For SMART to Start...');
           SMARTSetupEx(SmartWorld, False, True, False);
            Wait(2000);
             SetTargetDC(SmartGetDC);
             repeat
             wait(100);
            until(SmartGetColor(253, 233)<>1118604);
           SetupSRL;
          SRLID := YourSRLSTATSID;
         SRLPassword:= YOURSRLSTATSPASS;
        DeclarePlayers;
       ActivateClient;
      Loginplayer;
     beginplayer;
      Treecolor;
      repeat
       repeat
        Cuttree;
        until Invfull;
       if invfull then
        begin
         //dropall goes here. dont forget. Havent added yet. DONT FLAME!
        cut := cut + 27;
       proggy;
       end;
      until False;
    end;
    
     begin
     mainloop;
     end.

    srry bout double post

  5. #5
    Join Date
    Jul 2007
    Location
    New Zealand FTW!
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i added ur msn. its still not working Is there anather way it can find the tree without me having to put the tree colors in my tree color procedure. because maybe it just cant find the colors :S

    Code:
    procedure Treecolor;
    begin
      case lowercase(TreeType) of
       'normal': TreeCol := 2186319 or 4488562 or 3893086;
       'willow': TreeCol := 3098941 or 2312763 or 4157534;
       'yew': TreeCol := 1988171    or 2183239 or 2975578;
      end;
    end;
    The SRL team brings all the mods to the yard,
    And their like, "We kno u bot hard",
    "Damn right, We DO bot hard",
    "But you cant catch us, cos we use S.M.A.R.T!"

  6. #6
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Make TreeCol a TIntegerArray; and do 'normal': TreeCol := [123, 456, 789]; (The actual numbers, of course )

  7. #7
    Join Date
    Jul 2007
    Location
    New Zealand FTW!
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by 99_ aka ian. View Post
    Make TreeCol a TIntegerArray; and do 'normal': TreeCol := [123, 456, 789]; (The actual numbers, of course )
    Is there a tut on how 2 do this? tintegerarrays i mean
    The SRL team brings all the mods to the yard,
    And their like, "We kno u bot hard",
    "Damn right, We DO bot hard",
    "But you cant catch us, cos we use S.M.A.R.T!"

  8. #8
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    There are tutorials on Arrays. I can point you to one in just a second. *Uses the search button, which is always useful *

    http://www.villavu.com/forum/showthread.php?t=28436



    I'd also suggest you bookmark http://www.villavu.com/forum/member.php?u=9739 and look at his signature for just about every tutorial on everything.
    Last edited by ian.; 07-20-2009 at 12:50 PM.

  9. #9
    Join Date
    Feb 2009
    Location
    Philipines
    Posts
    600
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You left your password and username in the script

    I changed it and PMed you the new password.

  10. #10
    Join Date
    Feb 2008
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Don't try to develop an autoresponder, many people don't realize that autoresponders are for the most part the cause of people reporting macroers, autoresponders are so blatantly obvious...

  11. #11
    Join Date
    Jul 2007
    Location
    New Zealand FTW!
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    -sigh- before i saw ur post/pm i just noticed i left it in

    Thanks a bunch btw. need more people like you in the world. wouldnt wna lose that nice pking acc
    The SRL team brings all the mods to the yard,
    And their like, "We kno u bot hard",
    "Damn right, We DO bot hard",
    "But you cant catch us, cos we use S.M.A.R.T!"

  12. #12
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    There is a function in srl called DropAll;, which pretty much drops the whole inv. Or, if there is an axe in the inventory, you can use Drop(2, 28, false);, which drops from 2nd slot to last slot.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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