Log in

View Full Version : How to make in script "CLICK/USE" on juicy root?



l4z
03-03-2016, 09:01 PM
Was wondering and gona share with you code in lua. Working fine.

Here is a lua:



local itemID = {21104} -- ItemID to be picked up
Module.New('lootFromGround', function(module)
if (Self.TargetID() <= 0) then
for y = -5, 5 do
for x = -7, 7 do
if table.contains(itemID, Map.GetTopUseItem(Self.Position().x + x, Self.Position().y + y, Self.Position().z).id) then
Cavebot.Stop()
Self.UseItemFromGround(Self.Position().x + x, Self.Position().y + y, Self.Position().z)
wait(1000)
Cavebot.Start()
module:Delay(math.random(1000))
end
end
end
end
end)

dean015
03-03-2016, 10:11 PM
Was wondering and couldnt find solution..
Any help? Thanks like always :)

just an idea but maybe the use lever function might work ? since its just doing "use" on a certain tile

no idea

Oscagi
03-04-2016, 07:43 AM
Was wondering and gona share with you code in lua. Working fine.

Here is a lua:



local itemID = {21104} -- ItemID to be picked up
Module.New('lootFromGround', function(module)
if (Self.TargetID() <= 0) then
for y = -5, 5 do
for x = -7, 7 do
if table.contains(itemID, Map.GetTopUseItem(Self.Position().x + x, Self.Position().y + y, Self.Position().z).id) then
Cavebot.Stop()
Self.UseItemFromGround(Self.Position().x + x, Self.Position().y + y, Self.Position().z)
wait(1000)
Cavebot.Start()
module:Delay(math.random(1000))
end
end
end
end
end)


This script is not yours.. Here (http://forums.xenobot.net/showthread.php?39294-Oramond-Juicy-Root-Scripts&highlight=juicy) its the other post.


just an idea but maybe the use lever function might work ? since its just doing "use" on a certain tile

no idea

If u do it like a lever, u have to add X,Y,Z. With this module it check in the screen if it finds a certain ID.

l4z
03-05-2016, 05:11 PM
I didnt say its mine, friend send this to me so I wanted to schare on forum cuz couldnt find topic by myself.

Triniak
03-07-2016, 12:53 AM
Thanks <3

kiel6591
07-30-2020, 02:30 PM
Hello
The fact of clicking on something is already giving use item.
So I made it easier.
the Walker below is for the left location of npc Chavis.
It takes like 7 point roots, because the roots grow fast,
as an OT game, I don't know if it's that fast in the original.
The idea is with {Use Lever}


<item text="Node (33539, 31954, 7)" tag="0"/>
<item text="Node (33538, 31949, 7)" tag="0"/>
<item text="Stand (33536, 31949, 7)" tag="1"/>
<item text="Use Lever(33535, 31949, 7)" tag="244"/>
<item text="Stand (33536, 31959, 7)" tag="1"/>
<item text="Use Lever(33535, 31959, 7)" tag="244"/>
<item text="Stand (33535, 31967, 7)" tag="1"/>
<item text="Use Lever(33534, 31967, 7)" tag="244"/>
<item text="Node (33535, 31982, 7)" tag="0"/>
<item text="Stand (33534, 31990, 7)" tag="1"/>
<item text="Use Lever(33533, 31990, 7)" tag="244"/>
<item text="Stand (33530, 31975, 7)" tag="1"/>
<item text="Use Lever(33529, 31975, 7)" tag="244"/>
<item text="Node (33532, 31969, 7)" tag="0"/>
<item text="Stand (33533, 31967, 7)" tag="1"/>
<item text="Use Lever(33534, 31967, 7)" tag="244"/>
<item text="Stand (33534, 31959, 7)" tag="1"/>
<item text="Use Lever(33535, 31959, 7)" tag="244"/>


Hope this helps.