Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Kilka problemów z xeno


ksitka

Rekomendowane odpowiedzi

Opublikowano

Witam, otóż tak mój problem polega na tym że xeno kupuje za dużo potow, ammo tzn. z kazdym refilem kupuje 300 potow.

Po drugie gdy bot idzie się wypakować, deposituje tylko ten bp który ma otwarty a poprzedni(pełny) zostawia tak jak jest.

Jako zapłatę udostępnie full afka na ormo ;) jeśli ktoś będzie chciał.

 

Oto Skrypt :

 

 

---------------------------------
--------Twoj Waypoint------------
-------Created By Sanix----------
---------------------------------

----------- BP SETUP ------------
--~ [bP 1] ~-- Main
--~ [bP 2] ~-- Produkty
--~ [bP 3] ~-- Gold

----------- DP SETUP ------------
--~ [DP 1] ~-- Rare
--~ [DP 2] ~-- Produkty

------------ Settings -----------

-- Mana Potions --

local ManasToLeave = 100 -- Z iloma manasami wracać
local WantedManas = 500 -- Ile Manasow kupić
local ManaPotID = 238 -- Mana Potion ID
local ManaCost = 50 -- 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 = 100 -- Koszt HP Potka

-- Mana Potions --

local AmmoToLeave = 200 -- Z iloma manasami wracać
local WantedAmmo = 1500 -- Ile Manasow kupić
local AmmoID = 16141 -- Mana Potion ID
local AmmoCost = 20 -- Mana Potion koszt

-- AMUNICJA --

local MainBP = 21411 -- ID plecaka glownego (moj)
local ItemBP = 8860 -- ID plecaka na itemy (moj)
local GoldBP = 21411 -- ID plecaka na kase (moj)
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([[
----]])
wait(5000)

-----------------------------------------------------------------------------------------------------------------------------------------
function onWalkerSelectLabel(labelName)

if (labelName == "Checker") then
if (Self.ItemCount(ManaPotID) <= ManasToLeave) or (Self.ItemCount(HealthPotID) <= HealthToLeave) or (Self.Cap() < MinCap) then
gotoLabel("Leave")
else
gotoLabel("Start Hunt")
end

else if labelName == "doorN" then
Self.UseItemFromGround(location.x, location.y + 1, location.z)


elseif (labelName == "Deposit") then
setWalkerEnabled(false)
Self.ReachDepot()
Self.DepositItems({8082, 0}, {21175, 0}, {21166, 0}, {21174, 0}, {21177, 0}) -- Tutaj dodajesz ID itemkow ktore ma odkładać do Depo a po przecinku backpack w kolejności od lewej strony 0 oznacza miejsce pierwsze a 1 miejsce 2, 2 to miejsce trzecie i tak dalej
Self.DepositItems({21176,0 }, {3081, 0}, {3381, 0}, {21173, 0}, {3381, 0})
Self.DepositItems({9058, 1}, {5910, 1}, {3028, 1}, {9057,1 },{3033, 1}, {3030, 1}) -- tutaj to smao co wyżej bo jak jest za dużo itemek w jednej lini to się zawiesza
wait(1500,1900)

elseif (labelName == "Cash") then
setWalkerEnabled(false)
delayWalker(5000)
Self.Say("hi")
sleep(math.random(700, 1400))
Self.SayToNpc("deposit all")
sleep(math.random(300, 1000))
Self.SayToNpc("yes")
setWalkerEnabled(true)

elseif (labelName == "Withdraw") then
setWalkerEnabled(false)
delayWalker(5000)
Self.SayToNpc("hi")
sleep(math.random(700, 1400))
Self.WithdrawMoney((ManaCost*(WantedManas-Self.ItemCount(ManaPotID))))
sleep(math.random(700, 1400))
Self.WithdrawMoney((AmmoCost*(WantedAmmo-Self.ItemCount(AmmoID))))
sleep(math.random(700, 1400))
Self.WithdrawMoney(100)
sleep(math.random(700, 1400))
Self.SayToNpc("yes")
setWalkerEnabled(true)

elseif (labelName == "Potions") then
setWalkerEnabled(false)
delayWalker(10000)
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(2000, 2400))
Self.ShopBuyItem(HealthPotID, (WantedHealth-Self.ItemCount(HealthPotID)))
sleep(math.random(800, 1700))
setWalkerEnabled(true)

