aslan6474 1
aslan6474
romegames 1
romegames
Reklam vermek için turkmmo@gmail.com

[ORJİNAL] Questler Tek Konuda

  • Konuyu başlatan Konuyu başlatan bakam321
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 18
  • Görüntüleme Görüntüleme 3K
Arkadaşlar Orjinal questleri bu konuda paylaşıcam questlerin çoğu yabancıdır TÜRKÇELEŞTİRME konusunda yardım ederseniz sevinirim

Bütün Orjinal Questleri Burada paylaşacam..

İlk Önce Official Spider Dungeon 3 Questi Paylaşıcam Quest Almancadır...

get_sd3_key.quest

quest get_sd3_key begin state start begin
when 20355.chat."Schlüssel zum SD3" with pc.get_level() > 49 begin
say_title(string.format("%s:", mob_name(string.format("%d", npc.get_race()))))
say()
say("Besorge für mich eine Kopie einer")
say("Inschrift aus dem SD3.")
wait()
say_title(string.format("%s:", mob_name(string.format("%d", npc.get_race()))))
say()
say("Du erhältst von mir nun einen Passierschein,")
say("damit du den SD2 betreten kannst.")
wait()
if not pc.enough_inventory() then
say_title(string.format("%s:", mob_name(string.format("%d", npc.get_race()))))
say("Du hast nicht genug Platz in deinem Inventar.")
return
end
pc.give_item2(71095, 1)
set_state(get_schrift)
end
end
state get_schrift begin
when kill with not npc.is_pc() and pc.get_map_index() == 71 begin
if number(1, 10) then
game.drop_item(31001, 1)
set_state(back_to_hauptmann)
end
end
end
state back_to_hauptmann begin
when 20355.chat."Ich habe die Inschrift!" with pc.count_item(31001) >= 1 begin
say_title(string.format("%s:", mob_name(string.format("%d", npc.get_race()))))
say("Wie ich sehe hast du die Inschrift gefunden")
say("Gehe nun zu Uriel.")
wait()
pc.setqf("uriel",1)
end
when 20011.chat."Ich soll mich bei dir melden" with pc.getqf("uriel") == 1 begin
pc.setqf("uriel",0)
say_title(string.format("%s:", mob_name(string.format("%d", npc.get_race()))))
say("Ich habe soeben einen Weg gefunden,")
say("um einen Schlüssel herzustellen, welcher es")
say("ermöglicht den SD3 zu betreten.")
wait()
say_title(string.format("%s:", mob_name(string.format("%d", npc.get_race()))))
say("Gehe wieder zum Hauptmann.")
say("Er sagt dir, welche Gegenstände du")
say("für die Herstellung benötigst.")
wait()
pc.setqf("haupt",1)
end
when 20355.chat."Zutaten für den Schlüssel" with pc.getqf("haupt") == 1 begin
pc.setqf("haupt",0)
say_title(string.format("%s:", mob_name(string.format("%d", npc.get_race()))))
say("Für den Schlüssel benötigst du:")
say_reward("1x Spinnen-Giftsack")
say_reward("1x Spinnen-Eiersack")
say_reward("1x Spinnennetz")
say_reward("1x Spinnenaugen")
say_reward("1x Spinnenbeine")
say_reward("1x Gift der Spinnenkönigin")
wait()
say_title(string.format("%s:", mob_name(string.format("%d", npc.get_race()))))
say("Gehe nun wieder zu Uriel.")
wait()
pc.give_item2(71095, 1)
pc.setqf("uriel",2)
end
when 20011.chat."Ich kenne die Zutaten" with pc.getqf("uriel") == 2 begin
say_title(string.format("%s:", mob_name(string.format("%d", npc.get_race()))))
say("Du kennst also die Zutaten für den Schlüssel?")
say()
say("Gut..")
say("Geh nun in den SD2 und besorge die Zutaten.")
pc.setqf("uriel",0)
set_state(get_items)
end
end
state get_items begin
when kill with pc.get_map_index() == 71 begin
if number(1, 10) then
local item = {
{30025},
{30058},
{30056},
{30059},
{30326}
}
local anz = number(1, table.getn(item))
game.drop_item_with_ownership(item[anz][1], 1)
end
end
when 20011.chat."Ich habe die Zutaten!" with
pc.count_item(30025) > 0
and pc.count_item(30058) > 0
and pc.count_item(30056) > 0
and pc.count_item(30059) > 0
and pc.count_item(30326) > 0 begin
say_title(string.format("%s:", mob_name(string.format("%d", npc.get_race()))))
say()
say("Okay, du hast alle Zutaten.")
say("Willst du nun den Schlüssel herstellen?")
if select("Ja","Nein") == 2 then return end
say_title(string.format("%s:", mob_name(string.format("%d", npc.get_race()))))
say()
say("[DELAY value; 750]....[/DELAY]")
wait()
say_title(string.format("%s:", mob_name(string.format("%d", npc.get_race()))))
say()
say("Der Schlüssel wurde erfolgreich hergestellt.")
wait()
pc.give_item2(30324, 1)
pc.remove_item(30025,1) pc.remove_item(30058,1) pc.remove_item(30056, 1) pc.remove_item(30059,1) pc.remove_item(30326,1)
set_state(start)
end
end
end

sd3_bruthoehle.quest

quest sd3_bruthoehle begin state start begin
when 30130.chat."In die Bruthöhle" with pc.get_level() > 49 begin
say_title(string.format("%s:", mob_name(string.format("%d", npc.get_race()))))
if game.get_event_flag("sd3_frei") == 1 then
say("Die Bruthöhle ist zur Zeit besetzt.")
return
end
if not party.is_party() then
say("Du kannst nur in einer Gruppe die")
say("Bruthöhle betreten.")
return
end
if not party.is_leader() then
say("Nur der Gruppenleiter kann das")
say("Portal zur Bruthöhle öffnen.")
return
end
say("Möchtet ihr die Bruthöhle betreten?")
if select("Ja","Nein") == 2 then return end
d.join(191)
game.set_event_flag("sd3_frei",1)
server_timer("exit",60*20)
end
when login with pc.get_map_index() == 191 and party.is_party() begin
d.set_regen_file("data/dungeon/sd3/eier.txt")
d.regen_file("data/dungeon/sd3/boss.txt")
d.notice("Ihr habt 20 Minuten Zeit, um den Spinnenbaron zu töten.")
end
when exit.server_timer begin
d.exit_all()
server_timer("sd3_set_free",60*60)
end
when 2094.kill with party.is_party() and pc.get_level() > 49 begin
local count = tonumber(party.get_near_count()-1)
notice_all(string.format("%s und %d weitere Mitglieder haben den Spinnenbaron besiegt!", pc.get_name(), count))
server_timer("sd3_set_free", 60*60)
server_timer("exit",60*5)
d.notice("In 5 Minuten werdet ihr hinausteleportiert")
end
when sd3_set_free.server_timer begin
game.set_event_flag("sd3_frei",0)
end
end
end


Questlerin Devamı Gelicek..
 
Son düzenleme:
Buyur Birde Bunları İncele :D :D :D :D

Bunlar daha bi orjinal gibi ama bunların say komutları biraz farklı çalışıo. :D

spider_dungeon_3floor_boss.quest

Kod:
----------------------------------
-- °Å¹Ì±¼ 3Ãş°ú º¸½º·ë °ü·Ã ÀüºÎ
--  2012.2.3 ±è¿ë¿í
----------------------------------

