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
2. Now we need to lua function for catching label signals. You can add it using Options > Lua scripts > New Script
3. First we have label start, let's just close all backpacks and open main backpack.
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.
5. Last one is label dance where you will learn how to use for loops. Let's dance a little bit.
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 :)
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
ReplyDeleteNie 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).
DeleteNajproś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
Da sie zrobic Lua ktory przechodzi miedzy wyznaczonymi koordynatami? zrobilem najprostrzym sposobem i postac sie ruszy ale skrypt wywala odrazu. To ja czy bot?
ReplyDeleteNie 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.
DeleteAcer,
ReplyDeleteis it possible to make a hotkey while killing the monsters pull the bodies down below me?
others question, I play a server where there is no exaust in the spells, is there any variable to check utito tempo active?
Delete1. To drag items these script: https://github.com/Ascerr/Lua-Scripts/blob/master/Drag%20Item%20under%20Your%20Character.lua
Delete2. 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()
Helo,
Deletei 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
after moving the bodies below the player, if it could also open it would be great
DeleteThx Again
It's thief script, you need to create it for yourself.
DeleteCould you at least give me a tip on how to combine 2 functions in the same script?
DeleteI can use the first function to check the loot, but I can't combine it with the second function to pull the bodies
thx
local config = {
Deleteitems = {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")
Can you help me with a script to skip a sertain waypoint if player on screen?
ReplyDeleteIt's simple:
Deletenode: 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
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
ReplyDeleteyou can use one line lua script in walker:
ReplyDeletelua: Map.UseItem(32323, 32211, 7, 0, 0, 0)
So I add all the nodes into the script, all the seperate ones?
DeleteExplain me your problem in game you try to solve.
DeleteI want my character to press bushes, in this case blueberry bushes
DeleteThis 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.
DeleteSo 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?
DeleteAdd wpt near bush first then add lua script with coordines of this bush.
ReplyDeleteSorry for the question, but how can I turn off a Lua script in "cavebot" when character leaves the cave?
ReplyDeleteI'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
Raw walker code:
Deletelua: Rifbot.KillScript("script name")
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
ReplyDeleteTell me server where you play, i'll check it.
DeleteNostalrius
DeleteIt's simple:
Deletehunt
goto: hunt, cap > 100
wait: 999999
Did not work. I will describe it better.
Delete* 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
I see you don't understood how bot works, you need spent some time alone with 3 lines of code i posted you.
DeleteMaybe 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.
Deletehunt
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
node: 32160, 31806, 6
Deletenode: 32166, 31806, 6
lua: if Self.Capity() <= 50 then Walker.Goto(hunt) end
wait: 1000
deposit
tried too
Done. Its working
ReplyDeleteWalker "door" function didnt work for green/blue djin door. Why? There are some special thing to do?
ReplyDeleteAscer,
ReplyDeleteI 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?
On server where are depot box, you can type inside deposit/withdraw window ID of depot box.
DeleteThanks bro.
DeleteIs 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?
ReplyDeleteI don't think so but you can search Github lua scripts database for some example and modify it for your needs:
Deletehttps://github.com/Ascerr/Lua-Scripts
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?
ReplyDeleteThe logic is, I make runes, deposit them, fill my soul and make runes again
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.
DeleteMy question is to open the bps with that ID that are stacked inside the locker
Hello,
DeletePut in depot different ID of backpack than backpack with runes, example blue backpack for depositing and standard brown for runes.
thanks!
DeleteIs there any script that can reinforce the "anti ks" of the "should attack me" option?
ReplyDeletebecause 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
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.
DeleteIt possible to make another script similar
ReplyDeleteDescription: Change target between creatures depent on hpperc.
CHANGE TARGET BETWEN CREATURES DEPENT ON DISTANCE...
For paladins will be good when we have like 3+ monsters at screen
Try one of these scripts:
Delete1. https://github.com/Ascerr/Lua-Scripts/blob/master/Attack%20Monster%20with%20most%20HP.lua
2. https://github.com/Ascerr/Lua-Scripts/blob/master/Prioritize%20Demonic%20or%20Ranged%20Mobs.lua
3. https://github.com/Ascerr/Lua-Scripts/blob/master/Attack%20Closest%20Monster.lua
rifbot didnt workes on tibiascape?
ReplyDeleteI don't support this game game client.
Deleteany idea of when u will support tibia scape?
DeleteDifferent architecture of game client.
DeleteJak ustawic supply check, ze np jak mniej niz 50 mana potow to idzie na refila do dp
ReplyDeletePod jaki serwer z hotkeyami czy bez?
DeleteNa kasterie, ze wszystkim
DeleteW sensie na ten moment najważniejsze dla mnie jest ogarnąć jak zrobić ten label "check supply" i jak jest zbyt mało to idzie do labelu "refil" i tam wayponciki na refil są.
DeleteTam z tego co kojarze to manasy się stakują więc możesz zrobić taki kod do walkera:
Deletegoto: refil, item(8309) < 50
Tak stakują się. Dobra sprobuje, dzieki!
DeleteCo zrobic zeby po reconnectcie resetowal mainbackpack?
ReplyDeletei drugi skrypt zeby zawsze trzymal mainbp otwarty gdyby sie zamknal przez prszypadek
Najlepiej użyć lua scriptu lub w walkerze co jakiś czas ustawić restart bps
Deletehttps://github.com/Ascerr/Lua-Scripts/blob/master/Reconnect%20Backpacks.lua
potrzebuje skryptu ktory bedzie rzucal 20 rubinow do pozycji x = 33266, y = 31829, z = 10
DeleteDa się to opracować?
DeleteSiema
DeleteW walkerze dodaj sobie taki kod, tylko wpisz dobre itemid dla rubinów. Ważne musza być na jedej kratce w plecaku bo jak masz je np 10 i 10 to wyrzuci tylko 10.
lua: Self.DropItem(33266, 31829, 10, itemid, 20, 0)
A jesli mam dajmy na to 83 na jednym slocie to rzuci 20 tylko ?
DeleteWszystko dziala! dziekuje pieknie !
DeleteTak bez problemu.
DeletePotrzebowałbym skrypt który po reloginie resetuje bp. Za kazdym razem po reloginie jak otwiera mi mooba to wyrzuca wszystkie zlootowane itemy do niego zamiast zbierac do bp, straszne to jest.
ReplyDeleteUżyj tego lua:
Deletehttps://github.com/Ascerr/Lua-Scripts/blob/master/Reconnect%20Backpacks.lua
Teraz taka kwiestia, idzie postac na refil jak jest dajmy na to 100 manasow albo 50 sd, ale ja nie wiem ile czego jest, co zrobic zeby kupowal te przedmioty do okreslonej ilosci. np manasy do 500 i sd do 400
ReplyDeleteJeżeli grasz na Kasterii i tam są stakujące się runy i potiony to wtedy możesz użyć tego kodu do kupowania MF i uhów w walkerze:
Deletebuy mf
goto: end mf, item(8309) >= 1800
lua: Self.Say("instant buy " .. 1800 - Self.ItemCount(8309) .. " mana fluids")
wait: 1000
goto: buy mf, item(8309) <= 1800
wait: 1000
end mf
buy uh
goto: end uh, item(3160) >= 450
lua: Self.Say("instant buy " .. 450 - Self.ItemCount(3160) .. " ultimate healing runes")
wait: 1000
goto: buy mf, item(3160) <= 450
end uh
dzięki wielkie, teraz najwazniejsze ctrl +p zatrzymuje calego bota, jest taka opcja zeby zatrzymac tylko targeting cavebot i looter ?
DeleteJeżeli potrzebujesz tego pod klawisz to ten script zapisz sobie pod nazwą: onoff cavebot
Deletepotem możesz go wywołać za pomocą shortkeya: EXECUTE onoff cavebot
lua: https://github.com/Ascerr/Lua-Scripts/blob/master/%5Bon%20Shortkey%5D%20On%20Off%20Cavebot.lua
Masz jakąś radę na stalkery? Idzie mi na full afk na resp, a jak otocza mnie stalkery to bot sie scina bo ich nie widzi i wyrzuca mi wpt z refila na normalne, pozniej nie moze sie odnalezc i tak stoi
ReplyDeleteSiema
DeleteZrobiłem script aby postać używa runy obszarowej na sobie gdy dostanie hita od stalkera:
https://github.com/Ascerr/Lua-Scripts/blob/master/Use%20Area%20Rune%20on%20you%20if%20dmg%20from%20stalker.lua
O stary, kozacki ten skrypt, szacuneczek na maxa. Dziekuje
DeletePrzeszkukalem kawal stron i bota, ale nie moge znalezc przeciagania dzwigni na cavebocie
ReplyDeleteZwykły action używania mapy w bocie, możesz zrobić oczywiście check czy już otwarta:
Deletelua: Map.UseItem(x, y, z, itemid, 1, 0)
Teraz misja na wyższym levelu. Kasteria. Preye. Czy da sie zrobic cos takiego ze mam preya na jakiegos mooba, i trwa on 2h, chcialbym zeby bot przerollowal go po 1h 59m. Tak zeby nie stracic wczesniejszych wylosowanych preyow. Najlepiej byloby gdyby potrafil przelosowac jeszcze mooba znow na tego ktorego potrzebuje, ale to juz chyba level hard.
ReplyDeleteTotalnie nie mam pojęcia o co chodzi z preyami także nie pomogę.
Deletenie dziala mi ten skryp, error
ReplyDelete--[[
Script Name: Stop cavebot and logout if no mf
Description: This script will check for green message about using vials. If low amount then will stop cavebot and wait for lost pz to logout.
Required: Gameclient need to send green message about vials.
Author: Ascer - example
]]
local config = {
vialMsg = "Using one of (.+) vials...", -- msg about vials, (.+) -> is place for detecting vials number
amount = 10 -- when mfs below this amount do action.
}
-- DON'T EDIT BELOW THIS LINE
local currentVials, logout = -1, false
--> read special messages in game
function proxyText(messages)
for i, msg in ipairs(messages) do
local vials = string.match(msg.message, config.vialMsg)
if vials ~= nil then
currentVials = tonumber(vials)
end
end
end
Proxy.TextNew("proxyText")
Module.New("Stop cavebot and logout if no mf", function()
if Self.isConnected() then
if logout then
if Walker.isEnabled() then Walker.Enabled(false) end
if Looter.isEnabled() then Looter.Enabled(false) end
if not Self.isInFight() then
Self.Logout()
else
print("Waiting for pz lost to logout..")
end
end
if currentVials ~= -1 and currentVials <= config.amount then
logout = true
end
else
if logout then
Rifbot.setCheckboxState("runemaker", "relogin after", false) -- disable here relogin from runemaker
end
end
end)
Napisz coś więcej, script po wczytaniu nie pokazuje error.
Deleteteraz jak w tym nawiasie (.+) wpisalem server log to moge uruhomic skrypt, ale wziac gdy schodzi ponizej 10 vials to zero reakcji...
ReplyDeleteNa jakim serwerze grasz? bo np. na WeAreDragons jest inna wiadomość dla viali: "Using one of (.+) vial of mfs..."
Deleteteraz na realerze
ReplyDelete10:39 Using one of 20 vials...
ReplyDeleteNapiszesz co dokladnie i gdzie musze wpisac? Moze robie cos zle..
ReplyDeleteDziała doskonale na Realerze, sprawdzałem teraz. Upewnij się, że inny lua script nie ma aktywnej funkcji proxy bo jest jednowątkowa i może ją jako pierwszy używac.
Delete