Sprawdźcie to:
local MainBP = "backpack" -- BP 1
local GoldBP = "orange bag" -- BP 2
local RareBP = "shopping bag" -- BP 3
local LeaveCap = 100 -- NA ILU CAPA MA WYCHODZIC Z EXPA
local ManasID = 268 -- ID MANA POTKA
local MaxManas = 500 -- ILE MA KUPOWAC MANASOW
local LeaveManas = 120 -- PRZY ILU MANASACH MA WYCHODZIC Z EXPA
local useAmmo = false -- CZY UZYWAC AMMO (true/false)
local AmmoID = 16141 -- ID AMMO
local MaxAmmo = 500 -- ILE MA KUPOWAC AMMO
local LeaveAmmo = 100 -- PRZY ILU AMMO MA WYCHODZIC Z EXPA
local function depotItems()
-- TUTAJ WPISUJECIE ITEMY JAKIE MA ODKLADAC DO DP I DO KTOREGO {ID ITEMU, SLOT DP}
Self.DepositItems({3031, 0}, {5944, 0})
end
-- NIE RUSZAC JAK NIE WIECIE CO
dofile('Forgee.lua')
Targeting.Start()
Looter.Start()
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "Check") then
if useAmmo == true then
Walker.ConditionalGoto(Self.Cap() < LeaveCap or Self.ItemCount(ManasID) < LeaveManas or Self.ItemCount(AmmoID) < LeaveAmmo, 'Leave', 'Hunt')
else
Walker.ConditionalGoto(Self.Cap() < LeaveCap or Self.ItemCount(ManasID) < LeaveManas, 'Leave', 'Hunt')
end
elseif (labelName == "CheckSupply") then
if useAmmo == true then
Walker.ConditionalGoto(Self.Cap() < LeaveCap or Self.ItemCount(ManasID) < LeaveManas or Self.ItemCount(AmmoID) < LeaveAmmo, 'ToRefil', 'ToHunt')
else
Walker.ConditionalGoto(Self.Cap() < LeaveCap or Self.ItemCount(ManasID) < LeaveManas, 'ToRefil', 'ToHunt')
end
elseif (labelName == "Bank") then
Walker.Stop()
Self.SayToNpc({"hi", "deposit all", "yes"}, 65)
wait(2000)
Walker.Start()
elseif (labelName == 'RefilMana') then
Walker.Stop()
Self.SayToNpc({'hi', 'trade'})
wait(200, 500)
Self.ShopBuyItem(ManasID, (MaxManas-Self.ItemCount(ManasID)))
wait(200, 500)
if Self.ItemCount(ManasID) < LeaveManas then
print([[Nie mozna kupic manasow. Prawdopodobnie brak zlota. Bot sie zatrzymuje.]])
return true
end
Walker.Start()
elseif (labelName == 'RefilAmmo') then
if useAmmo == true then
Walker.Stop()
Self.SayToNpc({'hi', 'trade'})
wait(200, 500)
Self.ShopBuyItem(AmmoID, (MaxAmmo-Self.ItemCount(AmmoID)))
wait(200, 500)
if Self.ItemCount(AmmoID) < LeaveAmmo then
print([[Nie mozna kupic ammo. Prawdopodobnie brak zlota. Bot sie zatrzymuje.]])
return true
end
Walker.Start()
end
elseif (labelName == 'Deposit') then
setWalkerEnabled(false)
depotItems()
wait(1500,1900)
setWalkerEnabled(true)
elseif (labelName == 'OpenBPs') then
Walker.Stop()
closeBackpacks()
wait(500)
openBackpacks({Item.GetID(GoldBP), 0}, {Item.GetID(RareBP), 0})
wait(2000)
Walker.Start()
end
end
Jeśli chcesz dodać Travel to dodajesz coś takiego: (na Gunzodus i chyba ogólnie OTS jest taki problem, że nie da się dać follow na NPC więc musisz taki stand dać, żeby mniej więcej na środku statku stać)
elseif (labelName == "GoToVeno") then
Walker.Stop()
Self.SayToNpc({"hi", "travel", "venore", "yes"}, 65)
wait(600)
Walker.Start()
Otwieranie drzwi jest w tej bibliotece Forgee więc analogicznie dajesz:
elseif (labelName == "openDoor1") then
Walker.Stop()
openDoor(x, y, z, keyid) -- jesli do otwarcia drzwi nie trzeba klucza to nie piszesz tego parametru tylko x,y,z drzwi
wait(600)
Walker.Start()