[Mino kazo] Also getting stuck when refill at Sigurd, he is to far away from Player
[Mino kazo] Also getting stuck when refill at Sigurd, he is to far away from Player
thais north cyclops.
I've got problem with depot. Xeno can open but he works normally. He's openning and closing, after that he's going to next waypoint (but without withdrawing royal spears)
Maybe I've got something bad done? Please tell me.
Thanks in advice.
BTW, I think it'll be better when script stop attacking monsters after checking supplies, spears...
When he counts that he has not enough spears he's walking out the spawn, meeting lots of monsters sometime, when he try to kill em its very possible that spears ends (especially at low lvls)
Last edited by kamilson_92; 02-27-2016 at 07:04 PM.
-----------------------------------------------------------------------------------------------------------------------
--- BP Settings ---
local GoldBP = "Orange backpack" --- Your gold backpack (use same colors inside)
local LootBP = "Backpack" --- Your Loot backpack (use same colors inside)
--- Depot BP Info
--- Your #1 BP inside depot will recieve stackables also non-stackables
-----------------------------------------------------------------------------------------------------------------------
--- Hunt Settings ---
local MPBuy = 50 --- Amount of mana pots to bring on hunt.
local MPLeave = 15 --- Leave spawn if mana potions is below this.
local ManaPots = 268 --- ID of your manapots.
local ManaPrice = 50
local RuneBuy = 0 ---Buys Hmms For a little exp boost. 0 to disable
local Runeid = 3198 ---Id of the rune you wanna shoot
local RunePrice = 12
------------------------------------------------------------------------------------------
local CapLeave = 30 --- Leave spawn if cap is below this.
local Hardcore = false ----Do you want to go Hardcore part true/false
local Smith = false ----Do you want to go Smith part true/false
local AmmoID = 7378 ---Id of Ammo To refill <<Royal spear 7378>>>
local MaxAmmo = 13 --------How many ammo you wanna withdraw from depot
local AmmoDP = 1 -- Slot of DP that will be for your ammunition. 0 is first backpack 1 is second backpack 2 is third backpack ETC
local LeaveAmmo = 8
--------------------------Don't edit below unless you know what's there--------------------------------------------
Targeting.Start()
Looter.Start()
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
print([[
-----------------------------------
-----------------------------------
----Thais North Cyclops [Paladin]--
----This script was created by:----
----------------Nixez-------------
----------Happy Hunting!-----------
-----------------------------------]])
wait(7000)
function onWalkerSelectLabel(labelName)
if (labelName == "check") then
if ((Self.Cap() <= CapLeave)) or (Self.ItemCount(AmmoID) < LeaveAmmo) then
print([[Low Cap or ammo.]])
gotoLabel("GoTown")
elseif (Self.ItemCount(ManaPots) < MPLeave) then
Walker.Goto("GoTown")
print([[Low mana pots, leaving cave.]])
else
Walker.Goto("StartHunt")
print([[Enough supplies & cap, keep hunting.]])
end
elseif (labelName == "Deposit") then
Walker.Stop()
wait(1600,2400)
Self.ReachDepot()
Self.DepositItems({7398, 0}, {7452, 0}, {5880, 0}, {3039, 0}, {9657, 0})
elseif (labelName == "GetAmmo") then
Self.ReachDepot()
wait(200, 300)
Container.GetByName("Locker"):OpenChildren({3502, true}) -- Opens depot chest
wait(500,600)
Container.GetByName("Locker"):Close() -- Closes locker
wait(500,600)
Self.WithdrawItems(AmmoDP, {AmmoID, 0, MaxAmmo-Self.ItemCount(AmmoID)}) -- 3 means from third backpack in DP, Ammo is ammunition ID, 0 means to first backpack you hold, last "number" is an amount to withdraw.
wait(200,400)
elseif (labelName == "Bank") then
Walker.Stop()
print([[Depositing GP & withdrawing money for supplies..]])
wait(1800,2400)
Self.SayToNpc("hi")
wait(1800,2400)
Self.SayToNpc("deposit all")
wait(1800,2400)
Self.SayToNpc("yes")
wait(1800,2400)
Self.WithdrawMoney((ManaPrice*(MPBuy-Self.ItemCount(ManaPots)))+500)
wait(1800,2400)
Self.WithdrawMoney((RunePrice*(RuneBuy-Self.ItemCount(Runeid)))+500)
wait(1800,2400)
Self.SayToNpc("yes")
wait(1800,2400)
Self.SayToNpc("balance")
Targeting.Start()
Walker.Start()
elseif (labelName == "Potions") then
Walker.Stop()
print([[Refilling pots..]])
wait(2500,3000)
Self.SayToNpc("hi")
wait(1900,2400)
Self.SayToNpc("vial")
wait(1900,2400)
Self.SayToNpc("yes")
wait(1900,2400)
Self.SayToNpc("trade")
wait(1900,2400)
Self.ShopBuyItemsUpTo(ManaPots, MPBuy)
Self.SayToNpc("bye")
Self.SayToNpc("hi")
wait(1900,2400)
Self.SayToNpc("trade")
wait(1900,2400)
Self.ShopBuyItemsUpTo(Runeid, RuneBuy)
wait(1900,2400)
Self.SayToNpc("bye")
Walker.Start()
elseif (labelName == "CheckHardcore") then
delayWalker(1000)
setWalkerEnabled(false)
if Hardcore == true then
setWalkerEnabled(true)
print("Going Hardcore")
gotoLabel("DoHardcore")
else
setWalkerEnabled(true)
print("escaping Hard Core")
gotoLabel("NoHardcore")
end
elseif (labelName == "CheckSmith1") then
delayWalker(1000)
setWalkerEnabled(false)
if Smith == true then
setWalkerEnabled(true)
print("Going to Smith's Spawn")
gotoLabel("Smith1")
else
setWalkerEnabled(true)
print("Skipping Smith's Spawn")
gotoLabel("NoSmith1")
end
elseif (labelName == "Backpacks") then
Walker.Stop()
print([[Resetting BP..]])
wait(1000,2000)
Self.CloseContainers()
wait(2000,3000)
Self.OpenMainBackpack(true):OpenChildren({Item.Get ID(LootBP), true}, {GoldBP, true})
wait(2000,3000)
Walker.Start()
end
end
-----
Self.ReachDepot = function (tries)
local tries = tries or 3
Walker.Stop()
local DepotIDs = {3497, 3498, 3499, 3500}
local DepotPos = {}
for i = 1, #DepotIDs do
local dps = Map.GetUseItems(DepotIDs[i])
for j = 1, #dps do
table.insert(DepotPos, dps[j])
end
end
local function gotoDepot()
local pos = Self.Position()
print("Depots found: " .. tostring(#DepotPos))
for i = 1, #DepotPos do
location = DepotPos[i]
Self.UseItemFromGround(location.x, location.y, location.z)
wait(1000, 2000)
if Self.DistanceFromPosition(pos.x, pos.y, pos.z) >= 1 then
wait(5000, 6000)
if Self.DistanceFromPosition(location.x, location.y, location.z) == 1 then
Walker.Start()
return true
end
else
print("Something is blocking the path. Trying next depot.")
end
end
return false
end
repeat
reachedDP = gotoDepot()
if reachedDP then
return true
end
tries = tries - 1
sleep(100)
print("Attempt to reach depot was unsuccessfull. " .. tries .. " tries left.")
until tries <= 0
return false
end
if DoTask then
LootMessageProxy.OnReceive('LootMessageProxy', function (proxy, msg)
if string.match(msg, 'Loot of a hydra') then
HydraCount = HydraCount + 1
print("Hydras killed: "..HydraCount.."/650")
end
end)
end
Map.GetUseItems = function (id)
if type(id) == "string" then
id = Item.GetID(id)
end
local pos = Self.Position()
local store = {}
for x = -7, 7 do
for y = -5, 5 do
if Map.GetTopUseItem(pos.x + x, pos.y + y, pos.z).id == id then
itemPos = {x = pos.x + x, y = pos.y + y, z = pos.z}
table.insert(store, itemPos)
end
end
end
return store
end
function Self.WithdrawItems2(slot, ...)
local function withdrawFromChildContainers(items, parent, slot)
local bid = parent:GetItemData(slot).id
if (#items > 0) and (Item.isContainer(bid)) then
parent:UseItem(slot, true) -- open backpack on the slot
else
return true
end
wait(500, 900)
local child = Container.GetLast() -- get the child opened backpack
if (child:ID() == bid) then -- the child bp id matches the itemid clicked, close enough
local childCount = child:ItemCount()
local offset = 0
local count = {}
for spot = 0, childCount - 1 do -- loop through all the items in depot backpack
local item = child:GetItemData(spot - offset)
local data, index = table.contains(items, item.id, 1)--, table.find(items, item.id)
if (data) then
if (not count[item.id]) then count[item.id] = 0 end -- start the count
local DestinationBp = Container.GetByName(AmmoBP)
local dest = DestinationBp
local skip = false
local toMove = item.count -- we think we're going to move all the item at first, this may change below
local slotnum = tonumber(data[2])
if (slotnum) then
slot = slotnum
end
toMove = math.min(data[3] - count[item.id], item.count) -- get what's left to withdraw or all of the item, whichever is least
if((count[item.id] + toMove) > data[3])then -- this is probably not needed, but just incase we are trying to move more than the limit
skip = true -- skip the entire moving
table.remove(items, index) -- remove the item from the list
end
if not (skip) then
local compCount = child:CountItemsOfID(item.id)
wait(500, 900)
if(compCount > child:CountItemsOfID(item.id))then -- less of the itemid in there now, item moved successfully.. most likely.
count[item.id] = count[item.id] + toMove
if(toMove == item.count)then -- if we deposited a full item stack then decrease the offset, if not remove the item since we're done.
offset = offset + 1
else
table.remove(items, index)
end
else
return true -- we didn't move the item, container is full. TODO: recurse the player containers.
end
end
end
end
return withdrawFromChildContainers(items, child, child:ItemCount() - 1)
end
return false
end
setBotEnabled(false) -- turn off walker/looter/targeter
local depot = Self.OpenDepot()
if (depot) then -- did we open depot?
local items = {}
for i = 1, #arg do
local data = arg[i]
items[i] = {Item.GetItemIDFromDualInput(data[1]), data[2], data[3]}
end
withdrawFromChildContainers(items, depot, slot)
end
setBotEnabled(true)
delayWalker(2500)
end
Please someone fix it. I don't have any freaky idea how to repair it...
(The problem is that bot wants withdraw too more spears than he can. "This object is too heavy for you to carry")
Please help me!
Due to me being a terribad, could you possibly put the suggested level range beside each download link?If it's not too much!
Thanks for all your Epic Scripts though, i love em'!
Hey Kamilson,
The way to adjust how many spears is the line at...
--- Hunt Settings ---
local MPBuy = 50 --- Amount of mana pots to bring on hunt.
local MPLeave = 15 --- Leave spawn if mana potions is below this.
local ManaPots = 268 --- ID of your manapots.
local ManaPrice = 50
local RuneBuy = 0 ---Buys Hmms For a little exp boost. 0 to disable
local Runeid = 3198 ---Id of the rune you wanna shoot
local RunePrice = 12
------------------------------------------------------------------------------------------
local CapLeave = 30 --- Leave spawn if cap is below this.
local Hardcore = false ----Do you want to go Hardcore part true/false
local Smith = false ----Do you want to go Smith part true/false
local AmmoID = 7378 ---Id of Ammo To refill <<Royal spear 7378>>>
----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
local MaxAmmo = 13 --------How many ammo you wanna withdraw from depot <-------------------- change this too a lower amount. instead of 13 change to like 10, or whatever your weight can hold.
----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
local AmmoDP = 1 -- Slot of DP that will be for your ammunition. 0 is first backpack 1 is second backpack 2 is third backpack ETC
local LeaveAmmo = 8
--------------------------Don't edit below unless you know what's there--------------------------------------------
Ye, I know. I want enough spears (that amount which I can carry) but xenobot wants withdraw more and he's stays by depot and nothing
BTW. COULD SOMEONE PUT THE LINK TO AB'dendriel CYCLOPS? This link isn't working. Refresh please.
Last edited by kamilson_92; 02-29-2016 at 10:47 AM.
I have some problems with Minotaurs RP. Dont talk with npc and dont refill/open dp.
Maybe because that: when i paste lua and xbst to scripts/settings and im clicking on LOAD in Xenobot appear a msg that told me to chose "skip" or "replace". When i click Replace, my lua is replaced to non edited, and when im click skip, script doesnt open dp/talk to npcs.
Last edited by naoymi; 03-01-2016 at 06:47 PM.
Maybe venore Swamp Trolls? Good spot to make money. Knight plese
Att, Mr Moore.
My bot gets stuck withdrawing RS from the depot.
Sometimes it tries to withdraw more RS than what I can carry (even though the max amount is still lower than my cap).
Sometimes it just withdraws RS to the backpack and they stay there forever... ahaha xD
What can be done?
Also, I had to add a check for RS in the "check" label, because I ran out of RS during the hunt.