Updated to OTCv8 3.1 rev 157

This commit is contained in:
OTCv8
2022-03-17 20:50:37 +00:00
parent 1d7d2f0c2b
commit 19fad11949
114 changed files with 2172 additions and 984 deletions

View File

@@ -0,0 +1,40 @@
CaveBot.Extensions.Travel = {}
CaveBot.Extensions.Travel.setup = function()
CaveBot.registerAction("Travel", "#db5a5a", function(value, retries)
local data = string.split(value, ",")
if #data < 2 then
warn("CaveBot[Travel]: incorrect travel value!")
return false
end
local npcName = data[1]:trim()
local dest = data[2]:trim()
if retries > 5 then
print("CaveBot[Travel]: too many tries, can't travel")
return false
end
local npc = getCreatureByName(npcName)
if not npc then
print("CaveBot[Travel]: NPC not found, can't travel")
return false
end
if not CaveBot.ReachNPC(npcName) then
return "retry"
end
CaveBot.Travel(dest)
delay(storage.extras.talkDelay*3)
print("CaveBot[Travel]: travel action finished")
return true
end)
CaveBot.Editor.registerAction("travel", "travel", {
value="NPC name, city",
title="Travel",
description="NPC name, City name, delay in ms(default is 200ms)",
})
end