slash234
12-01-2012, 06:07 PM
dofile('Forgee.lua')
------------------------------------------------------------------------------------------
------- Pirates Yalahar By Tibtrak!-------------------------------------------------------
------------------------------------------------------------------------------------------
------- Customize your script ------------------------------------------------------------
------------------------------------------------------------------------------------------
---BP Setup---
GoldBp = "Brocade Backpack" -- Put the name of your backpack for gold
GoldBpID = 8860 -- Put the ID of your backpack for gold
LootBp = "Expedition Backpack" -- Put the name of your backpack for loot
LootBpID = 10324 -- Put the ID of your backpack for
---Potions & Cap Setup---
CapToRefill = 100 -- below this amount bot goes to refill
PotsToRefill = 60 -- below this amount bot goes to refill
ManasToBuy = 300 -- Amount of mana potions to buy
pots = 268 -- ID of manapotion (should not be changed)
HealthPotsID = 236 -- ID of healthpotion you want to buy
HealthPotsPrice = 100 -- Price of healthpotion
HealthPotsToBuy = 25 -- Amount of healthpotions to buy
------------------------------------------------------------------------------------------
------- Do Not Touch Below! :) -----------------------------------------------------------
------------------------------------------------------------------------------------------
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "CheckStatus") then
setBotEnabled(false)
if ((Self.ItemCount(pots) < PotsToRefill)) or (Self.Cap() < CapToRefill) then
setBotEnabled(true)
gotoLabel("ToTown")
else
setBotEnabled(true)
gotoLabel("Hunt")
end
elseif (labelName == "DepositGold") then
setBotEnabled(false)
delayWalker(10000)
Self.SayToNpc('hi')
wait(1000,2000)
Self.SayToNpc('deposit all')
wait(1000,2000)
Self.SayToNpc('yes')
wait(1000,2000)
local GoldToManas = ((ManasToBuy-Self.ItemCount(268))*50)
local GoldToHealth = ((HealthPotsToBuy-Self.ItemCount(HealthPotsID))*HealthPotsPrice)
local GoldToPots = (GoldToManas+GoldToHealth+500)
Self.SayToNpc("withdraw " .. GoldToPots)
wait(1000,2000)
Self.SayToNpc('yes')
setBotEnabled(true)
elseif (labelName == "ReopenBps") then
setBotEnabled(false)
closeBackpacks()
wait(1000,2000)
openBackpacks(GoldBpID, LootBpID)
wait(1000,2000)
setBotEnabled(true)
elseif (labelName == "DepositItems") then
setBotEnabled(false)
Self.DepositItems({5461, 0}, {6096, 0}, {5918, 0}, {6097, 0}, {6098, 0}, {6126, 0}, {6095, 0}, {10302, 0})
setBotEnabled(true)
elseif (labelName == "BuyPotions") then
setBotEnabled(false)
Self.SayToNpc({"Hi", "Trade"}, 65)
wait(1000,2000)
Self.ShopBuyItem(268,(ManasToBuy-Self.ItemCount(268)))
wait(1000,2000)
setBotEnabled(true)
elseif (labelName == "BuyHealthPotions") then
setBotEnabled(false)
Self.SayToNpc({"Hi", "Trade"}, 65)
wait(1000,2000)
Self.ShopBuyItem(HealthPotsID,(HealthPotsToBuy-Self.ItemCount(HealthPotsID)))
wait(1000,2000)
setBotEnabled(true)
elseif (labelName == "CheckHealthsShop") then
setBotEnabled(false)
if ((Self.ItemCount(HealthPotsID) < HealthPotsToBuy)) then
setBotEnabled(true)
gotoLabel("BuyHealthPotions")
else
setBotEnabled(true)
gotoLabel("GoOn")
end
elseif (labelName == "CheckManas") then
if (Self.ItemCount(pots) <= PotsToRefill) then
setWalkerEnabled(true)
gotoLabel("GoManas")
else
setWalkerEnabled(true)
gotoLabel("GoHunt")
end
end
end
------------------------------------------------------------------------------------------
------- Pirates Yalahar By Tibtrak!-------------------------------------------------------
------------------------------------------------------------------------------------------
------- Customize your script ------------------------------------------------------------
------------------------------------------------------------------------------------------
---BP Setup---
GoldBp = "Brocade Backpack" -- Put the name of your backpack for gold
GoldBpID = 8860 -- Put the ID of your backpack for gold
LootBp = "Expedition Backpack" -- Put the name of your backpack for loot
LootBpID = 10324 -- Put the ID of your backpack for
---Potions & Cap Setup---
CapToRefill = 100 -- below this amount bot goes to refill
PotsToRefill = 60 -- below this amount bot goes to refill
ManasToBuy = 300 -- Amount of mana potions to buy
pots = 268 -- ID of manapotion (should not be changed)
HealthPotsID = 236 -- ID of healthpotion you want to buy
HealthPotsPrice = 100 -- Price of healthpotion
HealthPotsToBuy = 25 -- Amount of healthpotions to buy
------------------------------------------------------------------------------------------
------- Do Not Touch Below! :) -----------------------------------------------------------
------------------------------------------------------------------------------------------
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "CheckStatus") then
setBotEnabled(false)
if ((Self.ItemCount(pots) < PotsToRefill)) or (Self.Cap() < CapToRefill) then
setBotEnabled(true)
gotoLabel("ToTown")
else
setBotEnabled(true)
gotoLabel("Hunt")
end
elseif (labelName == "DepositGold") then
setBotEnabled(false)
delayWalker(10000)
Self.SayToNpc('hi')
wait(1000,2000)
Self.SayToNpc('deposit all')
wait(1000,2000)
Self.SayToNpc('yes')
wait(1000,2000)
local GoldToManas = ((ManasToBuy-Self.ItemCount(268))*50)
local GoldToHealth = ((HealthPotsToBuy-Self.ItemCount(HealthPotsID))*HealthPotsPrice)
local GoldToPots = (GoldToManas+GoldToHealth+500)
Self.SayToNpc("withdraw " .. GoldToPots)
wait(1000,2000)
Self.SayToNpc('yes')
setBotEnabled(true)
elseif (labelName == "ReopenBps") then
setBotEnabled(false)
closeBackpacks()
wait(1000,2000)
openBackpacks(GoldBpID, LootBpID)
wait(1000,2000)
setBotEnabled(true)
elseif (labelName == "DepositItems") then
setBotEnabled(false)
Self.DepositItems({5461, 0}, {6096, 0}, {5918, 0}, {6097, 0}, {6098, 0}, {6126, 0}, {6095, 0}, {10302, 0})
setBotEnabled(true)
elseif (labelName == "BuyPotions") then
setBotEnabled(false)
Self.SayToNpc({"Hi", "Trade"}, 65)
wait(1000,2000)
Self.ShopBuyItem(268,(ManasToBuy-Self.ItemCount(268)))
wait(1000,2000)
setBotEnabled(true)
elseif (labelName == "BuyHealthPotions") then
setBotEnabled(false)
Self.SayToNpc({"Hi", "Trade"}, 65)
wait(1000,2000)
Self.ShopBuyItem(HealthPotsID,(HealthPotsToBuy-Self.ItemCount(HealthPotsID)))
wait(1000,2000)
setBotEnabled(true)
elseif (labelName == "CheckHealthsShop") then
setBotEnabled(false)
if ((Self.ItemCount(HealthPotsID) < HealthPotsToBuy)) then
setBotEnabled(true)
gotoLabel("BuyHealthPotions")
else
setBotEnabled(true)
gotoLabel("GoOn")
end
elseif (labelName == "CheckManas") then
if (Self.ItemCount(pots) <= PotsToRefill) then
setWalkerEnabled(true)
gotoLabel("GoManas")
else
setWalkerEnabled(true)
gotoLabel("GoHunt")
end
end
end