Signup Now
Results 1 to 6 of 6
  1. #1
    Banned
    Join Date
    Dec 2013
    Posts
    556
    Reputation
    18
    Rep Power
    0

    Use item on specific item on ground.

    Hello, I need action to use item in my BP on a specific item on ground, not by position xD

    Smth like this, but swap ground() to specific ground item ID:

    auto(1000)
    useitemon('small amethyst', 0, ground(), "SHRINE id = 155")
    Last edited by K4r4biN; 06-24-2015 at 04:13 PM.

  2. #2
    Free User Eli's Avatar
    Join Date
    Dec 2013
    Location
    www.eliscripts.com
    Posts
    355
    Reputation
    85
    Rep Power
    21
    init start
    GroundItemID = {20135} -- ground id tile
    ItemToUse = "pick" -- item to use
    init end

    auto(1000)

    for _,GroundID in ipairs(GroundItemID) do
    for i = -7,7 do
    for j = -5,5 do
    GroundTile = gettile($posx+i,$posy+j,$posz)
    for ftilecount = 1,GroundTile.itemcount do
    if GroundTile.item[ftilecount].id == GroundID and tilereachable($posx+i,$posy+j,$posz) then
    GroundX,GroundY = $posx+i,$posy+j
    pausewalking(2000)
    reachlocation(GroundX,GroundY,$posz,1)
    useitemon(ItemToUse, 0, ground(GroundX,GroundY,$posz))
    pausewalking(0)
    wait(1000)
    end
    end
    end
    end
    end
    Skype account has been hacked, beware! We will not deal anymore with anyone using skype!

  3. #3
    Free User Eli's Avatar
    Join Date
    Dec 2013
    Location
    www.eliscripts.com
    Posts
    355
    Reputation
    85
    Rep Power
    21
    PS. That's @Dehan action with small edits
    Skype account has been hacked, beware! We will not deal anymore with anyone using skype!

  4. #4
    Banned
    Join Date
    Dec 2013
    Posts
    556
    Reputation
    18
    Rep Power
    0
    Quote Originally Posted by Eli View Post
    PS. That's @Dehan action with small edits
    I had working hotkey before I made format, but since I wasn't coding for long time I forgot the right code. Editing somebody's work w/o knowledge what you doing is simply stupid. It's using exactly same action as I wrote above.

    I meant to replace 'ground()' to find an ID of ground item and use small amethyst on that item.

  5. #5
    Moderator mistgun's Avatar
    Join Date
    Dec 2013
    Location
    Lodz, Poland
    Posts
    1,821
    Reputation
    220
    Rep Power
    26
    this should work

    useitemon('small amethyst', 'ID ON GROUND', 'ground')


    or more advanced alternative:



    init start
    local itemToUse = 'strong mana potion'
    local useOnItems = {'gold coin', 'parcel'}

    table.id(useOnItems)
    init end

    auto(1000)

    for x, y in screentiles() do
    if itemcount(itemToUse) > 0 and table.find(useOnItems, topitem(x, y, $posz).id) then
    reachlocation(x, y, $posz)
    useitemon(itemTouse, 0, ground(x, y, $posz))
    end
    end
    Last edited by mistgun; 06-24-2015 at 06:00 PM.

  6. #6
    Banned
    Join Date
    Dec 2013
    Posts
    556
    Reputation
    18
    Rep Power
    0
    Love ya mist!!!!!!!!!!! This is the thing I forgot haha, instead of ground($posx, $posy, $posz) just id of ground item and 'ground' !!!!!!!!!!!!!!! ^^ !!!!!!!!!!!!!!!!!!

 

 

Posting Permissions

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