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

Xenobot Problem z skryptem


akwa1245

Rekomendowane odpowiedzi

Opublikowano

Mam oto taki problem iż czasem wyswietla mi sie ramka (Logout) gdy bot lata po dłuższym czasie . O co z tym Chodzi ? Dodam że mam wyłączoną opcję z stamina itd ;/

Opublikowano

Mam oto taki problem iż czasem wyswietla mi sie ramka (Logout) gdy bot lata po dłuższym czasie . O co z tym Chodzi ? Dodam że mam wyłączoną opcję z stamina itd ;/

Masz zapewne zminimalizowany ekwipunek, albo ustawioną funkcję minimalizowania ekwipunku, sprawdź.

qxv1fr.jpg


by NovusOrdo


It is better to keep your mouth closed and let people think you are a fool than to open it and remove all doubt. ~Mark Twain

Opublikowano
------ REFILL SETTINGS ------

local LeaveMana = 100 --- How many mana potions until you leave the hunt?

local BuyMana = 200 --- How many mana potions you begin the hunt with?

 

local LeaveAmmo = 550 --- How many ammunition until you leave the hunt?

local BuyAmmo = 3000 --- How many ammunition you begin the hunt with?

 

local LeaveCap = 80 --- Leaves spawn when character reaches this cap.

local HideEquipment = true --- Do you want to minimize your equipment?

local LogoutStamina = false --- Do you want to logout at 16 hours? (Inside the depot)

 

-- Item ID's, if you don't want to use SHP and SMP, change these:

 

local ManaName = "great spirit potion"

local ManaCost = 190

 

-- Ammo ID's, if you dont't want to use Prismatic Bolt, change these:

 

local AmmoName = "Crystalline Arrow"

local AmmoCost = 20

 

-- Backpack Configuration:

 

local MainBP = "moon backpack"

local LootBP = "Jewelled Backpack"

local StackBP = "Orange Backpack"

local AmmoBP = "Backpack of Holding"

 

 

-- Here I'm gonna get the item ids, leave this as it is.

 

local ManaID = Item.GetID(ManaName)

local AmmoID = Item.GetID(AmmoName)

 

 

-- These are the flask IDs, not worth changing since it will sell all flasks regardless of type.

local FlaskID = 283

local FlaskIDA = 284

local FlaskIDB = 285

 

-- local GoldBP = 3253 --- Item ID of your gold backpack.

 

registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")

 

function onWalkerSelectLabel(labelName)

if (labelName == "Checker") then

-- Check Supplies, Hunt or Leave

Walker.ConditionalGoto((Self.ItemCount(ManaID) <= LeaveMana) or (Self.Cap() < LeaveCap) or (Self.ItemCount(AmmoID) <= LeaveAmmo), "Leave", "Hunt")

 

elseif (labelName == "Start") then

Walker.ConditionalGoto((Self.Position().z == 11), "BeginHunt", "ReachDepot")

 

elseif (labelName == "DepositGold") then

-- Deposit Gold, check balance.

Walker.Stop()

Self.SayToNpc({"hi", "deposit all", "yes"}, 100)

 

local withdrawManas = math.max(BuyMana - Self.ItemCount(ManaID), 0)*ManaCost

local total = math.abs(withdrawManas)

 

if total >= 1 then

Self.SayToNpc({"withdraw " .. total, "yes", "balance"}, 100)

end

 

local withdrawAmmo = math.max(BuyAmmo - Self.ItemCount(AmmoID), 0)*AmmoCost

        local total = math.abs(withdrawAmmo)

 

if total >=1 then

Self.SayToNpc({"withdraw" .. total, "yes", "balance"}, 100)

 

end

 

Walker.Start()

 

elseif (labelName == "TravelGo") then

Self.SayToNpc({"hi", "Yalahar" , "yes", }, 65)

 

elseif (labelName == "TravelGo1") then

Self.SayToNpc({"hi", "Carlin" , "yes", }, 65)

 

elseif (labelName == "DepositItems") then

-- Deposit Items

Walker.Stop()

Self.ReachDepot(5)

