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

Problem Xeno scrypt


Superbuffe

Rekomendowane odpowiedzi

Opublikowano

Witam , zrobilem wg poradnika skrypt , tylko problem jest taki, ze jak go zapisze to jest completed, ale otwierajac mam problem taki : Invalid XML format (expected=!), zmienilem plik w innym xbst by moze tam zadzialal i jest to samo.. w zalacnziku wylse xbst i lua. tak apropo nie chca mi dzialac ze jak wlaczam skrypta nie laduje mi settingsow i odwrotnie.

Nexus Hero.lua

Nexus Hero.xbst

Opublikowano

Edytowałeś xbst w notatniku i gdzieś zapomniałeś znaku, sprawdziłem i nie jest to część z wpt - zrób nowy xbst (targeting/support bez walkera) i wklej w niego część między <panel name="Walker"> </panel>.

Spoiler

<panel name="Walker">
	<control name="WaypointList">
		<item text="ResetBPs:" tag="255"/>
		<item text="Stand (33169, 31808, 8)" tag="1"/>
		<item text="Stand (33169, 31813, 9)" tag="1"/>
		<item text="DepositItems:" tag="255"/>
		<item text="Stand (33169, 31808, 9)" tag="1"/>
		<item text="Node (33171, 31810, 8)" tag="0"/>
		<item text="Stand (33169, 31812, 8)" tag="1"/>
		<item text="Node (33175, 31818, 7)" tag="0"/>
		<item text="Node (33190, 31820, 7)" tag="0"/>
		<item text="Node (33195, 31838, 7)" tag="0"/>
		<item text="Node (33212, 31843, 7)" tag="0"/>
		<item text="Node (33228, 31841, 7)" tag="0"/>
		<item text="Stand (33247, 31841, 7)" tag="1"/>
		<item text="Node (33253, 31840, 6)" tag="0"/>
		<item text="Stand (33255, 31838, 6)" tag="1"/>
		<item text="Stand (33255, 31840, 7)" tag="1"/>
		<item text="Buy:" tag="255"/>
		<item text="CheckStuff:" tag="255"/>
		<item text="ToHunt:" tag="255"/>
		<item text="SIgnore" tag="10"/>
		<item text="Stand (33255, 31838, 7)" tag="1"/>
		<item text="Node (33252, 31841, 6)" tag="0"/>
		<item text="Stand (33247, 31841, 6)" tag="1"/>
		<item text="Node (33237, 31836, 7)" tag="0"/>
		<item text="Node (33243, 31819, 7)" tag="0"/>
		<item text="Node (33243, 31791, 7)" tag="0"/>
		<item text="Node (33250, 31773, 7)" tag="0"/>
		<item text="Node (33243, 31767, 7)" tag="0"/>
		<item text="Stand (33241, 31767, 7)" tag="1"/>
		<item text="Node (33229, 31768, 6)" tag="0"/>
		<item text="Node (33216, 31760, 6)" tag="0"/>
		<item text="Stand (33216, 31757, 6)" tag="1"/>
		<item text="Node (33215, 31742, 7)" tag="0"/>
		<item text="Node (33225, 31710, 7)" tag="0"/>
		<item text="Node (33231, 31699, 7)" tag="0"/>
		<item text="Node (33232, 31689, 7)" tag="0"/>
		<item text="Node (33223, 31674, 7)" tag="0"/>
		<item text="Node (33220, 31662, 7)" tag="0"/>
		<item text="Stand (33221, 31654, 7)" tag="1"/>
		<item text="Stand (33221, 31648, 6)" tag="1"/>
		<item text="Stand (33224, 31651, 7)" tag="1"/>
		<item text="Node (33242, 31629, 8)" tag="0"/>
		<item text="Node (33267, 31622, 8)" tag="0"/>
		<item text="Node (33278, 31615, 8)" tag="0"/>
		<item text="Node (33282, 31601, 8)" tag="0"/>
		<item text="Node (33266, 31592, 8)" tag="0"/>
		<item text="Stand (33266, 31591, 8)" tag="1"/>
		<item text="EIgnore" tag="11"/>
		<item text="ContinueHunt:" tag="255"/>
		<item text="SLure" tag="6"/>
		<item text="Stand (33277, 31589, 9)" tag="1"/>
		<item text="Stand (33281, 31595, 9)" tag="1"/>
		<item text="Stand (33282, 31602, 9)" tag="1"/>
		<item text="Stand (33289, 31602, 9)" tag="1"/>
		<item text="Stand (33303, 31603, 9)" tag="1"/>
		<item text="Stand (33297, 31601, 9)" tag="1"/>
		<item text="ELure" tag="9"/>
		<item text="Node (33298, 31600, 9)" tag="0"/>
		<item text="SLure" tag="6"/>
		<item text="Stand (33299, 31591, 9)" tag="1"/>
		<item text="Stand (33305, 31584, 9)" tag="1"/>
		<item text="Stand (33303, 31580, 9)" tag="1"/>
		<item text="Stand (33296, 31576, 9)" tag="1"/>
		<item text="Stand (33301, 31576, 9)" tag="1"/>
		<item text="Stand (33299, 31583, 9)" tag="1"/>
		<item text="ELure" tag="9"/>
		<item text="Node (33306, 31581, 9)" tag="0"/>
		<item text="SLure" tag="6"/>
		<item text="Node (33313, 31589, 9)" tag="0"/>
		<item text="Stand (33320, 31593, 9)" tag="1"/>
		<item text="Stand (33329, 31595, 9)" tag="1"/>
		<item text="Stand (33331, 31591, 9)" tag="1"/>
		<item text="ELure" tag="9"/>
		<item text="Node (33315, 31591, 9)" tag="0"/>
		<item text="SLure" tag="6"/>
		<item text="Node (33315, 31572, 9)" tag="0"/>
		<item text="Stand (33329, 31570, 9)" tag="1"/>
		<item text="ELure" tag="9"/>
		<item text="Node (33315, 31568, 9)" tag="0"/>
		<item text="SLure" tag="6"/>
		<item text="Node (33319, 31560, 9)" tag="0"/>
		<item text="Node (33328, 31558, 9)" tag="0"/>
		<item text="Stand (33331, 31555, 9)" tag="1"/>
		<item text="Stand (33329, 31551, 9)" tag="1"/>
		<item text="Stand (33330, 31545, 9)" tag="1"/>
		<item text="Stand (33327, 31539, 9)" tag="1"/>
		<item text="Stand (33323, 31539, 9)" tag="1"/>
		<item text="ELure" tag="9"/>
		<item text="Node (33329, 31550, 9)" tag="0"/>
		<item text="Node (33319, 31559, 9)" tag="0"/>
		<item text="SLure" tag="6"/>
		<item text="Node (33301, 31559, 9)" tag="0"/>
		<item text="Node (33291, 31559, 9)" tag="0"/>
		<item text="Stand (33297, 31558, 9)" tag="1"/>
		<item text="ELure" tag="9"/>
		<item text="Node (33298, 31551, 9)" tag="0"/>
		<item text="SLure" tag="6"/>
		<item text="Stand (33306, 31546, 9)" tag="1"/>
		<item text="Stand (33301, 31545, 9)" tag="1"/>
		<item text="Stand (33296, 31545, 9)" tag="1"/>
		<item text="Stand (33290, 31545, 9)" tag="1"/>
		<item text="Stand (33288, 31546, 9)" tag="1"/>
		<item text="ELure" tag="9"/>
		<item text="SLure" tag="6"/>
		<item text="Node (33298, 31537, 9)" tag="0"/>
		<item text="Stand (33295, 31527, 9)" tag="1"/>
		<item text="Stand (33303, 31529, 9)" tag="1"/>
		<item text="Stand (33297, 31531, 9)" tag="1"/>
		<item text="ELure" tag="9"/>
		<item text="Node (33297, 31538, 9)" tag="0"/>
		<item text="Node (33297, 31558, 9)" tag="0"/>
		<item text="Node (33288, 31558, 9)" tag="0"/>
		<item text="SLure" tag="6"/>
		<item text="Node (33280, 31569, 9)" tag="0"/>
		<item text="Stand (33271, 31569, 9)" tag="1"/>
		<item text="ELure" tag="9"/>
		<item text="Node (33261, 31570, 9)" tag="0"/>
		<item text="Node (33250, 31570, 9)" tag="0"/>
		<item text="SLure" tag="6"/>
		<item text="Node (33267, 31570, 9)" tag="0"/>
		<item text="Node (33280, 31588, 9)" tag="0"/>
		<item text="Stand (33267, 31592, 9)" tag="1"/>
		<item text="ELure" tag="9"/>
		<item text="CheckSupplies:" tag="255"/>
		<item text="Refill:" tag="255"/>
		<item text="SIgnore" tag="10"/>
		<item text="Stand (33266, 31591, 9)" tag="1"/>
		<item text="Node (33281, 31600, 8)" tag="0"/>
		<item text="Node (33281, 31616, 8)" tag="0"/>
		<item text="Node (33265, 31617, 8)" tag="0"/>
		<item text="Node (33263, 31629, 8)" tag="0"/>
		<item text="Node (33251, 31629, 8)" tag="0"/>
		<item text="Node (33229, 31631, 8)" tag="0"/>
		<item text="Node (33228, 31649, 8)" tag="0"/>
		<item text="Stand (33225, 31651, 8)" tag="1"/>
		<item text="Stand (33221, 31648, 7)" tag="1"/>
		<item text="Stand (33220, 31654, 6)" tag="1"/>
		<item text="Node (33213, 31697, 7)" tag="0"/>
		<item text="Node (33216, 31710, 7)" tag="0"/>
		<item text="Node (33214, 31733, 7)" tag="0"/>
		<item text="Node (33215, 31745, 7)" tag="0"/>
		<item text="Stand (33216, 31756, 7)" tag="1"/>
		<item text="Node (33217, 31767, 6)" tag="0"/>
		<item text="Node (33228, 31768, 6)" tag="0"/>
		<item text="Stand (33241, 31767, 6)" tag="1"/>
		<item text="Node (33244, 31790, 7)" tag="0"/>
		<item text="Node (33242, 31820, 7)" tag="0"/>
		<item text="Node (33230, 31826, 7)" tag="0"/>
		<item text="Node (33221, 31833, 7)" tag="0"/>
		<item text="Node (33203, 31843, 7)" tag="0"/>
		<item text="Node (33192, 31834, 7)" tag="0"/>
		<item text="Node (33172, 31820, 7)" tag="0"/>
		<item text="Stand (33169, 31812, 7)" tag="1"/>
		<item text="EIgnore" tag="11"/>
	</control>
