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

Jak ustawić aby bot brał enchanted speary z depo?


assocati

Rekomendowane odpowiedzi

Opublikowano

Witajcie, używam tego skryptu [50+ RP] Hrodmir Quara Scouts SMALL, bot jest nauczony, że kiedy kończą się Royal Speary to idzie i kupuje a ja chciałbym aby bot nie kupował RSów tylko brał sobie Enchanted Speary z depo, czy da to się jakoś zmienić w skrypcie ?

Opublikowano

Da się, usuń w lua i z wpt cześć ze sklepem i dodaj do części gdzie bot używa dp to:

Self.WithdrawItems

Przykładowy skrypt jak to mniej więcej działa masz tutaj, w SolidScriptach chyba da radę to zrobić inaczej z ich biblioteką. 

 

 

Na samym dole skrypta wystarczy wpisać nazwę plecaka, item i ilość. Sprawdzałem na bunch of troll hair, bo mnie nie stać na nic innego :makka:
eA2JVk8.gif
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[i])
        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[i]
            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
--------------[[ EDYTUJ ]]--------------
local bpTo = "Grey Backpack"
Self.ReachDepot()
        wait(1000)
Self.WithdrawItems(0, {"bunch of troll hair", bpTo, 100})
 

 

 

Opublikowano

Dzięki za odp. Trochę się gubię jak mam to zrobić, mój plik LUA wygląda tak, jak mam to zmienić ?

 

 

dofile('[CONFIG] RP Hrodmir Quara Scouts SMALL.lua')
dofile('ssLib.lua')

registerEventListener(WALKER_SELECTLABEL, "onLabel")
print("HRODMIR QUARA SCOUTS - SMALL SPAWN. CHECK OUT WWW.SOLID-SCRIPTS.COM FOR MORE SCRIPTS.")

Targeting.Start()
Looter.Start()

function onLabel(label)
if(label == "Backpacks") then
Client.HideEquipment()
repeat
Self.CloseContainers()
wait(200, 400)
Self.OpenMainBackpack(true):OpenChildren({_suppliesBackpack, true}, {_stackBackpack, true}, {_rareBackpack, true}, {_goldBackpack, true})
wait(200, 400)
until SolidScripts.CheckBackpacks(5)
elseif(label == "Stamina") then
SolidScripts.CheckStamina(false)
elseif(label == "BankNPC") then
SolidScripts.WithdrawMoney()
elseif(label == "Withdraw") then
SolidScripts.WithdrawItem(_withdrawFood, 3725, 50, 2)
wait(200, 400)
Walker.ConditionalGoto(Self.ItemCount(3042) < 1, "Withdraw")
elseif(label == "PotionsNPC") then
SolidScripts.BuyPotions(false)
elseif(label == "CheckSupplies") then
SolidScripts.CheckSupplies()
elseif(label == "AmmoNPC") then
SolidScripts.BuyAmmo()
elseif(label == "Check") then
SolidScripts.Check()
elseif(label == "Deposit") then
SolidScripts.ReachDepot()
Self.DepositItems({12318, 0}, {8063, 0}, {3370, 0}, {8084, 0}, {8083, 0}, {3073, 0}, {8044, 0}, {3265, 0}, {3357, 0}, {3269, 0}, {3275, 0}, {3049, 0}, {3359, 0}, {3557, 0}, {3098, 0}, {3377, 0}, {3358, 0}, {3285, 0}, {3114, 0})
Self.DepositItems({5895, 1}, {11491, 1}, {11490, 1}, {11488, 1}, {3028, 1}, {11489, 1}, {3027, 1}, {3029, 1}, {3030, 1}, {3032, 1}, {3033, 1}, {9667, 1}, {7642, 1}, {3026, 1}, {11487, 1}, {3061, 1}, {3578, 1})
elseif(label == "Travel|Venore") then
SolidScripts.Travel("Captain Breezelda", {"hi", "venore", "yes"}, "Travel3")
elseif(label == "Travel|Svargrond2") then
SolidScripts.Travel("Captain Fearless", {"hi", "svargrond", "yes"}, "Travel4")
elseif(label == "CheckSofts") then
SolidScripts.CheckSofts()
elseif(label == "RepairSofts") then
SolidScripts.RepairSofts()
elseif(label == "Rope1") then
SolidScripts.UseRope(32086, 31093)
end
end

if(_dropVials) then
Module.Start('vial-dropper')
end

if(_refillMana) then
Module.Start('mana-refiller')
end

if(_useRecoverySpell) then
Module.Start('recovery-caster')
end

if(_useSoftBoots) then
Module.Start('equip-softs')
end

if(_dropGold) then
Module.Start('drop-gold')
end

if(_screenLevel) then
Module.Start('screen-shooter')
end

Module.Start('sort-supplies')

 

 

Oprócz tego mam jeszcze drugi plik LUA [CONFIG] ale tu chyba nie o ten plik chodzi.

 

@Marchwj jesteś w stanie coś pomóc ?

Zarchiwizowany

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

×
×
  • Dodaj nową pozycję...