quest spider_dungeon_3floor_boss begin
	state start begin
	--2, ´øÀü ³¡ ½Ã°£.
		when spider_end_timer.server_timer with game.get_event_flag("spider_dead"..get_channel_id()) == 0 begin  --
			warp_all_in_area_to_area(82700, 612700, 93700,625700, 69100, 614800, 69100, 614800)
			game.set_event_flag("spider_lair_ongoing_"..get_channel_id(),0)
			game.set_event_flag("spider_lair_leader_"..get_channel_id(), 0)
			game.set_event_flag("spider_dead"..get_channel_id(),0)
			purge_area(82700, 612700, 93700,625700)
		end
		
		when spider_dead_timer.server_timer begin
			warp_all_in_area_to_area(82700, 612700, 93700,625700, 69100, 614800, 69100, 614800)
			game.set_event_flag("spider_lair_ongoing_"..get_channel_id(), 0)
			game.set_event_flag("spider_lair_leader_"..get_channel_id(), 0)
			game.set_event_flag("spider_dead"..get_channel_id(),0)
			purge_area(82700, 612700, 93700,625700)
		end
	
		when login or levelup or enter with pc.get_level() >= 50 begin
			set_state( step1 )
		end
		
		when 30130.chat.locale.spider_dungeon_3floor_boss.title_1 begin
			say(locale.spider_dungeon_3floor_boss.say_1)
		end
		
		when 30130.chat."Å×½ºÆ® ÃʱâÈ*" with is_test_server() begin
			
			game.set_event_flag("spider_lair_ongoing_"..get_channel_id(), 0)
			pc.setqf("retry_limit_time", get_global_time())
			
			
			say("¼*¹ö Ȱ¼ºÈ* : "..game.get_event_flag("spider_lair_ongoing_"..get_channel_id(), 0).." (ä³Î : "..get_channel_id().." )")
			local remain_time = pc.getqf("retry_limit_time") -  get_global_time()
			say("Á¦Çѽð£ : "..remain_time)
		
			purge_area(82700, 612700, 93700,625700) --º¸½º·ë Áö¿ª ÃʱâÈ*
		end 
	end

	state step1 begin
		when 20011.chat.locale.spider_dungeon_3floor_boss.title_2 with is_test_server() begin   --Å×½ºÆ®¿ë
			set_state(start)
			say(locale.spider_dungeon_3floor_boss.say_2)
		end
		
		when 30130.chat."Å×½ºÆ® ÃʱâÈ*" with is_test_server() begin
			
			game.set_event_flag("spider_lair_ongoing_"..get_channel_id(), 0)
			pc.setqf("retry_limit_time", get_global_time())
			
			
			say("¼*¹ö Ȱ¼ºÈ* : "..game.get_event_flag("spider_lair_ongoing_"..get_channel_id(), 0).." (ä³Î : "..get_channel_id().." )")
			local remain_time = pc.getqf("retry_limit_time") -  get_global_time()
			say("Á¦Çѽð£ : "..remain_time)
		
			purge_area(82700, 612700, 93700,625700) --º¸½º·ë Áö¿ª ÃʱâÈ*
		end 
		
		when 30130.chat.locale.spider_dungeon_3floor_boss.title_1 begin
			say(locale.spider_dungeon_3floor_boss.say_1)
		end
		
		when 20355.chat.locale.spider_dungeon_3floor_boss.title_4 begin   --°æºñ´ëÀå¿¡°Ô ¸»À» °É¾î Äù½ºÆ®¸¦ ½ÃÀÛÇÑ´Ù.
			
			say_title(mob_name(20355)) 
			----"12345678901234567890123456789012345678901234567890"|
			say(locale.spider_dungeon_3floor_boss.say_4)
			set_state( step2 )
			pc.give_item2(76019)
		end
	end

	state step2 begin --ºñ¼®¿¡ Źº»À» ¶ß·¯ °¡¾ßÇÑ´Ù.
		when 20011.chat.locale.spider_dungeon_3floor_boss.title_2 with is_test_server() begin   --Å×½ºÆ®¿ë
			set_state(start)
			say(locale.spider_dungeon_3floor_boss.say_2)
		end
		
		when 30130.chat."Å×½ºÆ® ÃʱâÈ*" with is_test_server() begin
			
			game.set_event_flag("spider_lair_ongoing_"..get_channel_id(), 0)
			pc.setqf("retry_limit_time", get_global_time())
			
			
			say("¼*¹ö Ȱ¼ºÈ* : "..game.get_event_flag("spider_lair_ongoing_"..get_channel_id(), 0).." (ä³Î : "..get_channel_id().." )")
			local remain_time = pc.getqf("retry_limit_time") -  get_global_time()
			say("Á¦Çѽð£ : "..remain_time)
		
			purge_area(82700, 612700, 93700,625700) --º¸½º·ë Áö¿ª ÃʱâÈ*
		end 
		
		
		
		
		-----------Äù½ºÆ®ÆíÁö2------------
		when letter begin
			send_letter(locale.spider_dungeon_3floor_boss.title_5)

			local v = find_npc_by_vnum(30130)
			if 0 != v then
				target.vid("__TARGET__", v, mob_name(30130))
			end
		end

		when button or info begin
			say_title(locale.spider_dungeon_3floor_boss.title_5)
			say(locale.spider_dungeon_3floor_boss.say_5)
			say("")
		end

		when 30130.chat.locale.spider_dungeon_3floor_boss.title_5 begin
			target.delete("__TARGET__")
			
			say_title(pc.getname())
			----"12345678901234567890123456789012345678901234567890"|
			say(locale.spider_dungeon_3floor_boss.say_5_1)
			set_state(step3)
		end
		
		
		when 30130.chat.locale.spider_dungeon_3floor_boss.title_1 begin
			say(locale.spider_dungeon_3floor_boss.say_1)
		end
		
		when 20355.chat.locale.spider_dungeon_3floor_boss.title_4 begin
			
			say_title(mob_name(20355))
			----"12345678901234567890123456789012345678901234567890"|
			say(locale.spider_dungeon_3floor_boss.say_6)
		end
		
	end
	
	state step3 begin --Źº»À» ¶¹À¸´Ï °æºñ¿¡°Ô µ¹¾Æ°£´Ù.
		when 20011.chat.locale.spider_dungeon_3floor_boss.title_2 with is_test_server() begin   --Å×½ºÆ®¿ë
			set_state(start)
			say(locale.spider_dungeon_3floor_boss.say_2)
		end
		
		when 30130.chat."Å×½ºÆ® ÃʱâÈ*" with is_test_server() begin
			
			game.set_event_flag("spider_lair_ongoing_"..get_channel_id(), 0)
			pc.setqf("retry_limit_time", get_global_time())
			
			
			say("¼*¹ö Ȱ¼ºÈ* : "..game.get_event_flag("spider_lair_ongoing_"..get_channel_id(), 0).." (ä³Î : "..get_channel_id().." )")
			local remain_time = pc.getqf("retry_limit_time") -  get_global_time()
			say("Á¦Çѽð£ : "..remain_time)
		
			purge_area(82700, 612700, 93700,625700) --º¸½º·ë Áö¿ª ÃʱâÈ*
		end 
		
		when 30130.chat.locale.spider_dungeon_3floor_boss.title_1 begin
			say(locale.spider_dungeon_3floor_boss.say_1)
		end
		
		when letter begin
			send_letter(locale.spider_dungeon_3floor_boss.title_7)

			--°æºñ´ëÀåÀ» °¡¸®Å²´Ù.
			local v = find_npc_by_vnum(20355)
			if 0 != v then
				target.vid("__TARGET__", v, mob_name(20355))
			end
		end

		when button or info begin
			say_title(locale.spider_dungeon_3floor_boss.title_7)
			say(locale.spider_dungeon_3floor_boss.say_7)
			say("")
		end
		
		--À»µÎÁö¸¦ ¼±ÅÃÇϸé ÇØ´ç Äù½ºÆ®¿¡ °ü·ÃµÈ ´ëÈ*¸¦ ³ª´* ¼ö ÀÖ´Ù.
		when 20355.chat.locale.spider_dungeon_3floor_boss.title_7 begin
			say_title(mob_name(20355))
			say(locale.spider_dungeon_3floor_boss.say_7_1)
			set_state(step4)
		end
		
	end
		
	state step4 begin  --À»µÎÁö¿¡°Ô Źº»À» ¸Ã±âÀÚ.
		when 20011.chat.locale.spider_dungeon_3floor_boss.title_2 with is_test_server() begin   --Å×½ºÆ®¿ë
			set_state(start)
			say(locale.spider_dungeon_3floor_boss.say_2)
		end
		
		when 30130.chat."Å×½ºÆ® ÃʱâÈ*" with is_test_server() begin
			
			game.set_event_flag("spider_lair_ongoing_"..get_channel_id(), 0)
			pc.setqf("retry_limit_time", get_global_time())
			
			
			say("¼*¹ö Ȱ¼ºÈ* : "..game.get_event_flag("spider_lair_ongoing_"..get_channel_id(), 0).." (ä³Î : "..get_channel_id().." )")
			local remain_time = pc.getqf("retry_limit_time") -  get_global_time()
			say("Á¦Çѽð£ : "..remain_time)
		
			purge_area(82700, 612700, 93700,625700) --º¸½º·ë Áö¿ª ÃʱâÈ*
		end 
		
		when 30130.chat.locale.spider_dungeon_3floor_boss.title_1 begin
			say(locale.spider_dungeon_3floor_boss.say_1)
		end
		
		-----------Äù½ºÆ®ÆíÁö2------------
		when letter begin
			send_letter(locale.spider_dungeon_3floor_boss.title_7)

			-- À»µÎÁö¸¦ °¡¸®Å²´Ù.
			local v = find_npc_by_vnum(20011)
			if 0 != v then
				target.vid("__TARGET__", v, mob_name(20011))
			end
		end

		when button or info begin
			say_title(locale.spider_dungeon_3floor_boss.title_7)
			say(locale.spider_dungeon_3floor_boss.say_7_2)
			say("")
		end
		
		when 20011.chat.locale.spider_dungeon_3floor_boss.title_7 begin
			target.delete("__TARGET__")
			
			say_title(mob_name(20011))
			say(locale.spider_dungeon_3floor_boss.say_7_3)
			say("")
			
			set_state(step5)
		end
	
		when 20355.chat.locale.spider_dungeon_3floor_boss.title_7 begin
			say_title(mob_name(20355))
			say(locale.spider_dungeon_3floor_boss.say_7_1)
		end
	end
	
	state step5 begin  --°æºñÇÑÅ× ÆíÁö ¹è´Ş
		when 20011.chat.locale.spider_dungeon_3floor_boss.title_2 with is_test_server() begin   --Å×½ºÆ®¿ë
			set_state(start)
			say(locale.spider_dungeon_3floor_boss.say_2)
		end
		
		when 30130.chat."Å×½ºÆ® ÃʱâÈ*" with is_test_server() begin
			
			game.set_event_flag("spider_lair_ongoing_"..get_channel_id(), 0)
			pc.setqf("retry_limit_time", get_global_time())
			
			
			say("¼*¹ö Ȱ¼ºÈ* : "..game.get_event_flag("spider_lair_ongoing_"..get_channel_id(), 0).." (ä³Î : "..get_channel_id().." )")
			local remain_time = pc.getqf("retry_limit_time") -  get_global_time()
			say("Á¦Çѽð£ : "..remain_time)
		
			purge_area(82700, 612700, 93700,625700) --º¸½º·ë Áö¿ª ÃʱâÈ*
		end 
		
		when 30130.chat.locale.spider_dungeon_3floor_boss.title_1 begin
			say(locale.spider_dungeon_3floor_boss.say_1)
		end
		
		when letter begin
			send_letter("À»µÎÁöÀÇ ÆíÁö¹è´Ş")

			-- À»µÎÁö¸¦ °¡¸®Å²´Ù.
			local v = find_npc_by_vnum(20355)
			if 0 != v then
				target.vid("__TARGET__", v, mob_name(20355))
			end
		end

		when button or info begin
			say_title(locale.spider_dungeon_3floor_boss.title_8)
			say(locale.spider_dungeon_3floor_boss.say_8)
			say("")
		end
		
		when 20355.chat.locale.spider_dungeon_3floor_boss.title_9 begin
			target.delete("__TARGET__")
			say_title(mob_name(20355))
			----"12345678901234567890123456789012345678901234567890"|
			say(locale.spider_dungeon_3floor_boss.say_9)
			say("")
			
			set_state(step6)
			pc.give_item2(76019)
		end	
		
		when 20011.chat.locale.spider_dungeon_3floor_boss.title_7 begin
			say_title(mob_name(20011))
			say(locale.spider_dungeon_3floor_boss.say_7_4)
			say("")
		end
		
	end
	
	state step6 begin --°æºñ´Â ³ª¸¸ ÀϽÃŲ´Ù. À»µÎÁö¿Í »óÀÇÇÏÀÚ.
		when 20011.chat.locale.spider_dungeon_3floor_boss.title_2 with is_test_server() begin   --Å×½ºÆ®¿ë
			set_state(start)
			say(locale.spider_dungeon_3floor_boss.say_2)
		end
		
		when 30130.chat."Å×½ºÆ® ÃʱâÈ*" with is_test_server() begin
			
			game.set_event_flag("spider_lair_ongoing_"..get_channel_id(), 0)
			pc.setqf("retry_limit_time", get_global_time())
			
			
			say("¼*¹ö Ȱ¼ºÈ* : "..game.get_event_flag("spider_lair_ongoing_"..get_channel_id(), 0).." (ä³Î : "..get_channel_id().." )")
			local remain_time = pc.getqf("retry_limit_time") -  get_global_time()
			say("Á¦Çѽð£ : "..remain_time)
		
			purge_area(82700, 612700, 93700,625700) --º¸½º·ë Áö¿ª ÃʱâÈ*
		end 
		
		when 30130.chat.locale.spider_dungeon_3floor_boss.title_1 begin
			say(locale.spider_dungeon_3floor_boss.say_1)
		end
		
		when letter begin
			send_letter(locale.spider_dungeon_3floor_boss.title_9)
			
			-- À»µÎÁö¸¦ °¡¸®Å²´Ù.
			local v = find_npc_by_vnum(20011)
			if 0 != v then
				target.vid("__TARGET__", v, mob_name(20011))
			end
		end

		when button or info begin
			say_title(locale.spider_dungeon_3floor_boss.title_9)
			say(locale.spider_dungeon_3floor_boss.say_9)
			say("")
		end

		--À»µÎÁö¸¦ ¼±ÅÃÇϸé ÇØ´ç Äù½ºÆ®¿¡ °ü·ÃµÈ ´ëÈ*¸¦ ³ª´* ¼ö ÀÖ´Ù.
		when 20011.chat.locale.spider_dungeon_3floor_boss.title_9 begin
			target.delete("__TARGET__")
			say_title(mob_name(20011))
			say(locale.spider_dungeon_3floor_boss.say_9_1)
			
			set_state(boss_ok)
			
		end
		
	end
	
	state boss_ok begin  -- ¿*¼è¸¦ ¸¸µé¼ö ÀÖ°Ô µÈ ÃÖÁ¾»óÅÂ. ÀÌÁ¦ºÎÅÍ °Å¹Ì±¼ º¸½º·ë¿¡ ÀÔÀåÇÒ ¼ö ÀÖ´Ù.
		when 20011.chat.locale.spider_dungeon_3floor_boss.title_2 with is_test_server() begin   --Å×½ºÆ®¿ë
			set_state(start)
			say(locale.spider_dungeon_3floor_boss.say_2)
		end
	
		when 30130.chat."Å×½ºÆ® ÃʱâÈ*" with is_test_server() begin
			
			game.set_event_flag("spider_lair_ongoing_"..get_channel_id(), 0)
			pc.setqf("retry_limit_time", get_global_time())
			
			
			say("¼*¹ö Ȱ¼ºÈ* : "..game.get_event_flag("spider_lair_ongoing_"..get_channel_id(), 0).." (ä³Î : "..get_channel_id().." )")
			local remain_time = pc.getqf("retry_limit_time") -  get_global_time()
			say("Á¦Çѽð£ : "..remain_time)
		
			purge_area(82700, 612700, 93700,625700) --º¸½º·ë Áö¿ª ÃʱâÈ*
		end 
		
		when	20011.chat.locale.spider_dungeon_3floor_boss.title_9 begin
			say_title(mob_name(20011))
			say(locale.spider_dungeon_3floor_boss.say_9_2)
			wait()
			
			if pc.count_item(30025) > 0 and pc.count_item(30056) > 0 and pc.count_item(30057) > 0 and pc.count_item(30058) > 0 and pc.count_item(30059) > 0 and pc.count_item(30326) > 0 then
				say_title(mob_name(20011))
				say(locale.spider_dungeon_3floor_boss.say_9_3)
				pc.remove_item(30025, 1)
				pc.remove_item(30056, 1)
				pc.remove_item(30057, 1)
				pc.remove_item(30058, 1)
				pc.remove_item(30059, 1)
				pc.remove_item(30326, 1)
				if math.random(1,2000) <= 1000 then
					say(locale.spider_dungeon_3floor_boss.say_9_4)
					pc.give_item2(30324, 1)
				else
					say(locale.spider_dungeon_3floor_boss.say_9_5)
				end
			else
				say_title(mob_name(20011))
				say(locale.spider_dungeon_3floor_boss.say_9_6)
			end
		end
		
		


		when 30130.chat.locale.spider_dungeon_3floor_boss.title_1 begin
			if game.get_event_flag("spider_lair_ongoing_"..get_channel_id()) == 1 then
			
				local starttime = game.get_event_flag("spider_lair_start_time_"..get_channel_id())
				local current_time = get_global_time()
				
				if party.get_leader_pid() == game.get_event_flag("spider_lair_leader_"..get_channel_id()) then
				
					if  starttime +  300 >= current_time  and party.get_leader_pid() == game.get_event_flag("spider_lair_leader_"..get_channel_id()) and game.get_event_flag("spider_lair_ongoing_"..get_channel_id()) == 1 then
						say(locale.spider_dungeon_3floor_boss.say_10) -- Å×½ºÆ®¿ë
						local warp = select("È®ÀÎ","Ãë¼Ò")
						if warp == 1 then
							pc.setqf("firstIn",1)
							pc.setqf("retry_limit_time", starttime + 1200 + 3600 )
							set_state(inLair)
							pc.warp(88100,614800)
							return
						end
					else
						say(locale.spider_dungeon_3floor_boss.say_11) -- Å×½ºÆ®¿ë
						return
					end
				else
					local remain_time = (game.get_event_flag("spider_lair_end_time_"..get_channel_id() ) - get_global_time()) / 60
					say(locale.spider_dungeon_3floor_boss.say_12)
					say(string.format(locale.spider_dungeon_3floor_boss.say_13,remain_time))
					return
				end	
			elseif  pc.getqf("retry_limit_time") > get_global_time() then
				local access_limit = (pc.getqf("retry_limit_time") - get_global_time()) / 60
				say(locale.spider_dungeon_3floor_boss.say_14)
				say(string.format(locale.spider_dungeon_3floor_boss.say_15,access_limit))
				return
			elseif party.is_leader()   then
				 if false == pc.can_warp() then
					  say(locale.spider_dungeon_3floor_boss.say_16)
					  return
				 end
				if pc.count_item(30324) > 0 then
					say(locale.spider_dungeon_3floor_boss.say_17)
					local warp = select(locale.confirm,locale.cancel)
					if warp == 1 then
						
						set_state(inLair)
						
						pc.remove_item(30324, 1)
						
						mob.spawn(2094,369,551,0,0)
						
						--°ª ¼³Á¤.
						game.set_event_flag("spider_lair_ongoing_"..get_channel_id()		,			1)
						game.set_event_flag("spider_lair_start_time_"..get_channel_id()	, get_global_time())
						game.set_event_flag("spider_lair_end_time_"..get_channel_id()		, get_global_time() + 1200)
						game.set_event_flag("spider_lair_leader_"..get_channel_id()			, party.get_leader_pid())
						
						pc.setqf("retry_limit_time", get_global_time() + 1200 + 3600 )
						pc.setqf("firstIn",1)
						
						
						server_timer("spider_end_timer", 1200 )
						
						
						pc.warp(88100,614800)
					end
					return
				else
					say(locale.spider_dungeon_3floor_boss.say_18)
					return
				end
			else --¸®´õ ¾Æ´Ï´Ù.
				say(locale.spider_dungeon_3floor_boss.say_19)
				return
			end
			
		end
		

	end

	state inLair begin
		when 20011.chat.locale.spider_dungeon_3floor_boss.title_2 with is_test_server() begin   --Å×½ºÆ®¿ë
			set_state(start)
			say(locale.spider_dungeon_3floor_boss.say_2)
		end
		
	
		when 30130.chat."Å×½ºÆ® ÃʱâÈ*" with is_test_server() begin
			
			game.set_event_flag("spider_lair_ongoing_"..get_channel_id(), 0)
			pc.setqf("retry_limit_time", get_global_time())
			
			
			say("¼*¹ö Ȱ¼ºÈ* : "..game.get_event_flag("spider_lair_ongoing_"..get_channel_id(), 0).." (ä³Î : "..get_channel_id().." )")
			local remain_time = pc.getqf("retry_limit_time") -  get_global_time()
			say("Á¦Çѽð£ : "..remain_time)
		
			purge_area(82700, 612700, 93700,625700) --º¸½º·ë Áö¿ª ÃʱâÈ*
		end 
	
		when login  begin 
			-- Á¤»óÀûÀ¸·Î º¸½º·ë¿¡ ÀÔÀå. 
			--if pc.getqf("firstIn") == 1  and party.get_leader_pid() == game.get_event_flag("spider_lair_leader_"..get_channel_id()) then
			if get_global_time() < pc.getqf("retry_limit_time") -  3600 and party.get_leader_pid() == game.get_event_flag("spider_lair_leader_"..get_channel_id()) then
				pc.setqf("firstIn",0)
			elseif pc.getx() >= 827 and pc.getx() <= 937 and pc.gety() >= 6127 and  pc.gety() <= 6257 then 
				pc.warp(95900,571000)
				pc.remove_item(30327, 1)
			else -- À§¿¡¼* ÆÃ°Ü³½ À¯Àú°¡ ¹Û¿¡¼* ·Î±×ÀÎ ÇÏ°Ô µÇ¸é, Á¢±Ù Á¦ÇÑ ½Ã°£À» ¼ÂÆÃÇØÁÜ.
				pc.remove_item(30327, 1)
				set_state( boss_ok )
				local limit = pc.getqf("retry_limit_time")
				
				if limit > ( get_global_time() + 3600 ) then
					limit = ( get_global_time() + 3600 )
				end
				pc.setqf("retry_limit_time", limit )
				
				local duration = limit - get_global_time()
			end
		end

		when 30130.chat.gameforge.spider_dungeon_3floor_boss._10_npcChat begin
			if game.get_event_flag("spider_lair_ongoing_"..get_channel_id()) == 1 then
			
				local starttime = game.get_event_flag("spider_lair_start_time_"..get_channel_id())
				local current_time = get_global_time()
				
				if party.get_leader_pid() == game.get_event_flag("spider_lair_leader_"..get_channel_id()) then
				
					if  starttime +  300 >= current_time  and party.get_leader_pid() == game.get_event_flag("spider_lair_leader_"..get_channel_id()) and game.get_event_flag("spider_lair_ongoing_"..get_channel_id()) == 1 then
						say(gameforge.spider_dungeon_3floor_boss._300_say) -- Å×½ºÆ®¿ë
						local warp =  select(locale.confirm,locale.cancel)
						if warp == 1 then
							pc.warp(88100,614800)
							return
						end
					end
				end
			end
		end
		

		
		when 2092.kill begin --´ë¿Õ°Å¹Ì Á×ÀÓ
			server_timer("spider_dead_timer", 180)
			game.set_event_flag("spider_dead"..get_channel_id(), 1)
			notice_in_map(locale.spider_dungeon_3floor_boss.say_20)
		end
		
		
		when 2095.kill begin --°Å¹Ì¾Ë Á×ÀÓ
			local kingVid = game.get_event_flag("king_vid")
			local remain_egg = game.get_event_flag("remain_egg"..get_channel_id())
			
			if remain_egg > 0 then
				remain_egg = remain_egg - 1
				game.set_event_flag("remain_egg"..get_channel_id(), remain_egg)
			end
			
			--°Å¹ÌÀÇ °ø°İ·Â º¸Á¤
			 npc.set_vid_attack_mul(kingVid, 10/(remain_egg + 1))
			 
			 --°Å¹Ì°¡ ¹Ş´Â ÇÇÇØ·® º¸Á¤
			 npc.set_vid_damage_mul(kingVid, 10/(remain_egg + 1))
		end
		
		
		--  2012.4.5 ÀÌ»óÇö ¸®Á¨À§Ä¡ ¼öÁ¤
		when 30327.use with pc.getx() >= 827 and pc.get_map_index() == 217 and pc.getx() <= 937 and pc.gety() >= 6127 and  pc.gety() <= 6257 begin
			--say("¸Ê¹øÈ£ : "..pc.get_map_index())
			pc.remove_item(30327, 1)
			i = mob.spawn(2095,400,566,0,0)
			mob.spawn(2095,400,594,0,0)
			mob.spawn(2095,362,600,0,0)
			mob.spawn(2095,337,599,0,0)
			mob.spawn(2095,335,581,0,0)
			mob.spawn(2095,344,562,0,0)
			mob.spawn(2095,364,588,0,0)
			mob.spawn(2095,379,562,0,0)
			mob.spawn(2095,368,525,0,0)
			
			
			local kingVid = mob.spawn(2092,367,588,0,0)
			game.set_event_flag("king_vid",kingVid)
			game.set_event_flag("remain_egg"..get_channel_id(), 9)
		end
		
	end
