Odp: Xenobot przerabianie/pisanie skryptow
Elf.... Jeden problem rozwi?zany, teraz m?g?bys spojrze? na fullsprawdzenie? Bo tam mi wy?wietla b??d jaki?
---------- Tre?? dodana o 13:33 ----------
Troche w nim pozmienialem. Wyplaca mi kase i kupuje potki , tylko jest gorzej z tym ze jak ma wystarczajaca ilosc potek to i tak idzie znow kupic i wyplacic kase, tak jest ciagle nwm dlaczego.. Problem jest raczej z checkerem i fullcheckerem. Moze ktos pomoc ?
[LUA] ---------------------------------
--------Twoj Waypoint------------
-------Created By Sung----------
---------------------------------
----------- BP SETUP ------------
--~ [BP 1] ~-- Main
--~ [BP 2] ~-- Produkty
--~ [BP 3] ~-- Gold
----------- DP SETUP ------------
--~ [DP 1] ~-- Rare
--~ [DP 2] ~-- Produkty
------------ Settings -----------
-- Mana Potions --
local ManasToLeave = 10 -- Z iloma manasami wraca?
local WantedManas = 15 -- Ile Manasow kupi?
local ManaPotID = 268 -- Mana Potion ID
local ManaCost = 120 -- Mana Potion koszt
-- Health Potions --
local HealthToLeave = 8 -- Z iloma healtami wraca?
local WantedHealth = 20 -- Ile Healtow Kupi?
local HealthPotID = 236 -- Health Potion ID
local HealthCost = 1 -- Koszt HP Potka
-- Other Options --
local MainBP = 2867 -- ID plecaka glownego (Czerwony)
local ItemBP = 9602 -- ID plecaka na itemy (Pomaranczowy)
local GoldBP = 2872 -- ID plecaka na kase (Camouflage)
local MinCap = 50 -- Od ilu Capa wraca?
local HideEquipment = true -- Zminimalizowa? EQ
-- Floor Settings --
local SecondFloor = true -- Tego nie zmieniajcie
Targeting.Start()
Looter.Start()
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
local info = [[]]
wait(5000)
print([[
--<Skrypt na bicie Mlvl//By Sung>--]])
wait(5000)
-----------------------------------------------------------------------------------------------------------------------------------------
function onWalkerSelectLabel(labelName)
if (labelName == "Checker") then
if (Self.ItemCount(ManaPotID) <= ManasToLeave) then
gotoLabel("Leave")
else
gotoLabel("Start Hunt")
end
elseif (labelName == "Potki") then
setWalkerEnabled(false)
Self.SayToNpc "hi"
sleep(math.random(800, 1700))
Self.SayToNpc "trade"
sleep(math.random(2000, 2400))
Self.ShopBuyItem(ManaPotID, (WantedManas-Self.ItemCount(ManaPotID)))
sleep(math.random(800, 1700))
setWalkerEnabled(true)
elseif (labelName == "Deposit") then
setWalkerEnabled(false)
Self.SayToNpc ("hi")
sleep(math.random(700, 1400))
Self.SayToNpc ("deposit all")
sleep(math.random(700, 1400))
Self.SayToNpc ("yes")
setWalkerEnabled(true )
elseif (labelName == "Withdraw") then
setWalkerEnabled(false)
Self.SayToNpc "hi"
sleep(math.random(2000, 2400))
Self.WithdrawMoney (ManaCost*(WantedManas-Self.ItemCount(ManaPotId)))
sleep(math.random(800, 1700))
Self.WithdrawMoney (100)
sleep(math.random(800, 1700))
Self.SayToNpc "yes"
setWalkerEnabled (true)
elseif (labelName == "FullCheck") then
if (Self.ItemCount(ManaPotID) < WantedManas) then
gotoLabel ("Predeposit")
else
gotoLabel ("LetsHunt")
end
elseif (labelName == "ResetBp") then
Walker.Stop()
Container.Close(ItemBP)
wait(1000)
Container.Close(GoldBP)
wait(1000)
Container.GetFirst():OpenChildren(ItemBP)
wait(1000)
Container.GetFirst():OpenChildren(GoldBP)
wait(1000)
Container.GetByName(ItemBP):Minimize()
wait(1000)
Container.GetByName(GoldBP):Minimize()
wait(200)
if (HideEquipment) then
Client.HideEquipment()
wait(1000)
end
Walker.Start()
end
end[/LUA]