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")
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.
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!
PS. That's @Dehan action with small edits
Skype account has been hacked, beware! We will not deal anymore with anyone using skype!
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.
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.
Latest Scripts: Ultimate Dawnport FACC Spots Souleater Tunnels Useful Lua:
Love ya mist!!!!!!!!!!! This is the thing I forgot haha, instead of ground($posx, $posy, $posz) just id of ground item and 'ground' !!!!!!!!!!!!!!! ^^ !!!!!!!!!!!!!!!!!!