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 - Skrypt (Pomoc w edycji)


Voliooooon

Rekomendowane odpowiedzi

Opublikowano

Posiadam skrypt na AC, próbuję go edytować np. to ile potów ma kupić, ile capa ma mieć jak zacznie wracać, i które bp ma otwierać, myślałem, że to proste, ale jednak nie.

-------------------------------------------------
----------------Y2Quake--------------------------
------------Amazon Camp Venore-------------------
-----------------KNIGHT--------------------------
-------------------------------------------------
--Settings---------------------------------------
MPotID = 268							-- Mana potion ID
MPotprice = 50							-- Mana potion price
MPots = 40 							-- Mana potions you want to buy
MinMPots = 10	 						-- Min of mana potions to leave
-------------------------------------------------
HPotID = 266						    -- Health potion ID
HPotprice = 50							-- Health potion price
HPots = 30								-- Health potions you want to buy
MinHPots = 5							-- Min of health potions to leave the spawn
-------------------------------------------------
MinCap = 80 ---- if less then script will exit spawn
-------------------------------------------------
local GoldBP = 8860						-- Id of Gold Backpack (Default is 2871 = Golden Backpack)
local LootBP = 2869						-- Id of Gold Backpack (Default is 2871 = Golden Backpack)
--END OF SETTINGS--------------------------------



--- DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU'RE DOING ---

registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")

local info = [[
Script pago hecho por:
    The Rosse~]]

function onWalkerSelectLabel(labelName)
-------------------------------------------------
	  if (labelName == "check") then
        delayWalker(1000)
        setWalkerEnabled(false)
        if (Self.ItemCount(MPotID) <= MinMPots) or (Self.Cap() < MinCap) or (Self.ItemCount(HPotID) <= MinHPots) then
        setWalkerEnabled(true)
        gotoLabel("refill")
        else
        setWalkerEnabled(true)
        gotoLabel("KeepHunting")
        end
-------------------------------------------------
		elseif (labelName == "KeepHunting") then
		print(info)
-------------------------------------------------
		elseif (labelName == "bank") then
		local withdrawManas = (MPots-Self.ItemCount(MPotID))*MPotprice
		local withdrawHealth = (HPots-Self.ItemCount(HPotID))*HPotprice
		local amount = (withdrawManas)
		local amount2 = (withdrawHealth)
        setWalkerEnabled(false)
		Self.SayToNpc({"hi", "deposit all", "yes"}, 65)
		wait(1500,1900)
		Self.SayToNpc({"withdraw " .. amount, "yes"}, 65)
		wait(1500,1900)
		Self.SayToNpc({"withdraw " .. amount2, "yes", "balance"}, 65)
		setWalkerEnabled(true)
-------------------------------------------------
		elseif (labelName == "deposit") then
		setWalkerEnabled(false)
		Self.DepositItems(10294, 9653, 3290, 3069, 12548, 3008, {11443, 1}, {11444, 1}, {3028, 1}, {3030, 1}, {9652, 1}, {5896, 1}, {5902, 1})
				wait(1500,1900)	
-------------------------------------------------
		elseif (labelName == "tradepots") then
		local manaCount = (MPots-Self.ItemCount(MPotID))
		local healthCount = (HPots-Self.ItemCount(HPotID))
	    delayWalker(20000)
		Self.SayToNpc({"hi", "vials", "yes", "yes", "yes", "yes", "trade"}, 65)
		wait(2000)
		while (Self.ItemCount(MPotID) < MPots) do
		Self.ShopBuyItem(MPotID, manaCount)
		wait(200, 500)
		end
		while (Self.ItemCount(HPotID) < HPots) do
		Self.ShopBuyItem(HPotID, healthCount)
		wait(200, 500)
		end
-------------------------------------------------   
		elseif (labelName == "backpacks") then
		Self.CloseContainers()
		repeat
		wait(900)
		until (Self.UseItemFromEquipment("backpack") > 0) --opens main backpack
		wait(1000)
		Container.GetFirst():OpenChildren(GoldBP, LootBP)
end
end

function closeBackpacks(...) -- CREDITS TO FORGEE
	local tmpBP = Container.GetFirst() 
	local cascaded = {...}
	while tmpBP:isOpen() do
		for spot = 0, tmpBP:ItemCount() do
			local item = tmpBP:GetItemData(spot)
			if item.id == tmpBP:ID() then
				table.insert(cascaded, tmpBP:ID())
				tmpBP = tmpBP:GetNext()
			end
		end
		tmpBP = Container.GetFirst()
		if not table.contains(cascaded, tmpBP:ID()) or tmpBP:ItemCount() == 0 then -- Backpack is main or last cascaded. Closing...
			Self.UseItem(tmpBP:ID())
			wait(500, 900)
		end
		if #cascaded > 0 then -- Any cascaded backpacks?
			for i = 1, #cascaded do
				if tmpBP:ID() == cascaded[i] then -- Found cascaded backpack.
					if tmpBP:ItemCount() > 0 then -- Backpack contains atleast one item, check for anoter bp.
						for spot = 0, tmpBP:ItemCount() do
							local item = tmpBP:GetItemData(spot)
							if item.id == tmpBP:ID() then -- Found anoter cascade bp, opening...
								tmpBP:UseItem(spot)
								break
							end
						end
					end
				end
			end
		end
		wait(500, 900)
		tmpBP = Container.GetFirst() -- Get a new bp to check.
		if tmpBP:ID() == 0 then -- No more open backpacks.
			print("All backpacks were successfully closed.")
		end
	end
	return true
end

function openBackpacks(...)  -- openBackpacks(id1, id2, id3)
    Self.UseItem(Self.Backpack().id)
    wait(1900, 3700)
    for _, input in ipairs(arg) do
        local Bp = Container.GetFromIndex(input[2])
        for spot = 0, Bp:ItemCount() do
            local item = Bp:GetItemData(spot)
            if(item.id == input[1]) then
                Bp:UseItem(spot)
                break
            end
        end
        wait(900, 1700)
    end
end

To co powiększyłem i dałem czerwonym kolorem właśnie próbuję edytować. Niby edytuje, zapisuje wszystko ok.

Włączam Tibie odpalam bota, wczytuję ten skrypt i wywala mi błąd:

18:55 XenoScript Error:
           Script: [NakuuHUD] Venore - Amazons.lua
           Line #: 100
           Chunk: ...ents\XenoBot\Scripts\[NakuuHUD] Venore - Amazons.lua
           Error: bad argument #1 to 'input' (..\Settings\[Knight] Venore - Amazons.xbst: No such file or directory)
This is an error with user-input and should not be reported as a bug with XenoBot.

Ogólnie zmieniłem nazwę tego .lua na taką samą jak mam .xbst bo jakieś okienko mi wywalało z wyborem "replace" lub "skip", jak brałem "skip" to wywalał error, a jak "replace" to plik .lua który edytowałem wracał do stanu pierwotnego. Czyli wracał jak było 80 capa, nie chciał otworzyć BP jakie chciałem, itd.

 

Ktoś może pomóc? Dopiero zacząłem zabawę z tą maszynką i niezbyt jeszcze ogarniam ;)

 

 

@Edit

Nie chcę zmienić wielkości czcionki w kodzie, więc podam co chciałem edytować:

MPots

MinMPots

HPots

MinHPots

MinCap

LootBP

Opublikowano

Twój plik xenobot scripts (.xbst) ma nazwę "[Knight] Venore - Amazons.xbst"?

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ę...