</panel>

 

 

 

Opublikowano

problem mam taki ze robiac nowe xbsty i zapisujac, daje load i wyskakuje ten sam blad, nawet jak nie otwieralem ich w notatniku, wyczailem ze jak stworze notatnik i go zapisze i potem dam open to dziala, ale jezeli cos zrobie w support czy gdziekolwiek to juz wyskakuje ten blad.

tak samo jak usune exura sio " nick z supporta to dziala. <-- zauwazylem ze to przez ( " ) bo jak bez tego wpisze spell to da sie zapisac i wczytac

 

Opublikowano

Wszystko jasne, zrób tak:

<item spell='exura sio "nick"' mana="140" vcomp="0" vsign="1" vrandom="0" vvalue="76" enabled="1"/>

Wtedy działa.

Le3FQVi.gif

 

Opublikowano

a teraz mam inny problem. 

XenoScript Error:
           Script: Nexus Hero (1).lua
           Error: attempted to call non-existant event listener
This is an error with user-input and should not be reported as a bug with XenoBot.

jak probuje wpisac komende taka jak "Petoss" w swoim poradniku  : "Function onWalkerSelectLabel" nie chce mi dzialac, a bez tego niestety nic mi nie dziala tu , zadne labele, znasz moze jakis inny sposob? jak wpisalem "on walker select label" w kopii to wyskoczyly zas bledy typu brakuje end przy if itp itp itp.. czyli masa bledow wiec lepiej by bylo w tym 1 wlaczyc ta funkcje onwalker

