O char não procura o Depot 'locker', não sai do lugar.
Lua script
Cavebot:
Eu troquei o 'locker' pelo IDD 3499, ele se aproximou do Locker, porém não consegue abri-lo.
Lua script
SingleSoldierSpawn = true -- Do you want to go down the hole with a single dwarf soldier?
CapToLeave = 0
AmmoRefiller = true -- Set it to false if you won't use ammo hunting.
AmmoName = 'arrow'
AmmoPrice = 2
AmmoToBuy = 500
AmmoToLeave = 100
-- Depot Options --
DepotNonStackableBP = 'Blue Backpack'
DepotStackableBP = 'Purple Backpack'
DepotRuneBP = 'Grey Backpack'
NonStackItems = { 'battle axe', 'axe ring', 'crossbow', 'dwarven shield', 'soldier helmet', 'chain armor', 'dwarven ring', 'bolt' }
StackItems = { 'bolt'}
-- Backpack Options --
MainBP = 'Green Backpack'
LootBP = 'Green Backpack'
GoldBP = 'Golden Backpack'
RuneBP = 'Backpack' ---
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
-- Other Options --
Depositer = true
if HuntWithUH or HuntWithHMM then
RuneWithdrawer = true
else
RuneWithdrawer = false
end
-- Rune Options --
HuntWithUH = false
UHName = 'ultimate healing rune'
BpOfUHToHunt = 1
UHToLeave = 8
HuntWithHMM = false
HMMName = 'heavy magic missile rune'
BpOfHMMToHunt = 2
HMMToLeave = 5
-- SUPPLY CHECKER FUNCTION --
function supplycheck(keep, leave)
if HuntWithHMM and HuntWithUH and AmmoRefiller then
if cap() > CapToLeave and itemcount(AmmoName, true) > AmmoToLeave and itemcount(UHName) > UHToLeave and itemcount(HMMName) > HMMToLeave then
gotolabel(keep)
else
gotolabel(leave)
end
elseif HuntWithHMM and AmmoRefiller then
if cap() > CapToLeave and itemcount(AmmoName, true) > AmmoToLeave and itemcount(HMMName) > HMMToLeave then
gotolabel(keep)
else
gotolabel(leave)
end
elseif HuntWithUH and AmmoRefiller then
if cap() > CapToLeave and itemcount(AmmoName, true) > AmmoToLeave and itemcount(UHName) > UHToLeave then
gotolabel(keep)
else
gotolabel(leave)
end
elseif AmmoRefiller then
if cap() > CapToLeave and itemcount(AmmoName, true) > AmmoToLeave then
gotolabel(keep)
else
gotolabel(leave)
end
elseif HuntWithUH and HuntWithHMM then
if cap() > CapToLeave and itemcount(UHName, true) > UHToLeave and itemcount(HMMName, true) > HMMToLeave then
gotolabel(keep)
else
gotolabel(leave)
end
elseif HuntWithHMM then
if cap() > CapToLeave and itemcount(HMMName, true) > HMMToLeave then
gotolabel(keep)
else
gotolabel(leave)
end
elseif HuntWithUH then
if cap() > CapToLeave and itemcount(UHName, true) > UHToLeave then
gotolabel(keep)
else
gotolabel(leave)
end
else
if cap() > CapToLeave then
gotolabel(keep)
else
gotolabel(leave)
end
end
end
-- BANKER FUNCTION --
function depositbank(npcname)
local Bankers = getcreatures(npcname)
for _, banker in ipairs(Bankers) do
if islocation() and banker.dist <= 3 then
say('hi')
wait(700, 1500)
say('deposit all')
wait(300, 800)
say('yes')
if AmmoRefiller then
local NeedOfAmo = AmmoToBuy - itemcount(AmmoName, true)
local GoldToWithdraw = NeedOfAmo * AmmoPrice
if GoldToWithdraw > 0 then
wait(800, 1300)
say('withdraw '..GoldToWithdraw)
wait(800, 1300)
say('yes')
wait(1500)
if (itemcount('gold coin', true) + itemcount('platinum coin', true) * 100) < NeedOfAmo * AmmoPrice then
wait(1000)
gotolabel('Bank')
else
gotolabel('AfterBank')
break
end
else
gotolabel('AfterBank')
break
end
else
gotolabel('AfterBank')
break
end
else
wait(1000)
gotolabel('Bank')
end
end
end
-- BUY AMMO FUNCTION --
function buyammo(npcname)
local Bankers = getcreatures(npcname)
for _, banker in ipairs(Bankers) do
if islocation() and banker.dist <= 3 then
if AmmoRefiller then
local AmmoNeeded = AmmoToBuy - itemcount(AmmoName, true)
if AmmoNeeded > 0 then
say('hi')
wait(1200, 1900)
say(AmmoNeeded..' '..AmmoName..'s')
wait(800, 1100)
say('yes')
wait(1300, 1800)
if itemcount(AmmoName, true) < AmmoToBuy then
local AmmoNeeded = AmmoToBuy - itemcount(AmmoName, true)
if (itemcount('gold coin', true) + itemcount('platinum coin', true) * 100) < AmmoNeeded * AmmoPrice then
logout()
else
gotolabel('Ammo')
end
else
gotolabel('AfterAmmo')
break
end
else
gotolabel('AfterAmmo')
break
end
break
end
else
wait(1000)
gotolabel('Ammo')
end
end
end
-- CHECKERS--
function initialcheck()
if HuntWithHMM and HuntWithUH then
if itemcount(HMMName, true) >= BpOfHMMToHunt * 20 and itemcount(UHName, true) > BpOfUHToHunt * 20 then
gotolabel('ResetBackpack')
else
gotolabel('GoDeposit')
end
elseif HuntWithUH then
if itemcount(UHName, true) >= BpOfUHToHunt * 20 then
gotolabel('ResetBackpack')
else
gotolabel('GoDeposit')
end
elseif HuntWithHMM then
if itemcount(HMMName, true) >= BpOfHMMToHunt * 20 then
gotolabel('ResetBackpack')
else
gotolabel('GoDeposit')
end
else
gotolabel('ResetBackpack')
end
end
function checkammorefiller()
if AmmoRefiller then
gotolabel('GoBuyAmmo')
else
gotolabel('GoHunt')
end
end
function checkdepositer()
if Depositer or RuneWithdrawer then
gotolabel('GoDeposit')
else
gotolabel('InitialCheck')
end
end
function checkfloor(value)
wait(1000)
if posz() ~= value then
gotolabel(waypoint().id - 1)
end
end
function checkfloorshovel(value)
wait(1000)
if posz() ~= value then
gotolabel(waypoint().id - 2)
end
end
-- BACKPACK RESETTER --
function resetbackpack()
if MainBP == LootBP then
if itemcount(LootBP, MainBP) > 0 then
if windowcount(MainBP) < 2 then
wait(800, 1000)
openitem(LootBP, MainBP, true)
wait(800, 1200)
closewindow(GoldBP)
wait(1000)
openitem(GoldBP, MainBP, true)
wait(1000, 2000)
resizewindows()
wait(1000)
else
wait(800, 1200)
closewindow(GoldBP)
wait(1000)
openitem(GoldBP, MainBP, true)
wait(1000, 2000)
resizewindows()
wait(1000)
end
else
wait(800, 1200)
closewindow(GoldBP)
wait(1000)
openitem(GoldBP, MainBP, true)
wait(1000, 2000)
resizewindows()
wait(1000)
end
else
closewindow(LootBP)
wait(800, 1000)
openitem(LootBP, MainBP, true)
wait(800, 1200)
closewindow(GoldBP)
wait(1000)
openitem(GoldBP, MainBP, true)
wait(1000, 2000)
resizewindows()
wait(1000)
end
end
-- DEPOSITER FUNCTION --
function deposit()
reachgrounditem('locker')
wait(500)
openitem('locker')
wait(1000)
if Depositer then
-- Deposit Non Stackables --
if windowcount('locker') > 0 then
if itemcount(DepotNonStackableBP, 'Locker') > 0 then
local DEPOSITER_LOOT_WINCOUNT = windowcount(DepotNonStackableBP)
openitem(DepotNonStackableBP, 'Locker')
wait(1000)
if LootBP ~= MainBP then
closewindow(LootBP)
wait(800, 1200)
openitem(LootBP, MainBP, true)
wait(600, 900)
end
if windowcount(DepotNonStackableBP) > DEPOSITER_LOOT_WINCOUNT then
if getcontainer(LootBP).usedslots == 1 and itemcount (LootBP, LootBP) > 0 then
wait(800, 1000)
openitem(LootBP, LootBP)
wait(800)
end
clearlastonto()
for i = 0, #NonStackItems do
while itemcount(NonStackItems[i], LootBP) > 0 do
moveitemsonto(NonStackItems[i], DepotNonStackableBP, getlastonto(), DepotNonStackableBP, LootBP, 100)
wait(500)
end
end
end
higherwindow(DepotNonStackableBP)
wait(1000)
end
else
gotolabel('DepositItems')
end
-- Deposit Stackables --
if itemcount(DepotStackableBP, 'Locker') > 0 then
local DEPOSITER_STACKED_WINCOUNT = windowcount(DepotStackableBP)
openitem(DepotStackableBP, 'Locker')
wait(1000)
if LootBP ~= MainBP then
closewindow(LootBP)
wait(800, 1200)
openitem(LootBP, MainBP, true)
wait(600, 900)
end
if windowcount(DepotStackableBP) > DEPOSITER_STACKED_WINCOUNT then
stackitems(DepotStackableBP, false)
if getcontainer(LootBP).usedslots == 1 and itemcount (LootBP, LootBP) > 0 then
wait(800, 1000)
openitem(LootBP, LootBP)
wait(800)
end
for i = 0, #StackItems do
while itemcount(StackItems[i], LootBP) > 0 do
moveitems(StackItems[i], DepotStackableBP, LootBP, 100)
wait(500)
end
end
end
else
gotolabel('DepositItems')
end
end
end
-- RUNE WITHDRAWER --
-- Start UH Refiller --
function runewithdraw()
if HuntWithUH then
wait(1000)
closewindows()
wait(1000)
openitem('locker')
wait(1000)
openitem(DepotRuneBP, 'locker')
wait(1000)
openitem(MainBP, 'back')
wait(1000)
openitem(RuneBP, MainBP, true)
wait(1000)
resizewindows()
wait(1000)
if BpOfUHToHunt > 0 then
for i = 0, (BpOfUHToHunt - 1) do
wait(400, 800)
openitem(RuneBP, RuneBP, true, i)
wait(400, 800)
resizewindows()
while windowcount(RuneBP) < (i + 2) do
wait(400, 800)
openitem(RuneBP, RuneBP, true, i)
wait(400, 800)
resizewindows()
end
local expectedRunesCount = (i + 1) * 20
while itemcount(UHName, RuneBP) < expectedRunesCount do
while itemcount(UHName, DepotRuneBP) == 0 and itemcount(DepotRuneBP, DepotRuneBP) > 0 do
openitem(DepotRuneBP, DepotRuneBP, false)
wait(400, 800)
end
if itemcount(UHName, DepotRuneBP) > 0 then
moveitemsonto(UHName, RuneBP, i, RuneBP, DepotRuneBP, 1)
wait(400, 800)
else
break
end
end
end
end
else
return
end
--- Start HMM Refiller ---
if HuntWithHMM then
if not HuntWithUH then
wait(1000)
closewindows()
wait(1000)
openitem('locker')
wait(1000)
openitem(DepotRuneBP, 'locker')
wait(1000)
openitem(MainBP, 'back')
wait(1000)
openitem(RuneBP, MainBP, true)
wait(1000)
resizewindows()
wait(1000)
if BpOfHMMToHunt > 0 then
for i = 0, (BpOfHMMToHunt - 1) do
wait(400, 800)
openitem(RuneBP, RuneBP, true, i)
wait(400, 800)
resizewindows()
while windowcount(RuneBP) < (i + 2) do
wait(400, 800)
openitem(RuneBP, RuneBP, true, i)
wait(400, 800)
resizewindows()
end
local expectedRunesCount = (i + 1) * 20
while itemcount(HMMName, RuneBP) < expectedRunesCount do
while itemcount(HMMName, DepotRuneBP) == 0 and itemcount(DepotRuneBP, DepotRuneBP) > 0 do
openitem(DepotRuneBP, DepotRuneBP, false)
wait(400, 800)
end
if itemcount(HMMName, DepotRuneBP) > 0 then
moveitemsonto(HMMName, RuneBP, i, RuneBP, DepotRuneBP, 1)
wait(400, 800)
else
break
end
end
end
end
else
wait(1000)
if BpOfHMMToHunt > 0 then
for i = (0 + BpOfUHToHunt), (BpOfHMMToHunt + BpOfUHToHunt - 1) do
wait(400, 800)
openitem(RuneBP, RuneBP, true, i)
wait(400, 800)
resizewindows()
while windowcount(RuneBP) < (i + 2) do
wait(400, 800)
openitem(RuneBP, RuneBP, true, i)
wait(400, 800)
resizewindows()
end
local expectedRunesCount = (i - BpOfUHToHunt + 1) * 20
while itemcount(HMMName, RuneBP) < expectedRunesCount do
while itemcount(HMMName, DepotRuneBP) == 0 and itemcount(DepotRuneBP, DepotRuneBP) > 0 do
openitem(DepotRuneBP, DepotRuneBP, false)
wait(400, 800)
end
if itemcount(HMMName, DepotRuneBP) > 0 then
moveitemsonto(HMMName, RuneBP, i, RuneBP, DepotRuneBP, 1)
wait(400, 800)
else
break
end
end
end
end
end
else
return
end
end
Cavebot:
deposit()
wait(800, 1200)
runewithdraw()
Eu troquei o 'locker' pelo IDD 3499, ele se aproximou do Locker, porém não consegue abri-lo.
function deposit()
reachgrounditem('3499')
wait(500)
openitem('3499')
wait(1000)
if Depositer then