Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- when 30121.chat."시발" with pc.get_map_index() != 208 and npc.lock() begin
- local starttime = game.get_event_flag("dragon_lair_time")
- local current_time = get_global_time()
- local settings = dragon_lair_access.get_settings()
- local time_remaining = dragon_lair_access.get_time_remaining()
- if pc.count_item(settings.access_item) >= settings.access_item_amount then
- if starttime + settings.group_time >= current_time then
- local password_input;
- repeat
- say ("시발")
- password_input = tonumber(input())
- if password_input != game.get_event_flag("dragon_lair_password") then
- say ("시발")
- local again = select("응", "아니")
- if again == 2 then
- return
- end
- end
- until password_input == game.get_event_flag("dragon_lair_password")
- if not dragon_lair_access.give_item_to_ghost() then
- return
- end
- -- right password
- pc.setqf("time", starttime)
- dragon_lair_access.warp_to_lair()
- set_state(kill_dragon)
- elseif time_remaining < 0 and npc.lock() then -- it is the first player talking with the ghost
- say ("시발")
- local abort = select("응","아니")
- if abort == 2 then
- npc.unlock()
- return
- end
- local password_number;
- repeat
- say ("시발")
- password_number = tonumber(input())
- local again;
- if type(password_number) != 'number' then
- say ("시발")
- again = select("응", "아니")
- if again == 2 then
- npc.unlock()
- return
- end
- end
- until type(password_number) == 'number'
- if not dragon_lair_access.give_item_to_ghost() then
- npc.unlock()
- return
- end
- if dragon_lair_access.get_time_remaining() > 0 then
- pc.give_item2(settings.access_item, settings.access_item_amount)
- npc.unlock()
- say ("시발")
- return
- end
- pc.setqf("password", password_number)
- timer("dragon_lair_warptimer", pc.get_channel_id()*2)
- npc.unlock()
- else
- say ("시발")
- return
- end
- else
- say ("시발")
- say(settings.access_item_amount.."x: ")
- say_item_vnum(settings.access_item)
- return
- end
- npc.unlock()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement