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

Full Afk


qintoofar

Rekomendowane odpowiedzi

Opublikowano

Cześć mógłby ktoś pomóc ze skryptem "checker" i "leave", otóz w skryptach mam napisane, że bot ma iść do depo poniżej 150capa i poniżej 2 mana potionów, ale bota  ma to gdzieś i wraca kiedy mu się chce.

 

 

--------------
--------------
----Scrypt--
------By:-
------Petos---
----------------    

--------- BP SETUP ----------
-- [BP 1] - głowny bp
-- [BP 1] - bp na itemki
-- [BP 1] - gold (bp mozesz sobie dowolnie ustawic w lootingu)

--------- DP SETUP ----------
-- [DP 1] - bp na lota

------ REFILL SETTINGS ------
local MinHealth = 2 --- Od ilu heal potów ma wracać z Hunta.
local MaxHealth = 9  --- Z iloma potami ma zaczynac hunt.
------- HUNT SETTINGS --------
local GoldBP = 2854 --- id bp do którego ma chować gp (mozesz ustawic poprostu w lootingu numer bp ;p)
local MinCap = 150-- ilość capa od której ma wracać do dp.
------- EXTRA SETTINGS -------
local HideEquipment = false --- czy bot ma minimalizować eq.
local LogoutStamina = true --- czy bot ma pójść do dp i sie wylogować jak bedzie miał 16 staminy.

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

Targeting.Start()
Looter.Start()

registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")

    print([[
    Scrypt
By:
Petos]])
    wait(5000)

function onWalkerSelectLabel(labelName)
    if (labelName == "Checker") then
        Walker.ConditionalGoto((Self.Cap() < MinCap) or (Self.ItemCount(266) <= MinHealth) or ((LogoutStamina) and (Self.Stamina() < 840)), "Leave", "Hunt")

    elseif (labelName == "Potions") then
        Walker.Stop()
        if (Self.ItemCount(266) < MaxHealth) then
            Self.SayToNpc({"hi", "flasks", "yes", "yes", "yes", "yes", "yes", "yes", "trade"}, 65)
            wait(2000)
            if (Self.ItemCount(266) < MaxHealth) then
                BuyItems(266, MaxHealth)
                wait(500)
            end
            wait(200, 500)
        end
        Walker.Start()

    elseif (labelName == "CheckStuff") then
        Walker.ConditionalGoto((Self.ItemCount(266) < MaxHealth), "Bank", "ToHunt")

    elseif (labelName == "Bank") then
        local withdrawHealths = math.max(MaxHealth - Self.ItemCount(266), 0)*50
        local totalmoneyneeded = (withdrawHealths - Self.ItemCount(285)*5)
        local MATHCEIL = (totalmoneyneeded)
        Walker.Stop()
        Self.SayToNpc({"hi", "deposit all", "yes"}, 65)
        if (totalmoneyneeded > 0) then
            Self.SayToNpc({"withdraw " .. MATHCEIL, "yes", "balance"}, 65)   
        end  
        wait(2000)
        Walker.Start()
        
    elseif (labelName == "Deposit") then
        Walker.Stop()
        Self.ReachDepot()
        Self.DepositItems({12517, 1})
        wait(1000)
        Self.WithdrawItems(1, {266, 0,(MaxHealth-Self.ItemCount(266))})
        if (LogoutStamina) and (Self.Stamina() < 960) then
            Walker.Stop()
        else
            Walker.Start()
        end

    elseif (labelName == "ResetBP") then
        Walker.Stop()
        Container.Close(GoldBP)
        wait(1000)        
        Container.GetFirst():OpenChildren(GoldBP)
        wait(1000)
        Container.GetByName(GoldBP):Minimize()
        if (HideEquipment) then
            Client.HideEquipment()
            wait(1000)
        end
        Walker.Start()    
    end
end

