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

Rekomendowane odpowiedzi

Opublikowano

Poprawicie taki quest, gdy wpisuje w ssh ./qc move_ring.quest to pisze tam "must start with quest"

"move_ring.quest:168 Abort (core dumped)

 

Oczywiscie dam like jak zadziala!

quest move_ring begin
state start begin
when 80009.use begin
say_title( "Pierscien Teleportacji:" )
say_red(pc.get_name().. " gdzie Cie Teleportowac?" )
say("")
local s = select ( "M1" , "M2" , "Dozorca/ItemShop" , "Inne" , "Expowiska" , "Expowiska cz.2" , "Anuluj" )
if s == 1 then
say_red("Wybierz:")
say("")
local s = select ( "Shinsoo" , "Chujno" , "Jinno" , "Anuluj" )

if s == 1 then
wait ()
pc.warp ( 474300 , 954800 )

elseif 2 == s then
wait ()
pc.warp ( 63800 , 166400 )

elseif 3 == s then
wait ()
pc.warp ( 959900 , 269200 )

elseif 4 == s then
return
end

elseif s == 2 then
say_red("Wybierz:")
say("")
local s = select ( "M2 Shinsoo" , "M2 Chunjo" , "M2 Jinno" , "Anuluj" )

if s == 1 then
wait ()
pc.warp ( 353100 , 882900 )

elseif 2 == s then
wait ()
pc.warp ( 873100 , 242600 )

elseif 3 == s then
wait ()
pc.warp ( 863900 , 246000 )

elseif 4 == s then
return
end

elseif s == 3 then
say_red("Wybierz:")
say("")
local s = select ( "Otworz Magazyn" , "Otworz ItemShop" , "Anuluj" )

if s == 1 then
game.open_safebox()

elseif 2 == s then
game.open_mall()

elseif 3 == s then
return
end

elseif s == 4 then
say_red("Wybierz:")
say("")
local s = select ( "Wieza Demonow" , "Anuluj" )

if s == 1 then
wait ()
pc.warp ( 590500 , 110500 )

elseif 2 == s then
return
end

elseif s == 5 then
say_red("Wybierz:")
say("")
local s = select ( "Dolina Seungryong" , "Pustynia Yongbi" , "Góra Sohan" , "Loch Pająków v1" , "Ognista Ziema" , "Anuluj" )

if s == 1 then
wait ()
local empire = pc . get_empire ( )
if empire == 1 then
pc.warp ( 402100 , 673900 )
elseif empire == 2 then
pc.warp ( 270400 , 739900 )
elseif empire == 3 then
pc.warp ( 321300 , 808000 )
end


elseif 2 == s then
wait ()
local empire = pc . get_empire ( )
if empire == 1 then
pc.warp ( 217800 , 627200 )
elseif empire == 2 then
pc.warp ( 221900 , 502700 )
elseif empire == 3 then
pc.warp ( 344000 , 502500 )
end


elseif 3 == s then
wait ()
local empire = pc . get_empire ( )
if empire == 1 then
pc.warp ( 434200 , 290600 )
elseif empire == 2 then
pc.warp ( 375200 , 174900 )
elseif empire == 3 then
pc.warp ( 491800 , 173600 )
end

elseif 4 == s then
wait ()
local empire = pc . get_empire ( )
if empire == 1 then
pc.warp ( 60000 , 496000 )
elseif empire == 2 then
pc.warp ( 60000 , 496000 )
elseif empire == 3 then
pc.warp ( 60000 , 496000 )
end

elseif 5 == s then
wait ()
local empire = pc . get_empire ( )
if empire == 1 then
pc.warp ( 599400 , 756300 )
elseif empire == 2 then
pc.warp ( 597800 , 622200 )
elseif empire == 3 then
pc.warp ( 730700 , 689800 )
end

elseif 6 == s then
return
end

elseif s == 6 then
say_red("Wybierz:")
say("")
local s = select ( "Loch Pająków V2" , "Czerwony Las" , "Anuluj" )

if s == 1 then
wait ()
pc.warp ( 704100 , 464100 )

elseif 2 == s then
wait ()
pc.warp ( 1119900 , 70800 )

elseif 3 == s then
return
end

elseif s == 2 then
return
end
end

end
end
end

 

KOLEKCJONER POSTÓW:

50 100 200 300 400 500 600 700 800 900 1k

  lUU8K8b.png

 

Opublikowano

Błąd "must start with quest" oznacza 2 rzeczy:

1. Twój quest nie zaczyna się od wyrazu "quest"

2. Gdzieś masz za dużo endów, które kończą quest xxx begin i "kompilator" oczekuje na następnego questa.

 

W Twoim przypadku bez przeglądania questa widzę, że masz za dużo endów na końcu. Sprawdzę to dokładniej i wrzucę Ci poprawkę.

