
Originally Posted by
Weathercock
It'd be great if you could fix this 'Venore Daily Tasks' script:
------------------------------------------------------------------------------------------------------
--------------------------------------- Settings -----------------------------------------------------
------------------------------------------------------------------------------------------------------
logoutWhenDone = false
alertWhenDone = true
digForSlug = true
capToDeposit = 0 --4 + 18 + 19 -- Will go to the bank if cap is less than this, default is what you need to carry the quest items
transferGold = no
transferTo = "Kharsek"
------------------------------------------------------------------------------------------------------
--------------------------------------- Constants ----------------------------------------------------
------------------------------------------------------------------------------------------------------
toolID = 17513
shovelID = 3457
------------------------------------------------------------------------------------------------------
--------------------------------------- Labels -------------------------------------------------------
------------------------------------------------------------------------------------------------------
Targeting.Start()
Looter.Start()
registerEventListener(WALKER_SELECTLABEL, "handleLabel")
function handleLabel(labelName)
if labelName == "NormanStart" then
Walker.Stop()
Self.SayToNpc({"hi", "job", "maintenance", "yes", "pathfinder", "yes", "sabotage", "yes"}, 90)
Walker.Start()
------------------------------------------------------------------------------------------------------
elseif labelName == "RepairNorth" then
delayWalker(500)
useItemOnGround(toolID, NORTH)
------------------------------------------------------------------------------------------------------
elseif labelName == "RepairEast" then
delayWalker(500)
useItemOnGround(toolID, EAST)
------------------------------------------------------------------------------------------------------
elseif labelName == "RepairSouth" then
delayWalker(500)
useItemOnGround(toolID, SOUTH)
------------------------------------------------------------------------------------------------------
elseif labelName == "RepairWest" then
delayWalker(500)
useItemOnGround(toolID, WEST)
------------------------------------------------------------------------------------------------------
elseif labelName == "NormanEnd" then
Walker.Stop()
-- Drop Can of Oil since you'll be given a new one next time, even if you're still carrying your old one
local bp = Container.New(backpack)
local pos = Self.Position()
for spot = bp:ItemCount() - 1, 0, -1 do
local item = bp:GetItemData(spot)
if item.id == toolId then
delayWalker(300)
bp:MoveItemToGround(spot, pos.x, pos.y, pos.z)
end
end
wait(2000, 3000)
Self.SayToNpc({"hi", "maintenance", "pathfinder", "sabotage", "bonus", "yes"}, 90)
Walker.ConditionalGoto(Self.Cap() < minCap, "GoDeposit", "End")
Walker.Start()
------------------------------------------------------------------------------------------------------
elseif labelName == "Bank" then
delayWalker(500)
useItemOnGround(toolID, WEST)
------------------------------------------------------------------------------------------------------
elseif labelName == "Frank" or labelName == "Scott"then
Walker.Stop()
Self.SayToNpc({"hi", "yes"}, 90)
Walker.Start()
------------------------------------------------------------------------------------------------------
elseif labelName == "Bank" then
Walker.Stop()
local money = Self.Money()
Self.SayToNpc({"hi", "deposit all", "yes", "transfer", money, transferTo, "yes"}, 90)
Walker.Start()
------------------------------------------------------------------------------------------------------
elseif labelName == "DigNorth" then
if Self.ItemCount(shovelID) > 0 then
delayWalker(300)
useItemOnGround(shovelID, NORTH)
end
------------------------------------------------------------------------------------------------------
elseif labelName == "CheckDig" then
if not digForSlug then
gotoLabel("EndDig")
end
------------------------------------------------------------------------------------------------------
elseif labelName == "End" then
Walker.Stop()
gotoLabel("Start")
if logoutWhenDone then
Self.Logout()
end
if alertWhenDone then
alert()
end
------------------------------------------------------------------------------------------------------
elseif labelName == "DoorSouth" then
Walker.Stop()
local pos = Self.Position()
Self.Step(SOUTH)
wait(400, 600)
while (Self.Position().y ~= pos.y+1) do
Self.UseItemFromGround(pos.x, pos.y+1, pos.z)
wait(400, 600)
Self.Step(SOUTH)
end
Walker.Start()
------------------------------------------------------------------------------------------------------
elseif labelName == "DoorNorth" then
Walker.Stop()
local pos = Self.Position()
Self.Step(NORTH)
wait(400, 600)
while (Self.Position().y ~= pos.y-1) do
Self.UseItemFromGround(pos.x, pos.y-1, pos.z)
wait(400, 600)
Self.Step(NORTH)
wait(400, 600)
end
Walker.Start()
------------------------------------------------------------------------------------------------------
elseif labelName == "DoorWest" then
Walker.Stop()
local pos = Self.Position()
Self.Step(WEST)
wait(400, 600)
while (Self.Position().x ~= pos.x-1) do
Self.UseItemFromGround(pos.x-1, pos.y, pos.z)
wait(400, 600)
Self.Step(WEST)
wait(400, 600)
end
Walker.Start()
------------------------------------------------------------------------------------------------------
elseif labelName == "DoorEast" then
Walker.Stop()
local pos = Self.Position()
Self.Step(EAST)
wait(400, 600)
while (Self.Position().x ~= pos.x+1) do
Self.UseItemFromGround(pos.x+1, pos.y, pos.z)
wait(400, 600)
Self.Step(EAST)
wait(400, 600)
end
Walker.Start()
------------------------------------------------------------------------------------------------------
end
end
function useItemOnGround(item, DIR)
local pos = Self.Position()
if(DIR == NORTH) then
Self.UseItemWithGround(item, pos.x, pos.y-1, pos.z)
elseif(DIR == SOUTH) then
Self.UseItemWithGround(item, pos.x, pos.y+1, pos.z)
elseif(DIR == EAST) then
Self.UseItemWithGround(item, pos.x+1, pos.y, pos.z)
elseif(DIR == WEST) then
Self.UseItemWithGround(item, pos.x-1, pos.y, pos.z)
end
end
I've looked over it several times and can't find out why it doesn't talk to NPCs and is really buggy every other run. Sometimes it won't use the oil can, other times it won't go underground.