----------------------- Functions ----------------------
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("Depots found: " .. 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("Something is blocking the path. Trying next depot.")
            end
        end
        return false
    end
    
    repeat
        reachedDP = gotoDepot()
        if reachedDP then
            return true
        end
        tries = tries - 1
        sleep(100)
        print("Attempt to reach depot was unsuccessfull. " .. tries .. " tries left.")
    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
 Walker.ConditionalGoto((Self.Cap() < MinCap) or (Self.ItemCount(266) <= MinHealth) or ((LogoutStamina) and (Self.Stamina() < 840)), "Leave", "Hunt")

Self.ItemCount(266)

Zmieniasz 266 na id manasów

Opublikowano

Dziękuję wielkie kolego, mam ostatnie pytanie byłbym bardzo wdzięczny za pomoc dotyczące RESET BP i DEPOSIT sytuacja wygląda tak, że jeżeli wracam z expa tuż przee DP mam label o nazwie "ResetBP" to bot nic nie robi, idzie do depo i zostawia tylko itemy w którym widać, że są itemy, nie zostawia z poprzednich bp i leci po manasy z itemami z expa, również nie chce przenieść itemów do bacpacków w depo tylko prosto do depo oto skrypt, przerpaszam za nieogar, ale próbuję sam zmieniać bp nazwy itp, ale nic nie skutkuje @rafaeru

 

 

------- BP SETUP ----------
-- [BP 1] - głowny bp
-- [BP 1] - bp na itemki
-- [BP 1] - gold (bp mozesz sobie dowolnie ustawic w lootingu)

--------- DP SETUP ----------
-- [DP 1] - bp na lota

------ REFILL SETTINGS ------
local MinHealth = 45 --- Od ilu heal potów ma wracać z Hunta.
local MaxHealth = 700  --- Z iloma potami ma zaczynac hunt.
------- HUNT SETTINGS --------
local GoldBP = 2854 --- id bp do którego ma chować gp (mozesz ustawic poprostu w lootingu numer bp ;p)
local MinCap = 150-- ilość capa od której ma wracać do dp.
------- EXTRA SETTINGS -------
local HideEquipment = false --- czy bot ma minimalizować eq.
local LogoutStamina = false --- czy bot ma pójść do dp i sie wylogować jak bedzie miał 16 staminy.

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

Targeting.Start()
Looter.Start()

registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")

    print([[
    Scrypt
By:
Puffoo]])
    wait(5000)

function onWalkerSelectLabel(labelName)
    if (labelName == "Checker") then
        Walker.ConditionalGoto((Self.Cap() < MinCap) or (Self.ItemCount(237) <= MinHealth) or ((LogoutStamina) and (Self.Stamina() < 840)), "Leave", "Hunt")

    elseif (labelName == "Potions") then
        Walker.Stop()
        if (Self.ItemCount(237) < MaxHealth) then
            Self.SayToNpc({"hi", "flasks", "yes", "yes", "yes", "yes", "yes", "yes", "trade"}, 65)
            wait(2000)
            if (Self.ItemCount(237) < MaxHealth) then
                BuyItems(237, MaxHealth)
                wait(500)
            end
            wait(200, 500)
        end
        Walker.Start()

    elseif (labelName == "CheckStuff") then
        Walker.ConditionalGoto((Self.ItemCount(266) < MaxHealth), "Bank", "ToHunt")

    elseif (labelName == "Bank") then
        local withdrawHealths = math.max(MaxHealth - Self.ItemCount(237), 0)*93
        local totalmoneyneeded = (withdrawHealths - Self.ItemCount(285)*5)
        local MATHCEIL = (totalmoneyneeded)
        Walker.Stop()
        Self.SayToNpc({"hi", "deposit all", "yes"}, 65)
        if (totalmoneyneeded > 0) then
            Self.SayToNpc({"withdraw " .. MATHCEIL, "yes", "balance"}, 65)   
        end  
        wait(2000)
        Walker.Start()
        
    elseif (labelName == "Deposit") then
        Walker.Stop()
        Self.ReachDepot()
        Self.DepositItems({3416, 1}, {3386, 1}, {7430, 1}, {3071, 1}, {3392, 1}, {3280, 1}, {7402, 1}, {3428, 1})
                wait(1000)
        Self.WithdrawItems(1, {266, 0,(MaxHealth-Self.ItemCount(266))})
        if (LogoutStamina) and (Self.Stamina() < 960) then
            Walker.Stop()
        else
            Walker.Start()
        end

    elseif (labelName == "ResetBP") then
        Walker.Stop()
        Container.Close(GoldBP)
        wait(1000)        
        Container.GetFirst():OpenChildren()
        wait(1000)
        Container.GetByName(GoldBP):Minimize()
        if (HideEquipment) then
            Client.HideEquipment()
            wait(1000)
        end
        Walker.Start()    
    end
end

----------------------- Functions ----------------------
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("Depots found: " .. 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("Something is blocking the path. Trying next depot.")
            end
        end
        return false
    end
    
    repeat
        reachedDP = gotoDepot()
        if reachedDP then
            return true
        end
        tries = tries - 1
        sleep(100)
        print("Attempt to reach depot was unsuccessfull. " .. tries .. " tries left.")
    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
	elseif (labelName == "ResetBP") then
		Walker.Stop()
		Container.Close(GoldBP)
		wait(1000)		
		Self.OpenMainBackpack(true)
		wait(1000)
		Container.GetByName(GoldBP):Minimize()
		if (HideEquipment) then
			Client.HideEquipment()
			wait(1000)
		end
		Walker.Start()	
elseif labelName == 'Deposit' then
		setWalkerEnabled(false)
		Self.DepositItems({3416, 1}, {3386, 1}, {7430, 1}, {3071, 1}, {3392, 1}, {3280, 1}, {7402, 1}, {3428, 1})
		wait(1500,1900)
		Self.WithdrawItems(1, {266, 0,(MaxHealth-Self.ItemCount(266))})
        if (LogoutStamina) and (Self.Stamina() < 960) then
            Walker.Stop()
        else
            Walker.Start()
        end
		setWalkerEnabled(true)

Podmien to i sprwadz

Opublikowano

Podmieniłem sytuacja wygląda tak, że przy labelu ResetBP backpack jest otwierany ten głowny, ale następnych już nie chce otwierać również (GOLDEN BP),  a przy labelu Deposit nie idzie w wyznaczone miejsce tylko przed depo i otwiera jakiegoś Browse Field, dodam, że po twoich 2 skryptach, które zaproponowałeś podmienić, wywala mi skrypt z Running Scripts do Found Scripts.

Opublikowano

Może podaj błąd jaki wywala jak go ładujesz. (Server Log)

Ale zgaduje, że tu może być problem:

elseif labelName == 'Deposit' then
		Walker.Stop()
		Self.DepositItems({3416, 1}, {3386, 1}, {7430, 1}, {3071, 1}, {3392, 1}, {3280, 1}, {7402, 1}, {3428, 1})
		wait(1500,1900)
		Self.WithdrawItems(1, {266, 0,(MaxHealth-Self.ItemCount(266))})
        if (LogoutStamina) and (Self.Stamina() < 960) then
            Walker.Stop()
        else
            Walker.Start()
        end

 

Opublikowano

Niestety to samo ciągle. Jeżeli to nie kłopot podeślę Tobie linka do prywatnego filmu na yt z tym problemem z downloadem .xbst i .lua ze skanem oczywiście.

Zarchiwizowany

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

×
×
  • Dodaj nową pozycję...