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

witam poprawi mi ktos tego q nie tepa mnie ... ...  moj index mapy to 6 a nazwa to wieza 

pisze tutaj bo nie moge pisać w odpowiednim dziale 

daje limit za pomoc 

quest wierza_ww begin
    state start begin
	when login begin
	    if pc.get_map_index() == 66 then
		-- ¨A«D¦b1LÓ®É, °eSdA~­±.
		-- LhLC ?dln
		-- 1LÓ  88  577  236 737
		-- 2LÓ  91  343  238 504
		-- 3LÓ 104  107  248 269
		if pc.get_x() < 2048+88 or pc.get_y() < 6656+577 or pc.get_x() > 2048+236 or pc.get_y() > 6656+737 then
		    pc.warp((5376+532)*100, (512+596+4)*100, 65)
		end
		pc.set_warp_location(65, 5376+532, 512+596+4)
	    elseif pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 then
		pc.set_warp_location(65, 5376+532, 512+596+4)
	    end
	end
        when deviltower_man.chat."Wieża Wygnańców " begin
                say_title("Strażnik Wieży Wygnańców:")
                if party.get_near_count() < 3 then
                        say("Wybacz, musisz mieć ze sobą 2 osoby w grupie.")
                        party.chat("Wasza grupa posiada zbyt mało członków.")
                
            elseif pc.get_level() < 90 then
                say("Wybacz, mogę wpuszczać tylko soby od 90 poziomu.")
                party.chat("Lider grupy nie posiada 90 poziomu.")
			
			elseif party.get_near_count() >= 3 and pc.get_level() >= 90 then
                say("Spełniasz wszystkie warunki.. ")
                say("Czy aby na pewno chcesz wejść do Wieży? ")
                say("Czeka tam na Ciebie i Twoich znajomych ogromne ")
                say("niebezpieczeństwo.. Jesteś tego pewien? ")
                local s = select("Wejdź!","Nie wchodzę.. ")
                
                if s == 1 then
                        pc.setqf("priv_dt", 1)
                    -- join into map!
                    d.join(66)
                end
				end
				end

        
        when login with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
                        --local i = nie ważne..
                        --chat("i: "..i) -- for test
                        if party.is_leader() == true and pc.getqf("priv_dt") > 0 then
                                pc.setqf("priv_dt", 0)
                                d.regen_file("data/dungeon/wygnancy.txt")
                                d.notice("Witajcie, w Wieży Wygnańców!")
                                d.notice("Zniszczcie  Metin Góry, by przedostać się dalej.")
                                d.spawn_mob(8031, 195, 690)
                        end
        end
        
        
        when 8031.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
            timer("wieza", 6)
                d.notice("Brawo, udało się Wam zniszczyć Kamień Metin. ")
				d.notice("Zostaniecie przeniesieni na następne piętro. ")
        end
        when wieza.timer begin
            d.new_jump_all(66, special.devil_tower[1][1], special.devil_tower[1][2])
            d.regen_file("data/dungeon/wygnancy2.txt")
            d.set_warp_at_eliminate(4, d.get_map_index(), special.devil_tower[2][1], special.devil_tower[2][2], "data/dungeon/wygnancy3.txt")
        end
        when 1903.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
            d.set_warp_at_eliminate(4, d.get_map_index(), special.devil_tower[3][1], special.devil_tower[3][2], "data/dungeon/wygnancy4.txt")
            d.check_eliminated()
                d.notice("Elit. Dziewięć Ogonów został pokonany!")
        end
        function get_4floor_stone_pos()
            local positions = {
                {368, 629},
                {419, 630},
                {428, 653},
                {422, 679},
                {395, 689},
                {369, 679},
                {361, 658},
            }
            for i = 1, 6 do
                local j = number(i, 7)
                if i != j then
                    local t = positions[i];
                    positions[i] = positions[j];
                    positions[j] = t;
                end
            end
            return positions
        end
        when 8032.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
            d.setf("levels", 4)
            local positions = wierza_ww.get_4floor_stone_pos()
            for i = 1, 6 do
                d.set_unique("fake" .. i , d.spawn_mob(8033, positions[i][1], positions[i][2]))
            end
            local vid = d.spawn_mob(8033, positions[7][1], positions[7][2])
            d.set_unique("real", vid)
            server_loop_timer('ww_stone4_updates', 10, pc.get_map_index())
            server_timer('ww_stone4_fail1s', 5*60, pc.get_map_index())

            d.notice("Brawo, udało się Tobie zniszczyć Metin Zemsty.");
            d.notice("Musicie teraz znaleźć prawdziwy Kamień Metin,");
            d.notice("by dostać się na kolejne piętro.");
            d.notice("Macie na to 5 minut zanim zostaniecie wylogowani !");
            d.notice("Śpieszcie się!");
        end

        when ww_stone4_fail1s.server_timer begin
            if d.select(get_server_timer_arg()) then
                d.notice("Pozostało 10 minut!")
                server_timer('ww_stone4_fail2s', 5*60, get_server_timer_arg())
            end
        end

        when ww_stone4_fail2s.server_timer begin
            if d.select(get_server_timer_arg()) then
                d.notice("Pozostało 5 minut!")
                server_timer('ww_stone4_fails', 5*60, get_server_timer_arg())
            end
        end

        when ww_stone4_fails.server_timer begin
            if d.select(get_server_timer_arg()) then
                d.notice("Nie udalo sie, zostaniecie wylogowany!")
                d.exit_all()
                clear_server_timer('ww_stone4_updates', get_server_timer_arg())
            end
        end

        when ww_stone4_updates.server_timer begin
            if d.select(get_server_timer_arg()) then
                if not d.is_unique_dead("real") then
                    for i = 1, 6 do
                        if d.getf("fakedead" .. i) == 0 then
                            if d.unique_get_hp_perc("fake" .. i) < 50 then
                                d.purge_unique("fake" .. i)
                                d.setf("fakedead" .. i, 1)
                                d.notice("To nie ten kamień!");
                            end
                        end
                    end
                else
                    server_timer("ww_stone4_ends", 5, get_server_timer_arg())
                    d.notice("Udało się wam zniszczyć prawdziwy Kamień Metin!");
                    d.notice("Zostaniecie przeniesieni na kolejne piętro.")
                    clear_server_timer('ww_stone4_fail1s', get_server_timer_arg())
                    clear_server_timer('ww_stone4_fail2s', get_server_timer_arg())
                    clear_server_timer('ww_stone4_fails', get_server_timer_arg())
                end
            else
                server_timer('ww_stone4_stop_timers', 1, get_server_timer_arg())
            end
        end

        when ww_stone4_stop_timers.server_timer begin
            clear_server_timer('ww_stone4_updates', get_server_timer_arg())
        end

        when ww_stone4_ends.server_timer begin
            if d.select(get_server_timer_arg()) then
                d.setf("levels", 5)
                d.setf("stone_counts", 5)
                d.notice("Świetnie.. Przechodzicie na 5 piętro!")
                d.notice("Aby przejść na kolejne musicie zabić wszystkie potwory.")
                d.notice("Poczym podnieść Kamień Otwarcia i otworzyć,")
                d.notice("wszystkie pięć pieczęci przed czasem!")
                d.jump_all(special.devil_tower[4][1], special.devil_tower[4][2])
                server_timer('ww_stone5_fail1s', 5*60, get_server_timer_arg())
                clear_server_timer('ww_stone4_updates', get_server_timer_arg())

                -- 5ĽÓÄ~Äň¦A˛{
                d.set_regen_file("data/dungeon/wygnancy5.txt")

                -- 5ĽÓ«Ę¦LĄŰ¦A˛{
                d.spawn_mob(20096, 421, 452)
                d.spawn_mob(20096, 380, 460)
                d.spawn_mob(20096, 428, 414)
                d.spawn_mob(20096, 398, 392)
                d.spawn_mob(20096, 359, 426)
            end
        end
        when ww_stone5_fail1s.server_timer begin
            if d.select(get_server_timer_arg()) then
                d.notice("Do Końca pozostało 15 minut.")
                server_timer('ww_stone5_fail2s', 5*60, get_server_timer_arg())
            end
        end

        when ww_stone5_fail2s.server_timer begin
            if d.select(get_server_timer_arg()) then
                d.notice("Do Końca pozostało 10 minut.")
                server_timer('ww_stone5_fail3s', 5*60, get_server_timer_arg())
            end
        end

        when ww_stone5_fail3s.server_timer begin
            if d.select(get_server_timer_arg()) then
                d.notice("Do Końca pozostało 5 minut.")
                server_timer('ww_stone5_fails', 5*60, get_server_timer_arg())
            end
        end

        when ww_stone5_fails.server_timer begin
            if d.select(get_server_timer_arg()) then
                d.notice("Niestety... Nie udało się! Zostaniecie wylogowani.")
                d.exit_all()
            end
        end

        when 2432.kill with pc.in_dungeon() and d.getf("levels") == 5 begin
            local KILL_COUNT_FOR_DROP_KEYs = 20
            local n =d.getf("counts") + 1
            d.setf("counts", n) 
            if n == KILL_COUNT_FOR_DROP_KEYs then
                pc.give_item2(50084, 1)
                d.notice(pc.get_name().." Podniósł Kamień Otwarcia!")
                d.setf("counts", 0)
            end
        end
        when 20096.take with item.vnum == 50084 and d.getf("levels") == 5 begin
            npc.purge()
            item.remove()
            d.setf("stone_counts", d.getf("stone_counts") - 1)
            if d.getf("stone_counts") <= 0 then
                d.setf("levels", 6)
                d.clear_regen()
                d.regen_file("data/dungeon/wygnancy6.txt")

                d.notice("Brawo, udało się! Jesteście na 6 piętrze!")
                d.notice("Zabijcie wszystkie potwory!")
                d.jump_all(special.devil_tower[5][1], special.devil_tower[5][2])
                timer("mob",6)
                clear_server_timer('ww_stone5_fail1s', get_server_timer_arg())
                clear_server_timer('ww_stone5_fail2s', get_server_timer_arg())
                clear_server_timer('ww_stone5_fail3s', get_server_timer_arg())
                clear_server_timer('ww_stone5_fails', get_server_timer_arg())
            else
                                d.notice("Do otwarcia pozostały "..d.getf("stone_counts").." pieczęcie.")
            end
        end
        
        when 2495.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 and d.getf("levels") == 6 begin
            d.kill_all()
            d.check_eliminated()
            local reward_alchemists = {20092}
            d.spawn_mob(reward_alchemists[number(1,1)], 425, 216);
        end

	--------------------------------------
	-- AN¶i¤J7LӦܨeaF8LÓ¤§«e
	--------------------------------------

	when 20092.chat."Chcę przejść dalej " with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
		say_koral(""..mob_name(20092)..": ")
		say_cialo("Zostaniesz przeniesiony")
		say_cialo("na 7 pietro Wieży Wygnańców!")
		say_cialo("Lecz uważaj... ")
		say_cialo("Tam nie bedzie tak łatwo jak wcześniej! ")
		wait()
		if pc.level >=90 then
			say_koral("Informacja: ")
			say_cialo("Każdy z graczy zostanie przeniesiony! ")
			timer("ww_jump_7", 6)
			return
		end
		say("Mozesz przejsc dalej!")
		say("")
		say("")
		wait()
		pc.warp(590500, 110500)
		return
    end

   when ww_jump_7.timer begin
		d.clear_regen()

		d.spawn_mob(8034, 639, 658)
		d.spawn_mob(8034, 611, 637)
		d.spawn_mob(8034, 596, 674)
		d.spawn_mob(8034, 629, 670)

		d.setf("level", 7)

		d.jump_all(2048+590, 6656+638)
	end
	
	when 8034.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
		local cont = d.getf("7_stone_kill") + 1
		d.setf("7_stone_kill", cont)

		if cont >= 4 then
			d.setf("7_stone_kill", 0)
			d.set_regen_file("data/dungeon/wygnancy7.txt")
		end	
	end

	when 8039.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
		game.drop_item(30400, 1)
	end

	when 30400.use with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
		pc.remove_item("30400", 1)

		local pct = number(1,10)

		if pct == 1 then
			-- ±L¤UZu¦aaD
			game.drop_item(30402, 1)
			d.clear_regen()
		else
			-- ±L¤U°?¦aaD
			game.drop_item(30401, 1)
			
		end
	end

	when 30402.use with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
		-- ¶Ç°e¨e8LÓ
		say_koral("Informacja: ")
		say_cialo("Przeniesiesz się na 8 pietro! ")
		pc.remove_item("30402", 1)
	    timer("ww_jump_8", 6)
		d.clear_regen()
	end
						
	--------------------------------------------
	-- AN¶i¤J8LӦܨeaF9LÓ¤§«e
	--------------------------------------------
	when ww_jump_8.timer begin
		d.setf("level", 8)
		d.jump_all(2048+590, 6656+403)
		d.set_regen_file("data/dungeon/wygnancy8.txt")
		d.spawn_mob(20360, 640, 460)
		local _count= pc.count_item(30402)-- ®r·RZu¤`CF¶d
		pc.remove_item(30402,_count)
		
	end

	when 2434.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 and d.getf("level") == 8 begin
		local pct1 = number(1, 5)
		if pct1 == 1 then
			local pct2 = number(1, 10)
			if pct2 == 1 then
				-- ±L¤UZuÂe°Í
				game.drop_item(30404, 1)
			else
				-- ±L¤U°?Âe°Í
				game.drop_item(30403, 1)
			end
		else
			return
		end
	end

	when 20360.take with item.vnum == 30404 begin
		-- 9LÓ«E¦L¸N°L
		d.notice("Zostaniecie przeniesieni na 9 pietro!")
		npc.purge()
		item.remove()
		timer("ww_jump_9", 6)
	end

	---------------------------------------------
	-- AN¶i¤J9LӦܵ?§ô
	---------------------------------------------
        when ww_jump_9.timer begin
                d.setf("levels", 8)
				d.jump_all(2048+590, 6656+155)
                d.spawn_mob(2291,630,195)
        end

        when 2291.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
                d.kill_all()
                local m_sex = pc.get_sex()
                                    if m_sex == 0 then
                notice_all("<Ogłoszenie> "..pc.get_name().." pokonał Czerwonego Smoka! ")
                        else
                notice_all("<Ogłoszenie> "..pc.get_name().." pokonała Czerwonego Smoka! ")
                                end

                timer("ww_end_jumps", 60)
				d.notice("Za minutę zostaniecie przeniesieni przed wieżę. ")
        end

        when ww_end_jumps.timer begin
            d.exit_all()
        end
end
state __GOOD__ begin
end
end
Opublikowano

Musisz zmienić to:

d.join(66)

Na:

d.join(6)

I wszędzie to:

and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000

Na to:

and pc.get_map_index() >= 60000 and pc.get_map_index() < 70000

Zarchiwizowany

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

×
×
  • Dodaj nową pozycję...