Results 1 to 4 of 4

Thread: Wont Right-Click???

  1. #1
    Join Date
    Nov 2007
    Location
    SCAR central
    Posts
    116
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Wont Right-Click???

    Hi, I'm making my first script and it is a power woodcutter in lummy on 1 tree. I have all the codes done and when I try to right click it doesnt and clicks on the empty space in my inventory(thats where the "Drop" button should appear when I right click)

    Heres my script (Some reviews aswell please)

    SCAR Code:
    program PowerAutorWoodCutter;//you have to stand right infront of a tree

    var
    x,y: Integer;
    i: Integer;

    const
    FirstTreeColor=874569;

    begin
    i:= 0
    if(FindColor(x,y,874569 ,-2,-28,767,600)) then
    repeat
    i:= i + 1;
    ClickMouse(287,133,true);//This is where I click the tree
    Wait(3000);
    MoveMouse(576,232);
    ClickMouse(576,232,false);//I now right click the log
    ClickMouse(575,273,true);//I now drop the log on the ground
    Wait(5000);
    ClickMouse(287,133,true);//This is where I click the tree
    until(i >= 20)// To increase the number of times it repeats... change the "20" to what ever number you want

  2. #2
    Join Date
    Jan 2007
    Location
    BC, Canada
    Posts
    66
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i dont know why it doesnt right click, but when i find a piece of my code that doesnt seem to work. i open a new tab and copy the problem into it then test the problem code by itself. It always helps to simplify.

  3. #3
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program New;
    {.include SRL\SRL.scar}

    var
    x,y,i,Loads:Integer;

    const
    FirstTreeColor=874569;
    LoadsToDo = 20;

    procedure Chop;
    begin
      if(FindColor(x,y,874569,MSX1,MSY1,MSX2,MSY2)) then
      begin
        Mouse(x,y,5,5,true);
        wait(100+random(100));
        repeat
          wait(1000+random(800));
        until(InvFull) or (i>5)
        if(i>5)then
        begin
          Chop;
          i:=0;
        end;
        if(InvFull)then
        begin
          DropToPosition(2,28);
          Loads:=Loads+1;
        end;
      end;
    end;

    begin
      SetupSRL;
      repeat
        Chop;
      until(Loads >= LoadsToDo)
    end.

    Try that, basically..

    DropToPosition(2,28); will drop anything in inventory from slot 2 to 28 (have axe in 1st slot)
    InvFull; will check if inventory is full (invcount of 28)

    MMouse(x,y,5,5); will move the mouse to X and Y with a random of 5
    Mouse(x,y,5,5,true); will move and click the mouse at X and Y with a random of 5 with a left click.

    Improve on it from there.

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  4. #4
    Join Date
    Nov 2007
    Location
    SCAR central
    Posts
    116
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thankyou

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help. Wont Click bitmap?
    By 0wn 4 skill in forum OSR Help
    Replies: 8
    Last Post: 07-05-2008, 12:51 PM
  2. it wont walk(click)
    By sjlou in forum OSR Help
    Replies: 16
    Last Post: 09-14-2007, 11:51 PM
  3. Wont click on AutoColorThis
    By badandymitch in forum OSR Help
    Replies: 2
    Last Post: 05-07-2007, 08:57 AM

Posting Permissions

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