XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 6 of 6

Thread: How to make in script "CLICK/USE" on juicy root?

  1. #1
    l4z's Avatar
    Join Date
    Oct 2015
    Posts
    133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    How to make in script "CLICK/USE" on juicy root?

    Was wondering and gona share with you code in lua. Working fine.

    Here is a lua:
    Code:
    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)
    Last edited by l4z; 03-03-2016 at 10:20 PM.

  2. #2
    dean015's Avatar
    Join Date
    Nov 2015
    Posts
    119
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by l4z View Post
    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

  3. #3
    Oscagi's Avatar
    Join Date
    Aug 2014
    Location
    Spain
    Posts
    237
    Mentioned
    27 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by l4z View Post
    Was wondering and gona share with you code in lua. Working fine.

    Here is a lua:
    Code:
    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 its the other post.

    Quote Originally Posted by dean015 View 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.


    REMEMBER TO SAY THANKS.

  4. #4
    l4z's Avatar
    Join Date
    Oct 2015
    Posts
    133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I didnt say its mine, friend send this to me so I wanted to schare on forum cuz couldnt find topic by myself.

  5. #5

    Join Date
    Jan 2016
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks <3

  6. #6

    Join Date
    Nov 2019
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.
    Last edited by kiel6591; 07-30-2020 at 02:33 PM.

Posting Permissions

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