Hallo Community,
gibt es hier jemanden, der mir dabei helfen könnte Dungeon Quests umzuschreiben ?
Als beispiel diese Quest vom Spinnendungeon.
Ich möchte gerne, dass man ihn Solo machen kann ohne Gruppe.
Zweitens ist es glaube so, dass wenn jemand drinnen ist in dieser Zeit niemand anderes den Run machen kann. Das möchte ich auch gerne weg machen sodass jeder rein kann wenn seine Cooldown abgelaufen ist.
Falls es sein muss kann auch etwas bezahlt werden.
- ----------------------------------
- -- 거미굴 3층과 보스룸 관련 전부
- -- 2012.2.3 김용욱
- ----------------------------------
- define lair_time 1800
- define lair_enter_wait_time 300
- define king_kill_wait_time 180
- define access_limit_time 3600
- 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, 610800, 69100, 610800)
- 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, 610800, 69100, 610800)
- 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 30130.chat.locale_quest(8241) begin
- if pc.count_item(70408) < 30 then
- --break
- say(locale_quest(8272))
- return
- end
- 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 + lair_enter_wait_time >= 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_quest(8263)) -- 테스트용
- local warp = select(locale_quest(2454), locale_quest(2426))
- if warp == 1 then
- pc.setqf("firstIn", 1)
- pc.setqf("retry_limit_time", starttime + lair_time + access_limit_time)
- set_state(inLair)
- pc.warp(88100, 614800)
- return
- end
- else
- say(locale_quest(8264)) -- 테스트용
- return
- end
- else
- local remain_time = (game.get_event_flag("spider_lair_end_time_" .. get_channel_id()) - get_global_time()) / 60
- if remain_time < 0 then
- say(locale_quest(8275))
- 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)
- return
- end
- say(locale_quest(8265))
- -- here we should change to string.format %s key
- say(string.format(locale_quest(8266), math.ceil(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_quest(8267))
- -- here we should also change to string.format %s key
- say(string.format(locale_quest(8268), math.ceil(access_limit)))
- return
- elseif party.is_leader() then
- if false == pc.can_warp() then
- say(locale_quest(8269))
- return
- end
- local pids = { party.get_member_pids() }
- local noTicketMembers = {}
- local notEnoughLevelMembers = {}
- local ticketCheck = true
- local ticketGroup = { 70408, 30, 70408, 30 }
- for i, pid in next, pids, nil do
- q.begin_other_pc_block(pid)
- local canPass = false
- for idx = 1, table.getn(ticketGroup), 2 do
- if pc.count_item(ticketGroup[idx]) >= ticketGroup[idx + 1] then
- canPass = true
- break
- end
- end
- if not canPass then
- table.insert(noTicketMembers, pc.get_name())
- ticketCheck = false
- end
- q.end_other_pc_block()
- end
- if not ticketCheck then
- say_title(mob_name(30130))
- say(locale_quest(1377))
- for i, name in next, noTicketMembers, nil do
- say(color(1, 1, 0), locale_quest(1378) .. name)
- end
- return
- end
- if pc.count_item(70408) > 30 then
- say(locale_quest(8270))
- local warp = select(locale_quest(2454), locale_quest(2426))
- if warp == 1 then
- set_state(inLair)
- -- pc.remove_item(70408, 30)
- 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() + lair_time)
- game.set_event_flag("spider_lair_leader_" .. get_channel_id(), party.get_leader_pid())
- pc.setqf("retry_limit_time", get_global_time() + lair_time + access_limit_time)
- pc.setqf("firstIn", 1)
- server_timer("spider_end_timer", lair_time)
- pc.warp(88100, 614800)
- end
- return
- else
- say(locale_quest(8271))
- return
- end
- else -- 리더 아니다.
- say(locale_quest(8272))
- return
- end
- end
- end
- state inLair begin
- when 20011.chat.locale_quest(8262) with is_test_server() begin -- 테스트용
- set_state(start)
- say(locale_quest(8273))
- end
- when login begin
- -- 정상적으로 보스룸에 입장.
- pc.remove_item(70408, 30)-- intrare
- -- 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") - access_limit_time and party.get_leader_pid() == game.get_event_flag("spider_lair_leader_" .. get_channel_id()) then
- pc.setqf("firstIn", 0)
- elseif pc.get_x() >= 827 and pc.get_x() <= 937 and pc.get_y() >= 6127 and pc.get_y() <= 6257 then
- pc.warp(95900, 571000)
- --pc.remove_item(70408, 30) -- reward
- else -- 위에서 팅겨낸 유저가 밖에서 로그인 하게 되면, 접근 제한 시간을 셋팅해줌.
- --pc.remove_item(70408, 30)-- reward
- set_state(start)
- local limit = pc.getqf("retry_limit_time")
- if limit > (get_global_time() + access_limit_time) then
- limit = (get_global_time() + access_limit_time)
- end
- pc.setqf("retry_limit_time", limit)
- local duration = limit - get_global_time()
- end
- -- DUNGEON_MANAGER_RANKING
- if pc.getf("spider_dungeon_3floor_boss", "entered") != 1 then
- pc.setf("spider_dungeon_3floor_boss", "entered", 1)
- pc.setf("spider_dungeon_3floor_boss", "enter_time", get_global_time())
- end
- -- END_OF_DUNGEON_MANAGER_RANKING
- end
- when 30130.chat.locale_quest(8241) 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 + lair_enter_wait_time >= 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_quest(8263)) -- 테스트용
- local warp = select(locale_quest(2454), locale_quest(2426))
- if warp == 1 then
- pc.warp(88100, 614800)
- return
- end
- end
- end
- end
- end
- -- DUNGEON_MANAGER_RANKING
- when logout begin
- if pc.get_map_index() == 217 then
- pc.setf("spider_dungeon_3floor_boss", "exit_time", get_global_time())
- pc.setf("spider_dungeon_3floor_boss", "entered", 0)
- end
- end
- -- END_OF_DUNGEON_MANAGER_RANKING
- when 2092.kill begin -- 대왕거미 죽임
- server_timer("spider_dead_timer", king_kill_wait_time)
- game.set_event_flag("spider_dead" .. get_channel_id(), 1)
- game.set_event_flag("spider_key_dropped" .. get_channel_id(), 0)
- notice_in_map(8274)
- -- DUNGEON_MANAGER_RANKING
- if party.is_party() then
- local pids = { party.get_member_pids() }
- for i, pid in next, pids, nil do
- q.begin_other_pc_block(pid)
- if pc.getf("spider_dungeon_3floor_boss", "enter_time") > 0 then
- d.update_rank(217, (get_global_time() - pc.getf("spider_dungeon_3floor_boss", "enter_time")), pc.get_last_damage())
- pc.setf("spider_dungeon_3floor_boss", "exit_time", get_global_time())
- end
- pc.give_item2(50074,2) -- reward
- q.end_other_pc_block()
- end
- else
- pc.give_item2(50074,2) -- reward
- if pc.getf("spider_dungeon_3floor_boss", "enter_time") > 0 then
- d.update_rank(217, (get_global_time() - pc.getf("spider_dungeon_3floor_boss", "enter_time")), pc.get_last_damage())
- end
- end
- -- END_OF_DUNGEON_MANAGER_RANKING
- end
- when 2094.kill begin --대왕거미 죽임
- if game.get_event_flag("spider_key_dropped"..get_channel_id()) == 0 then
- game.drop_item(70408, 1)
- game.set_event_flag("spider_key_dropped" .. get_channel_id(), 1)
- end
- 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())
- notice_in_map(8276)
- 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))
- pc.aggregate_monster()
- end
- -- 2012.4.5 이상현 리젠위치 수정
- when 30327.use with pc.get_x() >= 827 and pc.get_map_index() == 217 and pc.get_x() <= 937 and pc.get_y() >= 6127 and pc.get_y() <= 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", 9)
- game.set_event_flag("remain_egg" .. get_channel_id(), 9)
- end
- end
- end
Alles anzeigen
Danke im voraus.