PDA

View Full Version : Druid Help with Port Hope script please.



Bigb
02-16-2013, 10:34 PM
So, I've tried to re-script a .lua file and I'm not 100% sure what's wrong with it can someone please give me some guidance to what I'm doing wrong. This is my error


15:29 XenoScript Error:
Script: [Mage] North Port Hope.lua
Line #: 43
Chunk: C:\Users\Robert\Documents\XenoBot\Scripts\[Mage] North Port Hope.lua
Error: '=' expected near 'gotoLabel'
This is an error with user-input and should not be reported as a bug with XenoBot.

and this is the LUA file that I've changed.


dofile("Forgee.lua")

--- Settings ---

ManaPotionID = 268 --- mana potion ID
MinPots = 20 ---- if less then script will exit spawn
MinCap = 20 ---- if less then script will exit spawn
ManaPotions = 125 ----- amount to refill
ManaPotionCost = 50 -- How Much Mana Potion Costs

MainBp = "" -- Add Color Here
GoldBp = "" -- Add Color Here
LootBp = "" -- Add Color Here

--- END OF SETTINGS---

--- DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU'RE DOING ---

displayInformationMessage("North Port Hope, Rescripted by BigB")

local INFORMATION = [[
Script: North Port Hope
Vocation: Sorcerer, Druid, Master Sorcerer or Elder Druid
Level Recomended: 25+
Version: Redone to 3.0
Thread: http://forums.xenobot.net/showthread.php?4402-*SCRIPTS*-100-FREE-100-AFK-100-PACC-*LE4Shaun*&p=46550#post46550
Creator: LE4Shaun
Rescripted by: Bigb
Contact: http://forums.xenobot.net/member.php?10937-Bigb
]]


registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")

function onWalkerSelectLabel(labelName)
------------------Make Sure You have desired Items------------------------------

if (labelName == "Check") then
delayWalker(1000)
Walker.Stop()
if (Self.ItemCount(PotID) <= MinPots) or (Self.Cap() < MinCap) then
Walker.Start
gotoLabel("Refill")
else
Walker.Start()
gotoLabel("Start Hunt")
end
---------------------Start Your Hunting------------------------------

elseif (labelName == "Start Hunt") then
Walker.Delay(1000)
Walker.Stop()
if(Self.ItemCount(MPotID) <= MinMPots) then
gotoLable("CheckingDP")
Walker.Start()
else
Walker.Start()
end

--------------Put Items into Depot--------------------------------

elseif (labelName == "Deposit") then
Walker.Stop()
Selt.ReachDepot()
Self.DepositItems(
{3556, 1}, --
{10301, 1}, --
{9686, 1}, --
{10279, 1}, --
{12517, 1} --
)
wait(1500,1900)
Walker.Start()

--------------------Deposit and Get Money--------------------------------

elseif (labelName == "Bank") then
Walker.Stop()
Walker.Delay(5000)
Self.Say("Hi")
wait(2000,5000)
Self.SayToNpc("deposit all")
wait(2000, 5000)
Self.SayToNpc("yes")
Self.WithdrawlMoney((ManaPotionCost*(ManaPotion-self.ItemCount(ManaPotionID))))
wait(2000,5000)
Self.SayToNpc("yes")
wait(2000, 5000)
self.SayToNpc("Balance")
wait(2000,5000)
Walker.Start()

---------------------Buy Your Potions---------------------------------

elseif (labelName == "Buy Potions") then
Walker.Stop()
Walker.Delay(5000)
Self.Say("hello")
wait(3000,5000)
Self.SayToNpc("trade")
wait(3000,5000)
Self.ShopBuyItem(ManaPotionID, (ManaPotions-Self.ItemCount(ManaPotionID)))
wait(1000,3000)
Walker.Start()
end
end

-------------------------Reset Backpacks----------------------------

elseif (labelName == "Reset Backpack") then
Walker.Stop()
Self.CloseContainers()
repeat
wait(1000)
until (Self.UseItemFromEquipment("backpack") > 0)
wait(1000)
Container.GetFirst():OpenChildren(Item.GetID(GoldB p), Item.GetID(LootBp))
wait(1000)
Container.GetByName(MainBp):Minimize()
wait(1000)
Container.GetByName(GoldBp):Minimize()
wait(1000)
Container.GetByName(LootBp):Minimize()
wait(1000,3000)
Walker.Start()
end
end

---------------------Not Sure What This Does-----------------------------

function buyAlotOfItemsBecauseItsSuchAGodDamnBigDeal(item, count)
count = tonumber(count) or 1
repeat
local amnt = math.min(count, 100)
if(Self.ShopBuyItem(item, amnt) == 0)then
return printf("ERROR: failed to buy item: %s", tostring(item))
end
wait(200,500)
count = (count - amnt)
until count <= 0
end

carlsen
02-16-2013, 11:13 PM
---------------------Start Your Hunting------------------------------

elseif (labelName == "Start Hunt") then
Walker.Delay(1000)
Walker.Stop()
if(Self.ItemCount(MPotID) <= MinMPots) then
gotoLable("CheckingDP")
Walker.Start()
else
Walker.Start()
end


Should be:

---------------------Start Your Hunting------------------------------

elseif (labelName == "Start Hunt") then
Walker.Delay(1000)
Walker.Stop()
if(Self.ItemCount(MPotID) <= MinMPots) then
gotoLabel("CheckingDP")
Walker.Start()
else
Walker.Start()
end

Bigb
02-16-2013, 11:22 PM
I actually had like 8 errors lol. misspellings and all types of stuff but I got it fixed and working like a charm thank you very much for response!