elseif (labelName == "Ammo") then
setWalkerEnabled(false)
delayWalker(10000)
Self.SayToNpc("hi")
sleep(math.random(800, 1700))
Self.SayToNpc("trade")
sleep(math.random(2000, 2400))
Self.ShopBuyItem(AmmoID, (WantedAmmo-Self.ItemCount(AmmoID)))
sleep(math.random(2000, 2400))
Self.ShopBuyItem(HealthPotID, (WantedHealth-Self.ItemCount(HealthPotID)))
sleep(math.random(800, 1700))
setWalkerEnabled(true)

elseif (labelName == "FullCheck") then
if (Self.ItemCount(ManaPotID) < WantedManas) or (Self.Cap() < MinCap) or (Self.ItemCount(AmmoID) < WantedAmmo) 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(MainBp)
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


----------------------- Functions ----------------------
function SellItems(item) -- item = item ID
wait(300, 1700)
Self.ShopSellItem(item, Self.ShopGetItemSaleCount(item))
wait(900, 1200)
end

function BuyItems(item, count) -- item = item id, count = how many you want to buy up to
wait(900, 1200)
if (Self.ItemCount(item) < count) then
Self.ShopBuyItem(item, (count-Self.ItemCount(item)))
wait(200, 500)
end
end

Self.ReachDepot = function (tries)
local tries = tries or 3
Walker.Stop()
local DepotIDs = {3497, 3498, 3499, 3500}
local DepotPos = {}
for i = 1, #DepotIDs do
local dps = Map.GetUseItems(DepotIDs)
for j = 1, #dps do
table.insert(DepotPos, dps[j])
end
end

