[Rifbot Tutorial] Walker on Label

 In this tutorial you will learn how to:

  • execute action on label
  • use infinite loop while true do
  • use finite loop for i = 1, 10 do

required Rifbot 1.95 release 2021-09-30 15:35 or later

1. This is sample waypoints to add it right click on walker > edit

Rifbot Tutorial

 

2. Now we need to lua function for catching label signals. You can add it using Options > Lua scripts > New Script

Rifbot Tutorial

 

3. First we have label start, let's just close all backpacks and open main backpack.

Rifbot Tutorial

 

 4. When lua finish will continue walker. Label drop, now you learn how to do actions until they truly finish. We will drop items from backpack to ground.

Rifbot Tutorial

5. Last one is label dance where you will learn how to use for loops. Let's dance a little bit.

Rifbot Tutorial

All functions with they arguments are documented in Rifbot Lib.lua inside bot folder. 

That's all, if you have any questions post it below.

p.s. Images was used to prevent copying code :)

45 comments:

  1. Jak korzystac z funkcji "Container.MoveItemToContainer(containerFrom, slotFrom, containerTo, slotTo, itemid, count, delay)" Wiem ze jest to opisane ale chce aby przenosilo mi item o ID 3264 z worka na ziemi do mojego BP. Proboje na rozne strony lecz nie chce mi ta funkcja dzialac. Prosze o pomoc

    ReplyDelete
    Replies
    1. Nie będę ukrywał, nie jest to proste. Musisz najpierw przeszukać wszystkie plecaki inne niż ten docelowy, do którego będziesz podnosił i z nich wybrać id 3264 a potem wrzucić do np pierwszego otwartego plecaka (index: 0).

      Najprościej będzie użyć już gotowego scriptu na Auto Looting tylko config zmienić i będzie działać. Jest tam też pokazana mechanika zbierania przedmiotów więc możesz się podszkolić.

      https://github.com/Ascerr/Lua-Scripts/blob/master/Auto%20Looting.lua

      Delete
  2. Da sie zrobic Lua ktory przechodzi miedzy wyznaczonymi koordynatami? zrobilem najprostrzym sposobem i postac sie ruszy ale skrypt wywala odrazu. To ja czy bot?

    ReplyDelete
    Replies
    1. Nie bardzo wiem o co chodzi z tym przechodzeniem, wytłumacz to pomogę. A jeżeli chodzi i wywalnie scriptu to to jeżeli nie ma błędu na czerwono to brak jest w kodzie Module.New, który zapętla script.

      Delete
  3. Acer,
    is it possible to make a hotkey while killing the monsters pull the bodies down below me?

    ReplyDelete
    Replies
    1. others question, I play a server where there is no exaust in the spells, is there any variable to check utito tempo active?

      Delete
    2. 1. To drag items these script: https://github.com/Ascerr/Lua-Scripts/blob/master/Drag%20Item%20under%20Your%20Character.lua

      2. Walker -> settings -> magicshooter spell delay
      Checking utito tempo depends on server, if you use this spell and under equipment appear some icon like hasted or manashield then go with this lua function: Self.isBuffed()

      Delete
    3. Helo,
      i see this script (https://github.com/Ascerr/Lua-Scripts/blob/master/Drag%20Item%20under%20Your%20Character.lua).

      My real intention is to combine this script with another, I tried but I couldn't.
      (https://github.com/Ascerr/Lua-Scripts/blob/master/Alert%20on%20loot%20message.lua)

      If it were possible, I would like a script that, when dropping the loot listed, would move all the surrounding bodies (1sqm) below the player

      Delete
    4. after moving the bodies below the player, if it could also open it would be great

      Thx Again

      Delete
    5. It's thief script, you need to create it for yourself.

      Delete
    6. Could you at least give me a tip on how to combine 2 functions in the same script?
      I can use the first function to check the loot, but I can't combine it with the second function to pull the bodies
      thx

      Delete
    7. local config = {
      items = {3031, 3492} -- items to drag
      }

      function proxy(messages)
      for i, msg in ipairs(messages) do
      if string.find(string.lower(msg.message), "loot") then
      local pos = Self.Position()
      for x = -1, 1 do
      for y = -1, 1 do
      local map = Map.GetTopMoveItem(pos.x + x, pos.y + y, pos.z)
      if (pos.x ~= 0 or pos.y ~= 0) and table.find(config.items, map.id) then
      Map.MoveItem(pos.x + x, pos.y + y, pos.z, pos.x, pos.y, pos.z, map.id, map.count, 0) -- 0 is delay in ms.
      break
      end
      end
      end
      end
      end
      end
      Proxy.TextNew("proxy")

      Delete
  4. Can you help me with a script to skip a sertain waypoint if player on screen?

    ReplyDelete
    Replies
    1. It's simple:

      node: 33434, 32344, 7
      goto: skip, players(7) >= 1
      node: 33434, 32344, 7
      node: 33434, 32344, 7
      node: 33434, 32344, 7
      skip
      node: 33434, 32344, 7

      Delete
  5. Is there anyway to get the cavebot to just rightclick on some sqms? The only solution I've found is editing sewer waypoints but they are malfunctioning from time to time

    ReplyDelete
  6. you can use one line lua script in walker:

    lua: Map.UseItem(32323, 32211, 7, 0, 0, 0)

    ReplyDelete
    Replies
    1. So I add all the nodes into the script, all the seperate ones?

      Delete
    2. Explain me your problem in game you try to solve.

      Delete
    3. I want my character to press bushes, in this case blueberry bushes

      Delete
    4. This line i post you before will works. If you want only convert bush with moveable berries then use line once per bush other way you need to use it x4 times but with wait 500-1000 before each usage.

      Delete
    5. So I have to add every bush I want the bot to click in the lua script before I execute it or can I just add waypoints in the cavebot by going to advanced and then pressing the lua script from there?

      Delete
  7. Add wpt near bush first then add lua script with coordines of this bush.

    ReplyDelete
  8. Sorry for the question, but how can I turn off a Lua script in "cavebot" when character leaves the cave?

    I've seen this but don't know how to use it or where to put it


    function Rifbot.ExecuteScript(script, onOff)
    if onOff == nil then
    onOff = false
    end
    return executeScript(script, onOff)
    end

    Thx

    ReplyDelete
    Replies
    1. Raw walker code:

      lua: Rifbot.KillScript("script name")

      Delete
  9. I'm unable to use the cap check on Walker, the character ignores it. Can you give me an example, if it is possible to do this in Walker

    ReplyDelete
    Replies
    1. Tell me server where you play, i'll check it.

      Delete
    2. It's simple:

      hunt
      goto: hunt, cap > 100
      wait: 999999

      Delete
    3. Did not work. I will describe it better.
      * comment (ignore) *

      the Walker skip (ignoring) line 3 and automatically going to line 4...
      In fact, I would like if cap was still greater than or equal to 50 he would return to the beginning of the Walker and retrace his steps in the cave

      1 hunt
      2 walk....
      3 goto: deposit, cap<=50
      4 deposit
      5 walk...
      6 backhunt

      Delete
    4. I see you don't understood how bot works, you need spent some time alone with 3 lines of code i posted you.

      Delete
    5. Maybe if it was explicit in a tutorial I wouldn't have any doubts. I'm really having trouble understanding. I need help with this code.

      hunt
      goto: hunt, cap > 100
      wait: 999999

      Your help (simple)
      - cavebot on
      - if cap > 100
      - wait minutes

      And obviously, after that my char went to the deposit label instead of going back to the hunt label and continuing hunting

      Delete
    6. node: 32160, 31806, 6
      node: 32166, 31806, 6
      lua: if Self.Capity() <= 50 then Walker.Goto(hunt) end
      wait: 1000
      deposit

      tried too

      Delete
  10. Walker "door" function didnt work for green/blue djin door. Why? There are some special thing to do?

    ReplyDelete
  11. Ascer,

    I have a dilemma between refiling UHs and depositing all items in the depot. I can't do both.

    If I deposit the items, the uh backpacks go to page 7 depot

    Would it be possible to adjust it to deposit items in box I of the depot and then use withdraw in box II?

    I only saw the option to choose between backpacks inside depot I. This doesn't help because if I stack backpacks for the items, it will deposit 19 items and on the 20th it will say there is no space

    Can you help me with something?

    ReplyDelete
    Replies
    1. On server where are depot box, you can type inside deposit/withdraw window ID of depot box.

      Delete
  12. Is there a simple script that alternates target? Knight suffers doing task in 4x because he receives 1 point. I need to attack all the monsters. Ideally, it would be alternating. Can you help me?

    ReplyDelete
    Replies
    1. I don't think so but you can search Github lua scripts database for some example and modify it for your needs:
      https://github.com/Ascerr/Lua-Scripts

      Delete
  13. In Walker, the DP has a finite number of spaces. I placed BP's one inside the other and used the deposit command with ID 2854. However, when the first two are full of runes, it does not open the next BP's to make the deposit, how can I solve this? Can you help me?

    The logic is, I make runes, deposit them, fill my soul and make runes again

    ReplyDelete
    Replies
    1. The two scripts in the collection don't help. One is for BPs that are in the hand or on the shield and the other has to place the IDs of the BPs one below the other.

      My question is to open the bps with that ID that are stacked inside the locker

      Delete
    2. Hello,

      Put in depot different ID of backpack than backpack with runes, example blue backpack for depositing and standard brown for runes.

      Delete
  14. Is there any script that can reinforce the "anti ks" of the "should attack me" option?

    because I'm passing by and if the monster attacks me, it targets me and the person already says aimbot...

    Maybe something that turns off the target when there is a player on the screen and turns it on when there is no player, but that doesn't work either... because if I'm killing and someone appears, he'll move on

    ReplyDelete
    Replies
    1. Use standard: Should Attack Me and also lua script to on/off targeting if player but need add check if also monsters are on screen with example 1 or 2 sqm range near you. I don't have currently time to create this one.

      Delete