end

spider_king_egg.quest

Kod:
----------------------------------
--	°Å¹Ì±¼ 3Ãş ´ë¿Õ°Å¹Ì Äù½ºÆ® (¾Ë°ú ´ë¿Õ°Å¹Ì¿ÍÀÇ °ü°è)
-- °ú¿¬, ¾Ë°ú °Å¹Ì¿ÍÀÇ °ü°è´Â ¾î¶»°Ô µÇ´Â °ÍÀΰ¡!!
-- ¾ËÀÌ Á״´Ù. -> ´ë¿Õ°Å¹ÌÀÇ °ø°İº¸Á¤ÀÌ ³ô¾ÆÁø´Ù.     (¼¼°Ô ¶§¸°´Ù.)
--                   -> ´ë¿Õ°Å¹ÌÀÇ ÇÇÇØ·® º¸Á¤ÀÌ ³ô¾ÆÁø´Ù. (¼¼°Ô ¸Â´Â´Ù.)
--  2011.11.24 ±è¿ë¿í
----------------------------------
quest spiderKingEgg begin
	state start begin
		when login or levelup with pc.level >0 begin
			set_state(spiderKing)
		end
	end
	
	state spiderKing begin
		when 8002.kill begin
			local leader_vid = npc.get_leader_vid()
			
			--°Å¹ÌÀÇ °ø°İ·Â º¸Á¤
			local leader_attMul = npc.get_vid_attack_mul(leader_vid)
			local newAttMul = leader_attMul
			if leader_attMul >= 1 and leader_attMul < 1.11 then
				newAttMul = 1.111
			elseif leader_attMul < 1.25 then
				newAttMul = 1.251
			elseif leader_attMul < 1.43 then
				newAttMul = 1.431
			elseif leader_attMul < 1.67 then
				newAttMul = 1.671
			elseif leader_attMul < 2 then
				newAttMul = 2.1
			elseif leader_attMul < 2.5 then
				newAttMul = 2.51
			elseif leader_attMul < 3.33 then
				newAttMul = 3.331
			elseif leader_attMul < 5 then
				newAttMul = 5.1
			elseif leader_attMul < 10 then
				newAttMul = 10.1
			end
			 npc.set_vid_attack_mul(leader_vid, newAttMul)
			 
			 --°Å¹Ì°¡ ¹Ş´Â ÇÇÇØ·® º¸Á¤
			local leader_damMul = npc.get_vid_damage_mul(leader_vid)
			local newDamMul = leader_damMul
			if leader_damMul >= 1 and leader_damMul < 1.11 then
				newDamMul = 1.111
			elseif leader_damMul < 1.25 then
				newDamMul = 1.251
			elseif leader_damMul < 1.43 then
				newDamMul = 1.431
			elseif leader_damMul < 1.67 then
				newDamMul = 1.671
			elseif leader_damMul < 2 then
				newDamMul = 2.1
			elseif leader_damMul < 2.5 then
				newDamMul = 2.51
			elseif leader_damMul < 3.33 then
				newDamMul = 3.331
			elseif leader_damMul < 5 then
				newDamMul = 5.1
			elseif leader_damMul < 10 then
				newDamMul = 10.1
			end
			 npc.set_vid_damage_mul(leader_vid, newDamMul)
			
		end
		
	end