local function gotoDepot()
local pos = Self.Position()
print("Ilosc znalezionych Depo: " .. tostring(#DepotPos))
for i = 1, #DepotPos do
location = DepotPos
Self.UseItemFromGround(location.x, location.y, location.z)
wait(1000, 2000)
if Self.DistanceFromPosition(pos.x, pos.y, pos.z) >= 1 then
wait(5000, 6000)
if Self.DistanceFromPosition(location.x, location.y, location.z) == 1 then
Walker.Start()
return true
end
else
print("To depo jest zajete, szukam dalej.")
end
end
return false
end

repeat
reachedDP = gotoDepot()
if reachedDP then
return true
end
tries = tries - 1
sleep(100)
print("Nie udalo sie dotrzec do depo... " .. tries .. " szukam dalej.")
until tries <= 0

return false
end

Map.GetUseItems = function (id)
if type(id) == "string" then
id = Item.GetID(id)
end
local pos = Self.Position()
local store = {}
for x = -7, 7 do
for y = -5, 5 do
if Map.GetTopUseItem(pos.x + x, pos.y + y, pos.z).id == id then
itemPos = {x = pos.x + x, y = pos.y + y, z = pos.z}
table.insert(store, itemPos)
end
end
end
return store
end

 

Opublikowano

Miałem reset bp aczkolwiek nie działał więc musiałem go wyrzucić ;/

Problem polega na tym że zamyka wszystkie bp i otwiera tylko maina.

To skrypt z którego korzystam:

 

elseif (labelName == "ResetBp") then
Walker.Stop()

Container.Close(ItemBP)
wait(1000)
Container.Close(GoldBP)
wait(1000)
Container.GetFirst():OpenChildren(MainBp)
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()

 

 

local MainBP = 21411 -- ID plecaka glownego (moj)
local ItemBP = 8860 -- ID plecaka na itemy (moj)
local GoldBP = 21411 -- ID plecaka na kase (moj)
local MinCap = 50 -- Od ilu Capa wracać
local HideEquipment = true -- Zminimalizować EQ

 

a to moje eqhttp://scr.hu/3hm7/22z83

Opublikowano

 

local Backpack_Amount = 3

function OpenBackpacks(amount)
    Cavebot.Stop()
    Self.CloseContainers()
    Self.OpenMainBackpack(true)
    wait(500 + Self.Ping())
    if #Container.GetAll() == 1 then
        for slot, item in Container.GetFirst():iItems() do
            if Item.isContainer(item.id) then
                Container.GetFirst():UseItem(slot, false)
                wait(500 + Self.Ping())
                Container.GetLast():Minimize()
                wait(100 + Self.Ping())
            end
            if #Container.GetAll() == amount then break end
        end
    end
    if #Container.GetAll() ~= amount then
        print('Backpack reset not complete, recursing.')
        OpenBackpacks(amount)
    end
    Cavebot.Start()
end
 
Module.New('Backpack Re-Open', function()
if #Container.GetAll() < Backpack_Amount then
OpenBackpacks(Backpack_Amount)
wait(500 + Self.Ping())
end
end)
Opublikowano

Tak wygląda mój skrypt teraz i nadal bp nie chce otwierać

 

---------------------------------

--------Twoj Waypoint------------
-------Created By Ksitek----------
---------------------------------
 
----------- BP SETUP ------------
--~ [bP 1] ~-- Main
--~ [bP 2] ~-- Produkty
--~ [bP 3] ~-- Gold
 
----------- DP SETUP ------------
--~ [DP 1] ~-- Rare
--~ [DP 2] ~-- Produkty
 
------------ Settings -----------
local ManasToLeave = 50 -- Z iloma manasami wracać
local WantedManas = 300 -- Ile Manasow kupić
local ManaPotID = 237 -- Mana Potion ID
local ManaCost = 50 -- 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 = 100 -- Koszt HP Potka
 
-- Mana Potions --
 
local AmmoToLeave = 200 -- Z iloma manasami wracać
local WantedAmmo = 1300 -- Ile Manasow kupić
local AmmoID = 16141 -- Mana Potion ID
local AmmoCost = 20 -- Mana Potion koszt
 
-- AMUNICJA --
 
local MainBP = 21411 -- ID plecaka glownego   (moj)
local ItemBP = 8860 -- ID plecaka na itemy (moj)
local GoldBP = 21411 -- ID plecaka na kase (moj)
local MinCap = 50 -- Od ilu Capa wracać
local ManaBP = 21411
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([[
    --<Waypoint 100% Afk>--]])
    wait(5000)
 
-----------------------------------------------------------------------------------------------------------------------------------------
function onWalkerSelectLabel(labelName)
 
if (labelName == "Checker") then
   if (Self.ItemCount(ManaPotID) <= ManasToLeave) or (Self.ItemCount(HealthPotID) <= HealthToLeave) or (Self.Cap() < MinCap) then
            gotoLabel("Leave")
        else
            gotoLabel("Start Hunt")
end    
 
 
 
elseif (labelName == "Deposit") then
setWalkerEnabled(false)
Self.ReachDepot()
Self.DepositItems({8082, 0}, {21175, 0}, {21166, 0}, {21174, 0}, {21177, 0}) -- Tutaj dodajesz ID itemkow ktore ma odkładać do Depo a po przecinku backpack w kolejności od lewej strony 0 oznacza miejsce pierwsze a 1 miejsce 2, 2 to miejsce trzecie i tak dalej
Self.DepositItems({21176,0 }, {3081, 0}, {3381, 0}, {21173, 0}, {3381, 0})
Self.DepositItems({9058, 1}, {5910, 1}, {3028, 1}, {9057,1 },{3033, 1}, {3030, 1}) -- tutaj to smao co wyżej bo jak jest za dużo itemek w jednej lini to się zawiesza
wait(1500,1900)
 
elseif (labelName == "Cash") then
setWalkerEnabled(false)
        delayWalker(5000) 
        Self.Say("hi")
        sleep(math.random(700, 1400)) 
        Self.SayToNpc("deposit all")
        sleep(math.random(300, 1000))
        Self.SayToNpc("yes")
setWalkerEnabled(true)
 
elseif (labelName == "Withdraw") then
setWalkerEnabled(false)
delayWalker(5000) 
Self.SayToNpc("hi")
sleep(math.random(700, 1400))
Self.WithdrawMoney((ManaCost*(WantedManas-Self.ItemCount(ManaPotID))))
sleep(math.random(700, 1400)) 
Self.WithdrawMoney((AmmoCost*(WantedAmmo-Self.ItemCount(AmmoID))))
sleep(math.random(700, 1400)) 
Self.WithdrawMoney(100)
sleep(math.random(700, 1400)) 
Self.SayToNpc("yes")
setWalkerEnabled(true)
 
elseif (labelName == "Potions") then
setWalkerEnabled(false)
delayWalker(10000) 
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(2000, 2400)) 
        Self.ShopBuyItem(HealthPotID, (WantedHealth-Self.ItemCount(HealthPotID)))
sleep(math.random(800, 1700))
setWalkerEnabled(true)
 
elseif (labelName == "Ammo") then
setWalkerEnabled(false)
delayWalker(10000) 
Self.SayToNpc("hi")
sleep(math.random(800, 1700)) 
Self.SayToNpc("trade")
sleep(math.random(2000, 2400)) 
        Self.ShopBuyItem(AmmoID, (WantedAmmo-Self.ItemCount(AmmoID)))
sleep(math.random(2000, 2400)) 
        Self.ShopBuyItem(HealthPotID, (WantedHealth-Self.ItemCount(HealthPotID)))
sleep(math.random(800, 1700))
setWalkerEnabled(true)
 
elseif (labelName == "FullCheck") then
if (Self.ItemCount(ManaPotID) < WantedManas) or (Self.Cap() < MinCap) or (Self.ItemCount(AmmoID) < WantedAmmo) 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
 
 
----------------------- Functions ----------------------
function SellItems(item) -- item = item ID
wait(300, 1700)
Self.ShopSellItem(item, Self.ShopGetItemSaleCount(item))
wait(900, 1200)
end
 
local Backpack_Amount = 3
 
function OpenBackpacks(amount)
    Cavebot.Stop()
    Self.CloseContainers()
    Self.OpenMainBackpack(true)
    wait(500 + Self.Ping())
    if #Container.GetAll() == 1 then
        for slot, item in Container.GetFirst():iItems() do
            if Item.isContainer(item.id) then
                Container.GetFirst():UseItem(slot, false)
                wait(500 + Self.Ping())
                Container.GetLast():Minimize()
                wait(100 + Self.Ping())
            end
            if #Container.GetAll() == amount then break end
        end
    end
    if #Container.GetAll() ~= amount then
        print('Backpack reset not complete, recursing.')
        OpenBackpacks(amount)
    end
    Cavebot.Start()
end
 
 
 
 
function BuyItems(item, count) -- item = item id, count = how many you want to buy up to
wait(900, 1200)
if (Self.ItemCount(item) < count) then
Self.ShopBuyItem(item, (count-Self.ItemCount(item)))
wait(200, 500)
end
end
 
Self.ReachDepot = function (tries)
local tries = tries or 3
Walker.Stop()
local DepotIDs = {3497, 3498, 3499, 3500}
local DepotPos = {}
for i = 1, #DepotIDs do
local dps = Map.GetUseItems(DepotIDs)
for j = 1, #dps do
table.insert(DepotPos, dps[j])
end
end
 
local function gotoDepot()
local pos = Self.Position()
print("Ilosc znalezionych Depo: " .. tostring(#DepotPos))
for i = 1, #DepotPos do
location = DepotPos
Self.UseItemFromGround(location.x, location.y, location.z)
wait(1000, 2000)
if Self.DistanceFromPosition(pos.x, pos.y, pos.z) >= 1 then
wait(5000, 6000)
if Self.DistanceFromPosition(location.x, location.y, location.z) == 1 then
Walker.Start()
return true
end
else
print("To depo jest zajete, szukam dalej.")
end
end
return false
end
 
repeat
reachedDP = gotoDepot()
if reachedDP then
return true
end
tries = tries - 1
sleep(100)
print("Nie udalo sie dotrzec do depo... " .. tries .. " szukam dalej.")
until tries <= 0
 
return false
end
 
Map.GetUseItems = function (id)
    if type(id) == "string" then
        id = Item.GetID(id)
    end
    local pos = Self.Position()
local store = {}
    for x = -7, 7 do
        for y = -5, 5 do
            if Map.GetTopUseItem(pos.x + x, pos.y + y, pos.z).id == id then
                itemPos = {x = pos.x + x, y = pos.y + y, z = pos.z}
table.insert(store, itemPos)
            end
        end
    end
    return store

end

 

czy może żeby uruchomić akurat funkcję którą podał kolega wyżej potrzeba jakiejś innej komędy?

  • 3 tygodnie później...
Opublikowano

Tak wygląda teraz mój układ bp:

 


local MainBP = "Backpack" -- Main Backpack
local LootBP = "Blue Backpack" -- Backpack to put Gold to
local StackBP = "Green Backpack" -- Backpack to put Stackables to
local PotionsBP = "Purple Backpack" -- do sortowania

 

a tak skrypty do tego

 

elseif (labelName == "ResetBP") then
Self.CloseContainers()
wait(900,1000)
Self.OpenMainBackpack(true)
wait(700,900)
Container.GetByName(MainBP):Minimize()
wait(700,900)
Container.GetFirst():OpenChildren(LootBP)
wait(700,900)
Container.GetByName(LootBP):Minimize()
wait(700,900)
Container.GetFirst():OpenChildren(StackBP)
wait(700,900)
Container.GetByName(StackBP):Minimize()
wait(700,900)
Container.GetFirst():OpenChildren(PotionsBP)
wait(700,900)
Container.GetByName(PotionsBP):Minimize()
Client.HideEquipment()
wait(1000)
end
Walker.Start()
end

 

pisze to bo może komus akurat w google wyskoczy to forum i akurat komus pomoge ;)

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...