Opublikowano
--------------
--------------
----Scrypt--
------By: Nexus Hero-
------Nexus Hero---
----------------    

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

local GoldBP = 'blue backpack'    --- Nazwa bp jakiego bot ma resetować.
local LootBP = 'backpack of holding'
local PotionBP = 'golden backpack'
local LeaveCap = 100    --- Od ilu capa nasz bot ma wracać do dp.
local LeaveManas = 100   --- od ilu potków nasz bot ma wracać do dp.
local MaxManas = 400   --- Ile potków ma kupić nasz bot zanim pójdzie expić.
local MaxRunes = 500
local LeaveRunes = 80
---------------------------------------------------------------------------

Targeting.Start()
Looter.Start()

    print([[
    Scrypt
By:
Nexus Hero]])
    wait(5000)
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
	if (labelName == 'ResetBPs') then
		wait(1000)
		Self.CloseContainers()
		wait(1000,1500)
		Self.OpenMainBackpack(true):OpenChildren({Item.GetID(GoldBP), true}, {Item.GetID(LootBP), true}, {Item.GetID(PotionBP), true})
	

	elseif (labelName == 'DepositItems') then
		Self.ReachDepot()
		wait(500, 600)
		Self.DepositItems({3385, 1}, {8082, 5}, {3055, 6}, {3369, 5}, {8073, 6}, {8074, 6}, {3419, 1}, {3079, 1}, {3048, 7}, {3574, 10}, {3563, 10}, {3572, 10}, {3382, 1})
		Self.WithdrawItems(3, {3161, 3,(MaxHealth-Self.ItemCount(400))})
	

	elseif (labelName == 'Bank') then
		Self.SayToNpc({'hi', 'deposit all', 'yes', 'balance'})
	

	elseif (labelName == 'Buy') then
		Self.SayToNpc({'hi', 'trade'})
		Self.ShopBuyItem(23373, (MaxManas-Self.ItemCount(400)))
	

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

	elseif (labelName == 'CheckSupplies') then
		Walker.ConditionalGoto(Self.Cap() < LeaveCap or Self.ItemCount(23373, 3161) < LeaveManas, 'Refill', 'ContinueHunt')
	end

