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ć żeby po zrobieniu danego taska skrypt sie logał i wlogowywał na kolejnego chara


ThePein

Rekomendowane odpowiedzi

Opublikowano

Więc mam ten skrypt > 

------------------------------------------------------------------------------------------------------
--------------------------------------- Settings -----------------------------------------------------
------------------------------------------------------------------------------------------------------
logoutWhenDone = false
alertWhenDone = true
digForLeech = true
capToDeposit = 4 + 18 + 19 -- Will go to the bank if cap is less than this, default is what you need to carry the quest items
transferGold = false
transferTo = "Your main characters name"
backpack = "Backpack"

------------------------------------------------------------------------------------------------------
--------------------------------------- Constants ----------------------------------------------------
------------------------------------------------------------------------------------------------------
toolID = 17513
shovelID = 3457
------------------------------------------------------------------------------------------------------
--------------------------------------- Labels -------------------------------------------------------
------------------------------------------------------------------------------------------------------
Targeting.Start()
Looter.Start()

registerEventListener(WALKER_SELECTLABEL, "handleLabel")

function handleLabel(labelName)
	if labelName == "NormanStart" then
		Walker.Stop()
		Self.SayToNpc({"hi", "job", "maintenance", "yes", "pathfinder", "yes", "sabotage", "yes"}, 90)
		Walker.Start()
	
------------------------------------------------------------------------------------------------------

	elseif labelName == "RepairNorth" then
		delayWalker(500)
		useItemOnGround(toolID, NORTH)
		
------------------------------------------------------------------------------------------------------

	elseif labelName == "RepairEast" then
		delayWalker(500)
		useItemOnGround(toolID, EAST)
		
------------------------------------------------------------------------------------------------------

	elseif labelName == "RepairSouth" then
		delayWalker(500)
		useItemOnGround(toolID, SOUTH)
		
------------------------------------------------------------------------------------------------------

	elseif labelName == "RepairWest" then
		delayWalker(500)
		useItemOnGround(toolID, WEST)
		
------------------------------------------------------------------------------------------------------

	elseif labelName == "NormanEnd" then
		Walker.Stop()
		-- Drop Can of Oil since you'll be given a new one next time, even if you're still carrying your old one
		local bp = Container.New(backpack)
		local pos = Self.Position()
		for spot = bp:ItemCount() - 1, 0, -1 do
			local item = bp:GetItemData(spot)
			if item.id == toolID then
				delayWalker(300)
				bp:MoveItemToGround(spot, pos.x, pos.y, pos.z)
			end
		end
		Self.SayToNpc({"hi", "maintenance", "pathfinder", "sabotage", "bonus", "yes"}, 90)
		Walker.ConditionalGoto(Self.Cap() < capToDeposit, "GoDeposit", "End")
		Walker.Start()
		
		
------------------------------------------------------------------------------------------------------

	elseif labelName == "Frank" or labelName == "Scott"then
		Walker.Stop()
		Self.SayToNpc({"hi", "yes"}, 90)
		Walker.Start()
		
------------------------------------------------------------------------------------------------------

	elseif labelName == "Bank" then
		Walker.Stop()
		local money = Self.Money()
		Self.SayToNpc({"hi", "deposit all", "yes"}, 90)
		if transferGold then
			Self.SayToNpc({"transfer " .. money, transferTo, "yes"}, 90)
		end
		Walker.Start()
		
------------------------------------------------------------------------------------------------------

	elseif labelName == "DigNorth" then
		if Self.ItemCount(shovelID) > 0 then
			delayWalker(300)
			useItemOnGround(shovelID, NORTH)
		end
		
------------------------------------------------------------------------------------------------------

	elseif labelName == "CheckDig" then
		if not digForLeech then
			gotoLabel("EndDig")
		end
------------------------------------------------------------------------------------------------------

	elseif labelName == "End" then
		Walker.Stop()
		gotoLabel("Start")
		if logoutWhenDone then
			Self.Logout()
		end
		if alertWhenDone then
			alert()
		end
		
------------------------------------------------------------------------------------------------------
		
	elseif labelName == "DoorSouth" then 
		Walker.Stop()
		local pos = Self.Position()
		Self.Step(SOUTH)
		wait(400, 600)
		while (Self.Position().y ~= pos.y+1) do
			Self.UseItemFromGround(pos.x, pos.y+1, pos.z)
			wait(400, 600)
			Self.Step(SOUTH)
		end
		Walker.Start()

------------------------------------------------------------------------------------------------------
		
	elseif labelName == "DoorNorth" then 
		Walker.Stop()
		local pos = Self.Position()
		Self.Step(NORTH)
		wait(400, 600)
		while (Self.Position().y ~= pos.y-1) do
			Self.UseItemFromGround(pos.x, pos.y-1, pos.z)
			wait(400, 600)
			Self.Step(NORTH)
			wait(400, 600)
		end
		Walker.Start()

------------------------------------------------------------------------------------------------------
		
	elseif labelName == "DoorWest" then 
		Walker.Stop()
		local pos = Self.Position()
		Self.Step(WEST)
		wait(400, 600)
		while (Self.Position().x ~= pos.x-1) do
			Self.UseItemFromGround(pos.x-1, pos.y, pos.z)
			wait(400, 600)
			Self.Step(WEST)
			wait(400, 600)
		end
		Walker.Start()
		
------------------------------------------------------------------------------------------------------
		
	elseif labelName == "DoorEast" then 
		Walker.Stop()
		local pos = Self.Position()
		Self.Step(EAST)
		wait(400, 600)
		while (Self.Position().x ~= pos.x+1) do
			Self.UseItemFromGround(pos.x+1, pos.y, pos.z)
			wait(400, 600)
			Self.Step(EAST)
			wait(400, 600)
		end
		Walker.Start()
		
------------------------------------------------------------------------------------------------------		
	end
end

function useItemOnGround(item, DIR)
	local pos = Self.Position()
	if(DIR == NORTH) then
		Self.UseItemWithGround(item, pos.x, pos.y-1, pos.z)
	elseif(DIR == SOUTH) then
		Self.UseItemWithGround(item, pos.x, pos.y+1, pos.z)
	elseif(DIR == EAST) then
		Self.UseItemWithGround(item, pos.x+1, pos.y, pos.z)
	elseif(DIR == WEST) then
		Self.UseItemWithGround(item, pos.x-1, pos.y, pos.z)
	end
end

i tam można zaznaczyćże po wykonaniu taska będzie się logał ale nie wiem jak to ustawić żeby wlogowywał się na kolejnego chara i zaczynał na nim robić taska, żeby kończył i logał i wlogowywał sie na kolejengo i tak w kółko.

Ktoś jest w stanie mi pomóć ?]

Będą duuuuże plusy

Opublikowano

autor Xenobot'a jeszcze nie dodał funkcji "przelogowywania się" na innego chara.

 

[mogę się mylić]

Zarchiwizowany

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

×
×
  • Dodaj nową pozycję...