Masz pomysł na ciekawego questa? Wejdź na mój profil by poznać szczegóły!


Opublikowano

Wielkie dzieki za poradę. Ale mogę się zapytać: Skąd mam wiedzieć ile endów dać na końcu?

KOLEKCJONER POSTÓW:

50 100 200 300 400 500 600 700 800 900 1k

  lUU8K8b.png

 

Opublikowano

Wiem co kończymy endami, ale na końcu questu nie raz widzę z 7 endów. A w niektórych tylko 2 od czego to zależy?

KOLEKCJONER POSTÓW:

50 100 200 300 400 500 600 700 800 900 1k

  lUU8K8b.png

 

Opublikowano

Wiem co kończymy endami, ale na końcu questu nie raz widzę z 7 endów. A w niektórych tylko 2 od czego to zależy?

Od tego ile razy użyłeś if, when, state itd ;) Jeśli zobaczysz na poprawę mojego questa to zobaczysz, że używam tabulatorów. To naprawdę pomaga w dobraniu odpowiedniej ilości endów.

 

Poprawiony quest:

 

quest move_ring begin
	state start begin
		when 80009.use begin
			say_title( "Pierscien Teleportacji:" )
			say_red(pc.get_name().. " gdzie Cie Teleportowac?" )
			say("")
			local s = select ( "M1" , "M2" , "Dozorca/ItemShop" , "Inne" , "Expowiska" , "Expowiska cz.2" , "Anuluj" )
			if s == 1 then
				say_red("Wybierz:")
				say("")
				local s = select ( "Shinsoo" , "Chujno" , "Jinno" , "Anuluj" )
				if s == 1 then
					wait ()
					pc.warp ( 474300 , 954800 )
				elseif 2 == s then
					wait ()
					pc.warp ( 63800 , 166400 )
				elseif 3 == s then
					wait ()
					pc.warp ( 959900 , 269200 )
				elseif 4 == s then
					return
				end
			elseif s == 2 then
				say_red("Wybierz:")
				say("")
				local s = select ( "M2 Shinsoo" , "M2 Chunjo" , "M2 Jinno" , "Anuluj" )
				if s == 1 then
					wait ()
					pc.warp ( 353100 , 882900 )
				elseif 2 == s then
					wait ()
					pc.warp ( 873100 , 242600 )
				elseif 3 == s then
					wait ()
					pc.warp ( 863900 , 246000 )
				elseif 4 == s then
					return
				end
			elseif s == 3 then
				say_red("Wybierz:")
				say("")
				local s = select ( "Otworz Magazyn" , "Otworz ItemShop" , "Anuluj" )
				if s == 1 then
					game.open_safebox()
				elseif 2 == s then
					game.open_mall()
				elseif 3 == s then
					return
				end
			elseif s == 4 then
				say_red("Wybierz:")
				say("")
				local s = select ( "Wieza Demonow" , "Anuluj" )
				if s == 1 then
					wait ()
					pc.warp ( 590500 , 110500 )
				elseif 2 == s then
					return
				end
			elseif s == 5 then
				say_red("Wybierz:")
				say("")
				local s = select ( "Dolina Seungryong" , "Pustynia Yongbi" , "Góra Sohan" , "Loch Pająków v1" , "Ognista Ziema" , "Anuluj" )
				if s == 1 then
					wait ()
					local empire = pc . get_empire ( )
					if empire == 1 then
						pc.warp ( 402100 , 673900 )
					elseif empire == 2 then
						pc.warp ( 270400 , 739900 )
					elseif empire == 3 then
						pc.warp ( 321300 , 808000 )
					end
				elseif 2 == s then
					wait ()
					local empire = pc . get_empire ( )
					if empire == 1 then
						pc.warp ( 217800 , 627200 )
					elseif empire == 2 then
						pc.warp ( 221900 , 502700 )
					elseif empire == 3 then
						pc.warp ( 344000 , 502500 )
					end
				elseif 3 == s then
					wait ()
					local empire = pc . get_empire ( )
					if empire == 1 then
						pc.warp ( 434200 , 290600 )
					elseif empire == 2 then
						pc.warp ( 375200 , 174900 )
					elseif empire == 3 then
						pc.warp ( 491800 , 173600 )
					end
				elseif 4 == s then
					wait ()
					local empire = pc . get_empire ( )
					if empire == 1 then
						pc.warp ( 60000 , 496000 )
					elseif empire == 2 then
						pc.warp ( 60000 , 496000 )
					elseif empire == 3 then
						pc.warp ( 60000 , 496000 )
					end
				elseif 5 == s then
					wait ()
					local empire = pc . get_empire ( )
					if empire == 1 then
						pc.warp ( 599400 , 756300 )
					elseif empire == 2 then
						pc.warp ( 597800 , 622200 )
					elseif empire == 3 then
						pc.warp ( 730700 , 689800 )
					end
				elseif 6 == s then
					return
				end
			elseif s == 6 then
				say_red("Wybierz:")
				say("")
				local s = select ( "Loch Pająków V2" , "Czerwony Las" , "Anuluj" )
				if s == 1 then
					wait ()
					pc.warp ( 704100 , 464100 )
				elseif 2 == s then
					wait ()
					pc.warp ( 1119900 , 70800 )
				elseif 3 == s then
					return
				end
			elseif s == 7 then
				return
			end
		end
	end