end

main bp nie trzeba ustawiać jak co, coś trzeba dodać/dopisać to pisz

Pozdrawiam Wszystkich :)

Opublikowano

a czy to z check stuffem to jest dobre? bo to 23373 to sa ult mana potki a 3161 to ava, musze to rozpisac tylko nie wiem jak po rozpisaniu mialem blad

elseif (labelName == "CheckStuff") then 
        Walker.ConditionalGoto((Self.ItemCount(23373) < MaxHealth) or ((Self.ItemCount(3161) < MaxRunes, "Bank", "ToHunt")

    elseif (labelName == 'CheckSupplies') then
        Walker.ConditionalGoto(Self.Cap() < LeaveCap or Self.ItemCount(23373) < LeaveManas or (Self.ItemCount(3161) < MinRunes, 'Refill', 'ContinueHunt')
    end
 

tak to rozpisalem ale cos mi nie dziala

Ok rozpisalem i zadzialalo ale teraz kolejny blad to taki :

XenoScript Error:
           Script: mexus Hero (2).lua
           Line #: 45
           Chunk: ...?Users?Adrian?DOCUME?1?XenoBot?Scripts??MEXUSH?2.LUA
           Error: attempt to call field 'ReachDepot' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.

 

/\refresh ktos wie jak oomc?? probowalem dodac reach depot i jakies inne ale bez skutecznie

Opublikowano

ogólnie jeżeli nic nie zmieniałeś to polecam dopisać tę funkcje po labelach

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("Znalezione depoty: " .. 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("ktos/cos blokuje depo, szukam nasepnego.")
			end
		end
		return false
	end
	
	repeat
		reachedDP = gotoDepot()
		if reachedDP then
			return true
		end
		tries = tries - 1
		sleep(100)
		print("nie znalazlem depo " .. tries .. " proby")
	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

 

@EDIT

Jeżeli masz kilka backpacków "w sobie" do wydropionych przedmiotów, to Twój depositer nie zadziała tak, jakbyś chciał. Czyli nie wypakuje Ci wszystkich itemków z poszczególnych backpacków. Jeżeli chcesz się z tym pobawić to łap label do 'poprawnego' działania

     if (labelName == "Depot") then
        delayWalker(2000)
        setWalkerEnabled(false)
        Self.ReachDepot()
		
local validBackpacks = {3083, 6299, 3037, 3067, 3371, 3324, 812, 3063, 811, 3332, 3039, 3038, 3041, 3554, 6499, 3030, 5887, 282, 239, 3032, 5944, 3057}
local lootContainer = Container.New(8860, 2869)
     
repeat
	Self.DepositItems({10323, 0}, {7368, 0}, {10385, 0}, {10390, 0}, {10438, 0}, {10384, 0}, {813, 0}, {811, 0}, {10388, 0}, {8061, 0}, {8057, 0}, {3360, 0}, {3392, 0}, {11691, 0}, {11674, 0}, {4033, 0}, {11688, 0}, {11651, 0}, {11657, 0}, {10387, 0}, {7402, 0}, {10389, 0}, {7430, 0}, {3428, 0}, {3071, 0}, {12549, 0}, {12307, 0}, {8043, 0}, {3006, 0}, {10386, 0}, {3342, 0}, {812, 0}, {3370, 0}, {10439, 0}, {10398, 0})
	Self.DepositItems({3027, 1}, {3029, 1}, {3032, 1}, {5944, 1}, {10316, 1}, {3030, 1}, {9057, 1}, {238, 1}, {7642, 1}, {7643, 1})
	
    if (table.contains(validBackpacks, lootContainer:GetItemData(0).id)) then

        lootContainer:UseItem(0, true)
        wait(500)
    end
	until
    lootContainer:GetItemData(0).id == 0

Jak coś nie będzie działać to pisz, pomogę. Pozdro i powodzenia

Pozdrawiam Wszystkich :)

Opublikowano

1.przy trzecim otwarciu zdepozytowalo itemki wiec dziala teraz, ale nie wyciaga mi ava, "XenoBot: Unable to find open container #3." w dp 3cim mam avalanche a zapisalem to tak:

2. nie sprzedaje mi viali i nie kupuje mana potkow :(

  delayWalker(2000)
        setWalkerEnabled(false)
        Self.ReachDepot()
        
    Self.WithdrawItems(3, {3161, 3,(MaxRunes-Self.ItemCount(500))})
local validBackpacks = {3385, 1}, {8082, 5}, {3055, 6}, {3369, 5}, {8073, 6}, {8074, 6}, {3419, 1}, {3079, 1}, {3048, 7}, {3574, 10}, {3563, 10}, {3572, 10}, {3382, 1}
local lootContainer = Container.New(8860, 2869)
     
repeat
    Self.DepositItems({3385, 1}, {8082, 5}, {3055, 6}, {3369, 5}, {8073, 6}, {8074, 6}, {3419, 1}, {3079, 1}, {3048, 7}, {3574, 10}, {3563, 10}, {3572, 10}, {3382, 1})
    Self.DepositItems({3027, 1}, {3029, 1}, {3032, 1}, {5944, 1}, {10316, 1}, {3030, 1}, {9057, 1}, {238, 1}, {7642, 1}, {7643, 1})
    
    if (table.contains(validBackpacks, lootContainer:GetItemData(0).id)) then

        lootContainer:UseItem(0, true)
        wait(500)
    end
    until
    lootContainer:GetItemData(0).id == 0

nie wiem czy przeczytałeś prv ale jeżeli nie to prosiłbym o poprawienie całego bo z chciałbym się nauczyć pisać skrypty w xeno ale nie mogę ogarnąć tego początku a także prosiłbym o pomoc w :
Hud( zeby pokazywal : Exp, Czas, Waste, Profit i Hourly Exp)
Wybieranie itemkow z dp

Pisał co robi w otwartym oknie xeno bota jezeli potrafisz.

 

jak już się nauczę pisać skrypty to potem będę się starał nauczyć by przechodził z rożnych miast do właściwego itp :P
    

Opublikowano

1."XenoBot: Unable to find open container #3."

zmień  

Self.WithdrawItems(3, {3161, 3,(MaxRunes-Self.ItemCount(500))})

na  

 Self.WithdrawItems(2, {3161, 3,(MaxRunes-Self.ItemCount(500))})

Depoty liczymy od 0 czyli 1 depot ma nr. 0, 2 depot-> nr.1; 3depot numer 2 itd. itd.

 

2.Co do huda to łap link https://pastebin.com/raw/Xxjjje9e   zapisujesz to jako lua i dodajesz w Scripts

3. Co do sprzedaży viali to zrób label przy sklepie z Self.Say("hi") + Self.ShopSellAllItems(id viali)

4.Co do kupowania mana potionów polecam używać funkcji "Self ShopBuyItemsUpTo(zmienna od id potionow, zmienna od ilości potionów)" zamiast "Self.ShopBuyItem"(zaoszczędzi Ci to czasu i główkowania jak powinna wyglądać dokładna funkcja)

5."Pisał co robi w otwartym oknie xenobota jeżeli potrafie"

potrafię, lecz jest to czasochłonne i myślę, że na sam początek nie jest Ci to potrzebne(chyba). Niemniej jednak printy, które są zawarte w lua jakoś 'rekompensują' brakujące okno od xenobota i 'mówią' co robi bot w danym momencie.

 

Pozdrawiam Wszystkich :)

Opublikowano

label mam zrobiony"Viale" i  "Buy" i wtedy powinien sie zalaczyc ale nie dalej nie sprzedaje :( ani nie kupuje

elseif (labelName== 'viale') then
    setWalkerEnabled(false)
    Self.Say("hi") 
    Self.ShopSellAllItems(284)

 

elseif (labelName == 'Buy') then
        delayWalker(2000)
                setWalkerEnabled(false)
        Self.SayToNpc({'hi', 'trade'})
        Self.ShopBuyItem(23373, (MaxManas-Self.ItemCount(400)))
        Walker.Start()

A do tego buy items nie do konca rozumiem Self ShopBuyItemsUpTo i tyle ? nie musze podawac id itp?

i niestety mimo ze zamienilem skrypt to nie wybiera mi ava , widzi je otwiera ale nie przeciaga, czy to moze byc przez bp?

/\ Up, znalazlem problem , otworzylem sam 3 i 4 bp, przeciaga, tylko musze w skrypcie cos poprawic by otwieralo 4 backpacki. 

 -- [BP 1] - głowny bp
-- [BP 2] - bp na itemki
-- [BP 3] - gold 
-- [BP 4] - potions

   if (labelName == 'ResetBPs') then
        Walker.Stop()
        wait(1000)
        Self.CloseContainers()
        wait(1000,1500)
        Self.OpenMainBackpack(true):OpenChildren({Item.GetID(GoldBP), true}, {Item.GetID(LootBP), true}, {Item.GetID(PotionBP), true})
        Walker.Start() 

 

widzisz gdzies blad? przez co otwiera mi tylko 2 bp?

Opublikowano
--------------
--------------
----Scrypt--
------By: Nexus Hero-
------Nexus Hero---
----------------    

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

local GoldBP = 'blue backpack'    --- Nazwa bp jakiego bot ma resetować.
local LootBP = 'backpack of holding'
local PotionBP = 'golden backpack'
local LeaveCap = 100    --- Od ilu capa nasz bot ma wracać do dp.
local LeaveManas = 100   --- od ilu potków nasz bot ma wracać do dp.
local MaxManas = 400   --- Ile potków ma kupić nasz bot zanim pójdzie expić.
local idpot = 238 ----- id od mana potionow

------------ ustawienia avalanche---------
local AmmoUse = "avalanche rune"			--- nazwa runek ktore ma wyciagac
local idava = 3161  ---- id avalanche
local maxava = 500 --- ilosc ava ile ma kupic
local avaleave = 100 --- ilosc ava ponizej ktorej bot wychodzi z respa
local AmmoBp = "Dragon Backpack"    --- bp, gdzie ma wrzucac runy	
---------------------------------------------------------------------------

Targeting.Start()
Looter.Start()

    print([[
    Scrypt
By:
Nexus Hero]])
    wait(5000)
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
	if (labelName == 'ResetBPs') then
		wait(1000)
		Walker.Stop()
		wait(1000)
		Self.CloseContainers()
		wait(1000)
		Self.OpenMainBackpack(true):OpenChildren({Item.GetID(GoldBP), true}, {Item.GetID(LootBP), true}, {Item.GetID(PotionBP), true}, {Item.GetID(AmmoBp), true})
		wait(1000)
		Walker.Start()
	

	elseif (labelName == 'DepositItems') then
        delayWalker(2000)
        setWalkerEnabled(false)
        Self.ReachDepot()
		
local validBackpacks = {3083, 6299, 3037, 3067, 3371, 3324, 812, 3063, 811, 3332, 3039, 3038, 3041, 3554, 6499, 3030, 5887, 282, 239, 3032, 5944, 3057}
local lootContainer = Container.New(8860, 2869)
     
repeat
	Self.DepositItems({10323, 0}, {7368, 0}, {10385, 0}, {10390, 0}, {10438, 0}, {10384, 0}, {813, 0}, {811, 0}, {10388, 0}, {8061, 0}, {8057, 0}, {3360, 0}, {3392, 0}, {11691, 0}, {11674, 0}, {4033, 0}, {11688, 0}, {11651, 0}, {11657, 0}, {10387, 0}, {7402, 0}, {10389, 0}, {7430, 0}, {3428, 0}, {3071, 0}, {12549, 0}, {12307, 0}, {8043, 0}, {3006, 0}, {10386, 0}, {3342, 0}, {812, 0}, {3370, 0}, {10439, 0}, {10398, 0})
	Self.DepositItems({3027, 1}, {3029, 1}, {3032, 1}, {5944, 1}, {10316, 1}, {3030, 1}, {9057, 1}, {238, 1}, {7642, 1}, {7643, 1})
	
    if (table.contains(validBackpacks, lootContainer:GetItemData(0).id)) then

        lootContainer:UseItem(0, true)
        wait(500)
    end
	until
    lootContainer:GetItemData(0).id == 0
	

	elseif (labelName == 'Bank') then
		wait(1000)
		Self.SayToNpc("hi")
		wait(1000)
		Self.SayToNpc("deposit all")
		wait(1000)
		Self.SayToNpc("yes")
		wait(1000)
		Self.SayToNpc("balance")
		

	elseif (labelName == 'Buy') then
		wait(2000)
		Walker.Stop()
		wait(1000)
		Self.SayToNpc('hi')
		wait(1000)
		Self.SayToNpc("trade")
		wait(1000)
		Self.ShopBuyItemsUpTo(idpot, MaxManas)
		wait(1000)
		Walker.Start()
	

	elseif (labelName == "CheckStuff") then 
		if Self.ItemCount(idpot) < MaxManas then
		Walker.Goto("Bank") 
		print("brakuje potionow, ide je kupic")
		elseif Self.ItemCount(idava) < maxava then
		Walker.Goto("Bank")
		print("brakuje ava ide je kupic")
		else
		Walker.Goto("ToHunt")
		print("mam wszystko ide na hunt")
		end
		
	elseif (labelName == "CheckSupplies") then
		if Self.ItemCount(idava) < avaleave then
		Walker.Goto("Refill")
		print("malo ava ide na refill")
		elseif Self.ItemCount(idpot) < LeaveManas then
		Walker.Goto("Refill")
		print("malo potow ide na refill")
		elseif Self.Cap() < LeaveCap then
		Walker.Goto("Refill")
		print("malo capa ide na refill")
		else 
		Walker.Goto("ContinueHunt")
		print("wystarczajaco suppli, expie dalej")
		end
		
	elseif (labelName == "avalanche") then
	AmmoToWithdraw = (maxava - Self.ItemCount(AmmoUse))
	Self.WithdrawItems(2, {Item.GetID(AmmoUse), AmmoBp, AmmoToWithdraw})

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("Znalezione depoty: " .. 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("ktos/cos blokuje depo, szukam nasepnego.")
			end
		end
		return false
	end
	
	repeat
		reachedDP = gotoDepot()
		if reachedDP then
			return true
		end
		tries = tries - 1
		sleep(100)
		print("nie znalazlem depo " .. tries .. " proby")
	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

 

żeby Ci wziął avalanche z depota nr.3 musisz w Walkerze dodać następująco:

1.ReachDepot(prawy przycisk myszy -> Reach Depot)

2.Prawy przycisk myszy -> Add Scripts -> Self.OpenDepot()

3.Prawy przycisk myszy -> Add Label -> avalanche

 

 

@EDIT

ogólnie to ten label checkstuff bym wyrzucił bo jest on zbędny(lepiej zrobić by po kazdym labelu sprawdzał czy ma wystarczająco rzeczy na hunta i ewentualnie jeżeli by czegoś brakowało to by dokupował) bo takie bawienie się w to co zaproponowałeś jest bezużyteczne(trzeba tworzyć dodatkowe wpt) 

Pozdrawiam Wszystkich :)

Opublikowano

okej z tego co mi podales, wyciagnal runki, kupil potka ale nie sprzedal viali :(, a ten checkstuff zrobilem po to by jak nie mial wystarczajacej ilosci kasy np. na manasy/ brak ava by nie szedl bez tego. 

 

P.S. Okej, dodalem Self.ShopSellAllItems(284) i juz dziala sprzedaje viale :) idzie wlasnie na hunta wiec powiem jak wyglada sytuacja :)

 

ehh niestety, chodzic chodzi, expic expi wszystko fajnie, ale looter nie zbiera loota :( mam ustawione wszystko tak jak powinno, ignore unlisted < no, i never above, looter wlaczony, id mam, a nie podnosi zadnego ciala :(

 

Opublikowano

Napisz co to za potwory i wrzuć screena z lootera. Pytanie kolejne, czy otwiera potwory i nie zbiera itemów czy w ogóle ich nie otwiera i ignoruje.

Pozdrawiam Wszystkich :)

Opublikowano
11 minut temu, Superbuffe napisał:

tak pozatym da sie zrobic skrypt by wyrzucalo mi puste viale na expie

-- SETTING -------------------------------------------
-----------------------------------------------------
ManaType = 285 --283 is empty strong, 284 is great, 285 is normals.
ManasToDrop = 5 -- How many empty vials before drop?
-----------------------------------------------------
-- END OF SETTING--------------------------------------

function dropItem(id, cnt) 
    local cont = Container.GetFirst() 

    while (cont:isOpen()) do 
        for spot = 0, cont:ItemCount() do 
            local item = cont:GetItemData(spot) 
            if (item.id == id and item.count >= cnt) then 
                    cont:MoveItemToGround(spot, Self.Position().x, Self.Position().y, Self.Position().z) 
                    return true 
            end 
        end 

        cont = cont:GetNext() 
    end 
     
    return false 
end 


while (true) do 
    if (dropItem(ManaType,ManasToDrop)) then
        wait(48000, 60000) --Since we've already dropped a stack, wait a bit of time before trying to drop another
    else
        wait(2000) --havent dropped shit, wait2 seconds and try again. No need for randomization since we didn't do anything
    end
end
Cytat

by uzywalo mi 100gold coina 

function useCoins(id) 
local cont = Container.GetFirst() 
 
while (cont:isOpen()) do 
for spot = 0, cont:ItemCount() do 
local item = cont:GetItemData(spot) 
if (item.id == id) then 
if (item.count == 100) then
cont:UseItem(spot, True)
sleep(0)
return true
end
end 
end 
 
cont = cont:GetNext() 
end 
 
return false 
end 
 
while (true) do 
useCoins(3031)--gold
sleep(0)
useCoins(3035)--platinum
sleep(0)
end  

 

 

Opublikowano

dzieki a jak to zapisac ? 
 

function useCoins(id) 
local cont = Container.GetFirst() 
 
while (cont:isOpen()) do 
for spot = 0, cont:ItemCount() do 
local item = cont:GetItemData(spot) 
if (item.id == 3031 or 3035) then 
if (item.count == 100) then
cont:UseItem(spot, True)
sleep(0)
return true
end
end 
end 
 
cont = cont:GetNext() 
end 
 
return false 
end 
 
while (true) do 
useCoins(3031)--gold
sleep(0)
useCoins(3035)--platinum
sleep(0)
end  
Opublikowano
17 godzin temu, Marchwj napisał:

Przecież id kasy jest wszędzie takie samo i jest już wpisane w skrypt xD

ktorys z tych obu skryptow blokuje calego skrypta.. zdziwilem sie ze wczoraj expil a dzis nie moze nic kupic ani nic nie robi ze skrypta, widzisz gdzies blad?

/\ chodzi o manasy, po usunieciu gp nic nie dalo, po usunieciu mana skrypta wrocilo do normy.
up, blad, oba skrypty po wrzuceniu do lua mi go zwieszaja :(

 

Opublikowano

wrzuć xbst, bo nie jestem w stanie powiedzieć dlaczego. Aktualnie mam mało czasu więc w weekend ewentualnie bym mógł coś ogarnąć. Być może masz jakiś dodatkowy lua z looterem który 'koliduje' z tym wbudowanym. Trudno powiedzieć jeżeli nie widze tego u siebie, pozdro

Pozdrawiam Wszystkich :)

Zarchiwizowany

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

×
×
  • Dodaj nową pozycję...