forked from metin2/server
1
0
Fork 0
server/gamefiles/data/quest/dragon_soul_daily_gift.quest

44 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

define checker 20001
define level_limit 50
quest dragon_soul_daily_gift begin
state start begin
function is_event_on()
-- <20><><EFBFBD><EFBFBD> <20>ð<EFBFBD><C3B0><EFBFBD> dragon_soul_daily_gift_mgr.quest<73><74><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ð<EFBFBD> <20><EFBFBD><EBBFAA><EFBFBD><EFBFBD> Ȯ<><C8AE>.
local s_time = game.get_event_flag("ds_dg_st")
local e_time = game.get_event_flag("ds_dg_et")
local now = os.time()
return now > s_time and now < e_time
end
when checker.chat.gameforge.dragon_soul_daily_gift._010_npcChat with dragon_soul_daily_gift.is_event_on() begin
local event_id = game.get_event_flag("ds_dg_id")
if pc.getqf("event_id") != event_id then
say_title(mob_name(checker))
if pc.level < level_limit then
say(gameforge.dragon_soul_daily_gift._020_say)
return
elseif 0 == ds.is_qualified() then
say(gameforge.dragon_soul_daily_gift._030_say)
return
else
say(gameforge.dragon_soul_daily_gift._040_say)
pc.setqf("event_id", event_id)
wait()
end
end
say_title(mob_name(checker))
if 0 == get_today_count("dragon_soul_daily_gift", "gift") then
-- <20><><EFBFBD><EFBFBD>ġ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
say(gameforge.dragon_soul_daily_gift._050_say)
local gift_vnum = game.get_event_flag("ds_dg_item")
pc.give_item2(gift_vnum)
inc_today_count("dragon_soul_daily_gift", "gift")
else
-- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>̹<EFBFBD> <20><>.
say(gameforge.dragon_soul_daily_gift._060_say)
end
end
end
end