Drachenseelen-Quests entfernen

Loescht alle 5 dragon_soul*.quest-Quellen (dragon_soul, dragon_soul_refine,
dragon_soul_shop, dragon_soul_daily_gift, dragon_soul_daily_gift_mgr),
ihre pre_qc/-Duplikate sowie die zugehoerigen vorkompilierten
Quest-Cache-Artefakte unter quest/object/. Der NPC (vnum 20001,
"Alchemist") selbst bleibt bestehen, da er auch von unabhaengigen Quests
(energy_system, test_att_resist) genutzt wird.
This commit is contained in:
Andreas Lierschaft
2026-08-17 22:53:41 +02:00
parent dc89e6ee0c
commit 760f1998cc
58 changed files with 0 additions and 832 deletions
@@ -1,159 +0,0 @@
define gemstone 30270
define alchemist 20001
define reward_box 50255
define gemstone_need_count 10
define gemstone_trade_max_per_day 10
define dragon_soul_can_use_level 30
define drop_flag "ds_drop"
quest dragon_soul begin
state start begin
when levelup or letter with pc.level >= dragon_soul_can_use_level begin
send_letter(gameforge.dragon_soul._1010_sendLetter)
local v = find_npc_by_vnum(alchemist)
if 0 != v then
target.vid("__TARGET__", v, mob_name(alchemist))
end
end
when info or button begin
say(gameforge.dragon_soul._1020_say)
end
when alchemist.chat.gameforge.dragon_soul._1030_npcChat with pc.level >= dragon_soul_can_use_level begin
target.delete("__TARGET__")
say_title(mob_name(alchemist))
say(gameforge.dragon_soul._1040_say)
set_state(state_learning)
end
end
state state_learning begin
when letter begin
send_letter(gameforge.dragon_soul._1050_sendLetter)
end
when info or button begin
say(gameforge.dragon_soul._1060_say)
end
when kill begin
if npc.is_pc() then
return
end
if pc.count_item(gemstone) < gemstone_need_count then
if drop_gamble_with_flag(drop_flag) then
game.drop_item_with_ownership(gemstone, 1, 300)
end
end
end
when alchemist.chat.gameforge.dragon_soul._1050_sendLetter begin
say_title(mob_name(alchemist))
if pc.count_item(gemstone) >= gemstone_need_count then
say(gameforge.dragon_soul._1070_say)
pc.remove_item(gemstone, gemstone_need_count)
ds.give_qualification()
char_log(pc.get_player_id(), 'DS_QUALIFICATION', 'SUCCESS')
pc.give_item2(reward_box)
local today = math.floor(get_global_time() / 86400)
pc.setf("dragon_soul", "eye_timestamp", today)
pc.setf("dragon_soul", "eye_left", 9)
set_state(state_farming)
else
say(gameforge.dragon_soul._1080_say)
end
end
end
state state_farming begin
when letter begin
send_letter(gameforge.dragon_soul._1090_sendLetter)
end
when info or button begin
say(string.format(gameforge.dragon_soul._1100_say, pc.getf("dragon_soul", "eye_left")))
end
when kill begin
if npc.is_pc() then
return
end
if drop_gamble_with_flag(drop_flag) then
local eye_left = pc.getf("dragon_soul", "eye_left")
local haved_gemstone_number = pc.count_item(gemstone)
if eye_left > haved_gemstone_number / gemstone_need_count then
game.drop_item_with_ownership(gemstone, 1, 300)
end
end
end
when gemstone.pick begin
local eye_left = pc.getf("dragon_soul", "eye_left")
if eye_left <= 0 then
return
end
if pc.count_item(gemstone) >= gemstone_need_count then
pc.setf("dragon_soul", "eye_left", eye_left - 1)
pc.remove_item(gemstone, gemstone_need_count)
pc.give_item2(reward_box)
if 1 == eye_left then
notice_multiline(gameforge.dragon_soul._1110_notice, notice)
set_state(state_closed_season)
end
end
end
when alchemist.chat.gameforge.dragon_soul._1120_npcChat begin
say_title(mob_name(alchemist))
local today = math.floor(get_global_time() / 86400)
if today == pc.getf("dragon_soul", "eye_timestamp") then
say(gameforge.dragon_soul._1130_say)
else
say(gameforge.dragon_soul._1140_say)
pc.setf("dragon_soul", "eye_timestamp", today)
pc.setf("dragon_soul", "eye_left", 10)
end
end
end
state state_closed_season begin
when letter begin
send_letter(gameforge.dragon_soul._1150_sendLetter)
end
when info or button begin
say(gameforge.dragon_soul._1160_say)
local today = math.floor(get_global_time() / 86400)
if today == pc.getf("dragon_soul", "eye_timestamp") then
say(gameforge.dragon_soul._1170_say)
else
say(gameforge.dragon_soul._1180_say)
end
end
when alchemist.chat.gameforge.dragon_soul._1090_sendLetter begin
say_title(mob_name(alchemist))
local today = math.floor(get_global_time() / 86400)
if today == pc.getf("dragon_soul", "eye_timestamp") then
say(gameforge.dragon_soul._1130_say)
else
say(gameforge.dragon_soul._1140_say)
pc.setf("dragon_soul", "eye_timestamp", today)
pc.setf("dragon_soul", "eye_left", 10)
set_state(state_farming)
end
end
end
-- deprecated states. so, jump to new state.
state state_1 begin
when login begin
set_state(state_learning)
end
end
state state_2 begin
when login begin
set_state(state_learning)
end
end
state state_3 begin
when login begin
set_state(state_closed_season)
end
end
end
@@ -1,43 +0,0 @@
define checker 20001
define level_limit 50
quest dragon_soul_daily_gift begin
state start begin
function is_event_on()
-- 지금 시각이 dragon_soul_daily_gift_mgr.quest에서 셋팅한 시간 대역인지 확인.
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
-- 오늘치 선물 증정.
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
-- 선물은 이미 줌.
say(gameforge.dragon_soul_daily_gift._060_say)
end
end
end
end
@@ -1,91 +0,0 @@
define checker 20001
quest dragon_soul_daily_gift_mgr begin
state start begin
function is_event_on()
-- 지금 시각이 dragon_soul_daily_gift_mgr.quest에서 셋팅한 시간 대역인지 확인.
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
function date_getter()
say(gameforge.dragon_soul_gift_mgr._040_say)
say("yy-mm-dd hh:mm")
local date = input()
local _, _, y, m, d, hour, min = string.find(date, "(%d+)-(%d+)-(%d+) (%d+):(%d+)")
return y, m, d, hour, min
end
function print_quest_info()
local s_time = game.get_event_flag("ds_dg_st")
local e_time = game.get_event_flag("ds_dg_et")
local gift_vnum = game.get_event_flag("ds_dg_item")
say(os.date("start time[ENTER] year:%Y, month:%m, day:%d hour:%H minite:%M", s_time))
say(os.date(" end time[ENTER] year:%Y, month:%m, day:%d hour:%H minite:%M", e_time))
say(string.format("gift item[ENTER] vnum : %d", gift_vnum))
say_item_vnum(gift_vnum)
end
when checker.chat.gameforge.dragon_soul_gift_mgr._010_npcChat with pc.is_gm() begin
local sel = 0
if dragon_soul_daily_gift_mgr.is_event_on() then
say(locale.event_on_going)
local sel = select(locale.event_modify, locale.event_info_print, locale.event_cancel, locale.close)
if 2 == sel then
dragon_soul_daily_gift_mgr.print_quest_info()
return
elseif 3 == sel then
game.set_event_flag("ds_dg_et", 0)
return
elseif 4 == sel then
return
end
end
-- Get start time and end time.
local s_y, s_m, s_d, s_hour, s_min
repeat
say(gameforge.dragon_soul_gift_mgr._020_say)
s_y, s_m, s_d, s_hour, s_min = dragon_soul_daily_gift_mgr.date_getter()
s_y = s_y + 2000
say(string.format("year:%d month:%d day:%d hour:%d min:%d", s_y, s_m, s_d, s_hour, s_min))
until 1 == select(gameforge.locale.yes, gameforge.locale.no)
local e_y, e_m, e_d, e_hour, e_min
repeat
say(gameforge.dragon_soul_gift_mgr._030_say)
e_y, e_m, e_d, e_hour, e_min = dragon_soul_daily_gift_mgr.date_getter()
e_y = e_y + 2000
say(string.format("year:%d month:%d day:%d hour:%d min:%d", e_y, e_m, e_d, e_hour, e_min))
until 1 == select(gameforge.locale.yes, gameforge.locale.no)
local s_time = os.time{year=s_y, month=s_m, day=s_d, hour=s_hour, min=s_min}
local e_time = os.time{year=e_y, month=e_m, day=e_d, hour=e_hour, min=e_min}
-- Get gift item vnum
local gift_vnum = input_number("gift vnum")
-- Print settings and confirm.
say(os.date("start time[ENTER] year:%Y, month:%m, day:%d hour:%H minite:%M", s_time))
say(os.date(" end time[ENTER] year:%Y, month:%m, day:%d hour:%H minite:%M", e_time))
say(string.format("gift item[ENTER] vnum : %d", gift_vnum))
say_item_vnum(gift_vnum)
say(gameforge.dragon_soul_gift_mgr._050_say)
if 2 == select(gameforge.locale.yes, gameforge.locale.no) then
return
end
-- 이벤트 수정인 경우는 event_id를 바꾸면 안됨.
if 0 == sel then
local event_id = game.get_event_flag("ds_dg_id")
game.set_event_flag("ds_dg_id", event_id + 1)
end
game.set_event_flag("ds_dg_st", s_time)
game.set_event_flag("ds_dg_et", e_time)
game.set_event_flag("ds_dg_item", gift_vnum)
say (gameforge.dragon_soul_gift_mgr._060_say)
end
end
end
@@ -1,10 +0,0 @@
define alchemist 20001
quest dragon_soul_refine begin
state start begin
when alchemist.chat.gameforge.dragon_soul_refine._010_npcChat with ds.is_qualified() != 0 begin
say_title(mob_name(alchemist))
say (gameforge.dragon_soul_refine._020_say)
ds.open_refine_window()
end
end
end
@@ -1,10 +0,0 @@
define alchemist 20001
define dragon_soul_shop_vnum 13
quest dragon_soul_shop begin
state start begin
when alchemist.chat.gameforge.dragon_soul._100_npcChat with ds.is_qualified() begin
say (gameforge.dragon_soul._110_say)
npc.open_shop(dragon_soul_shop_vnum)
end
end
end
@@ -1 +0,0 @@
gameforge.dragon_soul._1030_npcChat
@@ -1,4 +0,0 @@
target . delete ( "__TARGET__" )
say_title ( mob_name ( 20001 ) )
say ( gameforge . dragon_soul . _1040_say )
set_state ( "state_learning" )
@@ -1 +0,0 @@
return pc . level >= 30
@@ -1 +0,0 @@
gameforge.dragon_soul._1090_sendLetter
@@ -1,10 +0,0 @@
say_title ( mob_name ( 20001 ) )
local today = math . floor ( get_global_time ( ) / 86400 )
if today == pc . getf ( "dragon_soul" , "eye_timestamp" ) then
say ( gameforge . dragon_soul . _1130_say )
else
say ( gameforge . dragon_soul . _1140_say )
pc . setf ( "dragon_soul" , "eye_timestamp" , today )
pc . setf ( "dragon_soul" , "eye_left" , 10 )
set_state ( "state_farming" )
end
@@ -1 +0,0 @@
gameforge.dragon_soul._1120_npcChat
@@ -1,9 +0,0 @@
say_title ( mob_name ( 20001 ) )
local today = math . floor ( get_global_time ( ) / 86400 )
if today == pc . getf ( "dragon_soul" , "eye_timestamp" ) then
say ( gameforge . dragon_soul . _1130_say )
else
say ( gameforge . dragon_soul . _1140_say )
pc . setf ( "dragon_soul" , "eye_timestamp" , today )
pc . setf ( "dragon_soul" , "eye_left" , 10 )
end
@@ -1 +0,0 @@
gameforge.dragon_soul._1050_sendLetter
@@ -1,14 +0,0 @@
say_title ( mob_name ( 20001 ) )
if pc . count_item ( 30270 ) >= 10 then
say ( gameforge . dragon_soul . _1070_say )
pc . remove_item ( 30270 , 10 )
ds . give_qualification ( )
char_log ( pc . get_player_id ( ) , "DS_QUALIFICATION" , "SUCCESS" )
pc . give_item2 ( 50255 )
local today = math . floor ( get_global_time ( ) / 86400 )
pc . setf ( "dragon_soul" , "eye_timestamp" , today )
pc . setf ( "dragon_soul" , "eye_left" , 9 )
set_state ( "state_farming" )
else
say ( gameforge . dragon_soul . _1080_say )
end
@@ -1 +0,0 @@
gameforge.dragon_soul_daily_gift._010_npcChat
@@ -1,24 +0,0 @@
local event_id = game . get_event_flag ( "ds_dg_id" )
if pc . getqf ( "event_id" ) ~= event_id then
say_title ( mob_name ( 20001 ) )
if pc . level < 50 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 ( 20001 ) )
if 0 == get_today_count ( "dragon_soul_daily_gift" , "gift" ) then
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
say ( gameforge . dragon_soul_daily_gift . _060_say )
end
@@ -1 +0,0 @@
return dragon_soul_daily_gift . is_event_on ( )
@@ -1 +0,0 @@
gameforge.dragon_soul_gift_mgr._010_npcChat
@@ -1,47 +0,0 @@
local sel = 0
if dragon_soul_daily_gift_mgr . is_event_on ( ) then
say ( locale . event_on_going )
local sel = select ( locale . event_modify , locale . event_info_print , locale . event_cancel , locale . close )
if 2 == sel then
dragon_soul_daily_gift_mgr . print_quest_info ( )
return
elseif 3 == sel then
game . set_event_flag ( "ds_dg_et" , 0 )
return
elseif 4 == sel then
return
end
end
local s_y , s_m , s_d , s_hour , s_min
repeat
say ( gameforge . dragon_soul_gift_mgr . _020_say )
s_y , s_m , s_d , s_hour , s_min = dragon_soul_daily_gift_mgr . date_getter ( )
s_y = s_y + 2000
say ( string . format ( "year:%d month:%d day:%d hour:%d min:%d" , s_y , s_m , s_d , s_hour , s_min ) )
until 1 == select ( gameforge . locale . yes , gameforge . locale . no )
local e_y , e_m , e_d , e_hour , e_min
repeat
say ( gameforge . dragon_soul_gift_mgr . _030_say )
e_y , e_m , e_d , e_hour , e_min = dragon_soul_daily_gift_mgr . date_getter ( )
e_y = e_y + 2000
say ( string . format ( "year:%d month:%d day:%d hour:%d min:%d" , e_y , e_m , e_d , e_hour , e_min ) )
until 1 == select ( gameforge . locale . yes , gameforge . locale . no )
local s_time = os . time { year = s_y , month = s_m , day = s_d , hour = s_hour , min = s_min }
local e_time = os . time { year = e_y , month = e_m , day = e_d , hour = e_hour , min = e_min }
local gift_vnum = input_number ( "gift vnum" )
say ( os . date ( "start time[ENTER] year:%Y, month:%m, day:%d hour:%H minite:%M" , s_time ) )
say ( os . date ( " end time[ENTER] year:%Y, month:%m, day:%d hour:%H minite:%M" , e_time ) )
say ( string . format ( "gift item[ENTER] vnum : %d" , gift_vnum ) )
say_item_vnum ( gift_vnum )
say ( gameforge . dragon_soul_gift_mgr . _050_say )
if 2 == select ( gameforge . locale . yes , gameforge . locale . no ) then
return
end
if 0 == sel then
local event_id = game . get_event_flag ( "ds_dg_id" )
game . set_event_flag ( "ds_dg_id" , event_id + 1 )
end
game . set_event_flag ( "ds_dg_st" , s_time )
game . set_event_flag ( "ds_dg_et" , e_time )
game . set_event_flag ( "ds_dg_item" , gift_vnum )
say ( gameforge . dragon_soul_gift_mgr . _060_say )
@@ -1 +0,0 @@
gameforge.dragon_soul_refine._010_npcChat
@@ -1,3 +0,0 @@
say_title ( mob_name ( 20001 ) )
say ( gameforge . dragon_soul_refine . _020_say )
ds . open_refine_window ( )
@@ -1 +0,0 @@
return ds . is_qualified ( ) ~= 0
@@ -1 +0,0 @@
gameforge.dragon_soul._100_npcChat
@@ -1,2 +0,0 @@
say ( gameforge . dragon_soul . _110_say )
npc . open_shop ( 13 )
@@ -1 +0,0 @@
return ds . is_qualified ( )
@@ -1,13 +0,0 @@
local eye_left = pc . getf ( "dragon_soul" , "eye_left" )
if eye_left <= 0 then
return
end
if pc . count_item ( 30270 ) >= 10 then
pc . setf ( "dragon_soul" , "eye_left" , eye_left - 1 )
pc . remove_item ( 30270 , 10 )
pc . give_item2 ( 50255 )
if 1 == eye_left then
notice_multiline ( gameforge . dragon_soul . _1110_notice , notice )
set_state ( "state_closed_season" )
end
end
@@ -1 +0,0 @@
say ( gameforge . dragon_soul . _1020_say )
@@ -1,7 +0,0 @@
say ( gameforge . dragon_soul . _1160_say )
local today = math . floor ( get_global_time ( ) / 86400 )
if today == pc . getf ( "dragon_soul" , "eye_timestamp" ) then
say ( gameforge . dragon_soul . _1170_say )
else
say ( gameforge . dragon_soul . _1180_say )
end
@@ -1 +0,0 @@
say ( string . format ( gameforge . dragon_soul . _1100_say , pc . getf ( "dragon_soul" , "eye_left" ) ) )
@@ -1 +0,0 @@
say ( gameforge . dragon_soul . _1060_say )
@@ -1 +0,0 @@
say ( gameforge . dragon_soul . _1020_say )
@@ -1,7 +0,0 @@
say ( gameforge . dragon_soul . _1160_say )
local today = math . floor ( get_global_time ( ) / 86400 )
if today == pc . getf ( "dragon_soul" , "eye_timestamp" ) then
say ( gameforge . dragon_soul . _1170_say )
else
say ( gameforge . dragon_soul . _1180_say )
end
@@ -1 +0,0 @@
say ( string . format ( gameforge . dragon_soul . _1100_say , pc . getf ( "dragon_soul" , "eye_left" ) ) )
@@ -1 +0,0 @@
say ( gameforge . dragon_soul . _1060_say )
@@ -1,10 +0,0 @@
if npc . is_pc ( ) then
return
end
if drop_gamble_with_flag ( "ds_drop" ) then
local eye_left = pc . getf ( "dragon_soul" , "eye_left" )
local haved_gemstone_number = pc . count_item ( 30270 )
if eye_left > haved_gemstone_number / 10 then
game . drop_item_with_ownership ( 30270 , 1 , 300 )
end
end
@@ -1,8 +0,0 @@
if npc . is_pc ( ) then
return
end
if pc . count_item ( 30270 ) < 10 then
if drop_gamble_with_flag ( "ds_drop" ) then
game . drop_item_with_ownership ( 30270 , 1 , 300 )
end
end
@@ -1,6 +0,0 @@
if pc . level >= 30 then send_letter ( gameforge . dragon_soul . _1010_sendLetter )
local v = find_npc_by_vnum ( 20001 )
if 0 ~= v then
target . vid ( "__TARGET__" , v , mob_name ( 20001 ) )
end
return end
@@ -1 +0,0 @@
send_letter ( gameforge . dragon_soul . _1150_sendLetter )
@@ -1 +0,0 @@
send_letter ( gameforge . dragon_soul . _1090_sendLetter )
@@ -1 +0,0 @@
send_letter ( gameforge . dragon_soul . _1050_sendLetter )
@@ -1,6 +0,0 @@
if pc . level >= 30 then send_letter ( gameforge . dragon_soul . _1010_sendLetter )
local v = find_npc_by_vnum ( 20001 )
if 0 ~= v then
target . vid ( "__TARGET__" , v , mob_name ( 20001 ) )
end
return end
@@ -1 +0,0 @@
set_state ( "state_learning" )
@@ -1 +0,0 @@
set_state ( "state_learning" )
@@ -1 +0,0 @@
set_state ( "state_closed_season" )
@@ -1 +0,0 @@
dragon_soul={["start"]=0,["state_1"]=-1296991421,["state_2"]=733489913,["state_3"]=1556028015,["state_closed_season"]=-1430288148,["state_farming"]=-718086412,["state_learning"]=-252263835}
@@ -1,5 +0,0 @@
dragon_soul_daily_gift={["start"]=0,is_event_on= function ()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 }
@@ -1,17 +0,0 @@
dragon_soul_daily_gift_mgr={["start"]=0,is_event_on= function ()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 ,date_getter= function ()say ( gameforge . dragon_soul_gift_mgr . _040_say )
say ( "yy-mm-dd hh:mm" )
local date = input ( )
local _ , _ , y , m , d , hour , min = string . find ( date , "(%d+)-(%d+)-(%d+) (%d+):(%d+)" )
return y , m , d , hour , min
end ,print_quest_info= function ()local s_time = game . get_event_flag ( "ds_dg_st" )
local e_time = game . get_event_flag ( "ds_dg_et" )
local gift_vnum = game . get_event_flag ( "ds_dg_item" )
say ( os . date ( "start time[ENTER] year:%Y, month:%m, day:%d hour:%H minite:%M" , s_time ) )
say ( os . date ( " end time[ENTER] year:%Y, month:%m, day:%d hour:%H minite:%M" , e_time ) )
say ( string . format ( "gift item[ENTER] vnum : %d" , gift_vnum ) )
say_item_vnum ( gift_vnum )
end }
@@ -1 +0,0 @@
dragon_soul_refine={["start"]=0}
@@ -1 +0,0 @@
dragon_soul_shop={["start"]=0}
@@ -1,151 +0,0 @@
quest dragon_soul begin
state start begin
when levelup or letter with pc.level >= 30 begin
send_letter(gameforge.dragon_soul._1010_sendLetter)
local v = find_npc_by_vnum(20001)
if 0 != v then
target.vid("__TARGET__", v, mob_name(20001))
end
end
when info or button begin
say(gameforge.dragon_soul._1020_say)
end
when 20001.chat.gameforge.dragon_soul._1030_npcChat with pc.level >= 30 begin
target.delete("__TARGET__")
say_title(mob_name(20001))
say(gameforge.dragon_soul._1040_say)
set_state(state_learning)
end
end
state state_learning begin
when letter begin
send_letter(gameforge.dragon_soul._1050_sendLetter)
end
when info or button begin
say(gameforge.dragon_soul._1060_say)
end
when kill begin
if npc.is_pc() then
return
end
if pc.count_item(30270) < 10 then
if drop_gamble_with_flag("ds_drop") then
game.drop_item_with_ownership(30270, 1, 300)
end
end
end
when 20001.chat.gameforge.dragon_soul._1050_sendLetter begin
say_title(mob_name(20001))
if pc.count_item(30270) >= 10 then
say(gameforge.dragon_soul._1070_say)
pc.remove_item(30270, 10)
ds.give_qualification()
char_log(pc.get_player_id(), 'DS_QUALIFICATION', 'SUCCESS')
pc.give_item2(50255)
local today = math.floor(get_global_time() / 86400)
pc.setf("dragon_soul", "eye_timestamp", today)
pc.setf("dragon_soul", "eye_left", 9)
set_state(state_farming)
else
say(gameforge.dragon_soul._1080_say)
end
end
end
state state_farming begin
when letter begin
send_letter(gameforge.dragon_soul._1090_sendLetter)
end
when info or button begin
say(string.format(gameforge.dragon_soul._1100_say, pc.getf("dragon_soul", "eye_left")))
end
when kill begin
if npc.is_pc() then
return
end
if drop_gamble_with_flag("ds_drop") then
local eye_left = pc.getf("dragon_soul", "eye_left")
local haved_gemstone_number = pc.count_item(30270)
if eye_left > haved_gemstone_number / 10 then
game.drop_item_with_ownership(30270, 1, 300)
end
end
end
when 30270.pick begin
local eye_left = pc.getf("dragon_soul", "eye_left")
if eye_left <= 0 then
return
end
if pc.count_item(30270) >= 10 then
pc.setf("dragon_soul", "eye_left", eye_left - 1)
pc.remove_item(30270, 10)
pc.give_item2(50255)
if 1 == eye_left then
notice_multiline(gameforge.dragon_soul._1110_notice, notice)
set_state(state_closed_season)
end
end
end
when 20001.chat.gameforge.dragon_soul._1120_npcChat begin
say_title(mob_name(20001))
local today = math.floor(get_global_time() / 86400)
if today == pc.getf("dragon_soul", "eye_timestamp") then
say(gameforge.dragon_soul._1130_say)
else
say(gameforge.dragon_soul._1140_say)
pc.setf("dragon_soul", "eye_timestamp", today)
pc.setf("dragon_soul", "eye_left", 10)
end
end
end
state state_closed_season begin
when letter begin
send_letter(gameforge.dragon_soul._1150_sendLetter)
end
when info or button begin
say(gameforge.dragon_soul._1160_say)
local today = math.floor(get_global_time() / 86400)
if today == pc.getf("dragon_soul", "eye_timestamp") then
say(gameforge.dragon_soul._1170_say)
else
say(gameforge.dragon_soul._1180_say)
end
end
when 20001.chat.gameforge.dragon_soul._1090_sendLetter begin
say_title(mob_name(20001))
local today = math.floor(get_global_time() / 86400)
if today == pc.getf("dragon_soul", "eye_timestamp") then
say(gameforge.dragon_soul._1130_say)
else
say(gameforge.dragon_soul._1140_say)
pc.setf("dragon_soul", "eye_timestamp", today)
pc.setf("dragon_soul", "eye_left", 10)
set_state(state_farming)
end
end
end
-- deprecated states. so, jump to new state.
state state_1 begin
when login begin
set_state(state_learning)
end
end
state state_2 begin
when login begin
set_state(state_learning)
end
end
state state_3 begin
when login begin
set_state(state_closed_season)
end
end
end
@@ -1,41 +0,0 @@
quest dragon_soul_daily_gift begin
state start begin
function is_event_on()
-- 지금 시각이 dragon_soul_daily_gift_mgr.quest에서 셋팅한 시간 대역인지 확인.
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 20001.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(20001))
if pc.level < 50 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(20001))
if 0 == get_today_count("dragon_soul_daily_gift", "gift") then
-- 오늘치 선물 증정.
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
-- 선물은 이미 줌.
say(gameforge.dragon_soul_daily_gift._060_say)
end
end
end
end
@@ -1,90 +0,0 @@
quest dragon_soul_daily_gift_mgr begin
state start begin
function is_event_on()
-- 지금 시각이 dragon_soul_daily_gift_mgr.quest에서 셋팅한 시간 대역인지 확인.
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
function date_getter()
say(gameforge.dragon_soul_gift_mgr._040_say)
say("yy-mm-dd hh:mm")
local date = input()
local _, _, y, m, d, hour, min = string.find(date, "(%d+)-(%d+)-(%d+) (%d+):(%d+)")
return y, m, d, hour, min
end
function print_quest_info()
local s_time = game.get_event_flag("ds_dg_st")
local e_time = game.get_event_flag("ds_dg_et")
local gift_vnum = game.get_event_flag("ds_dg_item")
say(os.date("start time[ENTER] year:%Y, month:%m, day:%d hour:%H minite:%M", s_time))
say(os.date(" end time[ENTER] year:%Y, month:%m, day:%d hour:%H minite:%M", e_time))
say(string.format("gift item[ENTER] vnum : %d", gift_vnum))
say_item_vnum(gift_vnum)
end
when 20001.chat.gameforge.dragon_soul_gift_mgr._010_npcChat with pc.is_gm() begin
local sel = 0
if dragon_soul_daily_gift_mgr.is_event_on() then
say(locale.event_on_going)
local sel = select(locale.event_modify, locale.event_info_print, locale.event_cancel, locale.close)
if 2 == sel then
dragon_soul_daily_gift_mgr.print_quest_info()
return
elseif 3 == sel then
game.set_event_flag("ds_dg_et", 0)
return
elseif 4 == sel then
return
end
end
-- Get start time and end time.
local s_y, s_m, s_d, s_hour, s_min
repeat
say(gameforge.dragon_soul_gift_mgr._020_say)
s_y, s_m, s_d, s_hour, s_min = dragon_soul_daily_gift_mgr.date_getter()
s_y = s_y + 2000
say(string.format("year:%d month:%d day:%d hour:%d min:%d", s_y, s_m, s_d, s_hour, s_min))
until 1 == select(gameforge.locale.yes, gameforge.locale.no)
local e_y, e_m, e_d, e_hour, e_min
repeat
say(gameforge.dragon_soul_gift_mgr._030_say)
e_y, e_m, e_d, e_hour, e_min = dragon_soul_daily_gift_mgr.date_getter()
e_y = e_y + 2000
say(string.format("year:%d month:%d day:%d hour:%d min:%d", e_y, e_m, e_d, e_hour, e_min))
until 1 == select(gameforge.locale.yes, gameforge.locale.no)
local s_time = os.time{year=s_y, month=s_m, day=s_d, hour=s_hour, min=s_min}
local e_time = os.time{year=e_y, month=e_m, day=e_d, hour=e_hour, min=e_min}
-- Get gift item vnum
local gift_vnum = input_number("gift vnum")
-- Print settings and confirm.
say(os.date("start time[ENTER] year:%Y, month:%m, day:%d hour:%H minite:%M", s_time))
say(os.date(" end time[ENTER] year:%Y, month:%m, day:%d hour:%H minite:%M", e_time))
say(string.format("gift item[ENTER] vnum : %d", gift_vnum))
say_item_vnum(gift_vnum)
say(gameforge.dragon_soul_gift_mgr._050_say)
if 2 == select(gameforge.locale.yes, gameforge.locale.no) then
return
end
-- 이벤트 수정인 경우는 event_id를 바꾸면 안됨.
if 0 == sel then
local event_id = game.get_event_flag("ds_dg_id")
game.set_event_flag("ds_dg_id", event_id + 1)
end
game.set_event_flag("ds_dg_st", s_time)
game.set_event_flag("ds_dg_et", e_time)
game.set_event_flag("ds_dg_item", gift_vnum)
say (gameforge.dragon_soul_gift_mgr._060_say)
end
end
end
@@ -1,9 +0,0 @@
quest dragon_soul_refine begin
state start begin
when 20001.chat.gameforge.dragon_soul_refine._010_npcChat with ds.is_qualified() != 0 begin
say_title(mob_name(20001))
say (gameforge.dragon_soul_refine._020_say)
ds.open_refine_window()
end
end
end
@@ -1,8 +0,0 @@
quest dragon_soul_shop begin
state start begin
when 20001.chat.gameforge.dragon_soul._100_npcChat with ds.is_qualified() begin
say (gameforge.dragon_soul._110_say)
npc.open_shop(13)
end
end
end