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 Ring player


akwa1245

Rekomendowane odpowiedzi

Opublikowano

Szukam skrypta na ringa (energy ring) , gdy widzi dwóch graczy lub więcej to zakłada ringa na utamke , a jak tylko znowu jest widoczny np 1 player  na ekranie to zdejmuje ringa . Poratuje ktoś ? 

 

 

Jęśli ktoś mi pomorze to zrobie dla niego full afka 

Pasjonat
Opublikowano

local ringID = ? -- energy ring's ID
local otherRingID = 3007 -- when there's nobody on screen, put crystal ring on

------------Don't Touch!-------------
function playersAround(radius, ...)
if getPlayersAround(radius, ...) then
return #getPlayersAround(radius, ...)
else
return 0
end
end

function getPlayersAround(radius, ...)
local t = {...}
local players = {}
if (radius == 0) then
radius = 8
end
for i = CREATURES_LOW, CREATURES_HIGH do
local creature = Creature.GetFromIndex(i)
if (creature:isValid()) and creature:ID() ~= Self.ID() then
if (creature:isOnScreen() and creature:isVisible() and creature:isAlive()) then
if creature:isPlayer() then
local name = creature:Name()
if (creature:DistanceFromSelf() <= radius) then
if (not table.contains(t, name)) then -- If we have a white list, we look for the player there.
table.insert(players, creature)
end
end
end
end
end
end
return players
end

Module.New('energyRing', function(module)
if (playersAround(7) > 0) then
if (Self.ItemCount(ringID) > 0 and Self.Ring().id ~= ringID) then
Self.Equip(ringID, "ring", 1)
end
else
if (Self.ItemCount(otherRingID) > 0 and Self.Ring().id ~= ringID) then
Self.Equip(otherRingID, "ring", 1)
end
end
module:Delay(100, 500)
end)

Zakłada energy jeżeli jest conajmniej jeden gracz na ekranie, jeżeli chcesz zmienić ilość graczy to edytujesz:

if (playersAround(7) > 0) then

 

Np. dla Twoich dwóch graczy byłoby tam 1.

I musisz mieć też w BP Crystal Ring, bo xeno nie ma czegoś takiego jak unequip, więc musi go zamienić.

 

@akwa1245 nie trzeba :)

:)
Opublikowano

Wielkie dzieki !  Wisze ci full afka powiec tylko gdzie a ci zrobie 

 

czyli on jest już gotowy ten scrypt tak ?  czy muszę go pouzupełniać bo jeszcze go nie testowałem 

 

 

 

 

Jest problem:

 

 

21:39 XenoScript Error:
           Script: Anty Combo Ring.lua
           Line #: 1
           Chunk: C:\Users\Daniel\Documents\XenoBot\Scripts\Anty Combo Ring.lua
           Error: unexpected symbol near '?'
This is an error with user-input and should not be reported as a bug with XenoBot.
Pasjonat
Opublikowano

 

Wielkie dzieki !  Wisze ci full afka powiec tylko gdzie a ci zrobie 

 

czyli on jest już gotowy ten scrypt tak ?  czy muszę go pouzupełniać bo jeszcze go nie testowałem 

 

 

 

 

Jest problem:

 

 

21:39 XenoScript Error:
           Script: Anty Combo Ring.lua
           Line #: 1
           Chunk: C:\Users\Daniel\Documents\XenoBot\Scripts\Anty Combo Ring.lua
           Error: unexpected symbol near '?'
This is an error with user-input and should not be reported as a bug with XenoBot.

 

 

Myślałem, że ogarniesz ... Za ten ? masz podstawić ID energy ringa - pisze jak byk obok tego.

:)
  • 3 miesiące temu...
  • 7 miesięcy temu...
Opublikowano

Witam powie mi ktoś dlaczego nie moge odpalić skryptu ?

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

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

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

-- Mana Potions --

local ManasToLeave = 70        -- Z iloma manasami wracac
local WantedManas = 300        -- Ile Manasow kupc
local ManaPotID = 238         -- Mana Potion ID
local ManaCost = 120         -- Mana Potion koszt

-- Health Potions --

local HealthToLeave = 80        -- Z iloma healtami wracać
local WantedHealth = 1500        -- Ile Healtow Kupic
local HealthPotID = 3155        -- Health Potion ID
local HealthCost = 108            -- Koszt HP Potka

-- Other Options --

local MainBP = 2854         -- ID plecaka glownego   (brazowy)
local ItemBP = 8860         -- ID plecaka na temy     (yalahar)
local GoldBP = 2869         -- ID plecaka na kase     (Camouflage)
local MinCap = 50         -- Od ilu Capa wracac
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 == "TravelGoJen") then
        setWalkerEnabled(false)
            delayWalker(5000)
               Self.Say("hi")
            sleep(math.random(700, 1400))
            Self.SayToNpc("Thais")  -- Tutaj wpisz wyspe na ktora sie udajesz.
            sleep(math.random(300, 1000))
            Self.SayToNpc("yes")
        setWalkerEnabled(true)
elseif (labelName == "TravelGoDwa") then
        setWalkerEnabled(false)
            delayWalker(5000)
               Self.Say("hi")
            sleep(math.random(700, 1400))
            Self.SayToNpc("oramond")  -- Tutaj wpisz wyspe na ktora sie udajesz.2
            sleep(math.random(300, 1000))
            Self.SayToNpc("yes")
        setWalkerEnabled(true)

elseif (labelName == "TravelBackJen") then
        setWalkerEnabled(false)
            delayWalker(5000)
            Self.Say("hi")
            sleep(math.random(700, 1400))
            Self.SayToNpc("thais")                    -- Tutaj wpisz wyspe powrotna
            sleep(math.random(300, 1000))
            Self.SayToNpc("yes")
        setWalkerEnabled(true)
elseif (labelName == "TravelBackDwa") then
        setWalkerEnabled(false)
            delayWalker(5000)
            Self.Say("hi")
            sleep(math.random(700, 1400))
            Self.SayToNpc("svargrond")                    -- Tutaj wpisz wyspe powrotna2
            sleep(math.random(300, 1000))
            Self.SayToNpc("yes")
        setWalkerEnabled(true)

elseif (labelName == "Deposit") then
        setWalkerEnabled(false)
        Self.ReachDepot()
        Self.DepositItems({7436, 0}, {7454, 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({10293, 1}, {10311, 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((HealthCost*(WantedHealth-Self.ItemCount(HealthPotIDID))))
        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({"Hi", "flasks", "yes", "yes", "yes", "Trade"}, 65)
        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 == "FullCheck") then
        if (Self.ItemCount(ManaPotID) < WantedManas) or (Self.Cap() < MinCap) or (Self.ItemCount(HealthPotID) < WantedHealth) 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

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

Zarchiwizowany

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

×
×
  • Dodaj nową pozycję...