end

spider_KeyMaking.quest

Kod:
----------------------------------
--	°Å¹Ìµ¿±¼ÀÇ ¿*¼è ¸¸µé±â Äù½ºÆ® (·¾Á¦ 50 ÀÌ»ó)
--  2012.2.3 ±è¿ë¿í
----------------------------------
quest spiderKeyMaking begin
	state start begin
		when login or levelup or enter with pc.get_level() >= 50 begin
			set_state( step1 )
		end
	end

	state step1 begin
		when 20355.chat."The third Spider Dungeon" begin   --°æºñ´ëÀå¿¡°Ô ¸»À» °É¾î Äù½ºÆ®¸¦ ½ÃÀÛÇÑ´Ù.
			say_title(mob_name(20355)) 
			say("")
			----"123456789012345678901234567890123456789012345678901234567890"|
			say("Oh! I'm glad you came.")
			say("")
			say("Our scouts have found about a third level in the Spider")
			say("Dungeons. Apparently, huge and evil insects have nested")
			say("in this previously unknown cave.")
			say("")
			say("Our men also found a Gravestone with an inscription they")
			say("could not decipher. Search for this stone and bring")
			say("back a copy of the inscription to me.")
			say("")
			say("Here is a Pass. It will allow you to enter the upper")
			say("levels")
			say("")
			pc.give_item2(71095)
			set_state( step2 )
		end
	end

	state step2 begin --ºñ¼®¿¡ Źº»À» ¶ß·¯ °¡¾ßÇÑ´Ù.
		-----------Äù½ºÆ®ÆíÁö2------------
		when letter begin
			send_letter("¾Ë ¼ö ¾ø´Â ºñ¹®")

			-- ºñ¼®À» °¡¸®Å²´Ù. (¾ÆÁ÷Àº ¹Ì¸®³»)
			local v = find_npc_by_vnum(20005)
			if 0 != v then
				target.vid("__TARGET__", v, mob_name(20005))
			end
		end

		when button or info begin
			say_title("The Gravestone")
			say("")
			----"123456789012345678901234567890123456789012345678901234567890"|
			say("Find the old Gravestone in the Spider Dungeons and make a")
			say("copy of the engravings for the Captain.")
			say("")
		end

		when 20371.chat."¾Ë ¼ö ¾ø´Â ºñ¹®" begin
			target.delete("__TARGET__")
			
			----"123456789012345678901234567890123456789012345678901234567890"|
			say("You made a copy of the pictograms in the gravestone.")
			say("")
			say("Go back to the Captain and show it to him.")
			say("")
			set_state(step3)
		end
		
		when 20355.chat."°Å¹Ìµ¿±¼ 3Ãş?!" begin
			
			say_title(mob_name(20355))
			say("")
			----"123456789012345678901234567890123456789012345678901234567890"|
			say("What are you waiting for? You didn't lose the Passage")
			say("I gave you, I hope?")
			say("")
		end
		
	end
	
	state step3 begin --Źº»À» ¶¹À¸´Ï °æºñ¿¡°Ô µ¹¾Æ°£´Ù.
		when letter begin
			send_letter("°Å¹Ìµ¿±¼ ºñ¼®ÀÇ ºñ¹Ğ")

			--°æºñ´ëÀåÀ» °¡¸®Å²´Ù.
			local v = find_npc_by_vnum(20355)
			if 0 != v then
				target.vid("__TARGET__", v, mob_name(20355))
			end
		end

		when button or info begin
			say_title("The Third Spider Dungeon")
			say("")
			----"123456789012345678901234567890123456789012345678901234567890"|
			say("You made a copy of the engravings in the old stone in")
			say("the Spider's Dungeon second floor.")
			say("")
			say("Show it to the Captain.")
			say("")
		end
		
		--À»µÎÁö¸¦ ¼±ÅÃÇϸé ÇØ´ç Äù½ºÆ®¿¡ °ü·ÃµÈ ´ëÈ*¸¦ ³ª´* ¼ö ÀÖ´Ù.
		when 20355.chat."Here's a copy of the engravings" begin
			say_title(mob_name(20355))
			say("")
			say("You found it already? Let's see...")
			say("[DELAY value;70]        [/DELAY]")
			say("What is this? I don't understand this language.")
			say("")
			say("Maybe we should ask the wise Uriel about it.")
			say("")
			set_state(step4)
		end
		
	end
		
	state step4 begin  --À»µÎÁö¿¡°Ô Źº»À» ¸Ã±âÀÚ.
		-----------Äù½ºÆ®ÆíÁö2------------
		when letter begin
			send_letter("A new threat")

			-- À»µÎÁö¸¦ °¡¸®Å²´Ù.
			local v = find_npc_by_vnum(20011)
			if 0 != v then
				target.vid("__TARGET__", v, mob_name(20011))
			end
		end

		when button or info begin
			say_title("A new threat")
			say("")
			----"123456789012345678901234567890123456789012345678901234567890"|
			say("The Captain can't figure out what's written in the")
			say("old inscriptions. Ask Uriel for help.")
			say("")
		end
		
		when 20011.chat."A new threat" begin
			target.delete("__TARGET__")
			say_title(mob_name(20011))
			say("")
			----"123456789012345678901234567890123456789012345678901234567890"|
			say("So the Captain wants me to decipher this mysterious")
			say("inscription? Of course, I love challenges!")
			say("[DELAY value;150]        [/DELAY]")
			say("Oh! This is... terrible. Here is the translation. Bring it")
			say("the Captain quicly and then come back here.")
			say("")
			say("If what is written here is true, we are facing a big threat.")
			say("Quick, go inform him!")
			say("")
			set_state(step5)
		end
	
		when 20355.chat."A new threat" begin
			say_title(mob_name(20355))
			say("")
			say("Did you talk to Uriel yet?")
			say("")
			say("What are you waiting for then?")
			say("")
		end
	end
	
	state step5 begin  --°æºñÇÑÅ× ÆíÁö ¹è´Ş
		when letter begin
			send_letter("ÆíÁö¹è´Ş")

			-- À»µÎÁö¸¦ °¡¸®Å²´Ù.
			local v = find_npc_by_vnum(20355)
			if 0 != v then
				target.vid("__TARGET__", v, mob_name(20355))
			end
		end

		when button or info begin
			say_title("A new threat")
			say("")
			say("")
			say("")
		end
		when 20355.chat."À»µÎÁöÀÇ ÆíÁö" begin
			target.delete("__TARGET__")
			say_title(mob_name(20355))
			----"123456789012345678901234567890123456789012345678901234567890"|
			say("")
			say("Darn! A violent arachnid demon has nested in the third level")
			say("of the Spider Dungeon. According to the inscription, a")
			say("special key is needed to access this hidden cave.")
			say("")
			say_reward("Ask Uriel about this key and gather a party of strong")
			say_reward("fighters to raid the hideout of the Spider Baroness.")
			say("")
			
			set_state(step6)
		end	
		
		when 20011.chat."°Å¹Ìµ¿±¼ ºñ¼®ÀÇ ºñ¹Ğ" begin
			say_title(mob_name(20011))
			say("À̺¸°Ô ½Ã±ŞÇÑ ¹®Á¦¶ó´Ï±î ¿Ö ÀÌ·¸°Ô ´ÊÀåÀ» ºÎ¸®´Â °Õ°¡..[ENTER]»¡¸® °æºñ´ëÀå¿¡°Ô ³ªÀÇ ÆíÁö¸¦ ÀüÇØÁÖ°í...[ENTER]´Ù½Ã ¿À°Ô³ª~!!![ENTER]")
			say("")
		end
		
	end
	
	state step6 begin --°æºñ´Â ³ª¸¸ ÀϽÃŲ´Ù. À»µÎÁö¿Í »óÀÇÇÏÀÚ.
		when letter begin
			send_letter("°Å¹Ìµ¿±¼ÀÇ ¿*¼è")
			
			-- À»µÎÁö¸¦ °¡¸®Å²´Ù.
			local v = find_npc_by_vnum(20011)
			if 0 != v then
				target.vid("__TARGET__", v, mob_name(20011))
			end
		end

		when button or info begin
			say_title("°Å¹Ìµ¿±¼ÀÇ ¿*¼è")
			say("¸Ç³¯ ³ª¸¸ ½ÃÄÑ.")
			say("À»µÎÁöÇÑÅ× °¡ÀÚ.")
			say("")
		end

		--À»µÎÁö¸¦ ¼±ÅÃÇϸé ÇØ´ç Äù½ºÆ®¿¡ °ü·ÃµÈ ´ëÈ*¸¦ ³ª´* ¼ö ÀÖ´Ù.
		when 20011.chat."Uriel's Letter" begin
			target.delete("__TARGET__")
			say_title(mob_name(20011))
			say("")
			----"123456789012345678901234567890123456789012345678901234567890"|
			say("You are back? Ah, so the Captain asked you to raid the")
			say("den of the Spider Baroness?")
			say("")
			say("Accessing it is not easy. An Arachnid Key is needed and")
			say("creating one is not an easy task.I will need you to bring")
			say("me a Spider Web, a Spider Egg Sack, a Spider Poison Sack,")
			say("a Spider Leg, a Spider Eye and the Queen Spider's Poison.")
			say("")
			set_state(step7)
			
		end
		
	end

	state step7 begin  --Àç·á¸¦ ¸ğ¾Æ À»µÎÁö¿¡°Ô °¡Á®°¡´Â »óÅÂ. Äù½ºÆ®ÀÇ ÃÖÁ¾ »óÅÂÀ̱⵵ ÇÏ´Ù.
		
		when 20011.chat."°Å¹Ìµ¿±¼ÀÇ ¿*¼è" begin
			say_title(mob_name(20011))
			say("¾Æ....[ENTER]°Å¹Ìµ¿±¼ÀÇ ¿*¼èÀÎ ÁöÁֽű¸¸¦ ¸¸µé·¯ ¿Â °ÍÀΰ¡??[ENTER]Àç·á´Â °Å¹ÌÀÇ µ¶ÁÖ¸Ó´Ï, °Å¹ÌÁÙ, °Å¹ÌÀÇ ´«, °Å¹Ì¾ËÁı, °Å¹Ì´Ù¸® °¢ ÇѰ³¾¿°ú ¿©¿Õ°Å¹ÌÀÇ µ¶¾× Àϼ¼...[ENTER]ÁغñµÇ¾ú´Â°¡???[ENTER]")
			wait()
			
			if pc.count_item(10) > 0 and pc.count_item(11) > 0 and pc.count_item(12) > 0 and pc.count_item(13) > 0 and pc.count_item(14) > 0 and pc.count_item(15) > 0 then
				say_title(mob_name(20011))
				say("¿À~!!![ENTER]´ë´ÜÇϱº....[ENTER]¸ğµç Àç·á¸¦ ´Ù ±¸ÇؿԾî~!!![ENTER]Àá½Ã¸¸ ±â´Ù¸®°Ô ¶Òµü¶ÒµüÇØ¼* ¸¸µé¾îÁÖÁö~!![ENTER].[ENTER].[ENTER].[ENTER]ÀÚ!!! ¿©±â ÀÖ³×~!!![ENTER]À̰ÍÀÌ °Å¹Ìµ¿±¼ 3Ãş¿¡¼* ´ë¿Õ°Å¹Ì ¹æÀ¸·Î °¥ ¼ö ÀÖ´Â ¿*¼è[ENTER]ÁöÁֽű¸Àϼ¼~!![ENTER]±×·³ ¸öÁ¶½ÉÇϰԳª~!![ENTER]")
				pc.remove_item(10, 1)
				pc.remove_item(11, 1)
				pc.remove_item(12, 1)
				pc.remove_item(13, 1)
				pc.remove_item(14, 1)
				pc.remove_item(15, 1)
				pc.give_item2(16, 1)
			else
				say_title(mob_name(20011))
				say("À̺¸°Ô³ª~!![ENTER]Àç·á°¡ ºÎÁ·ÇÏÁö ¾ÊÀº°¡~!!![ENTER]¾ğÁ¦³ª ´Ã À̾߱â ÇÏÁö¸¸...[ENTER]³* °©ºÎµµ ¾Æ´Ï°í ±×·¸´Ù°í ÇØ¼* ºÀ»çÁ¤½ÅÀÌ ÅõöÇÑ Àι°µµ[ENTER]¾Æ´Ò¼¼~!![ENTER]³» »çºñ¸¦ ÅĞ¾î ¿*¼è¸¦ ¸¸µé¾î ÁÙ¼ö´Â ¾øÁö ¾ÊÀº°¡~!![ENTER]Àç·á¸¦ ±¸Çؼ* ´Ù½Ã ³ª¿¡°Ô ¸»À» ÇϰԳª~!![ENTER][ENTER]Àç·á¸¦ ±î¸Ô¾ú´Ù¸é ´Ù½Ã Çѹø ¸»ÇØÁÖÁö..Àç·á´Â °Å¹ÌÀÇ µ¶ÁÖ¸Ó´Ï, °Å¹ÌÁÙ, °Å¹ÌÀÇ ´«, °Å¹Ì¾ËÁı, °Å¹Ì´Ù¸® °¢ ÇѰ³¾¿°ú ¿©¿Õ°Å¹ÌÀÇ µ¶¾× Àϼ¼....[ENTER]±×·³ ¼ö°í ÇϰԳª...[ENTER]¿¡À×~[ENTER]")
			end
		end
	end
