Results 1 to 4 of 4

Thread: Use item FROM ground TO ground...

  1. #1
    iBot User
    Join Date
    Sep 2012
    Posts
    239
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    46 Post(s)
    Reputation
    23
    Rep Power
    5

    Use item FROM ground TO ground...

    There's an item on the ground, let's say ID 2649, which I want to use on another position on the ground.

    Lua Code:
    useitemonitem(2649, ground(posx,posy,posz), ground(posx+1,posy,posz))

    The above does not work.

    If you doubt me, then try using a mana potion or any other item FROM ground TO ground. If you manage to do it, then tell me what's your code.

    An alternative I'm trying is to use the waypoint "Use" on the item on the ground, which simulates a right-click and makes your mouse a "crosshair" with the item ready to use, but it's not possible to do a left-click, otherwise I could make this work. Or is it? Any idea how I can emulate a left-click on the ground?

  2. #2
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    What are you trying to do exactly? What is 2649?

    Function is:
    useitemonitem(string item, string itemon, string itemon location)

    the second parameter calls for another item name, but inside one of your backpacks...

    IF you can explain what you're trying to do exactly i might be able to help.

  3. #3
    Normal User RafiXWPT's Avatar
    Join Date
    Jun 2012
    Location
    (Poland) http://rafixwptscripts.com
    Posts
    1,602
    Mentioned
    31 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    128 Post(s)
    Reputation
    128
    Rep Power
    9
    Quote Originally Posted by john86 View Post
    There's an item on the ground, let's say ID 2649, which I want to use on another position on the ground.

    Lua Code:
    useitemonitem(2649, ground(posx,posy,posz), ground(posx+1,posy,posz))

    The above does not work.

    If you doubt me, then try using a mana potion or any other item FROM ground TO ground. If you manage to do it, then tell me what's your code.

    An alternative I'm trying is to use the waypoint "Use" on the item on the ground, which simulates a right-click and makes your mouse a "crosshair" with the item ready to use, but it's not possible to do a left-click, otherwise I could make this work. Or is it? Any idea how I can emulate a left-click on the ground?
    Thats not possible, I make my own function for that using trick with browsefield, add it to standart.lua
    Lua Code:
    function useitemongroundonground(fromx,fromy,fromz,tox,toy,  toz)
        local delay = 500
        wait(delay)
        openbrowsefield(fromx, fromy, fromz)
        wait(delay)
        useitemon(toptileitem(fromx,fromy,fromz), tox,toy,toz)
        wait(delay)
    end


    (works if items are next to each other, not tested with using items on distance)
    Last edited by RafiXWPT; 09-19-2014 at 07:35 AM.

  4. #4
    Focus Group kamil123's Avatar
    Join Date
    Apr 2012
    Location
    Poland
    Posts
    339
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    18 Post(s)
    Reputation
    106
    Rep Power
    6
    Quote Originally Posted by john86 View Post
    There's an item on the ground, let's say ID 2649, which I want to use on another position on the ground.

    Lua Code:
    useitemonitem(2649, ground(posx,posy,posz), ground(posx+1,posy,posz))

    The above does not work.

    If you doubt me, then try using a mana potion or any other item FROM ground TO ground. If you manage to do it, then tell me what's your code.

    An alternative I'm trying is to use the waypoint "Use" on the item on the ground, which simulates a right-click and makes your mouse a "crosshair" with the item ready to use, but it's not possible to do a left-click, otherwise I could make this work. Or is it? Any idea how I can emulate a left-click on the ground?
    if u need it for opening hole in dawnport, then I did another way, that it collects 10gp and buys shovel at npc after one round xD

Posting Permissions

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