Results 1 to 3 of 3

Thread: [Q]Looting an that is dropped

  1. #1
    Join Date
    Jul 2012
    Location
    England
    Posts
    144
    Mentioned
    1 Post(s)
    Quoted
    28 Post(s)

    Default [Q]Looting an that is dropped

    Hi,

    I'm in the process of creating a Goblin Killer for runescape 2007. The goblin scanner and attacker works fine, but I want to add a loot option for picking up.
    My problem is, if a goblin drops coins and bones,the bones are above the coins and cover up the coins.
    I can detect bones, but nothing else

    Code:
    Procedure TakeLoot;
    
    Begin
          if FindObjCustom(x,y, ['ake','ones'],[boneColour1,boneColour2], 5) then
            begin
             mouse(x,y,4,4,false);
             ChooseOption('ake');
             wait(2000)
           end;
    end;
    All help is appreciated,

    msemtex

  2. #2
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by msemtex View Post
    Hi,

    I'm in the process of creating a Goblin Killer for runescape 2007. The goblin scanner and attacker works fine, but I want to add a loot option for picking up.
    My problem is, if a goblin drops coins and bones,the bones are above the coins and cover up the coins.
    I can detect bones, but nothing else

    Code:
    Procedure TakeLoot;
    
    Begin
          if FindObjCustom(x,y, ['ake','ones'],[boneColour1,boneColour2], 5) then
            begin
             mouse(x,y,4,4,false);
             ChooseOption('ake');
             wait(2000)
           end;
    end;
    All help is appreciated,

    msemtex
    I assume you're wanting to take coins?

    I would make a TPA/ATPA finder for all the bones by grabbing the bone color, getting the TPA of all bones, and splitting that into [TPAs] (an ATPA). Then, get the bounds of each [TPA], this will give you a box. Next, search only inside each of these boxes for the color of coins. If that color is found then get the middle of that box (MiddleBox returns a TPoint), move your mouse to that, right-click, and ChooseOptionMulti['ke Coi','Coins']. Since this function will return True of False just make something that if the function returned True (successfully chose the option to "Take Coins") then wait until the player has stopped moving (Flag or FFlag(0), ect...).

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  3. #3
    Join Date
    Jul 2012
    Location
    England
    Posts
    144
    Mentioned
    1 Post(s)
    Quoted
    28 Post(s)

    Default

    Ok, I will have a look into it. Thanks!

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
  •