end

 

Masz pomysł na ciekawego questa? Wejdź na mój profil by poznać szczegóły!


Opublikowano

A no jeszcze jedna sprawa. Jak klikam w ten pierścień to wtedy mnie nie tepa. Cały serwer trzeba resetować. Co jest nie tak?

KOLEKCJONER POSTÓW:

50 100 200 300 400 500 600 700 800 900 1k

  lUU8K8b.png

 

Opublikowano

Swoją drogą... :)

Nie testowałem - powinno działać:

--------------------------
-- Quest by Nismo
-- ;__________;
--------------------------
quest move_ring begin
	state start begin
		function main()
			local s = select("Moja Wioska","Wioski","Expowiska","Zamknij")
			if s == 1 then
				move_ring.my_village()
			elseif s == 2 then
				move_ring.village()
			elseif s == 3 then
				move.ring.explace()
			end
		end
		function my_village()
			local s = select("Wioska","Dzika Wioska","Wstecz","Zamknij")
			if s == 1 then
				warp_to_village()
			elseif s == 2 then
				move_ring.warp_to_wild_village()
			elseif s == 3 then
				move_ring.main()
			end
		end
		function warp_to_wild_village()
			local warp = {
			[1] = {353100,882900},
			[2] = {873100,242600},
			[3] = {863900,246000}
			}
			pc.warp(warp[pc.empire][1], warp[pc.empire][2])
		end
		function village()
			local warp = {
				[1] = {
					[1] = {474300,954800},
					[2] = {63800,166400},
					[3] = {959900,269200},
				},
				[2] = {
					[1] = {353100,882900},
					[2] = {873100,242600},
					[3] = {863900,246000},
				},
			}
			local s = select("Wioski","Dzikie Wioski","Wstecz","Zamknij")
			if s == 1 then
				local s = select("Shinsoo","Chunjo","Jinno","Wstecz","Zamknij")
				if s == 4 then move_ring.village() end
				if s == 5 then return end
				pc.warp(warp[1][s][1], warp[1][s][2])
			elseif s == 2 then
				local s = select("Shinsoo","Chunjo","Jinno","Wstecz","Zamknij")
				if s == 4 then move_ring.village() end
				if s == 5 then return end
				pc.warp(warp[2][s][1], warp[2][s][2])
			elseif s == 3 then
				move_ring.village()
			end
		end
		function explace()
			local v = {}
			local main = {
				[1] = {"Dolina Seungryong",402100,673900,270400,739900,321300,808000},
				[2] = {"Pustynia Yongbi",217800,627200,221900,502700,344000,502500},
				[3] = {"Góra Sohan",434200,290600,375200,174900,491800,173600},
				[4] = {"Loch Pająków v1",60000,496000,60000,496000,60000,496000},
				[5] = {"Ognista Ziema",599400,756300,597800,622200,730700,689800},
				[6] = {"Loch Pająków V2",704100,464100,704100,464100,704100,464100}, 
				[7] = {"Czerwony Las",1119900,70800,1119900,70800,1119900,70800},
				[8] = {"Wstecz"},
			}
			for i = 1, table.getn(main) do
				table.insert(v, main[i][1])
			end
			table.insert(v, "Zamknij")
			local s = select_table(v)
			if s == table.getn(main) then move_ring.main() end
			if s == table.getn(main)+1 then return end
			local x,y = 
			if pc.empire == 1 then
				x,y = 2,3
			elseif pc.empire == 2 then
				x,y = 4,5
			elseif pc.empire == 3 then
				x,y = 6,7
			end
			pc.warp(main[s][x], main[s][y])
		end
		when 80009.use begin
			move_ring.main()
		end
	end
end
Opublikowano

To jest quest czy jakies function :) ?

KOLEKCJONER POSTÓW:

50 100 200 300 400 500 600 700 800 900 1k

  lUU8K8b.png

 

Opublikowano

Quest bazujący na kilku funkcjach. Co do tego braku przenoszenia to pousuwaj wszystkie wait()

Masz pomysł na ciekawego questa? Wejdź na mój profil by poznać szczegóły!


  • 2 tygodnie później...

Zarchiwizowany

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

×
×
  • Dodaj nową pozycję...