end

spider_lair_access.quest

Kod:
----------------------------------
--	°Å¹Ì±¼3Ãş º¸½º·ë ÀÔÀå Äù½ºÆ®
--  2012.2.6 ±è¿ë¿í
----------------------------------
quest spider_lair_access begin
	state start begin
	
		when 20011.chat."ŸÀÌ¸Ó Å×½ºÆ®1" begin
			server_timer("timer_test1", 5)
			say("5Ãʵڿ¡")
		end
		when 20011.chat."ŸÀÌ¸Ó Å×½ºÆ®2 : spider_end_timer" begin
			server_timer("spider_end_timer", 5)
			say("5Ãʵڿ¡")
		end
		when 20011.chat."ŸÀÌ¸Ó Å×½ºÆ®3" begin
			server_timer("timer_test3", 5)
			say("5Ãʵڿ¡")
		end
		when 20011.chat."ŸÀÌ¸Ó Å×½ºÆ®4" begin
			server_timer("timer_test4", 5)
			say("5Ãʵڿ¡")
		end
		when timer_test1.server_timer begin
			game.set_event_flag("timer_result", 1) 
		end
		
		--2, ´øÀü ³¡ ½Ã°£.
		when spider_end_timer.server_timer begin  --
			warp_all_in_area_to_area(72000 - 10000, 166400-10000, 72000 + 10000, 166400+10000, 72000 +13000 , 166400+13000, 72000 +16000, 166400+16000)
			game.set_event_flag("spider_lair_ongoing_"..pc.get_channel_id(), 0)
		end
		
		when timer_test3.server_timer begin
			game.set_event_flag("timer_result", 3) 
		end
		when timer_test4.server_timer begin
			game.set_event_flag("timer_result", 4) 
		end
		
		when 20011.chat."ŸÀÌ¸Ó Å×½ºÆ® °á°ú È®ÀÎ" begin
			say("Å×½ºÆ® °á°ú´Â : "..game.get_event_flag("timer_result", 4) )
		end
		
		when 20011.chat."Å×½ºÆ® ÃʱâÈ*" begin
			
			game.set_event_flag("spider_lair_ongoing_"..pc.get_channel_id(), 0)
			pc.setqf("retry_limit_time", get_global_time()-10)
			
			
			say("¼*¹ö Ȱ¼ºÈ* : "..game.get_event_flag("spider_lair_ongoing_"..pc.get_channel_id(), 0).." (ä³Î : "..pc.get_channel_id().." )");
			say("·¹¾î ³¡³ª´Â ½Ã°£ : "..game.get_event_flag("spider_lair_end_time_"..pc.get_channel_id(), 0).." , ÇöÀç½Ã°£ : "..get_global_time());
			say("Á¦Çѽð£ : "..pc.getqf("retry_limit_time"))
		
		end 
		when 20011.chat."°Å¹Ìº¸½ºÀâÀÚ" begin
			say_title("°Å¹Ìº¸½º")
			--1. ÀÌ¹Ì ÁøÇàÁßÀΰ¡?
			if game.get_event_flag("spider_lair_ongoing_"..pc.get_channel_id()) == 1 then
				say("´øÀüÀº ÀÌ¹Ì ¸¸µé¾îÁ®ÀÖ´Ù. ¸®´õ :"..(game.get_event_flag("spider_lair_leader_"..pc.get_channel_id() ))) -- Å×½ºÆ®¿ë
				wait()
			
				local starttime = game.get_event_flag("spider_lair_start_time_"..pc.get_channel_id())
				local current_time = get_global_time()
				
				--1.1ÇØ´ç ÆÄƼ¿¡ ¼ÓÇØÀÖ´Ù.
				if party.get_leader_pid() == game.get_event_flag("spider_lair_leader_"..pc.get_channel_id()) then
					say("´øÀüÆÄƼ¿¡ ¼ÓÇØÀÖ´Ù.") -- Å×½ºÆ®¿ë
					wait()
				
					if  starttime +  300 >= current_time then
						say("ÀÔÀå°¡´É ½Ã°£ÀÌ´Ù. µé¾î°£´Ù.") -- Å×½ºÆ®¿ë
						say("ÀÔÀåÀº ¾ÆÁ÷ÀÌ´Ù. µé¾î°¬´Ù°í Ä¡ÀÚ.")-- Å×½ºÆ®¿ë
						pc.warp(71100,166400)
						pc.setqf("firstIn",1)
						pc.setqf("retry_limit_time", starttime + 15 + 15)
						set_state(inLair)
						return
					else
						say("ÀÔÀå½Ã°£ ³¡.") -- Å×½ºÆ®¿ë
						return
					end
				else
					say("´Ù¸¥¾Ö°¡ ÇϰíÀÖ¾î.: "..pc.getqf("spider_lair_end_time_")..pc.get_channel_id()	 - get_global_time().."ºĞ ±â´Ş")
					return
				end	
			--2. ÀçµµÀü Á¦ÇÑ ½Ã°£¿¡ °É¸®³ª?
			elseif  pc.getqf("retry_limit_time") > get_global_time() then
				say("³Í ¾ÆÁ÷ ½Ã°£ÀÌ ¾ÈµÆ¾î. : "..pc.getqf("retry_limit_time") - get_global_time())
				return
			--3. ¸®´õ´Ù.
			elseif party.is_leader()   then
				say("¸®´õ³×")
				if pc.count_item(16) > 0 then
					say("ÁöÁÖÁø±¸ ÀÖ³×")
					local warp = select("µé¾î°¨?","¾È°¨?")
					if warp == 1 then
						say("µé¾î°¬´Ù°í Ĩ½Ã´Ù. ¸®´õ : "..party.get_leader_pid())
						
						pc.warp(71100,166400)
						set_state(inLair)
						
						pc.remove_item(16, 1)
						
						--°ª ¼³Á¤.
						game.set_event_flag("spider_lair_ongoing_"..pc.get_channel_id()		,			1)
						game.set_event_flag("spider_lair_start_time_"..pc.get_channel_id()	, get_global_time())
						game.set_event_flag("spider_lair_end_time_"..pc.get_channel_id()		, get_global_time()+15)
						game.set_event_flag("spider_lair_leader_"..pc.get_channel_id()			, party.get_leader_pid())
						pc.setqf("retry_limit_time", game.get_event_flag("spider_lair_end_time_"..pc.get_channel_id() ) + 15)
						pc.setqf("firstIn",1)
						
						
						server_timer("spider_end_timer", 15 )
						
						
					end
					return
				else
					say("ÁöÁÖÁø±¸ ¾ø³×.")
					return
				end
			else --¸®´õ ¾Æ´Ï´Ù.
				say("³Ê ¸»°í ¸®´õ¿À¶ó±×·¡")
				return
			end
			
		end
		

	end

	state inLair begin
	
		when 20011.chat."Å×½ºÆ® ÃʱâÈ*" begin
			
			game.set_event_flag("spider_lair_ongoing_"..pc.get_channel_id(), 0)
			pc.setqf("retry_limit_time", get_global_time()-10)
			
			
			say("¼*¹ö Ȱ¼ºÈ* : "..game.get_event_flag("spider_lair_ongoing_"..pc.get_channel_id(), 0).." (ä³Î : "..pc.get_channel_id().." )");
			say("·¹¾î ³¡³ª´Â ½Ã°£ : "..game.get_event_flag("spider_lair_end_time_"..pc.get_channel_id(), 0).." , ÇöÀç½Ã°£ : "..get_global_time());
			say("Á¦Çѽð£ : "..pc.getqf("retry_limit_time"))
			
			
			set_state( start )
		
		end 
	
		when login  begin 
			if pc.getqf("firstIn") == 1  and party.get_leader_pid() == game.get_event_flag("spider_lair_leader_"..pc.get_channel_id()) then
				pc.setqf("firstIn",0)
			else
				say("³ª°¡")
				pc.warp(72000,166400)
				set_state( start )
			end
		end

		
		when 101.kill begin
			say("¿Õ°Å¹Ì Á׿´´Ù.")
			say("3ºĞµÚ¿¡ ´øÀü¿¡¼* ÂѾƳ¿.")
			server_timer("spider_end_timer", 5)
			
			set_state( start )
		end
		
		when 27001.use begin
			say("¾Ë ¼Òȯ µÇ¶ó.")
		end
		
		
	end
end
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst