Poză:
Poza in joc:
Poza in WinSCP:
Poza Putty:
DSA.quest: Cod: Selectaţi tot
define gemstone 30270
define alchemist 20001
define reward_box 50255
define gemstone_need_count 10
define gemstone_trade_max_per_day 30
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", 29)
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_title("Macht des Drachenauges")
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", 30)
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", 30)
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
Cod: Selectaţi tot
define checker 20001
quest dragon_soul_daily_gift_mgr begin
state start begin
function is_event_on()
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
Cod: Selectaţi tot
define alchemist 20001
define dragon_soul_shop_vnum 131
quest dragon_soul_shop begin
state start begin
when alchemist.chat.gameforge.dragon_soul._100_npcChat with ds.is_qualified() begin
setskin(NOWINDOW)
npc.open_shop(dragon_soul_shop_vnum)
end
end
end
Cod: Selectaţi tot
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
Cod: Selectaţi tot
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





