Results 1 to 7 of 7

Thread: need help with power wc

  1. #1
    Join Date
    Jan 2007
    Location
    new zealand
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default need help with power wc

    i dont know how to get thesse functions to work can some one plz help


    program PhonokinsTreeMuncher;

    var
    x,y:integer;


    const
    treecolor=654564;

    procedure findtree;
    begin
    if(findcolor(x,y,treecolor,0,0,700,700))then
    begin
    MoveMouseSmoothEx(x,y +random(0),20,40,45,25,20);
    Wait(100+random(10));
    ClickMouse(x,y,false);
    end;

    function PopUp2(x, y, rx, ry: Integer; Option: string): Boolean;
    begin
    Mouse(x, y, rx, ry, False);
    Wait(150 + Random(250));
    Result := PopUp(Option);
    end;

    function ChooseOption(x, y: Integer; txt: string): Boolean;
    var
    x1, y1, x2, y2, LeftCorner, RightCorner: Integer;
    begin
    LeftCorner := BitmapFromString(4, 4, 'z78DA33753135313137C5' +
    '411A600064715CEA914500CACE13F0');
    RightCorner := BitmapFromString(4, 4, 'z78DA33753135313137' +
    'C5200D30002E35F8C501C9C013F0');
    if (FindBitmap(LeftCorner, x1, y1)) and (FindBitmap(RightCorner, x2, y2)) then
    begin
    if (FindText(x, y, txt, upchars, x1, y1, x2, 502)) then
    begin
    Result := True;
    Mouse(x + Length(txt) * 3, y + 3, 2, 2, True);
    end
    else if (FindText(x, y, 'Cancel', upchars, x1, y1, x2, 502)) then
    Mouse(x + 9, y + 3, 2, 2, True);
    end;
    FreeBitmap(LeftCorner);
    FreeBitmap(RightCorner);
    end;

  2. #2
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try putting the code in [SCAR] tags.. its so hard to read and anyway you don't need to copy the functions and procedure from SRL you can use em like this:

    SCAR Code:
    program PhonokinsTreeMuncher;
      {.include SRL/SRL.scar} // Tell SCAR where using SRL

    const
      TreeColor = 654564;

    procedure FindTree;
      begin
        if(FindColor(x, y, TreeColor, 0, 0, 700, 700))then
          begin
            Mouse(x, y, 1, 1, False); //SRL procedure
            PopUp('Chop'); //SRL procedure
          end;
      end;
     
    begin
      FindTree;
    end.

  3. #3
    Join Date
    Jan 2007
    Location
    new zealand
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks for ur help but now i get this error
    message
    [Runtime Error] : Exception: Access violation at address 0064FEA2 in module 'scar.exe'. Read of address 00000000 in line 239 in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\Text.scar

    it find the tree and right clicks on ti but it dosnt chop it down

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

    Default

    setupsrl; should be the first thing in your main loop

  5. #5
    Join Date
    Jan 2007
    Location
    new zealand
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    program PhonokinWoodCutter;
    {.include SRL/SRL.scar}

    const
    treecolor = 3305568;

    procedure findtree;
    begin
    if(findcolor(x,y ,treecolor,0,0,700,700))then
    begin
    mouse(x,y,3,3,false);
    PopUp('Chop');
    end;
    until(invfull)
    end;

    procedure mainloop;
    begin
    repeat
    findtree;
    findnormalrandoms;
    DropAll;
    until(false)
    end;

    begin
    repeat
    setupsrl;
    mainloop;
    wait(5000+random(500));
    until(false)
    end.


    ok now it says this
    Line 14: [Error] (17675:1): Identifier expected in script

  6. #6
    Join Date
    Oct 2006
    Location
    New Zealand
    Posts
    423
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    try this:

    program PhonokinWoodCutter;
    {.include SRL/SRL.scar}

    const
    treecolor = 3305568;

    procedure findtree;
    begin
    if(findcolor(x,y ,treecolor,0,0,700,700))then
    begin
    mouse(x,y,3,3,false);
    PopUp('Chop');
    end;
    end;

    procedure mainloop;
    begin
    repeat
    findtree;
    findnormalrandoms;
    if (invfull)
    then begin
    DropAll;
    end;
    until(false)
    end;

    begin
    repeat
    setupsrl;
    mainloop;
    wait(5000+random(500));
    until(false)
    end.

    you didnt have a repeat for it to stop repeating, this order of things will work better too.

  7. #7
    Join Date
    Jan 2007
    Location
    new zealand
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    this dosent work it dosent do anything now but thanks for ur help

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help with my power cutter plz.
    By shrubie1 in forum OSR Help
    Replies: 9
    Last Post: 06-01-2008, 02:53 AM
  2. Power Chopper
    By topiser in forum First Scripts
    Replies: 10
    Last Post: 05-16-2008, 08:57 PM
  3. Power Chopper
    By Pwnt by Pwnt in forum RS3 Outdated / Broken Scripts
    Replies: 64
    Last Post: 08-02-2007, 02:46 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
  •