Self.DepositItems({823,0}, {6499,2}, {8061,2}, {7418,2}, {14089,2}, {14087,2}, {3033,1}, {14079,0}, {14082,0}, {14080,0}, {14081,0}, {14083,0}, {14077,0}, {3030,1}, {282,1}, {281,1}, {9058,1}, {7440,3}, {14246,3})

 

Walker.Start()

 

 

    elseif (labelName == "BuyManas")then

Walker.Stop()

if (Self.ItemCount(ManaID) < BuyMana) then

Self.SayToNpc({"hi", "flasks"}, 100)

while (Self.ItemCount(FlaskID) >= 1) or (Self.ItemCount(FlaskIDA) >= 1) or (Self.ItemCount(FlaskIDB) >= 1) do

Self.SayToNpc("yes", 100)

end

wait(2000)

Self.SayToNpc("trade", 100)

wait(2000)

while (Self.ItemCount(ManaID) < BuyMana) do

Self.ShopBuyItemsUpTo(ManaID, BuyMana)

wait(500,800)

end

        wait(200, 500)

end

Walker.Start()

 

elseif (labelName == "BuyAmmo") then

-- Buy Ammo

Walker.Stop()

if (Self.ItemCount(AmmoID) < BuyAmmo) then

print("Buying Ammo")

Self.SayToNpc("hi", 100)

wait(2000)

Self.SayToNpc("trade", 100)

wait(2000)

while (Self.ItemCount(AmmoID) < BuyAmmo) do

Self.ShopBuyItemsUpTo(AmmoID, BuyAmmo)

wait(500,800)

end

wait(200, 500)

end

Walker.Start()  

 

elseif (labelName == "CheckStuff") then

Walker.ConditionalGoto((Self.ItemCount(15793) < MaxHealth), "ToHunt")

 

elseif (labelName == "CheckStuff") then

Walker.ConditionalGoto((Self.ItemCount(7642) < MaxHealth1), "ToHunt")

 

 

elseif (labelName == "CheckGoneUp") then

-- Check we're on floor 3

Walker.ConditionalGoto((Self.Position().z == 7), "OpenSouth", "Leave")

 

elseif (labelName == "CheckGoneDown") then

-- Check we're on floor 7

Walker.ConditionalGoto((Self.Position().z == 11), "AmDown", "EnterResp")

 

elseif (labelName == "BuySpears") then

--------------------------------- TODO -------------------------

Walker.Stop()

Self.SayToNpc({"hi", "trade"}, 100)

-- Buy spears, make sure Self.ItemCount returns items in hands.

while (Self.ItemCount(AmmoID) < BuyAmmo) do

Self.ShopBuyItemsUpTo(AmmoID, BuyAmmo)

wait(500,800)

end

Walker.Start()

 

elseif (labelName == "ResetBps") then

-- Reset Backpacks

Walker.Stop()

Self.CloseContainers()

Self.OpenMainBackpack(true):OpenChildren({LootBP, true}, {StackBP, true}, {AmmoBP, true})

Container.GetFirst():Minimize()

Walker.Start()

 

elseif (labelName == "OpenNorth") then

Walker.Stop()

Self.UseItemFromGround(Self.Position().x, Self.Position().y - 1, Self.Position().z)

Walker.Start()

 

elseif (labelName == "OpenSouth") then

Walker.Stop()

Self.UseItemFromGround(Self.Position().x, Self.Position().y + 1, Self.Position().z)

Walker.Start()

 

elseif (labelName == "MiddleSpawn") then

Walker.Stop()

Walker.ConditionalGoto(HuntMiddle, "MiddleGo", "MiddleDone")

Walker.Start()

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

Ok dzieki , napisze potem czy podziałało ; )

Zapomniał dopisać, że xenobot jest tak zbugowany, że gdy masz zminimalizowany ekwipunek to też tak się dzieje, a po za tym czytaj mój 1 post - wszystko wyjaśnione jest.

qxv1fr.jpg


by NovusOrdo


It is better to keep your mouth closed and let people think you are a fool than to open it and remove all doubt. ~Mark Twain

Zarchiwizowany

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

×
×
  • Dodaj nową pozycję...