Files
Leviathan/GameServer/Resource/script/NPC_QuestClient.lua
T
2026-06-01 12:46:52 +02:00

12812 lines
358 KiB
Lua

--- Lua 스크립트 암호화
function get_module_name()
return "NPC_QuestClient"
end
-- 퀘스트 의뢰인 클릭 시 호출 함수
function NPC_QuestClient_contact()
-- 임시 변수 선언과 동시에 NPC ID 가져오기
local npc_id = get_npc_id()
-- <이름 출력> 각 NPC에 따라 적합한
-- 가이아 일 때 (4024 퀘스트 의뢰인 유완)
if npc_id == 4024 then
dlg_title("@90402401")
-- 데바 일 때 (1024 퀘스트 의뢰인 로하스)
elseif npc_id == 1024 then
dlg_title("@90102401")
-- 아수라 일 때 (2024 퀘스트 의뢰인 잉그마르)
elseif npc_id == 2024 then
dlg_title("@90202401")
-- 시크루트 일 때 (7024 퀘스트 의뢰인 사아)
elseif npc_id == 7024 then
dlg_title("@90702401")
end -- if 끝
-- <대사 출력> 각 NPC에 따라 적합한
-- 가이아 일 때 (4024 퀘스트 의뢰인 유완)
if npc_id == 4024 then
dlg_text("@90402402")
-- 데바 일 때 (1024 퀘스트 의뢰인 로하스)
elseif npc_id == 1024 then
dlg_text("@90102402")
-- 아수라 일 때 (2024 퀘스트 의뢰인 잉그마르)
elseif npc_id == 2024 then
dlg_text("@90202402")
-- 시크루트 일 때 (7024 퀘스트 의뢰인 사아)
elseif npc_id == 7024 then
if is_premium() then
dlg_text("@90702402")
else
dlg_text_without_quest_menu( "@90700118" )
end
end -- if 끝
-- <공통 메뉴>
-- 대화 종료
dlg_menu( "@90010002", "" )
-- 다이얼로그 출력하기
dlg_show()
end-- 펑션 끝
-- 랜덤 퀘스트 수락시 나오는 대사
function NPC_Random_Quest_Start()
-- 임시 변수 선언과 동시에 NPC ID 가져오기
local npc_id = get_npc_id()
-- <이름 출력> 각 NPC에 따라 적합한
-- 가이아 일 때 (4024 퀘스트 의뢰인 유완)
if npc_id == 4024 then
dlg_title("@90402401")
-- 데바 일 때 (1024 퀘스트 의뢰인 로하스)
elseif npc_id == 1024 then
dlg_title("@90102401")
-- 아수라 일 때 (2024 퀘스트 의뢰인 잉그마르)
elseif npc_id == 2024 then
dlg_title("@90202401")
-- 시크루트 일 때 (7024 퀘스트 의뢰인 사아)
elseif npc_id == 7024 then
dlg_title("@90702401")
end -- if 끝
-- <수락링크 출력> 내용 변환을 위해 랜덤퀘스트 수락링크를 불러오는 방법 : quest_text_without_quest_menu( quest_id, quest_text_id )
-- <마지막으로 수락한 퀘스트 ID 체크> 레벨에 따라 퀘스트 ID가 분류된 것을 체크하는 함수 : code = get_last_accept_quest()
local code = get_last_accept_quest();
-- 가이아 일 때 (4024 퀘스트 의뢰인 유완)
if npc_id == 4024 then
quest_text_without_quest_menu( code, 90402406 )
-- 데바 일 때 (1024 퀘스트 의뢰인 로하스)
elseif npc_id == 1024 then
quest_text_without_quest_menu( code, 90102406 )
-- 아수라 일 때 (2024 퀘스트 의뢰인 잉그마르)
elseif npc_id == 2024 then
quest_text_without_quest_menu( code, 90202406 )
-- 시크루트 일 때 (7024 퀘스트 의뢰인 사아)
elseif npc_id == 7024 then
if is_premium() then
quest_text_without_quest_menu( code, 90702406 )
else
dlg_text_without_quest_menu( "@90700118" )
end
end -- if 끝
-- <공통 메뉴>
-- 대화 종료
dlg_menu( "@90010002", "" )
-- 다이얼로그 출력하기
dlg_show()
end-- 펑션 끝
-- NPC_Quest_Lakcity_Highpriest 라크시 고위 신관 라르갈
-- NPC_Quest_Fairywood_Forestranger 요정의 숲 숲지기 에란
-- NPC_Quest_Katan_Councilmessenger 카탄 장로회 전령 젠
-- NPC_Quest_Cremationground_Shaman 화장터 무녀 제이나
-- NPC_Quest_Horizon_Questmerchant 호라이즌 교역상 엘민
-- NPC_Quest_Templarheadquarter_Templar 템플러 오유
-- NPC_Quest_Moonfirecemetery_Fighter 투사 류엔
-- NPC_Quest_Desert_Adventurer 일급 모험가 라우글
-- NPC_Quest_Desert_Inquirer 조사대 미오
-- NPC_Merchant_Etc_Desert 잡화상인 세이시아
-- NPC_Quest_Horizon_Hunter 호라이즌 사냥꾼 켄
--============================================================
--=============== 라크시 고위 신관 라르갈
--============================================================
function NPC_Quest_Lakcity_Highpriest_init()
cprint( "!고위 신관 라르갈 가동" )
set_npc_name( "@90108100" )
end
function NPC_Quest_Lakcity_Highpriest_contact()
-- 다이얼로그 출력
dlg_title( "@90108101" )
dlg_text( "@90108102" )
--if get_quest_progress(4074)==255 then dlg_menu("@90611498", "NPC_SkyFortress_Warp()") end --MohcenMaher, 9.7
if gv("level")>=190 then dlg_menu("@90611498", "NPC_SkyFortress_Warp()") end --MohcenMaher, 9.7; 9.8 new change
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function Quest_Link_109_1()
local count = find_item( 1100303 )
if count == 0 then
insert_item( 1100303, 1 )
else
end
end
function Quest_Link_111_1()
local count = find_item( 1100304 )
if count == 0 then
insert_item( 1100304, 1 )
else
end
end
--============================================================
--=============== 요정의 숲 숲지기 에란
--============================================================
function NPC_Quest_Fairywood_Forestranger_init()
cprint( "!숲지기 에란 가동" )
set_npc_name( "@90108200" )
end
function NPC_Quest_Fairywood_Forestranger_contact()
-- 다이얼로그 출력
dlg_title( "@90108201" )
dlg_text( "@90108202" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 카탄 장로회 전령 젠
--============================================================
function NPC_Quest_Katan_Councilmessenger_init()
cprint( "!장로회 전령 젠 가동" )
set_npc_name( "@90208100" )
end
function NPC_Quest_Katan_Councilmessenger_contact()
-- 다이얼로그 출력
dlg_title( "@90208101" )
dlg_text( "@90208102" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 화장터 무녀 제이나
--============================================================
function NPC_Quest_Cremationground_Shaman_init()
cprint( "!무녀 제이나 가동" )
set_npc_name( "@90208200" )
end
function NPC_Quest_Cremationground_Shaman_contact()
-- 다이얼로그 출력
dlg_title( "@90208201" )
-- 퀘스트 상태 체크 get_quest_progress(ID)
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 255 : 이미종료
local quest_progress100 = get_quest_progress(1081)
local quest_progress3351 = get_quest_progress(3351) -- <(version:7.3)>강철의 왕
local quest_progress3613 = get_quest_progress(3613) -- <(version:8.1)>긴급호출
-- 퀘스트 종료시 대사
if quest_progress100 == 255 then
dlg_text( "@90208213" )
-- 퀘스트 수행 전, 수행 중 대사
else
dlg_text( "@90208202" )
end
if quest_progress3613 == 2 then
dlg_text( "@90605478" )
-- 퀘스트 수행 전, 수행 중 대사
else
dlg_text( "@90208202" )
end
if quest_progress3351 == 1 then
dlg_menu( "@90604779", "open_market( 'tp_quest' )" )
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function Quest_Link_107_1()
local count = find_item( 1000032 )
if count == 0 then
insert_item( 1000032, 1 )
else
end
end
--============================================================
--=============== 호라이즌 교역상 엘민
--============================================================
function NPC_Quest_Horizon_Questmerchant_init()
cprint( "!교역상 엘민 가동" )
set_npc_name( "@90408100" )
end
function NPC_Quest_Horizon_Questmerchant_contact()
-- 다이얼로그 출력
dlg_title( "@90408101" )
dlg_text( "@90408102" )
if get_env("game.WZ_QA") == 1 then
dlg_menu("QA Options", "NPC_WZ_QA(1)" )
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 템플러 헤드쿼터 템플러 오유
--============================================================
function NPC_Quest_Templarheadquarter_Templar_init()
cprint( "!템플러 오유 가동" )
set_npc_name( "@90108300" )
end
function NPC_Quest_Templarheadquarter_Templar_contact()
dlg_title( "@90108301" )
dlg_text( "@90108302" )
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 월화의 공동묘지 투사 류엔
--============================================================
function NPC_Quest_Moonfirecemetery_Fighter_init()
cprint( "!투사 류엔 가동" )
set_npc_name( "@90408200" )
end
function NPC_Quest_Moonfirecemetery_Fighter_contact()
dlg_title( "@90408201" )
-- 퀘스트 상태 체크 get_quest_progress(ID)
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 255 : 이미종료
local quest_progress101 = get_quest_progress(1084)
if quest_progress101 == 255 then -- 퀘스트 종료시 대사
dlg_text( "@90408212" )
else -- 퀘스트 수행 전, 수행 중 대사
dlg_text( "@90408202" )
end
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
function Quest_Link_106_1()
local count = find_item( 1000028 )
if count == 0 then
insert_item( 1000028, 1 )
else
end
end
function Quest_Link_108_1()
local count = find_item( 1000029 )
if count == 0 then
insert_item( 1000029, 1 )
else
end
end
--============================================================
--=============== 세리우 사막 일급 모험가 라우글
--============================================================
function NPC_Quest_Desert_Adventurer_init()
cprint( "!일급 모험가 라우글 가동" )
set_npc_name( "@90508100" )
end
function NPC_Quest_Desert_Adventurer_contact()
dlg_title( "@90508101" )
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 255 : 이미종료
local quest_progress103 = get_quest_progress(1086) -- 퀘스트 상태 체크
if quest_progress103 == 255 then -- 퀘스트 종료시 대사
dlg_text( "@90508109" )
else -- 퀘스트 수행 전, 수행 중 대사
dlg_text( "@90508102" )
end
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 세리우 사막 조사대 미오
--============================================================
function NPC_Quest_Desert_Inquirer_init()
cprint( "!조사대 미오 가동" )
set_npc_name( "@90508200" )
end
function NPC_Quest_Desert_Inquirer_contact()
dlg_title( "@90508201" )
dlg_text( "@90508202" )
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
-- <<<<<< 세리우 사막 잡화상인 세이시아 >>>>>>
--============================================================
function NPC_Merchant_Etc_Desert_init()
cprint( "!잡화상인 세이시아 가동" )
set_npc_name( "@90508300" )
end
function NPC_Merchant_Etc_Desert_contact()
dlg_title( "@90508301" )
local quest_progress102 = get_quest_progress(1091)
if quest_progress102 == 255 then
dlg_text( "@90508307" )
else
dlg_text( "@90508302" )
end
-- 잡화 메뉴 및 대화 종료
local state_code = get_local_info()
if state_code == 512 or state_code == 4096 then
dlg_menu( "@90508306", "open_market( 'sec_sever_merchant_etc_PH' )" )
else
dlg_menu( "@90508306", "open_market( 'sec_sever_merchant_etc' )" )
end
dlg_menu( "@90010002", '' )
dlg_show()
end
-- NPC_Quest_Stump_Woodcutter 벌목장 벌목꾼 크라우
-- NPC_Quest_Lizardhabitat_Monsterresearcher 리자드맨 서식지 몬스터 연구원 네드락
-- NPC_Quest_Ivorytower_Guard 상아탑지기 베르나르
-- NPC_Quest_Woodworker 목수 사이퍼드
-- NPC_Quest_Assassinguild_Assassin 어쎄신 라밀
-- NPC_Quest_crystalmountain_madman 미치광이 해럴드
--============================================================
--=============== 그루터기 벌목장 벌목꾼 크라우
--============================================================
function NPC_Quest_Stump_Woodcutter_init()
cprint( "!벌목꾼 크라우 가동" )
set_npc_name( "@90108400" )
end
function NPC_Quest_Stump_Woodcutter_contact()
dlg_title( "@90108401" )
local quest_progress108 = get_quest_progress(1101)
if quest_progress108 == 255 then
dlg_text( "@90108409" )
else
dlg_text( "@90108402" )
end
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 리자드맨 서식지 몬스터 연구원 네드락
--============================================================
function NPC_Quest_Lizardhabitat_Monsterresearcher_init()
cprint( "!몬스터 연구원 네드락 가동" )
set_npc_name( "@90108500" )
end
function NPC_Quest_Lizardhabitat_Monsterresearcher_contact()
dlg_title( "@90108501" )
local quest_progress104 = get_quest_progress(1108)
if quest_progress104 == 255 then
dlg_text( "@90108515" )
else
dlg_text( "@90108502" )
end
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 상아탑지기 베르나르
--============================================================
function NPC_Quest_Ivorytower_Guard_init()
cprint( "!상아탑지기 베르나르 가동" )
set_npc_name( "@90108600" )
end
function NPC_Quest_Ivorytower_Guard_contact()
dlg_title( "@90108601" )
dlg_text( "@90108602" )
dlg_menu( "@90010002", " " )
dlg_show()
end
function Quest_Link_104_1()
local count = find_item( 1000025 )
if count == 0 then
insert_item( 1000025, 1 )
else
end
end
--============================================================
--=============== 목수 사이퍼드
--============================================================
function NPC_Quest_Woodworker_init()
cprint( "!목수 사이퍼드 가동" )
set_npc_name( "@90208300" )
end
function NPC_Quest_Woodworker_contact()
dlg_title( "@90208301" )
dlg_text( "@90208302" )
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 어쎄신 길드 어쎄신 라밀
--============================================================
function NPC_Quest_Assassinguild_Assassin_init()
cprint( "!어쎄신 라밀 가동" )
set_npc_name( "@90208400" )
end
function NPC_Quest_Assassinguild_Assassin_contact()
dlg_title( "@90208401" )
dlg_text( "@90208402" )
dlg_menu( "@90010002", " " )
dlg_show()
end
function Quest_Link_101_1()
local count = find_item( 1000031 )
if count == 0 then
insert_item( 1000031, 1 )
else
end
end
--============================================================
--=============== 수정의 산 미치광이 해럴드
--============================================================
function NPC_Quest_crystalmountain_madman_init()
cprint( "!미치광이 해럴드 가동" )
set_npc_name( "@90508400" )
end
function NPC_Quest_crystalmountain_madman_contact()
local quest_progress000 = get_quest_progress(1225)
dlg_title( "@90508401" )
if quest_progress000 == 255 then
dlg_text( "@90508418" )
else
dlg_text( "@90508402" )
end
dlg_menu( "@90010002", " " )
dlg_show()
end
---------------------------------
--- quest_progress108까지 사용---
---------------------------------
-- NPC_Quest_Horizon_Hunter 호라이즌 사냥꾼 켄
--============================================================
--=============== 호라이즌 사냥꾼 켄
--============================================================
function NPC_Quest_Horizon_Hunter_init()
cprint( "!사냥꾼 켄 가동" )
set_npc_name( "@90508500" )
end
function NPC_Quest_Horizon_Hunter_contact()
dlg_title( "@90508501" )
dlg_text( "@90508502" )
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 월드컵 이벤트 NPC
--============================================================
--COUNT01 = 파
--COUNT02 = 이
--COUNT03 = 팅
--COUNT04 = 태
--COUNT05 = 극
--COUNT06 = 전
--COUNT07 = 사
--COUNT08 = 필
--COUNT09 = 승
--COUNT10 = 코
--COUNT11 = 리
--COUNT12 = 아
-- 월드컵 이벤트 NPC 클릭 시 호출 함수
function NPC_event_contact()
-- 임시 변수 선언과 동시에 NPC ID 가져오기
local npc_id = get_npc_id()
-- <이름 출력> 각 NPC에 따라 적합한
-- 이벤트 도우미 코리앙 일때
if npc_id == 7501 then
dlg_title("@90750101")
-- 이벤트 도우미 스위즈 일때
elseif npc_id == 7502 then
dlg_title("@90750201")
-- 이벤트 도우미 프란스 일때
elseif npc_id == 7503 then
dlg_title("@90750301")
-- 이벤트 도우미 토구 일때
elseif npc_id == 7504 then
dlg_title("@90750401")
-- 이벤트 도우미 사카 일때
elseif npc_id == 7505 then
dlg_title("@90750501")
end
-- <대사 출력> 각 NPC에 따라 적합한
-- 이벤트 도우미 코리앙 일때
if npc_id == 7501 then
dlg_text("@90750102")
-- 이벤트 도우미 스위즈 일때
elseif npc_id == 7502 then
dlg_text("@90750202")
-- 이벤트 도우미 프란스 일때
elseif npc_id == 7503 then
dlg_text("@90750302")
-- 이벤트 도우미 토구 일때
elseif npc_id == 7504 then
dlg_text("@90750402")
-- 이벤트 도우미 사카 일때
elseif npc_id == 7505 then
dlg_text("@90750502")
end
-- <공통 메뉴>
-- 월드컵 이벤트에 관해 설명해준다
dlg_menu( "@90010109", 'worldcupEvent_explanation()' )
-- 카드를 보상 아이템으로 교환한다.
dlg_menu( "@90010110", 'worldcupEvent_card_to_item()' )
--대화 종료
dlg_menu( "@90010002", "" )
-- 다이얼로그 출력하기
dlg_show()
end
-- 월드컵 이벤트에 관해 설명한다
function worldcupEvent_explanation()
dlg_text("@90750103")
dlg_menu( "@90010003", 'NPC_event_contact()' )
dlg_menu( "@90010002", "" )
dlg_show()
end
-- 카드를 아이템으로 교환한다.
function worldcupEvent_card_to_item()
-- 임시 변수 선언과 동시에 NPC ID 가져오기
local npc_id = get_npc_id()
-- <이름 출력> 각 NPC에 따라 적합한
-- 이벤트 도우미 코리앙 일때
if npc_id == 7501 then
dlg_title("@90750101")
-- 이벤트 도우미 스위즈 일때
elseif npc_id == 7502 then
dlg_title("@90750201")
-- 이벤트 도우미 프란스 일때
elseif npc_id == 7503 then
dlg_title("@90750301")
-- 이벤트 도우미 토구 일때
elseif npc_id == 7504 then
dlg_title("@90750401")
-- 이벤트 도우미 사카 일때
elseif npc_id == 7505 then
dlg_title("@90750501")
end
-- 문자 카운트
local count = {}
local item_id = 2000401
-- 맞춘 문자 셋
local event_set = 0
for i = 1, 12 do
count[i] = find_item( item_id )
-- 카드가 없으면 현재 몇개째 인지 체크 하고 나가리.
if count[i] == 0 then
if i < 3 then
event_set = 0
elseif count[3] ~=0 and i < 7 then
event_set = 1
end
-- 밖으로 빠져나간다.
break
end
-- 3개째 맞게 되면(안 맞으면 알아서 빠져나가니까.) 세트 1 완성
if count[3] ~=0 and i == 3 then
event_set = 1
end
-- 7개째 맞게 되면 세트 2완성
if count[7] ~=0 and i == 7 then
event_set = 2
end
-- 12개째 맞게 되면 세트 3 완성.
if count[12] ~=0 and i == 12 then
event_set = 3
end
item_id = item_id + 1
end
-- <대사 출력> 각 NPC에 따라 적합한
if event_set == 0 then
-- 이벤트 도우미 코리앙 일때
if npc_id == 7501 then
dlg_text("@90750110")
-- 이벤트 도우미 스위즈 일때
elseif npc_id == 7502 then
dlg_text("@90750210")
-- 이벤트 도우미 프란스 일때
elseif npc_id == 7503 then
dlg_text("@90750310")
-- 이벤트 도우미 토구 일때
elseif npc_id == 7504 then
dlg_text("@90750410")
-- 이벤트 도우미 사카 일때
elseif npc_id == 7505 then
dlg_text("@90750510")
end
else
-- 이벤트 도우미 코리앙 일때
if npc_id == 7501 then
dlg_text("@90750104")
-- 이벤트 도우미 스위즈 일때
elseif npc_id == 7502 then
dlg_text("@90750204")
-- 이벤트 도우미 프란스 일때
elseif npc_id == 7503 then
dlg_text("@90750304")
-- 이벤트 도우미 토구 일때
elseif npc_id == 7504 then
dlg_text("@90750404")
-- 이벤트 도우미 사카 일때
elseif npc_id == 7505 then
dlg_text("@90750504")
end
end
-- 세트가 완성되어 있다면...
if event_set >= 1 then
dlg_menu( "파이팅 셋트", 'WorldcupEvent_question_1()' )
end
if event_set >= 2 then
dlg_menu( "태극전사 셋트", 'WorldcupEvent_question_2()' )
end
if event_set >= 3 then
dlg_menu( "필승코리아 셋트", 'WorldcupEvent_question_3()' )
end
--대화 종료
dlg_menu( "@90010002", "" )
-- 다이얼로그 출력하기
dlg_show()
end
-- 카드 교환 최종 확인(파이팅 셋트)
function WorldcupEvent_question_1()
-- 임시 변수 선언과 동시에 NPC ID 가져오기
local npc_id = get_npc_id()
-- <이름 출력> 각 NPC에 따라 적합한
-- 이벤트 도우미 코리앙 일때
if npc_id == 7501 then
dlg_title("@90750101")
-- 이벤트 도우미 스위즈 일때
elseif npc_id == 7502 then
dlg_title("@90750201")
-- 이벤트 도우미 프란스 일때
elseif npc_id == 7503 then
dlg_title("@90750301")
-- 이벤트 도우미 토구 일때
elseif npc_id == 7504 then
dlg_title("@90750401")
-- 이벤트 도우미 사카 일때
elseif npc_id == 7505 then
dlg_title("@90750501")
end
-- <대사 출력> 각 NPC에 따라 적합한
-- 이벤트 도우미 코리앙 일때
if npc_id == 7501 then
dlg_text("@90750105")
-- 이벤트 도우미 스위즈 일때
elseif npc_id == 7502 then
dlg_text("@90750205")
-- 이벤트 도우미 프란스 일때
elseif npc_id == 7503 then
dlg_text("@90750305")
-- 이벤트 도우미 토구 일때
elseif npc_id == 7504 then
dlg_text("@90750405")
-- 이벤트 도우미 사카 일때
elseif npc_id == 7505 then
dlg_text("@90750505")
end
--확인 버튼
dlg_menu( "확인", 'WorldcupEvent_Item_change(1)' )
-- 취소 버튼
dlg_menu( "취소", 'worldcupEvent_card_to_item()' )
-- 다이얼로그 출력하기
dlg_show()
end
-- 카드 교환 최종 확인(태극전사 셋트)
function WorldcupEvent_question_2()
-- 임시 변수 선언과 동시에 NPC ID 가져오기
local npc_id = get_npc_id()
-- <이름 출력> 각 NPC에 따라 적합한
-- 이벤트 도우미 코리앙 일때
if npc_id == 7501 then
dlg_title("@90750101")
-- 이벤트 도우미 스위즈 일때
elseif npc_id == 7502 then
dlg_title("@90750201")
-- 이벤트 도우미 프란스 일때
elseif npc_id == 7503 then
dlg_title("@90750301")
-- 이벤트 도우미 토구 일때
elseif npc_id == 7504 then
dlg_title("@90750401")
-- 이벤트 도우미 사카 일때
elseif npc_id == 7505 then
dlg_title("@90750501")
end
-- <대사 출력> 각 NPC에 따라 적합한
-- 이벤트 도우미 코리앙 일때
if npc_id == 7501 then
dlg_text("@90750106")
-- 이벤트 도우미 스위즈 일때
elseif npc_id == 7502 then
dlg_text("@90750206")
-- 이벤트 도우미 프란스 일때
elseif npc_id == 7503 then
dlg_text("@90750306")
-- 이벤트 도우미 토구 일때
elseif npc_id == 7504 then
dlg_text("@90750406")
-- 이벤트 도우미 사카 일때
elseif npc_id == 7505 then
dlg_text("@90750506")
end
--확인 버튼
dlg_menu( "확인", 'WorldcupEvent_Item_change(2)' )
-- 취소 버튼
dlg_menu( "취소", 'worldcupEvent_card_to_item()' )
-- 다이얼로그 출력하기
dlg_show()
end
-- 카드 교환 최종 확인(필승코리아 셋트)
function WorldcupEvent_question_3()
-- 임시 변수 선언과 동시에 NPC ID 가져오기
local npc_id = get_npc_id()
-- <이름 출력> 각 NPC에 따라 적합한
-- 이벤트 도우미 코리앙 일때
if npc_id == 7501 then
dlg_title("@90750101")
-- 이벤트 도우미 스위즈 일때
elseif npc_id == 7502 then
dlg_title("@90750201")
-- 이벤트 도우미 프란스 일때
elseif npc_id == 7503 then
dlg_title("@90750301")
-- 이벤트 도우미 토구 일때
elseif npc_id == 7504 then
dlg_title("@90750401")
-- 이벤트 도우미 사카 일때
elseif npc_id == 7505 then
dlg_title("@90750501")
end
-- <대사 출력> 각 NPC에 따라 적합한
-- 이벤트 도우미 코리앙 일때
if npc_id == 7501 then
dlg_text("@90750107")
-- 이벤트 도우미 스위즈 일때
elseif npc_id == 7502 then
dlg_text("@90750207")
-- 이벤트 도우미 프란스 일때
elseif npc_id == 7503 then
dlg_text("@90750307")
-- 이벤트 도우미 토구 일때
elseif npc_id == 7504 then
dlg_text("@90750407")
-- 이벤트 도우미 사카 일때
elseif npc_id == 7505 then
dlg_text("@90750507")
end
--확인 버튼
dlg_menu( "확인", 'WorldcupEvent_Item_change(3)' )
-- 취소 버튼
dlg_menu( "취소", 'worldcupEvent_card_to_item()' )
-- 다이얼로그 출력하기
dlg_show()
end
-- 아이템 지급
function WorldcupEvent_Item_change( event_set )
-- 임시 변수 선언과 동시에 NPC ID 가져오기
local npc_id = get_npc_id()
-- <이름 출력> 각 NPC에 따라 적합한
-- 이벤트 도우미 코리앙 일때
if npc_id == 7501 then
dlg_title("@90750101")
-- 이벤트 도우미 스위즈 일때
elseif npc_id == 7502 then
dlg_title("@90750201")
-- 이벤트 도우미 프란스 일때
elseif npc_id == 7503 then
dlg_title("@90750301")
-- 이벤트 도우미 토구 일때
elseif npc_id == 7504 then
dlg_title("@90750401")
-- 이벤트 도우미 사카 일때
elseif npc_id == 7505 then
dlg_title("@90750501")
end
-- <대사 출력> 각 NPC에 따라 적합한
-- 이벤트 도우미 코리앙 일때
if npc_id == 7501 then
dlg_text("@90750109")
-- 이벤트 도우미 스위즈 일때
elseif npc_id == 7502 then
dlg_text("@90750209")
-- 이벤트 도우미 프란스 일때
elseif npc_id == 7503 then
dlg_text("@90750309")
-- 이벤트 도우미 토구 일때
elseif npc_id == 7504 then
dlg_text("@90750409")
-- 이벤트 도우미 사카 일때
elseif npc_id == 7505 then
dlg_text("@90750509")
end
-- 만약을 위해서 다시 한번 체크
local item_id = 2000401
local count = {}
local temp_event_set = 0
for i = 1, 12 do
count[i] = find_item( item_id )
-- 카드가 없으면 현재 몇개째 인지 체크 하고 나가리.
if count[i] == 0 then
if i < 3 then
temp_event_set = 0
elseif count[3] ~=0 and i < 7 then
temp_event_set = 1
end
-- 밖으로 빠져나간다.
break
end
-- 3개째 맞게 되면(안 맞으면 알아서 빠져나가니까.) 세트 1 완성
if count[3] ~=0 and i == 3 then
temp_event_set = 1
end
-- 7개째 맞게 되면 세트 2완성
if count[7] ~=0 and i == 7 then
temp_event_set = 2
end
-- 12개째 맞게 되면 세트 3 완성.
if count[12] ~=0 and i == 12 then
temp_event_set = 3
end
item_id = item_id + 1
end
local flag = 1
-- 꽁수 부리기 퇴치 (현재 완성된 카드셋의 종류보다 보상으로 고른 것이 더 클때, 즉 보상을 큰 것을 고르고 카드를 빼돌린 상태)
if event_set > temp_event_set then
flag = 0
-- 이벤트 도우미 코리앙 일때
if npc_id == 7501 then
dlg_text("@90750110")
-- 이벤트 도우미 스위즈 일때
elseif npc_id == 7502 then
dlg_text("@90750210")
-- 이벤트 도우미 프란스 일때
elseif npc_id == 7503 then
dlg_text("@90750310")
-- 이벤트 도우미 토구 일때
elseif npc_id == 7504 then
dlg_text("@90750410")
-- 이벤트 도우미 사카 일때
elseif npc_id == 7505 then
dlg_text("@90750510")
end
end
if flag == 1 then
-- 지급할 아이템 세팅
local item_set = {}
local item_set_percentage = {}
if event_set == 1 then
item_set = { 700102, 700202, 602302, 602305, 602402, 2900500, 2000204, 700401 }
item_set_percentage = { 4, 20, 35, 50, 65, 70, 95, 100 }
elseif event_set == 2 then
item_set = { 700401, 700103, 700203, 2901000, 2000205, 900001, 602303, 602403 }
item_set_percentage = { 15, 17, 25, 35, 40, 50, 75, 100 }
elseif event_set == 3 then
item_set = { 540002, 540005, 540006, 540011, 540018, 540019, 900000, 2010201 }
item_set_percentage = { 7, 14, 21, 28, 35, 42, 90, 100 }
end
local event_item = math.random( 100 )
local count_item = 0
-- 아이템 ID 초기화
item_id = 0
-- 아이템 지급
if temp_event_set > 0 then
if event_item <= item_set_percentage[1] then
item_id = item_set[1]
elseif event_item <= item_set_percentage[2] then
item_id = item_set[2]
elseif event_item <= item_set_percentage[3] then
item_id = item_set[3]
elseif event_item <= item_set_percentage[4] then
item_id = item_set[4]
elseif event_item <= item_set_percentage[5] then
item_id = item_set[5]
elseif event_item <= item_set_percentage[6] then
item_id = item_set[6]
elseif event_item <= item_set_percentage[7] then
item_id = item_set[7]
elseif event_item <= item_set_percentage[8] then
item_id = item_set[8]
end
insert_item( item_id, 1)
-- 시스템 메시지 출력
local text = sconv("@941", "#@item_name@#", "@" .. tostring( item_id+10000000 ) )
message( text )
-- 파이팅 대한민국 필승코리아 삭제.
item_id = 2000401
local count_item = 3
if event_set == 1 then
count_item = 3
elseif event_set == 2 then
count_item = 7
elseif event_set == 3 then
count_item = 12
end
-- 주르륵 삭제.
for i = 1, count_item do
if count_item < 0 or count_item > 12 then
break
end
delete_item( get_item_handle(item_id), 1)
item_id = item_id + 1
end
end
end
--돌아가기
dlg_menu( "@90010003", 'NPC_event_contact()' )
--대화 종료
dlg_menu( "@90010002", "" )
-- 다이얼로그 출력하기
dlg_show()
end
--============================================================
--=============== 던전 관리인 미이나
--============================================================
-- 일반 플레이어
-- 대화 - 던전 정보 보기 - 소유 길드란?
-- - 세율이란?
--
--------------------------------------------------------------
-- 길드 마스터
-- 대화 - 던전 정보 보기 - 소유 길드란?
-- ! - 세율이란?
-- !
-- - 관리 메뉴 - 세금 수금(세금 + 라크)
-- - 세율 조정
--------------------------------------------------------------
-- 소유 길드 이름을 가져 옴: get_own_guild_name( dungeon_id )
-- 던전 과의 관계를 가져 옴: get_dungeon_relation( dungeon_id )
-- 현재 세율: get_tax_rate( dungeon_id )
-- 세율 변경: set_tax_rate( dungeon_id, tax_rate )
-- 현재 세금: get_tax_amount()
-- 세금 저장: draw_tax()
-- get_tax_chaos_amount() : 현재 저장된 라크 양 함수
-- draw_tax_chaos() : 꺼내는 함수
function NPC_dungeon_siege_manager_init()
cprint( "!던전 관리인 미이나 가동" )
set_npc_name( "@90408500" )
end
function NPC_dungeon_siege_manager_contact( dungeon_id )
-- scf_is_owned_dungeon()의 리턴 값 : get_dungeon_relation( dungeon_id )로 해당 던전을 소유했다는 것을 체크한 후 값 리턴
-- 0 : 던전과 관계 없음
-- 1 : 던전 소유 길드 또는 연합의 마스터 길드의 길드 마스터
-- 2 : 던전 소유 길드 또는 연합의 마스터 길드의 길드원
-- 3 : 던전 소유 연합의 마스터 길드가 아닌 서브 길드의 길드 마스터
-- 4 : 던전 소유 연합의 마스터 길드가 아닌 서브 길드의 길드원
-- 5 : 던전 시즈 공격자 길드 또는 공격자 연합 마스터 길드의 길드 마스터
-- 6 : 던전 시즈 공격자 길드 또는 공격자 연합 마스터 길드의 길드원
-- 7 : 던전 시즈 공격자 연합의 마스터 길드가 아닌 서브 길드의 길드 마스터
-- 8 : 던전 시즈 공격자 연합의 마스터 길드가 아닌 서브 길드의 길드원
-- 9 : 던전 소유 길드의 길드원 중 던전관리 권한을 가진 길드원
-- 던전 소유 길드의 마스터인지 길드원인지 아니면 일반인인지 받아온다.
-- 잘못된 내용으로 레드마인 버그 수정 [QA]_버그 #14539
-- 마스터=1 길드원=2 일반인=0 던전 관리 권한 소유 길드원=9
local dungeon_relation = get_dungeon_relation( dungeon_id )
-- 마스터는 관리 메뉴로, 길드원은 던전 정보 메뉴로, 일반인은 일반 정보 메뉴로 보낸다.
if dungeon_relation == 1 or dungeon_relation == 9 then
NPC_dungeon_siege_guildmaster_contact( dungeon_id )
elseif dungeon_relation == 2 or dungeon_relation == 3 or dungeon_relation == 4 then
NPC_dungeon_siege_guildmember_contact( dungeon_id )
elseif dungeon_relation == 0 or dungeon_relation == 5 or dungeon_relation == 6 or dungeon_relation == 7 or dungeon_relation == 8 then
NPC_dungeon_siege_adventurer_contact( dungeon_id )
end
end
function NPC_dungeon_siege_adventurer_contact( dungeon_id )
-- 다이얼로그 출력
dlg_title( "@90408501" )
dlg_text( "@90408502" )
-- 숨겨진 던전 리스트 : 130300 수정계곡 / 130800 팔미르1 / 130900 팔미르2 / 120700 엘카시아 / 121000 백룡 / 122000 흑룡 / 123000 사룡
if dungeon_id == 130300 or dungeon_id == 130800 or dungeon_id == 120700 or dungeon_id == 130900 or dungeon_id == 121000 or dungeon_id == 122000 or dungeon_id == 123000 then
-- 숨겨진 던전 정보 보기
dlg_menu( "@90010121", 'dungeon_information( '..dungeon_id..' )' )
dlg_menu( "@90019007", 'secret_dungeon_information( '..dungeon_id..' )' )
elseif
-- 일반 정보 보기
dlg_menu( "@90010121", 'dungeon_information( '..dungeon_id..' )' ) then
end
--대화 종료
dlg_menu( "@90010002", "" )
dlg_show()
end
function NPC_dungeon_siege_guildmaster_contact( dungeon_id )
-- 다이얼로그 출력
dlg_title( "@90408501" )
dlg_text( "@90408502" )
local dungeon_check = dungeon_id
-- 숨겨진 던전 리스트 : 130300 수정계곡 / 130800 팔미르1 / 130900 팔미르2 / 120700 엘카시아 / 121000 백룡 / 122000 흑룡 / 123000 사룡
if dungeon_id == 130300 or dungeon_id == 130800 or dungeon_id == 120700 or dungeon_id == 130900 or dungeon_id == 121000 or dungeon_id == 122000 or dungeon_id == 123000 then
-- 숨겨진 던전 정보 보기
dlg_menu( "@90019007", 'secret_dungeon_information( '..dungeon_id..' )' )
elseif
-- 일반 정보 보기
dlg_menu( "@90010121", 'dungeon_information( '..dungeon_id..' )' ) then
end
-- 관리 메뉴 - 해당 던전 소유 길드 마스터에게만 보임.
dlg_menu( "@90010114", 'management_menu( '..dungeon_id..' )' )
-- 던전 포기 - 해당 던전 소유 길드 마스터에게만 보임.
dlg_menu( "@90010158", 'dungeon_drop( '..dungeon_id..' )' )
--대화 종료
dlg_menu( "@90010002", "" )
dlg_show()
end
-- 던전 포기?
function dungeon_drop( dungeon_id )
dlg_title( "@90408501" )
dlg_text( "@90408518" )
-- 확인
dlg_menu( "@90010016", 'click_dungeon_drop( '..dungeon_id..' )' )
-- 취소
dlg_menu( "@90010001", 'NPC_dungeon_siege_manager_contact( '..dungeon_id..' )' )
dlg_show()
end
-- 클릭 던전 포기
function click_dungeon_drop( dungeon_id )
-- 던전 포기 실행 되면서 값이 drop_result에 들어감 성공시 1, 실패시 0
local drop_result = drop_dungeon_owner_ship()
if drop_result == 0 then
dlg_title( "@90408501" )
dlg_text( "@90408519" )
elseif drop_result == 1 then
dlg_title( "@90408501" )
dlg_text( "@90408520" )
warp( get_value( "x" ), get_value( "y" ), 0 )
end
--대화 종료
dlg_menu( "@90010002", "" )
dlg_show()
end
function NPC_dungeon_siege_guildmember_contact( dungeon_id )
-- 다이얼로그 출력
dlg_title( "@90408501" )
dlg_text( "@90408502" )
-- 숨겨진 던전 리스트 : 130300 수정계곡 / 130800 팔미르1 / 130900 팔미르2 / 120700 엘카시아 / 121000 백룡 / 122000 흑룡 / 123000 사룡
if dungeon_id == 130300 or dungeon_id == 130800 or dungeon_id == 120700 or dungeon_id == 130900 or dungeon_id == 121000 or dungeon_id == 122000 or dungeon_id == 123000 then
-- 숨겨진 던전 정보 보기
dlg_menu( "@90019007", 'secret_dungeon_information( '..dungeon_id..' )' )
elseif
-- 일반 정보 보기
dlg_menu( "@90010121", 'dungeon_information( '..dungeon_id..' )' ) then
end
--대화 종료
dlg_menu( "@90010002", "" )
dlg_show()
end
-- 던전 일반 정보 보기(일반인 전용 메뉴)
function dungeon_information( dungeon_id )
-- 현재 세율값을 받아온다.
local tax_rate = get_tax_rate( dungeon_id )
-- 던전 소유 길드명을 받아온다.
local own_guild_name = get_own_guild_name( dungeon_id )
-- 다이얼로그 출력
dlg_title( "@90408501" )
dlg_text(sconv("@90408510" , "#@own_guild@#" , own_guild_name , "#@tax_rate@#" , tostring(tax_rate)))
-- 소유 길드란?
dlg_menu( "@90010122", 'question_dungeon_owner('..dungeon_id..')' )
-- 세율이란?
dlg_menu( "@90010123", 'question_tax_rate('..dungeon_id..')' )
--돌아가기
dlg_menu( "@90010003", 'NPC_dungeon_siege_manager_contact( '..dungeon_id..' )' )
dlg_show()
end
-- 숨겨진 던전 일반 정보 보기(일반인 전용 메뉴)
function secret_dungeon_information( dungeon_id )
-- 다이얼로그 출력
dlg_title( "@90408501" )
-- 숨겨진 던전 소개
dlg_text( "@90408806" )
-- 들어가는 방법?
dlg_menu( "@90019008", 'question_secret_dungeon_enter('..dungeon_id..')' )
-- 키 몬스터란?
dlg_menu( "@90019009", 'question_secret_dungeon_keymonster('..dungeon_id..')' )
-- 나오는 방법?
dlg_menu( "@90019010", 'question_secret_dungeon_exit('..dungeon_id..')' )
-- 주의사항
dlg_menu( "@90019011", 'question_secret_dungeon_caution('..dungeon_id..')' )
--돌아가기
dlg_menu( "@90010003", 'NPC_dungeon_siege_manager_contact( '..dungeon_id..' )' )
dlg_show()
end
function question_secret_dungeon_enter(dungeon_id)
-- 다이얼로그 출력
dlg_title( "@90408501" )
-- 들어가는 방법?
dlg_text( "@90408807" )
-- 더 물어보기
dlg_menu( "@90019012", 'question_secret_dungeon_enter_add('..dungeon_id..')' )
-- 키 몬스터란?
dlg_menu( "@90019009", 'question_secret_dungeon_keymonster('..dungeon_id..')' )
-- 나오는 방법?
dlg_menu( "@90019010", 'question_secret_dungeon_exit('..dungeon_id..')' )
-- 주의사항
dlg_menu( "@90019011", 'question_secret_dungeon_caution('..dungeon_id..')' )
--돌아가기
dlg_menu( "@90010003", 'NPC_dungeon_siege_manager_contact( '..dungeon_id..' )' )
dlg_show()
end
function question_secret_dungeon_enter_add( dungeon_id )
-- 다이얼로그 출력
dlg_title( "@90408501" )
-- 나가는 방법?
dlg_text( "@90408811" )
-- 들어가는 방법?
dlg_menu( "@90019008", 'question_secret_dungeon_enter('..dungeon_id..')' )
-- 키 몬스터란?
dlg_menu( "@90019009", 'question_secret_dungeon_keymonster('..dungeon_id..')' )
-- 주의사항
dlg_menu( "@90019011", 'question_secret_dungeon_caution('..dungeon_id..')' )
--돌아가기
dlg_menu( "@90010003", 'NPC_dungeon_siege_manager_contact( '..dungeon_id..' )' )
dlg_show()
end
function question_secret_dungeon_keymonster(dungeon_id)
-- 다이얼로그 출력
dlg_title( "@90408501" )
-- 키몬스터는...
dlg_text( "@90408808" )
-- 들어가는 방법?
dlg_menu( "@90019008", 'question_secret_dungeon_enter('..dungeon_id..')' )
-- 나오는 방법?
dlg_menu( "@90019010", 'question_secret_dungeon_exit('..dungeon_id..')' )
-- 주의사항
dlg_menu( "@90019011", 'question_secret_dungeon_caution('..dungeon_id..')' )
--돌아가기
dlg_menu( "@90010003", 'NPC_dungeon_siege_manager_contact( '..dungeon_id..' )' )
dlg_show()
end
function question_secret_dungeon_exit(dungeon_id)
-- 다이얼로그 출력
dlg_title( "@90408501" )
-- 나가는 방법?
dlg_text( "@90408809" )
-- 더 물어보기
dlg_menu( "@90019012", 'question_secret_dungeon_exit_add('..dungeon_id..')' )
-- 들어가는 방법?
dlg_menu( "@90019008", 'question_secret_dungeon_enter('..dungeon_id..')' )
-- 키 몬스터란?
dlg_menu( "@90019009", 'question_secret_dungeon_keymonster('..dungeon_id..')' )
-- 주의사항
dlg_menu( "@90019011", 'question_secret_dungeon_caution('..dungeon_id..')' )
--돌아가기
dlg_menu( "@90010003", 'NPC_dungeon_siege_manager_contact( '..dungeon_id..' )' )
dlg_show()
end
function question_secret_dungeon_exit_add( dungeon_id )
-- 다이얼로그 출력
dlg_title( "@90408501" )
-- 나가는 방법?
dlg_text( "@90408812" )
-- 들어가는 방법?
dlg_menu( "@90019008", 'question_secret_dungeon_enter('..dungeon_id..')' )
-- 키 몬스터란?
dlg_menu( "@90019009", 'question_secret_dungeon_keymonster('..dungeon_id..')' )
-- 주의사항
dlg_menu( "@90019011", 'question_secret_dungeon_caution('..dungeon_id..')' )
--돌아가기
dlg_menu( "@90010003", 'NPC_dungeon_siege_manager_contact( '..dungeon_id..' )' )
dlg_show()
end
function question_secret_dungeon_caution(dungeon_id)
-- 다이얼로그 출력
dlg_title( "@90408501" )
-- 주의사항?
dlg_text( "@90408810" )
-- 더 물어보기
dlg_menu( "@90019012", 'question_secret_dungeon_caution_add('..dungeon_id..')' )
-- 들어가는 방법?
dlg_menu( "@90019008", 'question_secret_dungeon_enter('..dungeon_id..')' )
-- 키 몬스터란?
dlg_menu( "@90019009", 'question_secret_dungeon_keymonster('..dungeon_id..')' )
-- 나오는 방법?
dlg_menu( "@90019010", 'question_secret_dungeon_exit('..dungeon_id..')' )
--돌아가기
dlg_menu( "@90010003", 'NPC_dungeon_siege_manager_contact( '..dungeon_id..' )' )
dlg_show()
end
function question_secret_dungeon_caution_add( dungeon_id )
-- 다이얼로그 출력
dlg_title( "@90408501" )
-- 나가는 방법?
dlg_text( "@90408813" )
-- 더 물어보기
dlg_menu( "@90019012", 'question_secret_dungeon_caution_add_1('..dungeon_id..')' )
-- 들어가는 방법?
dlg_menu( "@90019008", 'question_secret_dungeon_enter('..dungeon_id..')' )
-- 키 몬스터란?
dlg_menu( "@90019009", 'question_secret_dungeon_keymonster('..dungeon_id..')' )
-- 주의사항
dlg_menu( "@90019011", 'question_secret_dungeon_caution('..dungeon_id..')' )
--돌아가기
dlg_menu( "@90010003", 'NPC_dungeon_siege_manager_contact( '..dungeon_id..' )' )
dlg_show()
end
function question_secret_dungeon_caution_add_1( dungeon_id )
-- 다이얼로그 출력
dlg_title( "@90408501" )
-- 나가는 방법?
dlg_text( "@90408814" )
-- 들어가는 방법?
dlg_menu( "@90019008", 'question_secret_dungeon_enter('..dungeon_id..')' )
-- 키 몬스터란?
dlg_menu( "@90019009", 'question_secret_dungeon_keymonster('..dungeon_id..')' )
-- 주의사항
dlg_menu( "@90019011", 'question_secret_dungeon_caution('..dungeon_id..')' )
--돌아가기
dlg_menu( "@90010003", 'NPC_dungeon_siege_manager_contact( '..dungeon_id..' )' )
dlg_show()
end
-- 소유 길드란?
function question_dungeon_owner( dungeon_id )
-- 다이얼로그 출력
dlg_title( "@90408501" )
dlg_text( "@90408511" )
--돌아가기
dlg_menu( "@90010003", 'dungeon_information( '..dungeon_id..' )' )
dlg_show()
end
-- 세율이란?
function question_tax_rate( dungeon_id )
-- 다이얼로그 출력
dlg_title( "@90408501" )
dlg_text( "@90408512" )
--돌아가기
dlg_menu( "@90010003", 'dungeon_information( '..dungeon_id..' )' )
dlg_show()
end
-- 관리 메뉴(던전 소유 길드원에게만 보임.)
function dungeon_guild_information( dungeon_id )
-- 현재 세율값을 받아온다.
local tax_rate = get_tax_rate( dungeon_id )
-- 걷힌 세금 얻어옴
local tax = get_tax_amount()
-- 걷힌 라크 얻어옴
local lak = get_tax_chaos_amount()
-- 다이얼로그 출력
dlg_title( "@90408501" )
dlg_text(sconv("@90408515" , "#@tax_rate@#" , tostring(tax_rate) , "#@tax@#" , tostring(tax) , "#@lak@#" , tostring(lak)))
--돌아가기
dlg_menu( "@90010003", 'NPC_dungeon_siege_manager_contact( '..dungeon_id..' )' )
dlg_show()
end
-- 관리 메뉴(길드 마스터에게만 보임.)
function management_menu( dungeon_id )
-- 걷힌 세금 얻어옴
local tax = get_tax_amount()
-- 현재 세율값을 받아온다.
local tax_rate = get_tax_rate( dungeon_id )
-- 걷힌 라크 얻어옴
local lak = get_tax_chaos_amount()
-- 다이얼로그 출력
dlg_title( "@90408501" )
dlg_text(sconv("@90408515" , "#@tax_rate@#" , tostring(tax_rate) , "#@tax@#" , tostring(tax) , "#@lak@#" , tostring(lak)))
-- 세금 수금
dlg_menu( "@90010116", 'tax_collection( '..dungeon_id..' )' )
-- 라크 수금
dlg_menu( "@90010125", 'lak_collection( '..dungeon_id..' )' )
-- 세율 조정
dlg_menu( "@90010118", 'tax_rate_adjust( '..dungeon_id..' )' )
--돌아가기
dlg_menu( "@90010003", 'NPC_dungeon_siege_guildmaster_contact('..dungeon_id..')' )
dlg_show()
end
-- 세금 수금
function tax_collection( dungeon_id )
-- 걷힌 세금 얻어옴
local tax = get_tax_amount()
-- 수금하시겠습니까?
dlg_title( "@90408501" )
dlg_text(sconv("@90408504" , "#@tax@#" , tostring(tax)))
-- 확인(돈 지급)
dlg_menu( "@90010030", 'tax_collection_click( '..dungeon_id..' )' )
-- 취소(전 메뉴로 돌아감)
dlg_menu( "@90010001", 'management_menu(' .. dungeon_id .. ')' )
dlg_show()
end
-- 수금 버튼 눌러서 돈 지급
function tax_collection_click( dungeon_id )
-- 걷힌 세금 얻어옴
local tax = get_tax_amount()
-- 소지금 제한 루틴
local nummoney, player_money
player_money = gv("gold") -- 유저 현재 소지금을 가져온다.
nummoney = tax + player_money -- 유저 현재 소지금과 걷힌 세금을 합친다.
if nummoney > 10000000000 then -- 세금과 유저 현재 소지금을 합쳐서 100억이 넘는지 체크 한다.
dlg_title( "@90408501" )
dlg_text("@577") -- 소지금이 초과되었다는 메시지출력
dlg_menu( "@90010003", 'management_menu(' .. dungeon_id .. ')' ) -- 메뉴 호출
dlg_show() -- 보이기
-- 이미 걷어간 상태이거나 수금할 돈이 없다면
elseif tax == 0 then
dlg_title( "@90408501" )
dlg_text( "@90408513" )
--돌아가기
dlg_menu( "@90010003", 'management_menu( '..dungeon_id..' )' )
dlg_show()
else
-- 세금 걷고 저장
draw_tax()
-- 저장
save()
-- 관리 메뉴로 돌아감
management_menu( dungeon_id )
end
end
-- 라크 수금
function lak_collection( dungeon_id )
-- 걷힌 라크 얻어옴
local lak = get_tax_chaos_amount()
-- 수금하시겠습니까?
dlg_title( "@90408501" )
dlg_text( "@90408516" )
-- 확인(라크 지급)
dlg_menu( "@90010030", 'lak_collection_click( '..dungeon_id..' )' )
-- 취소(전 메뉴로 돌아감)
dlg_menu( "@90010001", 'management_menu(' .. dungeon_id .. ')' )
dlg_show()
end
-- 수금 버튼 눌러서 라크 지급
function lak_collection_click( dungeon_id )
-- 걷힌 라크 얻어옴
local lak = get_tax_chaos_amount()
-- 이미 걷어간 상태이거나 수금할 돈이 없다면
if lak == 0 then
dlg_title( "@90408501" )
dlg_text( "@90408517" )
--돌아가기
dlg_menu( "@90010003", 'management_menu( '..dungeon_id..' )' )
dlg_show()
else
-- 라크 걷고 저장
draw_tax_chaos()
-- 저장
save()
-- 관리 메뉴로 돌아감
management_menu( dungeon_id )
end
end
-- 세율 조정
function tax_rate_adjust( dungeon_id )
-- 현재 세율값을 받아온다.
local tax_rate = get_tax_rate( dungeon_id )
dlg_title( "@90408501" )
dlg_text( "@90408506" )
dlg_text(sconv("@90408506" , "#@tax_rate@#" , tostring(tax_rate)))
-- 세율 1% 증가 메뉴
dlg_menu( "@90010119", 'tax_rate_increase('..dungeon_id..')' )
-- 세율 1% 감소 메뉴
dlg_menu( "@90010120", 'tax_rate_decrease('..dungeon_id..')' )
--돌아가기
dlg_menu( "@90010003", 'management_menu('..dungeon_id..')' )
dlg_show()
end
function tax_rate_increase( dungeon_id )
-- 현재 세율값을 받아온다.
local tax_rate = get_tax_rate( dungeon_id )
-- 세율이 이미 10%라면 퇴짜
if tax_rate == 10 then
dlg_title( "@90408501" )
dlg_text( "@90408507" )
--돌아가기
dlg_menu( "@90010003", 'tax_rate_adjust('..dungeon_id..')' )
dlg_show()
-- 세율 변경:
elseif tax_rate < 10 then
set_tax_rate( dungeon_id, tax_rate+1 )
-- 윗 단계로 돌아감
tax_rate_adjust( dungeon_id )
end
end
function tax_rate_decrease( dungeon_id )
-- 현재 세율값을 받아온다.
local tax_rate = get_tax_rate( dungeon_id )
-- 세율이 이미 1%이라면 퇴짜
if tax_rate == 1 then
dlg_title( "@90408501" )
dlg_text( "@90408508" )
--돌아가기
dlg_menu( "@90010003", 'tax_rate_adjust('..dungeon_id..')' )
dlg_show()
-- 세율 변경:
elseif tax_rate > 1 then
set_tax_rate( dungeon_id, tax_rate-1 )
-- 윗 단계로 돌아감
tax_rate_adjust( dungeon_id )
end
end
----------------------------------------------------------------------------
----------------------------------------------------------------------------
------------------- 벚꽃 이벤트 npc 단술 동호회 회원 -----------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
function NPC_sweet_drink_init()
cprint( "!단술 동호회 회원" )
set_npc_name( "@90991200" )
end
function NPC_sweet_drink_contact()
-- 다이얼로그 출력
dlg_title( "@90991201" )
dlg_text( "@90991202" )
-- 당신은 누구?
dlg_menu( "@90010148", 'sweet_drink_who_are_you()' )
-- 단술이란?
dlg_menu( "@90010149", 'sweet_drink_question()' )
-- 단술 교환
dlg_menu( "@90010150", 'sweet_drink_exchange()' )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
-- 당신은 누구?
function sweet_drink_who_are_you()
-- 다이얼로그 출력
dlg_title( "@90991201" )
dlg_text( "@90991203" )
--돌아가기
dlg_menu( "@90010003", 'NPC_sweet_drink_contact()' )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
-- 단술이란?
function sweet_drink_question()
-- 다이얼로그 출력
dlg_title( "@90991201" )
dlg_text( "@90991204" )
--돌아가기
dlg_menu( "@90010003", 'NPC_sweet_drink_contact()' )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
-- 단술 교환
function sweet_drink_exchange()
local item_count = find_item ( 2000140 )
item_handle = get_item_handle ( 2000140 )
if item_count >= 50 then
-- 단술 교환 성공시
dlg_title( "@90991201" )
dlg_text( "@90991205" )
delete_item ( item_handle, 50 )
insert_item ( 2000141, 1 )
else
-- 단술 모자랄 경우
dlg_title( "@90991201" )
dlg_text( "@90991206" )
end
--돌아가기
dlg_menu( "@90010003", 'NPC_sweet_drink_contact()' )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 호라이즌 조합장 가더
--============================================================
function NPC_Quest_Gangway_Administrator_init()
cprint( "!조합장 가더 가동" )
set_npc_name( "@90409100" )
end
function NPC_Quest_Gangway_Administrator_contact()
-- 다이얼로그 출력
dlg_title( "@90409101" )
dlg_text( "@90409102" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 잃어버린 갱도 생존자 튠
--============================================================
function NPC_Quest_Gangway_survivor_init()
cprint( "!생존자 튠 가동" )
set_npc_name( "@90409200" )
end
function NPC_Quest_Gangway_survivor_contact()
-- 다이얼로그 출력
dlg_title( "@90409201" )
dlg_text( "@90409202" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 론도 무역 조합 사원 라카드
--============================================================
function NPC_Trade_member_Rondoh_init()
cprint( "!무역 조합 사원 라카드 가동" )
set_npc_name( "@90601700" )
end
function NPC_Trade_member_Rondoh_contact()
-- 다이얼로그 출력
dlg_title( "@90601701" )
dlg_text( "@90601702" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 론도 양아치 키리오
--============================================================
function NPC_Beggar_Rondoh_init()
cprint( "!양아치 키리오 가동" )
set_npc_name( "@90601800" )
end
function NPC_Beggar_Rondoh_contact()
-- 다이얼로그 출력
dlg_title( "@90601801" )
dlg_text( "@90601802" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 론도 건달 파두
--============================================================
function NPC_Scamp_Rondoh_init()
cprint( "!건달 파두 가동" )
set_npc_name( "@90601900" )
end
function NPC_Scamp_Rondoh_contact()
-- 다이얼로그 출력
dlg_title( "@90601901" )
dlg_text( "@90601902" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 론도 시장 에일레나
--============================================================
function NPC_Mayoress_Rondoh_init()
cprint( "!시장 에일레나 가동" )
set_npc_name( "@90602000" )
end
function NPC_Mayoress_Rondoh_contact()
-- 다이얼로그 출력
dlg_title( "@90602001" )
dlg_text( "@90602002" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 론도 무역 조합장 미륜
--============================================================
function NPC_Trade_master_Rondoh_init()
cprint( "!무역 조합장 미륜 가동" )
set_npc_name( "@90602100" )
end
function NPC_Trade_master_Rondoh_contact()
-- 퀘스트 상태 체크 get_quest_progress(ID)
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 255 : 이미종료
local quest_progress000 = get_quest_progress(1226)
-- 퀘스트 종료시 대사
if quest_progress000 == 255 then
dlg_title( "@90602101" )
dlg_text( "@90602106" )
-- 퀘스트 수행 전, 수행 중 대사
else
-- 다이얼로그 출력
dlg_title( "@90602101" )
dlg_text( "@90602102" )
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 론도 섀도우헌터 토르하
--============================================================
function NPC_Shadow_Hunter_Rondoh_init()
cprint( "!섀도우헌터 토르하 가동" )
set_npc_name( "@90602300" )
end
function NPC_Shadow_Hunter_Rondoh_contact()
-- 다이얼로그 출력
dlg_title( "@90602301" )
dlg_text( "@90602302" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 론도 경비병
--============================================================
function NPC_Guard_Rondoh_contact()
-- 임시 변수 선언과 동시에 NPC ID 가져오기
local npc_id = get_npc_id()
-- <이름 출력> 각 NPC에 따라 적합한
if npc_id == 6024 then
dlg_title("@90602401")
dlg_text( "@90602402" )
elseif npc_id == 6025 then
dlg_title("@90602501")
dlg_text( "@90602502" )
elseif npc_id == 6026 then
dlg_title("@90602601")
dlg_text( "@90602602" )
elseif npc_id == 6027 then
dlg_title("@90602701")
dlg_text( "@90602702" )
elseif npc_id == 6028 then
dlg_title("@90602801")
dlg_text( "@90602802" )
elseif npc_id == 6029 then
dlg_title("@90602901")
dlg_text( "@90602902" )
elseif npc_id == 6030 then
dlg_title("@90603001")
dlg_text( "@90603002" )
elseif npc_id == 6031 then
dlg_title("@90603101")
dlg_text( "@90603102" )
elseif npc_id == 6040 then
dlg_title("@90604001")
dlg_text( "@90604002" )
elseif npc_id == 6041 then
dlg_title("@90604101")
dlg_text( "@90604102" )
end
-- 끝내기
dlg_menu( "@90010002", "" )
-- 다이얼로그 출력하기
dlg_show()
end
--============================================================
--=============== 론도 경비대장 쿠둔
--============================================================
function NPC_Guard_Commander_Rondoh_init()
cprint( "!경비대장 쿠둔 가동" )
set_npc_name( "@90603200" )
end
function NPC_Guard_Commander_Rondoh_contact()
-- 다이얼로그 출력
dlg_title( "@90603201" )
dlg_text( "@90603202" )
--[[ 할로윈 사탕받기//할로윈 이벤트에만 가동 Npc_event.lua에 있음
dlg_menu( "@90604959", 'Trick_or_treat_2011()' )
----------------------------------------------------------]]
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 론도 대부호 쿠랄리느
--============================================================
function NPC_Great_Rich_Rondoh_init()
cprint( "!대부호 쿠랄리느 가동" )
set_npc_name( "@90603300" )
end
function NPC_Great_Rich_Rondoh_contact()
dlg_title( "@90603301" )
dlg_text( "@90603302" )
local state_code = get_local_info()
if state_code == 4 or state_code == 8 or state_code == 128 or state_code == 16384 or state_code == 32768 or state_code == 65536 then
dlg_menu( "@90610497", "NPC_Event_2017_Devildom_Crystal_Trade_About()" ) -- Can I make an investment?
if get_env( "game.devildom_crystal_trade" ) == 1 then --If feature is active
dlg_menu( "@90610498", "NPC_Event_2017_Devildom_Crystal_Trade()" ) -- Trade Crystals
end
end
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
--============================================================
--=============== 론도 흑랑 길드원 츠바쿠
--============================================================
function NPC_Dark_Wolf_member_1_Rondoh_init()
cprint( "!흑랑 길드원 츠바쿠 가동" )
set_npc_name( "@90603400" )
end
function NPC_Dark_Wolf_member_1_Rondoh_contact()
-- 다이얼로그 출력
dlg_title( "@90603401" )
dlg_text( "@90603402" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 론도 흑랑 길드원 드뷴
--============================================================
function NPC_Dark_Wolf_member_2_Rondoh_init()
cprint( "!흑랑 길드원 드뷴 가동" )
set_npc_name( "@90603500" )
end
function NPC_Dark_Wolf_member_2_Rondoh_contact()
-- 다이얼로그 출력
dlg_title( "@90603501" )
dlg_text( "@90603502" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 론도 아스트랄 교인 미노아
--============================================================
function NPC_Astral_Believer_Rondoh_init()
cprint( "!아스트랄 교인 미노아 가동" )
set_npc_name( "@90603600" )
end
function NPC_Astral_Believer_Rondoh_contact()
-- 다이얼로그 출력
dlg_title( "@90603601" )
dlg_text( "@90603602" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 론도 연인 제니아
--============================================================
function NPC_lover_1_Rondoh_init()
cprint( "!연인 제니아 가동" )
set_npc_name( "@90603700" )
end
function NPC_lover_1_Rondoh_contact()
-- 다이얼로그 출력
dlg_title( "@90603701" )
dlg_text( "@90603702" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 론도 연인 케일
--============================================================
function NPC_lover_2_Rondoh_init()
cprint( "!연인 케일 가동" )
set_npc_name( "@90603800" )
end
function NPC_lover_2_Rondoh_contact()
dlg_title( "@90603801" )
--2016 발렌타인 이벤트 기간만 동작하게
local state_code = get_local_info()
local current_time = get_os_date( "%Y-%m-%d %H:%M:%S" )
local check = 0
local SoloBuff = tonumber( get_global_variable( "solo_buff_2016" ) ) or 0
if state_code == 1 and '2016-02-11 10:00:00' <= current_time and current_time < '2016-03-03 10:00:00' then
check = 1
elseif state_code == 16 and '2016-02-12 11:00:00' <= current_time and current_time < '2016-03-01 11:00:00' then
check = 1
elseif state_code == 256 and '2016-02-08 08:00:00' <= current_time and current_time < '2016-02-29 08:00:00' then
check = 1
elseif state_code == 512 and '2016-02-19 11:00:00' <= current_time and current_time < '2016-03-04 11:00:00' then
check = 1
end
if check == 1 then
if SoloBuff == 0 then -- 솔로버프 없을 경우
dlg_text( "@90610187" ) -- 다이얼로그 출력
dlg_menu( "@90610184", "Valentine_2016_Kale_Give()" ) -- 쿠피드의 선물을 건네준다
else
dlg_text( "@90610189" ) -- 다이얼로그 출력
end
else
dlg_text( "@90603802" ) -- 다이얼로그 출력
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 론도 보디가드 파푸가
--============================================================
function NPC_BodyGuard_Rondoh_init()
cprint( "!보디가드 파푸가 가동" )
set_npc_name( "@90603900" )
end
function NPC_BodyGuard_Rondoh_contact()
-- 다이얼로그 출력
dlg_title( "@90603901" )
dlg_text( "@90603902" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 수정의 산 에이전트 케이
--============================================================
function NPC_Agent_K_Rondoh_init()
cprint( "!에이전트 케이 기동" )
set_npc_name( "@90604200" )
end
function NPC_Agent_K_Rondoh_contact()
-- 퀘스트 상태 체크 get_quest_progress(ID)
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 255 : 이미종료
local quest_progress000 = get_quest_progress(1224)
-- 퀘스트 종료시 대사
if quest_progress000 == 255 then
dlg_title( "@90604201" )
dlg_text( "@90604217" )
-- 퀘스트 수행 전, 수행 중 대사
else
dlg_title( "@90604201" )
dlg_text( "@90604202" )
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 대련장 치료사 시유
--============================================================
function NPC_healer_contact()
local npc_id = get_npc_id()
if npc_id == 6043 then
dlg_title( "@90604301" )
dlg_text( "@90604302" )
elseif npc_id == 1088 then
dlg_title("@90108801")
dlg_text( "@90108802" )
elseif npc_id == 4093 then
dlg_title("@90409301")
dlg_text( "@90409302" )
elseif npc_id == 2086 then
dlg_title("@90208601")
dlg_text( "@90208602" )
end
-- 대화종료
--dlg_menu( "@90010156", "question_vie()" )
dlg_menu( "@90010157", "vie_healling()" )
dlg_menu( "@90010002", " " )
dlg_show()
end
function question_vie()
local npc_id = get_npc_id()
if npc_id == 6043 then
dlg_title( "@90604301" )
dlg_text( "@90604303" )
elseif npc_id == 1088 then
dlg_title("@90108801")
dlg_text( "@90108803" )
elseif npc_id == 4093 then
dlg_title("@90409301")
dlg_text( "@90409303" )
elseif npc_id == 2086 then
dlg_title("@90208601")
dlg_text( "@90208603" )
end
dlg_menu( "@90010003", "NPC_healer_contact()" )
dlg_menu( "@90010002", " " )
dlg_show()
end
function vie_healling()
local gold = get_value( "gold" )
local level = get_value( "level" )
local npc_id = get_npc_id()
-- 기존 가격
-- local cost = level * 100
-- 변경된 가격
local cost = math.floor( 1.9* (level ^ 1.85) + 9 )
if npc_id == 6043 then
dlg_title( "@90604301" )
elseif npc_id == 1088 then
dlg_title("@90108801")
elseif npc_id == 4093 then
dlg_title("@90409301")
elseif npc_id == 2086 then
dlg_title("@90208601")
end
temp_text =sconv("@90604304", "#@healling_cost@#", cost)
dlg_text(temp_text)
dlg_menu( "@90010016", "pay_heal()" )
dlg_menu( "@90010001", "NPC_healer_contact()" )
dlg_show()
end
function pay_heal()
local gold = get_value( "gold" )
local level = get_value( "level" )
local npc_id = get_npc_id()
-- 기존 가격
-- local cost = level * 100
-- 변경된 가격
local cost = math.floor( 1.9* (level ^ 1.85) + 9 )
if npc_id == 6043 then
dlg_title( "@90604301" )
elseif npc_id == 1088 then
dlg_title("@90108801")
elseif npc_id == 4093 then
dlg_title("@90409301")
elseif npc_id == 2086 then
dlg_title("@90208601")
end
if cost > gold then
if npc_id == 6043 then
dlg_title( "@90604301" )
elseif npc_id == 1088 then
dlg_title("@90108801")
elseif npc_id == 4093 then
dlg_title("@90409301")
elseif npc_id == 2086 then
dlg_title("@90208601")
end
dlg_text( "@90604305" )
else
if npc_id == 6043 then
dlg_title( "@90604301" )
elseif npc_id == 1088 then
dlg_title("@90108801")
elseif npc_id == 4093 then
dlg_title("@90409301")
elseif npc_id == 2086 then
dlg_title("@90208601")
end
dlg_text( "@90604306" )
set_value( "hp" , get_value( "max_hp") )
set_value( "gold", gold - cost )
update_gold_chaos()
end
dlg_menu( "@90010002", " " )
dlg_show()
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--============================================================
--=============== 스템 프러 리
--============================================================
function NPC_stamp_master_contact()
-- 퀘스트 중인지 받아온다. 1이면 퀘스트 중. 0이면 도전 시작
local q_flag = get_flag( "q4" )
local q_flag1 = get_flag( "q5" )
local q_flag2 = get_flag( "q6" )
local q_flag3 = get_flag( "q7" )
local q_flag4 = get_flag( "q8" )
local q_flag5 = get_flag( "q9" )
local q_flag6 = get_flag( "q10" )
local q_flag7 = get_flag( "q11" )
local q_flag8 = get_flag( "q12" )
local q_flag9 = get_flag( "q13" )
local q_flag10 = get_flag( "q14" )
local q_flag00 = get_flag( "q15" )
-- 퀘스트 완료해버린 뒤. 할 게 없음
if q_flag00 == 1 then
-- 다이얼로그 출력
dlg_title( "@90991901" )
dlg_text( "@90991913" )
-- 퀘스트 받은 상태에서 모두 모았을 때
elseif q_flag == 1 and q_flag1 == 1 and q_flag2 == 1 and q_flag3 == 1 and q_flag4 == 1 and q_flag5 == 1 and q_flag6 == 1 and q_flag7 == 1 and q_flag8 == 1 and q_flag9 == 1 and q_flag10 == 1 then
-- 다이얼로그 출력
dlg_title( "@90991901" )
dlg_text( "@90991912" )
-- 퀘스트 완전히 완료
set_flag( "q15", "1")
delete_item( get_item_handle(2010247), 1 )
delete_item( get_item_handle(2010248), 1 )
delete_item( get_item_handle(2010249), 1 )
delete_item( get_item_handle(2010250), 1 )
delete_item( get_item_handle(2010251), 1 )
delete_item( get_item_handle(2010252), 1 )
delete_item( get_item_handle(2010253), 1 )
delete_item( get_item_handle(2010254), 1 )
delete_item( get_item_handle(2010255), 1 )
delete_item( get_item_handle(2010256), 1 )
stamp_master_clear()
insert_item( 2901000, 3 )
elseif q_flag == 1 then
-- 다이얼로그 출력
dlg_title( "@90991901" )
dlg_text( "@90991905" )
-- 대화종료
dlg_menu( "@90010159", 'question_stamp()' )
dlg_menu( "@90010162", 'question_stamp_master()' )
elseif q_flag == 0 then
-- 다이얼로그 출력
dlg_title( "@90991901" )
dlg_text( "@90991902" )
-- 대화종료
dlg_menu( "@90010159", 'question_stamp()' )
dlg_menu( "@90010162", 'question_stamp_master()' )
dlg_menu( "@90010160", 'challenge_stamp_master()' )
else
-- 다이얼로그 출력
dlg_title( "@90991901" )
dlg_text( "@90991902" )
-- 대화종료
dlg_menu( "@90010159", 'question_stamp()' )
dlg_menu( "@90010162", 'question_stamp_master()' )
dlg_menu( "@90010160", 'challenge_stamp_master()' )
q_flag = set_flag( "q4" , "0")
q_flag1 = set_flag( "q5" , "0")
q_flag2 = set_flag( "q6" , "0")
q_flag3 = set_flag( "q7" , "0")
q_flag4 = set_flag( "q8" , "0")
q_flag5 = set_flag( "q9" , "0")
q_flag6 = set_flag( "q10" , "0")
q_flag7 = set_flag( "q11" , "0")
q_flag8 = set_flag( "q12" , "0")
q_flag9 = set_flag( "q13" , "0")
q_flag10 = set_flag( "q14" , "0")
q_flag00 = set_flag( "q15" , "0")
end
dlg_menu( "@90010002", " " )
dlg_show()
end
-- 도전 스탬프러리!
function challenge_stamp_master()
-- 다이얼로그 출력
dlg_title( "@90991901" )
dlg_text( "@90991904" )
--확인
dlg_menu( "@90010016", 'yes_question_stamp()' )
--취소
dlg_menu( "@90010001", 'NPC_stamp_master_contact()' )
dlg_show()
end
-- 도전 허락
function yes_question_stamp()
-- 다이얼로그 출력
dlg_title( "@90991901" )
dlg_text( "@90991914" )
set_flag( "q4", "1")
dlg_menu( "@90010002", " " )
dlg_show()
end
--스탬프러리란?
function question_stamp()
-- 다이얼로그 출력
dlg_title( "@90991901" )
dlg_text( "@90991903" )
dlg_menu( "@90010003", ' NPC_stamp_master_contact() ' )
dlg_menu( "@90010002", " " )
-- 대화종료
dlg_show()
end
-- 스탬프러리는 어디에?
function question_stamp_master()
-- 다이얼로그 출력
dlg_title( "@90991901" )
dlg_text( "@90991907" )
dlg_menu( "@90010163", 'question_stamp_master_katan()' )
dlg_menu( "@90010164", 'question_stamp_master_larc()' )
dlg_menu( "@90010165", 'question_stamp_master_rondo()' )
dlg_menu( "@90010166", 'question_stamp_master_etc()' )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function question_stamp_master_katan()
-- 다이얼로그 출력
dlg_title( "@90991901" )
dlg_text( "@90991908" )
-- 대화종료
dlg_menu( "@90010003", 'question_stamp_master()' )
dlg_menu( "@90010002", " " )
dlg_show()
end
function question_stamp_master_larc()
-- 다이얼로그 출력
dlg_title( "@90991901" )
dlg_text( "@90991909" )
-- 대화종료
dlg_menu( "@90010003", 'question_stamp_master()' )
dlg_menu( "@90010002", " " )
dlg_show()
end
function question_stamp_master_rondo()
-- 다이얼로그 출력
dlg_title( "@90991901" )
dlg_text( "@90991910" )
-- 대화종료
dlg_menu( "@90010003", 'question_stamp_master()' )
dlg_menu( "@90010002", " " )
dlg_show()
end
function question_stamp_master_etc()
-- 다이얼로그 출력
dlg_title( "@90991901" )
dlg_text( "@90991911" )
-- 대화종료
dlg_menu( "@90010003", 'question_stamp_master()' )
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 스탬프러리 아가씨
--============================================================
function NPC_stamp_lady_1_contact()
--퀘스트 중인지 읽어온다. 퀘스트 중이면 q4가 1. 아니면 0
local q_flag1 = get_flag( "q4" )
--스탬프를 받았는지 읽어온다. 받았다면 1. 아니라면 0
local q_flag2 = get_flag( "q5" )
-- 골든 위크 퀘스트 중이 아니라면 즐
if q_flag1 == 0 then
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992002" )
-- 만약 퀘스트 중이라면
elseif q_flag1 == 1 then
if q_flag2 == 1 then
-- 스탬프를 받은 상태라면 1 받지 않았다면 0
-- 스탬프 받았으니 즐
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992004" )
dlg_menu( "@90010162", 'question_stamp_lady()' )
else
-- 스탬프를 받지 않았다면 준다. 축하!
dlg_title( "@90992001" )
dlg_text( "@90992003" )
-- 스탬프 넣어주고 플래그 1로 채크
set_flag( "q5", "1")
insert_item( 2010247, 1 )
stamp_master_clear()
dlg_menu( "@90010162", 'question_stamp_lady()' )
end
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 스탬프러리 아가씨
--============================================================
function NPC_stamp_lady_2_contact()
--퀘스트 중인지 읽어온다. 퀘스트 중이면 q4가 1. 아니면 0
local q_flag1 = get_flag( "q4" )
--스탬프를 받았는지 읽어온다. 받았다면 1. 아니라면 0
local q_flag2 = get_flag( "q6" )
-- 골든 위크 퀘스트 중이 아니라면 즐
if q_flag1 == 0 then
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992002" )
-- 만약 퀘스트 중이라면
elseif q_flag1 == 1 then
if q_flag2 == 1 then
-- 스탬프를 받은 상태라면 1 받지 않았다면 0
-- 스탬프 받았으니 즐
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992004" )
dlg_menu( "@90010162", 'question_stamp_lady()' )
else
-- 스탬프를 받지 않았다면 준다. 축하!
dlg_title( "@90992001" )
dlg_text( "@90992003" )
-- 스탬프 넣어주고 플래그 1로 채크
set_flag( "q6", "1")
insert_item( 2010248, 1 )
stamp_master_clear()
dlg_menu( "@90010162", 'question_stamp_lady()' )
end
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 스탬프러리 아가씨
--============================================================
function NPC_stamp_lady_3_contact()
--퀘스트 중인지 읽어온다. 퀘스트 중이면 q4가 1. 아니면 0
local q_flag1 = get_flag( "q4" )
--스탬프를 받았는지 읽어온다. 받았다면 1. 아니라면 0
local q_flag2 = get_flag( "q7" )
-- 골든 위크 퀘스트 중이 아니라면 즐
if q_flag1 == 0 then
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992002" )
-- 만약 퀘스트 중이라면
elseif q_flag1 == 1 then
if q_flag2 == 1 then
-- 스탬프를 받은 상태라면 1 받지 않았다면 0
-- 스탬프 받았으니 즐
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992004" )
dlg_menu( "@90010162", 'question_stamp_lady()' )
else
-- 스탬프를 받지 않았다면 준다. 축하!
dlg_title( "@90992001" )
dlg_text( "@90992003" )
-- 스탬프 넣어주고 플래그 1로 채크
set_flag( "q7", "1")
insert_item( 2010249, 1 )
stamp_master_clear()
dlg_menu( "@90010162", 'question_stamp_lady()' )
end
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 스탬프러리 아가씨
--============================================================
function NPC_stamp_lady_4_contact()
--퀘스트 중인지 읽어온다. 퀘스트 중이면 q4가 1. 아니면 0
local q_flag1 = get_flag( "q4" )
--스탬프를 받았는지 읽어온다. 받았다면 1. 아니라면 0
local q_flag2 = get_flag( "q8" )
-- 골든 위크 퀘스트 중이 아니라면 즐
if q_flag1 == 0 then
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992002" )
-- 만약 퀘스트 중이라면
elseif q_flag1 == 1 then
if q_flag2 == 1 then
-- 스탬프를 받은 상태라면 1 받지 않았다면 0
-- 스탬프 받았으니 즐
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992004" )
dlg_menu( "@90010162", 'question_stamp_lady()' )
else
-- 스탬프를 받지 않았다면 준다. 축하!
dlg_title( "@90992001" )
dlg_text( "@90992003" )
-- 스탬프 넣어주고 플래그 1로 채크
set_flag( "q8", "1")
insert_item( 2010250, 1 )
stamp_master_clear()
dlg_menu( "@90010162", 'question_stamp_lady()' )
end
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 스탬프러리 아가씨
--============================================================
function NPC_stamp_lady_5_contact()
--퀘스트 중인지 읽어온다. 퀘스트 중이면 q4가 1. 아니면 0
local q_flag1 = get_flag( "q4" )
--스탬프를 받았는지 읽어온다. 받았다면 1. 아니라면 0
local q_flag2 = get_flag( "q9" )
-- 골든 위크 퀘스트 중이 아니라면 즐
if q_flag1 == 0 then
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992002" )
-- 만약 퀘스트 중이라면
elseif q_flag1 == 1 then
if q_flag2 == 1 then
-- 스탬프를 받은 상태라면 1 받지 않았다면 0
-- 스탬프 받았으니 즐
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992004" )
dlg_menu( "@90010162", 'question_stamp_lady()' )
else
-- 스탬프를 받지 않았다면 준다. 축하!
dlg_title( "@90992001" )
dlg_text( "@90992003" )
-- 스탬프 넣어주고 플래그 1로 채크
set_flag( "q9", "1")
insert_item( 2010251, 1 )
stamp_master_clear()
dlg_menu( "@90010162", 'question_stamp_lady()' )
end
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 스탬프러리 아가씨
--============================================================
function NPC_stamp_lady_6_contact()
--퀘스트 중인지 읽어온다. 퀘스트 중이면 q4가 1. 아니면 0
local q_flag1 = get_flag( "q4" )
--스탬프를 받았는지 읽어온다. 받았다면 1. 아니라면 0
local q_flag2 = get_flag( "q10" )
-- 골든 위크 퀘스트 중이 아니라면 즐
if q_flag1 == 0 then
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992002" )
-- 만약 퀘스트 중이라면
elseif q_flag1 == 1 then
if q_flag2 == 1 then
-- 스탬프를 받은 상태라면 1 받지 않았다면 0
-- 스탬프 받았으니 즐
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992004" )
dlg_menu( "@90010162", 'question_stamp_lady()' )
else
-- 스탬프를 받지 않았다면 준다. 축하!
dlg_title( "@90992001" )
dlg_text( "@90992003" )
-- 스탬프 넣어주고 플래그 1로 채크
set_flag( "q10", "1")
insert_item( 2010252, 1 )
stamp_master_clear()
dlg_menu( "@90010162", 'question_stamp_lady()' )
end
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 스탬프러리 아가씨
--============================================================
function NPC_stamp_lady_7_contact()
--퀘스트 중인지 읽어온다. 퀘스트 중이면 q4가 1. 아니면 0
local q_flag1 = get_flag( "q4" )
--스탬프를 받았는지 읽어온다. 받았다면 1. 아니라면 0
local q_flag2 = get_flag( "q11" )
-- 골든 위크 퀘스트 중이 아니라면 즐
if q_flag1 == 0 then
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992002" )
-- 만약 퀘스트 중이라면
elseif q_flag1 == 1 then
if q_flag2 == 1 then
-- 스탬프를 받은 상태라면 1 받지 않았다면 0
-- 스탬프 받았으니 즐
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992004" )
dlg_menu( "@90010162", 'question_stamp_lady()' )
else
-- 스탬프를 받지 않았다면 준다. 축하!
dlg_title( "@90992001" )
dlg_text( "@90992003" )
-- 스탬프 넣어주고 플래그 1로 채크
set_flag( "q11", "1")
insert_item( 2010253, 1 )
stamp_master_clear()
dlg_menu( "@90010162", 'question_stamp_lady()' )
end
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 스탬프러리 아가씨
--============================================================
function NPC_stamp_lady_8_contact()
--퀘스트 중인지 읽어온다. 퀘스트 중이면 q4가 1. 아니면 0
local q_flag1 = get_flag( "q4" )
--스탬프를 받았는지 읽어온다. 받았다면 1. 아니라면 0
local q_flag2 = get_flag( "q12" )
-- 골든 위크 퀘스트 중이 아니라면 즐
if q_flag1 == 0 then
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992002" )
-- 만약 퀘스트 중이라면
elseif q_flag1 == 1 then
if q_flag2 == 1 then
-- 스탬프를 받은 상태라면 1 받지 않았다면 0
-- 스탬프 받았으니 즐
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992004" )
dlg_menu( "@90010162", 'question_stamp_lady()' )
else
-- 스탬프를 받지 않았다면 준다. 축하!
dlg_title( "@90992001" )
dlg_text( "@90992003" )
-- 스탬프 넣어주고 플래그 1로 채크
set_flag( "q12", "1")
insert_item( 2010254, 1 )
stamp_master_clear()
dlg_menu( "@90010162", 'question_stamp_lady()' )
end
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 스탬프러리 아가씨
--============================================================
function NPC_stamp_lady_9_contact()
--퀘스트 중인지 읽어온다. 퀘스트 중이면 q4가 1. 아니면 0
local q_flag1 = get_flag( "q4" )
--스탬프를 받았는지 읽어온다. 받았다면 1. 아니라면 0
local q_flag2 = get_flag( "q13" )
-- 골든 위크 퀘스트 중이 아니라면 즐
if q_flag1 == 0 then
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992002" )
-- 만약 퀘스트 중이라면
elseif q_flag1 == 1 then
if q_flag2 == 1 then
-- 스탬프를 받은 상태라면 1 받지 않았다면 0
-- 스탬프 받았으니 즐
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992004" )
dlg_menu( "@90010162", 'question_stamp_lady()' )
else
-- 스탬프를 받지 않았다면 준다. 축하!
dlg_title( "@90992001" )
dlg_text( "@90992003" )
-- 스탬프 넣어주고 플래그 1로 채크
set_flag( "q13", "1")
insert_item( 2010255, 1 )
stamp_master_clear()
dlg_menu( "@90010162", 'question_stamp_lady()' )
end
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 스탬프러리 아가씨
--============================================================
function NPC_stamp_lady_10_contact()
--퀘스트 중인지 읽어온다. 퀘스트 중이면 q4가 1. 아니면 0
local q_flag1 = get_flag( "q4" )
--스탬프를 받았는지 읽어온다. 받았다면 1. 아니라면 0
local q_flag2 = get_flag( "q14" )
-- 골든 위크 퀘스트 중이 아니라면 즐
if q_flag1 == 0 then
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992002" )
-- 만약 퀘스트 중이라면
elseif q_flag1 == 1 then
if q_flag2 == 1 then
-- 스탬프를 받은 상태라면 1 받지 않았다면 0
-- 스탬프 받았으니 즐
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992004" )
dlg_menu( "@90010162", 'question_stamp_lady()' )
else
-- 스탬프를 받지 않았다면 준다. 축하!
dlg_title( "@90992001" )
dlg_text( "@90992003" )
-- 스탬프 넣어주고 플래그 1로 채크
set_flag( "q14", "1")
insert_item( 2010256, 1 )
stamp_master_clear()
dlg_menu( "@90010162", 'question_stamp_lady()' )
end
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function question_stamp_lady()
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992005" )
dlg_menu( "@90010163", 'question_stamp_lady_katan()' )
dlg_menu( "@90010164", 'question_stamp_lady_larc()' )
dlg_menu( "@90010165", 'question_stamp_lady_rondo()' )
dlg_menu( "@90010166", 'question_stamp_lady_etc()' )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function question_stamp_lady_katan()
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992006" )
-- 대화종료
dlg_menu( "@90010003", 'question_stamp_lady()' )
dlg_menu( "@90010002", " " )
dlg_show()
end
function question_stamp_lady_larc()
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992007" )
-- 대화종료
dlg_menu( "@90010003", 'question_stamp_lady()' )
dlg_menu( "@90010002", " " )
dlg_show()
end
function question_stamp_lady_rondo()
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992008" )
-- 대화종료
dlg_menu( "@90010003", 'question_stamp_lady()' )
dlg_menu( "@90010002", " " )
dlg_show()
end
function question_stamp_lady_etc()
-- 다이얼로그 출력
dlg_title( "@90992001" )
dlg_text( "@90992009" )
-- 대화종료
dlg_menu( "@90010003", 'question_stamp_lady()' )
dlg_menu( "@90010002", " " )
dlg_show()
end
-- 보상 처리 구역
function stamp_master_clear()
local level = get_value( "level" )
local expe = get_value( "exp" )
local jpe = get_value( "jp" )
local experien = math.floor( level * 2.4 + level^1.46 + ( level^ 2 * 0.1) + 2 ) * 40
local jp = math.floor( level * 0.8 * 40)
set_value( "jp", jpe + jp )
set_value( "exp", expe + experien )
end
--============================================================
--=============== 선물 지급 도우미
--============================================================
function NPC_Second_present_contact()
local q_flag0 = get_flag( "q18" )
local q_flag1 = get_flag( "q19" )
local Second_event = get_value( "event_code" )
if Second_event == 1 then
-- 플래그 초기화 시키기!
if q_flag0 == 0 or q_flag1 == 0 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목 : 선물대여도우미
dlg_text( "@90993002" ) --인사말
-- 대화종료
dlg_menu( "@90010172", 'second_present()' ) --선물받기
dlg_menu( "@90010002", " " ) --대화종료
elseif q_flag0 == 1 or q_flag1 == 1 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목 : 선물대여도우미
dlg_text( "@90993002" ) --인사말
-- 대화종료
dlg_menu( "@90010172", 'second_present()' ) --선물받기
dlg_menu( "@90010002", " " ) --대화종료
else
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목 : 선물대여도우미
dlg_text( "@90993002" ) --인사말
-- 대화종료
dlg_menu( "@90010172", 'second_present()' ) --선물받기
dlg_menu( "@90010002", " " ) --대화종료
set_flag( "q18", "0")
set_flag( "q19", "0")
end
else
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목 : 선물대여도우미
dlg_text( "@90993004" ) --죄송하지만 이번 선물은 라펠즈의 세계에 오랜만에 오신 분들만 받을 수 있습니다.
dlg_menu( "@90010002", " " ) --대화종료
end
dlg_show()
end
-- 선물 받기
function second_present()
-- 현재 직업 id를 받아놓는다.
local job = get_value( "job" )
-- 레벨 받아옴
local level = get_value( "level" )
local q_flag0 = get_flag( "q18" )
local q_flag1 = get_flag( "q19" )
-- 기본 직업은 즐 때림
if job == 100 or job == 200 or job == 300 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목 : 선물대여도우미
dlg_text( "@90993009" ) --선물을 대여 받으려면 먼저 1차 직업으로 전직을 해야 합니다.
elseif level <= 49 then --랭크2무기대여
--1차 직업을 가지고 있던 2차 직업을 가지고 있던 모두 그에 맞는 아이템을 지급해 준다.
if job == 201 or job == 202 or job == 203 or job == 301 or job == 302 or job == 303 or job == 101 or job == 102 or job == 103 or job == 210 or job == 211 or job == 212 or job == 213 or job == 214 or job == 310 or job == 311 or job == 312 or job == 313 or job == 314 or job == 110 or job == 111 or job == 112 or job == 113 or job == 114 then
if q_flag0 == 1 and q_flag1 == 1 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목 : 선물대여도우미
dlg_text( "@90993005" ) --이미 선물을 대여 받으셨네요.
elseif q_flag0 == 1 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목
dlg_text( "@90993003" ) --어떤 선물을 받으시겠습니까?
dlg_menu( "@90010174", 'second_present_armor()' ) --방어구받기
elseif q_flag1 == 1 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목
dlg_text( "@90993003" ) --어떤 선물을 받으시겠습니까?
dlg_menu( "@90010173", 'second_present_weapon()' ) --무기받기
elseif q_flag0 == 0 and q_flag1 == 0 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목
dlg_text( "@90993003" ) --어떤 선물을 받으시겠습니까?
dlg_menu( "@90010174", 'second_present_armor()' ) --방어구받기
dlg_menu( "@90010173", 'second_present_weapon()' ) --무기받기
end
end
elseif level >= 50 and level <= 79 then --랭크3무기대여
--1차 직업을 가지고 있던 2차 직업을 가지고 있던 모두 그에 맞는 아이템을 지급해 준다.
if job == 201 or job == 202 or job == 203 or job == 301 or job == 302 or job == 303 or job == 101 or job == 102 or job == 103 or job == 210 or job == 211 or job == 212 or job == 213 or job == 214 or job == 310 or job == 311 or job == 312 or job == 313 or job == 314 or job == 110 or job == 111 or job == 112 or job == 113 or job == 114 then
if q_flag0 == 1 and q_flag1 == 1 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목 : 선물대여도우미
dlg_text( "@90993005" ) --이미 선물을 대여 받으셨네요.
elseif q_flag0 == 1 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목
dlg_text( "@90993003" ) --어떤 선물을 받으시겠습니까?
dlg_menu( "@90010174", 'second_present_armor()' ) --방어구받기
elseif q_flag1 == 1 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목
dlg_text( "@90993003" ) --어떤 선물을 받으시겠습니까?
dlg_menu( "@90010173", 'second_present_weapon()' ) --무기받기
elseif q_flag0 == 0 and q_flag1 == 0 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목
dlg_text( "@90993003" ) --어떤 선물을 받으시겠습니까?
dlg_menu( "@90010174", 'second_present_armor()' ) --방어구받기
dlg_menu( "@90010173", 'second_present_weapon()' ) --무기받기
end
end
elseif level >= 80 and level <= 99 then --랭크4무기대여
--파이터 등 1차 직업 들은 2차로 전직해라는 문구 출력
if job == 201 or job == 202 or job == 203 or job == 301 or job == 302 or job == 303 or job == 101 or job == 102 or job == 103 then
dlg_title( "@90993000" ) --제목 : 선물대여도우미
dlg_text( "@90993010" ) --2차직업으로 전직해야합니다.
elseif job == 210 or job == 211 or job == 212 or job == 213 or job == 214 or job == 310 or job == 311 or job == 312 or job == 313 or job == 314 or job == 110 or job == 111 or job == 112 or job == 113 or job == 114 then
if q_flag0 == 1 and q_flag1 == 1 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목 : 선물대여도우미
dlg_text( "@90993005" ) --이미 선물을 대여 받으셨네요.
elseif q_flag0 == 1 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목
dlg_text( "@90993003" ) --어떤 선물을 받으시겠습니까?
dlg_menu( "@90010174", 'second_present_armor()' ) --방어구받기
elseif q_flag1 == 1 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목
dlg_text( "@90993003" ) --어떤 선물을 받으시겠습니까?
dlg_menu( "@90010173", 'second_present_weapon()' ) --무기받기
elseif q_flag0 == 0 and q_flag1 == 0 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목
dlg_text( "@90993003" ) --어떤 선물을 받으시겠습니까?
dlg_menu( "@90010174", 'second_present_armor()' ) --방어구받기
dlg_menu( "@90010173", 'second_present_weapon()' ) --무기받기
end
end
elseif level >= 100 and level <= 119 then --랭크5무기대여
--파이터 등 1차 직업 들은 2차로 전직해라는 문구 출력
if job == 201 or job == 202 or job == 203 or job == 301 or job == 302 or job == 303 or job == 101 or job == 102 or job == 103 then
dlg_title( "@90993000" ) --제목 : 선물대여도우미
dlg_text( "@90993010" ) --2차직업으로 전직해야합니다.
elseif job == 210 or job == 211 or job == 212 or job == 213 or job == 214 or job == 310 or job == 311 or job == 312 or job == 313 or job == 314 or job == 110 or job == 111 or job == 112 or job == 113 or job == 114 then
if q_flag0 == 1 and q_flag1 == 1 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목 : 선물대여도우미
dlg_text( "@90993005" ) --이미 선물을 대여 받으셨네요.
elseif q_flag0 == 1 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목
dlg_text( "@90993003" ) --어떤 선물을 받으시겠습니까?
dlg_menu( "@90010174", 'second_present_armor()' ) --방어구받기
elseif q_flag1 == 1 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목
dlg_text( "@90993003" ) --어떤 선물을 받으시겠습니까?
dlg_menu( "@90010173", 'second_present_weapon()' ) --무기받기
elseif q_flag0 == 0 and q_flag1 == 0 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목
dlg_text( "@90993003" ) --어떤 선물을 받으시겠습니까?
dlg_menu( "@90010174", 'second_present_armor()' ) --방어구받기
dlg_menu( "@90010173", 'second_present_weapon()' ) --무기받기
end
end
elseif level >= 120 and level <= 170 then --랭크6무기대여
--파이터 등 1차 직업 들은 2차로 전직해라는 문구 출력
if job == 201 or job == 202 or job == 203 or job == 301 or job == 302 or job == 303 or job == 101 or job == 102 or job == 103 then
dlg_title( "@90993000" ) --제목 : 선물대여도우미
dlg_text( "@90993010" ) --2차직업으로 전직해야합니다.
elseif job == 210 or job == 211 or job == 212 or job == 213 or job == 214 or job == 310 or job == 311 or job == 312 or job == 313 or job == 314 or job == 110 or job == 111 or job == 112 or job == 113 or job == 114 then
if q_flag0 == 1 and q_flag1 == 1 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목 : 선물대여도우미
dlg_text( "@90993005" ) --이미 선물을 대여 받으셨네요.
elseif q_flag0 == 1 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목
dlg_text( "@90993003" ) --어떤 선물을 받으시겠습니까?
dlg_menu( "@90010174", 'second_present_armor()' ) --방어구받기
elseif q_flag1 == 1 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목
dlg_text( "@90993003" ) --어떤 선물을 받으시겠습니까?
dlg_menu( "@90010173", 'second_present_weapon()' ) --무기받기
elseif q_flag0 == 0 and q_flag1 == 0 then
-- 다이얼로그 출력
dlg_title( "@90993000" ) --제목
dlg_text( "@90993003" ) --어떤 선물을 받으시겠습니까?
dlg_menu( "@90010174", 'second_present_armor()' ) --방어구받기
dlg_menu( "@90010173", 'second_present_weapon()' ) --무기받기
end
end
end
dlg_menu( "@90010002", " " ) --대화종료
dlg_show()
end
-- 무기 지급
function second_present_weapon()
-- 현재 직업 id를 받아놓는다.
local job = get_value( "job" )
-- 레벨 받아옴
local level = get_value( "level" )
--캐릭터 레벨은 낮으나 2차직업을 가진 캐릭터들에 대한 예외처리로
--2차직업도 검색 조건에 포함시킨다.
if level <= 49 then --랭크2무기대여
-- 파이터, 나이트, 워리어 직업 체크
if job == 201 or job == 210 or job == 211 then
insert_item( 3000301, 1 ) --나이츠소드
set_flag( "q18", "1")
-- 클레릭, 메이지, 프리스트
elseif job == 202 or job == 212 or job == 213 then
insert_item( 3000317, 1 ) --파쇄곤
set_flag( "q18", "1")
-- 테이머, 브리더
elseif job == 203 or job == 214 then
insert_item( 3000317, 1 ) --파쇄곤
set_flag( "q18", "1")
-- 스트라이더, 어쌔신, 레인저
elseif job == 301 or job == 310 or job == 311 then
insert_item( 3000301, 1 )
insert_item( 3000301, 1 ) --나이츠소드2개대여
insert_item( 3000309, 1 )
set_flag( "q18", "1")
-- 매지션, 소서러, 다크매지션
elseif job == 302 or job == 312 or job == 313 then
insert_item( 3000321, 1 )
set_flag( "q18", "1")
-- 서모너, 배틀서모너
elseif job == 303 or job == 314 then
insert_item( 3000395, 1 ) --아이론대거
set_flag( "q18", "1")
-- 투사, 전사, 궁사
elseif job == 101 or job == 110 or job == 111 then
insert_item( 3000387, 1 )
insert_item( 3000387, 1 ) --아이스 엑스2개대여
insert_item( 3000305, 1 ) --링클 보우
set_flag( "q18", "1")
-- 주술사, 마도사, 마투사
elseif job == 102 or job == 112 or job == 113 then
insert_item( 3000396, 1 ) --양날 도끼
set_flag( "q18", "1")
-- 야수사, 마수사
elseif job == 103 or job == 114 then
insert_item( 3000313, 1 )
set_flag( "q18", "1")
else
return
end
elseif level >= 50 and level <= 79 then --랭크3무기대여
--아래 1차직업들은 예외사항으로 캐릭터레벨은 높으나
--전직을 하지 않은 캐릭터를 위한 예외사항이다.
--그 레벨에 맞는 아이템을 전직에 맞게 준다.
-- 파이터
if job == 201 then
insert_item( 3000302, 1 ) --파염
insert_item( 3000397, 1 ) --바스타드소드
set_flag( "q18", "1")
-- 클레릭
elseif job == 202 then
insert_item( 3000318, 1 ) --쥬얼리메이스
set_flag( "q18", "1")
-- 테이머
elseif job == 203 then
insert_item( 3000318, 1 ) --쥬얼리메이스
set_flag( "q18", "1")
-- 스트라이더
elseif job == 301 then
insert_item( 3000302, 1 ) --파염
insert_item( 3000302, 1 ) --파염
insert_item( 3000310, 1 ) --그레이트보우
set_flag( "q18", "1")
-- 매지션
elseif job == 302 then
insert_item( 3000322, 1 ) --크리스탈스태프
set_flag( "q18", "1")
-- 서모너
elseif job == 303 then
insert_item( 3000388, 1 ) --어둠의손길
set_flag( "q18", "1")
-- 투사
elseif job == 101 then
insert_item( 3000389, 1 ) --블러디엑스
insert_item( 3000389, 1 ) --블러디엑스
insert_item( 3000306, 1 ) --레인져보우
set_flag( "q18", "1")
-- 주술사
elseif job == 102 then
insert_item( 3000390, 1 ) --자이언트엑스
set_flag( "q18", "1")
-- 야수사
elseif job == 103 then
insert_item( 3000389, 1 ) --블러디엑스
insert_item( 3000389, 1 ) --블러디엑스
set_flag( "q18", "1")
--정상적인 전직 진행을 한 유저들은 아래와 같이
--2차전직한 직업을 가지고 있다.
-- 나이트
elseif job == 210 then
insert_item( 3000302, 1 ) --파염
set_flag( "q18", "1")
-- 워리어
elseif job == 211 then
insert_item( 3000397, 1 ) --바스타드소드
set_flag( "q18", "1")
-- 메이지
elseif job == 212 then
insert_item( 3000318, 1 ) --쥬얼리메이스
set_flag( "q18", "1")
-- 프리스트
elseif job == 213 then
insert_item( 3000318, 1 ) --쥬얼리메이스
set_flag( "q18", "1")
-- 브리더
elseif job == 214 then
insert_item( 3000318, 1 ) --쥬얼리메이스
set_flag( "q18", "1")
-- 어쌔신
elseif job == 310 then
insert_item( 3000302, 1 )
insert_item( 3000302, 1 ) --파염2개대여
set_flag( "q18", "1")
-- 레인저
elseif job == 311 then
insert_item( 3000310, 1 ) --그레이트보우
set_flag( "q18", "1")
-- 소서러
elseif job == 312 then
insert_item( 3000322, 1 ) --크리스탈스태프
set_flag( "q18", "1")
-- 다크매지션
elseif job == 313 then
insert_item( 3000322, 1 )
set_flag( "q18", "1")
-- 배틀서모너
elseif job == 314 then
insert_item( 3000388, 1 ) --어둠의손길
set_flag( "q18", "1")
-- 전사
elseif job == 110 then
insert_item( 3000389, 1 )
insert_item( 3000389, 1 ) --블러디엑스2개대여
set_flag( "q18", "1")
-- 궁사
elseif job == 111 then
insert_item( 3000306, 1 ) --레인져보우
set_flag( "q18", "1")
-- 마도사
elseif job == 112 then
insert_item( 3000390, 1 ) --자이언트엑스
set_flag( "q18", "1")
-- 마투사
elseif job == 113 then
insert_item( 3000390, 1 ) --자이언트엑스
set_flag( "q18", "1")
-- 마수사
elseif job == 114 then
insert_item( 3000389, 1 )
insert_item( 3000389, 1 ) --블러디엑스2개대여
set_flag( "q18", "1")
else
return
end
elseif level >= 80 and level <= 99 then --랭크4무기대여
-- 나이트
if job == 210 then
insert_item( 3000303, 1 ) --소브오브빅토리
set_flag( "q18", "1")
-- 워리어
elseif job == 211 then
insert_item( 3000398, 1 ) --익스큐터너
set_flag( "q18", "1")
-- 메이지, 프리스트
elseif job == 212 or job == 213 then
insert_item( 3000319, 1 ) --해머
set_flag( "q18", "1")
-- 브리더
elseif job == 214 then
insert_item( 3000319, 1 ) --해머
set_flag( "q18", "1")
-- 어쌔신
elseif job == 310 then
insert_item( 3000303, 1 )
insert_item( 3000303, 1 ) --소드오브빅토리2개대여
set_flag( "q18", "1")
-- 레인저
elseif job == 311 then
insert_item( 3000311, 1 ) --마크보우
set_flag( "q18", "1")
-- 소서러, 다크매지션
elseif job == 312 or job == 313 then
insert_item( 3000323, 1 ) --라운드스태프
set_flag( "q18", "1")
-- 배틀서모너
elseif job == 314 then
insert_item( 3000391, 1 ) --쏘우
set_flag( "q18", "1")
-- 전사
elseif job == 110 then
insert_item( 3000392, 1 )
insert_item( 3000392, 1 ) --썬더엑스2개대여
set_flag( "q18", "1")
-- 궁사
elseif job == 111 then
insert_item( 3000307, 1 ) --자이언트보우
set_flag( "q18", "1")
-- 마도사, 마투사
elseif job == 112 or job == 113 then
insert_item( 3000315, 1 ) --그레이트액스
set_flag( "q18", "1")
-- 마수사
elseif job == 114 then
insert_item( 3000392, 1 )
insert_item( 3000392, 1 ) --썬더액스2개대여
set_flag( "q18", "1")
else
return
end
elseif level >= 100 and level <= 119 then --랭크5무기대여
-- 나이트
if job == 210 then
insert_item( 3000304, 1 ) --베오울프
set_flag( "q18", "1")
-- 워리어
elseif job == 211 then
insert_item( 3000399, 1 ) --일룬
set_flag( "q18", "1")
-- 메이지, 프리스트
elseif job == 212 or job == 213 then
insert_item( 3000320, 1 ) --메테오로이달커젤
set_flag( "q18", "1")
-- 브리더
elseif job == 214 then
insert_item( 3000320, 1 ) --메테오로이달커젤
set_flag( "q18", "1")
-- 어쌔신
elseif job == 310 then
insert_item( 3000304, 1 )
insert_item( 3000304, 1 ) --베오울프2개대여
set_flag( "q18", "1")
-- 레인저
elseif job == 311 then
insert_item( 3000312, 1 ) --그랜드크로스보우
set_flag( "q18", "1")
-- 소서러, 다크매지션
elseif job == 312 or job == 313 then
insert_item( 3000324, 1 ) --스태프오브세이지
set_flag( "q18", "1")
-- 배틀서모너
elseif job == 314 then
insert_item( 3000393, 1 ) --트위스트대거
set_flag( "q18", "1")
-- 전사
elseif job == 110 then
insert_item( 3000394, 1 )
insert_item( 3000394, 1 ) --질풍의도끼2개대여
set_flag( "q18", "1")
-- 궁사
elseif job == 111 then
insert_item( 3000308, 1 ) --크리티컬보우
set_flag( "q18", "1")
-- 마도사, 마투사
elseif job == 112 or job == 113 then
insert_item( 3000316, 1 ) --토네이도오브소울
set_flag( "q18", "1")
-- 마수사
elseif job == 114 then
insert_item( 3000394, 1 )
insert_item( 3000394, 1 ) --질풍의도끼2개대여
set_flag( "q18", "1")
else
return
end
elseif level >= 120 and level <= 170 then --랭크6무기대여
-- 나이트
if job == 210 then
insert_item( 3000401, 1 ) --프라가라흐
set_flag( "q18", "1")
-- 워리어
elseif job == 211 then
insert_item( 3000407, 1 ) --사인검
set_flag( "q18", "1")
-- 메이지, 프리스트
elseif job == 212 or job == 213 then
insert_item( 3000409, 1 ) --살가타너스
set_flag( "q18", "1")
-- 브리더
elseif job == 214 then
insert_item( 3000409, 1 ) --살가타너스
set_flag( "q18", "1")
-- 어쌔신
elseif job == 310 then
insert_item( 3000401, 1 )
insert_item( 3000401, 1 ) --프라가라흐2개대여
set_flag( "q18", "1")
-- 레인저
elseif job == 311 then
insert_item( 3000412, 1 ) --파멸의눈
set_flag( "q18", "1")
-- 소서러, 다크매지션
elseif job == 312 or job == 313 then
insert_item( 3000413, 1 ) --용의절규
set_flag( "q18", "1")
-- 배틀서모너
elseif job == 314 then
insert_item( 3000414, 1 ) --오리할콘
set_flag( "q18", "1")
-- 전사
elseif job == 110 then
insert_item( 3000415, 1 )
insert_item( 3000415, 1 ) --사신의도끼2개대여
set_flag( "q18", "1")
-- 궁사
elseif job == 111 then
insert_item( 3000416, 1 ) --바일런트게일
set_flag( "q18", "1")
-- 마도사, 마투사
elseif job == 112 or job == 113 then
insert_item( 3000417, 1 ) --굉뢰
set_flag( "q18", "1")
-- 마수사
elseif job == 114 then
insert_item( 3000415, 1 )
insert_item( 3000415, 1 ) --사신의도끼2개대여
set_flag( "q18", "1")
else
return
end
end
-- 다이얼로그 출력
dlg_title( "@90993000" )
dlg_text( "@90993007" )
-- 무기 지급 받았음)
set_flag( "q18", "1")
dlg_menu( "@90010002", " " )
dlg_show()
end
--데바
--디바인솔져 201
--클레릭 203
--브리더 204
--아수라
--스트라이더 301
--다크매지션 303
--소서러 304
--가이아
--투사 101
--주술사 103
--마수사 104
-- 방어구 지급
function second_present_armor()
-- 현재 직업 id를 받아놓는다.
local job = get_value( "job" )
-- 레벨 받아옴
local level = get_value( "level" )
if level <= 49 then --랭크2방어구대여
--캐릭터 레벨은 낮으나 2차직업을 가진 캐릭터들에 대한 예외처리로
--2차직업도 검색 조건에 포함시킨다.
-- 파이터, 나이트, 워리어
if job == 201 or job == 210 or job == 211 then
insert_item( 3000327, 1 ) --화이트메일
insert_item( 3000375, 1 ) --와일드레더슈즈
insert_item( 3000379, 1 ) --와일드레더글러브
insert_item( 3000367, 1 ) --헤비쉴드
insert_item( 3000383, 1 ) --우든헬멧
insert_item( 3000371, 1 ) --라이트벨트
set_flag( "q19", "1")
-- 클레릭, 메이지, 프리스트
elseif job == 202 or job == 212 or job == 213 then
insert_item( 3000345, 1 ) --화이트로브
insert_item( 3000375, 1 )
insert_item( 3000379, 1 )
insert_item( 3000383, 1 )
insert_item( 3000371, 1 )
set_flag( "q19", "1")
-- 테이머, 브리더
elseif job == 203 or job == 214 then
insert_item( 3000356, 1 ) --실버코트
insert_item( 3000375, 1 )
insert_item( 3000379, 1 )
insert_item( 3000383, 1 )
insert_item( 3000371, 1 )
set_flag( "q19", "1")
-- 스트라이더, 어쌔신, 레인저
elseif job == 301 or job == 310 or job == 311 then
insert_item( 3000325, 1 ) --라이트클로스
insert_item( 3000375, 1 )
insert_item( 3000379, 1 )
insert_item( 3000383, 1 )
insert_item( 3000371, 1 )
set_flag( "q19", "1")
-- 매지션, 소서러, 다크매지션
elseif job == 302 or job == 312 or job == 313 then
insert_item( 3000344, 1 ) --아수라로브
insert_item( 3000375, 1 )
insert_item( 3000379, 1 )
insert_item( 3000383, 1 )
insert_item( 3000371, 1 )
set_flag( "q19", "1")
-- 서모너, 배틀서모너
elseif job == 303 or job == 314 then
insert_item( 3000357, 1 ) --아수라코트
insert_item( 3000375, 1 )
insert_item( 3000379, 1 )
insert_item( 3000367, 1 ) --헤비쉴드
insert_item( 3000383, 1 )
insert_item( 3000371, 1 )
set_flag( "q19", "1")
-- 투사, 전사, 궁사
elseif job == 101 or job == 110 or job == 111 then
insert_item( 3000326, 1 ) --심혼의갑옷
insert_item( 3000375, 1 )
insert_item( 3000379, 1 )
insert_item( 3000383, 1 )
insert_item( 3000371, 1 )
set_flag( "q19", "1")
-- 주술사, 마도사, 마투사
elseif job == 102 or job == 112 or job == 113 then
insert_item( 3000343, 1 ) --심혼의법의
insert_item( 3000375, 1 )
insert_item( 3000379, 1 )
insert_item( 3000383, 1 )
insert_item( 3000371, 1 )
set_flag( "q19", "1")
-- 야수사, 마수사
elseif job == 103 or job == 114 then
insert_item( 3000355, 1 ) --가죽외투
insert_item( 3000375, 1 )
insert_item( 3000379, 1 )
insert_item( 3000383, 1 )
insert_item( 3000371, 1 )
set_flag( "q19", "1")
else
return
end
elseif level >= 50 and level <= 79 then --랭크3방어구대여
--무기와 마찬가지로 캐릭터 레벨은 높으나
--2차직업으로 전직하지 않은 유저를 위한 예외 처리이다.
-- 파이터
if job == 201 then
insert_item( 3000329, 1 ) --플래티넘아머
insert_item( 3000376, 1 ) --실키즈슈즈
insert_item( 3000380, 1 ) --실키즈글러브
insert_item( 3000368, 1 ) --강철의가호
insert_item( 3000384, 1 ) --본헬멧
insert_item( 3000372, 1 ) --그레이트벨트
set_flag( "q19", "1")
-- 클레릭
elseif job == 202 then
insert_item( 3000347, 1 ) --플래티넘로브
insert_item( 3000376, 1 ) --실키즈슈즈
insert_item( 3000380, 1 ) --실키즈글러브
insert_item( 3000384, 1 ) --본헬멧
insert_item( 3000372, 1 ) --그레이트벨트
set_flag( "q19", "1")
-- 테이머
elseif job == 203 then
insert_item( 3000358, 1 ) --플래티넘코트
insert_item( 3000376, 1 ) --실키즈슈즈
insert_item( 3000380, 1 ) --실키즈글러브
insert_item( 3000384, 1 ) --본헬멧
insert_item( 3000372, 1 ) --그레이트벨트
set_flag( "q19", "1")
-- 스트라이더
elseif job == 301 then
insert_item( 3000330, 1 ) --헬리쉬아머
insert_item( 3000338, 1 ) --헬리쉬타이즈
insert_item( 3000376, 1 ) --실키즈슈즈
insert_item( 3000380, 1 ) --실키즈글러브
insert_item( 3000384, 1 ) --본헬멧
insert_item( 3000372, 1 ) --그레이트벨트
set_flag( "q19", "1")
-- 매지션
elseif job == 302 then
insert_item( 3000348, 1 ) --헬리쉬가브
insert_item( 3000376, 1 ) --실키즈슈즈
insert_item( 3000380, 1 ) --실키즈글러브
insert_item( 3000384, 1 ) --본헬멧
insert_item( 3000372, 1 ) --그레이트벨트
set_flag( "q19", "1")
-- 서모너
elseif job == 303 then
insert_item( 3000359, 1 ) --헬리쉬코트
insert_item( 3000376, 1 ) --실키즈슈즈
insert_item( 3000380, 1 ) --실키즈글러브
insert_item( 3000368, 1 ) --강철의가호
insert_item( 3000384, 1 ) --본헬멧
insert_item( 3000372, 1 ) --그레이트벨트
set_flag( "q19", "1")
-- 투사
elseif job == 101 then
insert_item( 3000328, 1 ) --맹세의갑옷
insert_item( 3000337, 1 ) --맹세의수렵복
insert_item( 3000376, 1 ) --실키즈슈즈
insert_item( 3000380, 1 ) --실키즈글러브
insert_item( 3000384, 1 ) --본헬멧
insert_item( 3000372, 1 ) --그레이트벨트
set_flag( "q19", "1")
-- 주술사
elseif job == 102 then
insert_item( 3000346, 1 ) --대자연의법의
insert_item( 3000376, 1 ) --실키즈슈즈
insert_item( 3000380, 1 ) --실키즈글러브
insert_item( 3000384, 1 ) --본헬멧
insert_item( 3000372, 1 ) --그레이트벨트
set_flag( "q19", "1")
-- 야수사
elseif job == 103 then
insert_item( 3000360, 1 ) --환술의사포
insert_item( 3000376, 1 ) --실키즈슈즈
insert_item( 3000380, 1 ) --실키즈글러브
insert_item( 3000384, 1 ) --본헬멧
insert_item( 3000372, 1 ) --그레이트벨트
set_flag( "q19", "1")
--아래 직업은 2차전직을 한 상태의 유저들에게
--적용하는 아이템들이다. 내용은 1차전직을 한 캐릭터와 동일하다.
-- 나이트
elseif job == 210 then
insert_item( 3000329, 1 ) --플래티넘아머
insert_item( 3000376, 1 ) --실키즈슈즈
insert_item( 3000380, 1 ) --실키즈글러브
insert_item( 3000368, 1 ) --강철의가호
insert_item( 3000384, 1 ) --본헬멧
insert_item( 3000372, 1 ) --그레이트벨트
set_flag( "q19", "1")
-- 워리어
elseif job == 211 then
insert_item( 3000329, 1 ) --플래티넘아머
insert_item( 3000376, 1 ) --실키즈슈즈
insert_item( 3000380, 1 ) --실키즈글러브
insert_item( 3000384, 1 ) --본헬멧
insert_item( 3000372, 1 ) --그레이트벨트
set_flag( "q19", "1")
-- 메이지, 프리스트
elseif job == 212 or job == 213 then
insert_item( 3000347, 1 ) --플래티넘로브
insert_item( 3000376, 1 )
insert_item( 3000380, 1 )
insert_item( 3000384, 1 )
insert_item( 3000372, 1 )
set_flag( "q19", "1")
-- 브리더
elseif job == 214 then
insert_item( 3000358, 1 ) --플래티넘코트
insert_item( 3000376, 1 )
insert_item( 3000380, 1 )
insert_item( 3000384, 1 )
insert_item( 3000372, 1 )
set_flag( "q19", "1")
-- 어쌔신
elseif job == 310 then
insert_item( 3000330, 1 ) --헬리쉬아머
insert_item( 3000376, 1 )
insert_item( 3000380, 1 )
insert_item( 3000384, 1 )
insert_item( 3000372, 1 )
set_flag( "q19", "1")
-- 레인저
elseif job == 311 then
insert_item( 3000338, 1 ) --헬리쉬타이즈
insert_item( 3000376, 1 )
insert_item( 3000380, 1 )
insert_item( 3000384, 1 )
insert_item( 3000372, 1 )
set_flag( "q19", "1")
-- 소서러, 다크매지션
elseif job == 312 or job == 313 then
insert_item( 3000348, 1 ) --헬리쉬가브
insert_item( 3000376, 1 )
insert_item( 3000380, 1 )
insert_item( 3000384, 1 )
insert_item( 3000372, 1 )
set_flag( "q19", "1")
-- 배틀서모너
elseif job == 314 then
insert_item( 3000359, 1 ) --헬리쉬코트
insert_item( 3000376, 1 )
insert_item( 3000380, 1 )
insert_item( 3000368, 1 ) --강철의가호
insert_item( 3000384, 1 )
insert_item( 3000372, 1 )
set_flag( "q19", "1")
-- 전사
elseif job == 110 then
insert_item( 3000328, 1 ) --맹세의갑옷
insert_item( 3000376, 1 )
insert_item( 3000380, 1 )
insert_item( 3000384, 1 )
insert_item( 3000372, 1 )
set_flag( "q19", "1")
-- 궁사
elseif job == 111 then
insert_item( 3000337, 1 ) --맹세의수렵복
insert_item( 3000376, 1 )
insert_item( 3000380, 1 )
insert_item( 3000384, 1 )
insert_item( 3000372, 1 )
set_flag( "q19", "1")
-- 마도사, 마투사
elseif job == 112 or job == 113 then
insert_item( 3000346, 1 ) --대자연의법의
insert_item( 3000376, 1 )
insert_item( 3000380, 1 )
insert_item( 3000384, 1 )
insert_item( 3000372, 1 )
set_flag( "q19", "1")
-- 마수사
elseif job == 114 then
insert_item( 3000360, 1 ) --환술의사포
insert_item( 3000376, 1 )
insert_item( 3000380, 1 )
insert_item( 3000384, 1 )
insert_item( 3000372, 1 )
set_flag( "q19", "1")
else
return
end
elseif level >= 80 and level <= 99 then --랭크4방어구대여
-- 나이트
if job == 210 then
insert_item( 3000333, 1 ) --홀리아머
insert_item( 3000377, 1 ) --스트라이더부츠
insert_item( 3000381, 1 ) --스트라이더글러브
insert_item( 3000369, 1 ) --엑셀런트쉴드
insert_item( 3000385, 1 ) --엑셀런트헬름
insert_item( 3000373, 1 ) --엑셀런트벨트
set_flag( "q19", "1")
-- 워리어
elseif job == 211 then
insert_item( 3000333, 1 ) --홀리아머
insert_item( 3000377, 1 ) --스트라이더부츠
insert_item( 3000381, 1 ) --스트라이더글러브
insert_item( 3000385, 1 ) --엑셀런트헬름
insert_item( 3000373, 1 ) --엑셀런트벨트
set_flag( "q19", "1")
-- 메이지, 프리스트
elseif job == 212 or job == 213 then
insert_item( 3000351, 1 ) --홀리로브
insert_item( 3000377, 1 )
insert_item( 3000381, 1 )
insert_item( 3000385, 1 )
insert_item( 3000373, 1 )
set_flag( "q19", "1")
-- 브리더
elseif job == 214 then
insert_item( 3000363, 1 ) --홀리코트
insert_item( 3000377, 1 )
insert_item( 3000381, 1 )
insert_item( 3000385, 1 )
insert_item( 3000373, 1 )
set_flag( "q19", "1")
-- 어쌔신
elseif job == 310 then
insert_item( 3000331, 1 ) --섀도우메일
insert_item( 3000377, 1 )
insert_item( 3000381, 1 )
insert_item( 3000385, 1 )
insert_item( 3000373, 1 )
set_flag( "q19", "1")
-- 레인저
elseif job == 311 then
insert_item( 3000339, 1 ) --섀도우타이즈
insert_item( 3000377, 1 )
insert_item( 3000381, 1 )
insert_item( 3000385, 1 )
insert_item( 3000373, 1 )
set_flag( "q19", "1")
-- 소서러, 다크매지션
elseif job == 312 or job == 313 then
insert_item( 3000349, 1 ) --섀도우가브
insert_item( 3000377, 1 )
insert_item( 3000381, 1 )
insert_item( 3000385, 1 )
insert_item( 3000373, 1 )
set_flag( "q19", "1")
-- 배틀서모너
elseif job == 314 then
insert_item( 3000361, 1 ) --섀도우코트
insert_item( 3000377, 1 )
insert_item( 3000381, 1 )
insert_item( 3000369, 1 ) --엑셀런트쉴드
insert_item( 3000385, 1 )
insert_item( 3000373, 1 )
set_flag( "q19", "1")
-- 전사
elseif job == 110 then
insert_item( 3000332, 1 ) --쌍두룡갑
insert_item( 3000377, 1 )
insert_item( 3000381, 1 )
insert_item( 3000385, 1 )
insert_item( 3000373, 1 )
set_flag( "q19", "1")
-- 궁사
elseif job == 111 then
insert_item( 3000340, 1 ) --쌍듀룡의비늘
insert_item( 3000377, 1 )
insert_item( 3000381, 1 )
insert_item( 3000385, 1 )
insert_item( 3000373, 1 )
set_flag( "q19", "1")
-- 마도사, 마투사
elseif job == 112 or job == 113 then
insert_item( 3000350, 1 ) --현자의법의
insert_item( 3000377, 1 )
insert_item( 3000381, 1 )
insert_item( 3000385, 1 )
insert_item( 3000373, 1 )
set_flag( "q19", "1")
-- 마수사
elseif job == 114 then
insert_item( 3000362, 1 ) --신비주술사의외투
insert_item( 3000377, 1 )
insert_item( 3000381, 1 )
insert_item( 3000385, 1 )
insert_item( 3000373, 1 )
set_flag( "q19", "1")
else
return
end
elseif level >= 100 and level <= 119 then --랭크5방어구대여
-- 나이트
if job == 210 then
insert_item( 3000334, 1 ) --사룡의갑주
insert_item( 3000378, 1 ) --루나레이드부츠
insert_item( 3000382, 1 ) --루나레이드글러브
insert_item( 3000370, 1 ) --에인션트쉴드
insert_item( 3000386, 1 ) --에인션트헬름
insert_item( 3000374, 1 ) --에인션트벨트
set_flag( "q19", "1")
-- 워리어
elseif job == 211 then
insert_item( 3000334, 1 ) --사룡의갑주
insert_item( 3000378, 1 ) --루나레이드부츠
insert_item( 3000382, 1 ) --루나레이드글러브
insert_item( 3000386, 1 ) --에인션트헬름
insert_item( 3000374, 1 ) --에인션트벨트
set_flag( "q19", "1")
-- 메이지, 프리스트
elseif job == 212 or job == 213 then
insert_item( 3000352, 1 ) --강철사신의로브
insert_item( 3000378, 1 )
insert_item( 3000382, 1 )
insert_item( 3000386, 1 )
insert_item( 3000374, 1 )
set_flag( "q19", "1")
-- 브리더
elseif job == 214 then
insert_item( 3000365, 1 ) --오리엔탈소울아머
insert_item( 3000378, 1 )
insert_item( 3000382, 1 )
insert_item( 3000386, 1 )
insert_item( 3000374, 1 )
set_flag( "q19", "1")
-- 어쌔신
elseif job == 310 then
insert_item( 3000334, 1 ) --사룡의갑주
insert_item( 3000378, 1 )
insert_item( 3000382, 1 )
insert_item( 3000386, 1 )
insert_item( 3000374, 1 )
set_flag( "q19", "1")
-- 레인저
elseif job == 311 then
insert_item( 3000341, 1 ) --용각의깃
insert_item( 3000378, 1 )
insert_item( 3000382, 1 )
insert_item( 3000386, 1 )
insert_item( 3000374, 1 )
set_flag( "q19", "1")
-- 소서러, 다크매지션
elseif job == 312 or job == 313 then
insert_item( 3000352, 1 ) --강철사신의로브
insert_item( 3000378, 1 )
insert_item( 3000382, 1 )
insert_item( 3000386, 1 )
insert_item( 3000374, 1 )
set_flag( "q19", "1")
-- 배틀서모너
elseif job == 314 then
insert_item( 3000365, 1 ) --오리엔탈소울아머
insert_item( 3000378, 1 )
insert_item( 3000382, 1 )
insert_item( 3000370, 1 ) --에인션트쉴드
insert_item( 3000386, 1 )
insert_item( 3000374, 1 )
set_flag( "q19", "1")
-- 전사
elseif job == 110 then
insert_item( 3000334, 1 ) --사룡의갑주
insert_item( 3000378, 1 )
insert_item( 3000382, 1 )
insert_item( 3000386, 1 )
insert_item( 3000374, 1 )
set_flag( "q19", "1")
-- 궁수
elseif job == 111 then
insert_item( 3000341, 1 ) --용각의깃
insert_item( 3000378, 1 )
insert_item( 3000382, 1 )
insert_item( 3000386, 1 )
insert_item( 3000374, 1 )
set_flag( "q19", "1")
-- 마도사, 마투사
elseif job == 112 or job == 113 then
insert_item( 3000352, 1 ) --강철사신의로브
insert_item( 3000378, 1 )
insert_item( 3000382, 1 )
insert_item( 3000386, 1 )
insert_item( 3000374, 1 )
set_flag( "q19", "1")
-- 마수사
elseif job == 114 then
insert_item( 3000365, 1 ) --오리엔탈소울아머
insert_item( 3000378, 1 )
insert_item( 3000382, 1 )
insert_item( 3000386, 1 )
insert_item( 3000374, 1 )
set_flag( "q19", "1")
else
return
end
elseif level >= 120 and level <= 170 then --랭크6방어구대여
-- 나이트
if job == 210 then
insert_item( 3000400, 1 ) --슈터블포트리스
insert_item( 3000402, 1 ) --제니셔리언부츠
insert_item( 3000403, 1 ) --제니셔리언글러브
insert_item( 3000404, 1 ) --윈드크러스트
insert_item( 3000405, 1 ) --가들리헬름
insert_item( 3000406, 1 ) --가들리벨트
set_flag( "q19", "1")
-- 워리어
elseif job == 211 then
insert_item( 3000400, 1 ) --슈터블포트리스
insert_item( 3000402, 1 ) --제니셔리언부츠
insert_item( 3000403, 1 ) --제니셔리언글러브
insert_item( 3000405, 1 ) --가들리헬름
insert_item( 3000406, 1 ) --가들리벨트
set_flag( "q19", "1")
-- 메이지, 프리스트
elseif job == 212 or job == 213 then
insert_item( 3000408, 1 ) --거절의도포
insert_item( 3000402, 1 ) --제니셔리언부츠
insert_item( 3000403, 1 ) --제니셔리언글러브
insert_item( 3000405, 1 ) --가들리헬름
insert_item( 3000406, 1 ) --가들리벨트
set_flag( "q19", "1")
-- 브리더
elseif job == 214 then
insert_item( 3000410, 1 ) --복종의포스아머
insert_item( 3000402, 1 ) --제니셔리언부츠
insert_item( 3000403, 1 ) --제니셔리언글러브
insert_item( 3000405, 1 ) --가들리헬름
insert_item( 3000406, 1 ) --가들리벨트
set_flag( "q19", "1")
-- 어쌔신
elseif job == 310 then
insert_item( 3000400, 1 ) --슈터블포트리스
insert_item( 3000402, 1 ) --제니셔리언부츠
insert_item( 3000403, 1 ) --제니셔리언글러브
insert_item( 3000405, 1 ) --가들리헬름
insert_item( 3000406, 1 ) --가들리벨트
set_flag( "q19", "1")
-- 레인저
elseif job == 311 then
insert_item( 3000411, 1 ) --슈츠오브헬리오스
insert_item( 3000402, 1 ) --제니셔리언부츠
insert_item( 3000403, 1 ) --제니셔리언글러브
insert_item( 3000405, 1 ) --가들리헬름
insert_item( 3000406, 1 ) --가들리벨트
set_flag( "q19", "1")
-- 소서러, 다크매지션
elseif job == 312 or job == 313 then
insert_item( 3000408, 1 ) --거절의도포
insert_item( 3000402, 1 ) --제니셔리언부츠
insert_item( 3000403, 1 ) --제니셔리언글러브
insert_item( 3000405, 1 ) --가들리헬름
insert_item( 3000406, 1 ) --가들리벨트
set_flag( "q19", "1")
-- 배틀서모너
elseif job == 314 then
insert_item( 3000410, 1 ) --복종의포스아머
insert_item( 3000402, 1 ) --제니셔리언부츠
insert_item( 3000403, 1 ) --제니셔리언글러브
insert_item( 3000404, 1 ) --윈드크러스트
insert_item( 3000405, 1 ) --가들리헬름
insert_item( 3000406, 1 ) --가들리벨트
set_flag( "q19", "1")
-- 전사
elseif job == 110 then
insert_item( 3000400, 1 ) --슈터블포트리스
insert_item( 3000402, 1 ) --제니셔리언부츠
insert_item( 3000403, 1 ) --제니셔리언글러브
insert_item( 3000405, 1 ) --가들리헬름
insert_item( 3000406, 1 ) --가들리벨트
set_flag( "q19", "1")
-- 궁사
elseif job == 111 then
insert_item( 3000411, 1 ) --슈츠오브헬리오스
insert_item( 3000402, 1 ) --제니셔리언부츠
insert_item( 3000403, 1 ) --제니셔리언글러브
insert_item( 3000405, 1 ) --가들리헬름
insert_item( 3000406, 1 ) --가들리벨트
set_flag( "q19", "1")
-- 마도사, 마투사
elseif job == 112 or job == 113 then
insert_item( 3000408, 1 ) --거절의도포
insert_item( 3000402, 1 ) --제니셔리언부츠
insert_item( 3000403, 1 ) --제니셔리언글러브
insert_item( 3000405, 1 ) --가들리헬름
insert_item( 3000406, 1 ) --가들리벨트
set_flag( "q19", "1")
-- 마수사
elseif job == 114 then
insert_item( 3000410, 1 ) --복종의포스아머
insert_item( 3000402, 1 ) --제니셔리언부츠
insert_item( 3000403, 1 ) --제니셔리언글러브
insert_item( 3000405, 1 ) --가들리헬름
insert_item( 3000406, 1 ) --가들리벨트
set_flag( "q19", "1")
else
return
end
end
-- 다이얼로그 출력
dlg_title( "@90993000" )
dlg_text( "@90993008" )
-- 무기 지급 받았음)
set_flag( "q19", "1")
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 레벨 업 도우미
--============================================================
function NPC_Second_level_up_contact()
local state_code = get_local_info()
if state_code == 8 or state_code == 128 then -- 독일, 프랑스
dlg_title( "@90993400" )
dlg_text( "@90993402" )
dlg_menu( "@90010175", "Second_level_up()" )
end
dlg_menu( "@90010002", " " )
dlg_show()
end
-- 기존 레벨 저장된 상태
function Second_level_up()
local level = get_value( "level" )
local max_achieved_level = get_flag( "q21" )
local is_quest_started = get_flag( "q22" )
local state_code = get_local_info()
if state_code == 8 or state_code == 128 then -- 독일, 프랑스
if max_achieved_level == "" then
max_achieved_level = 0
end
if is_quest_started == "" then
is_quest_started = 0
end
local current_achieve_level = ( math.floor( level / 10 ) + 1 ) * 10
-- 대화창 제목(npc 이름) 설정
dlg_title( "@90993400" )
-- 퀘스트 진행 중이 아닐 경우
if is_quest_started == 0 then
-- 지금까지 달성했던(퀘스트로) 최대 레벨보다 현재 달성 목표 레벨이 높다면 퀘스트 시작 가능
if current_achieve_level > max_achieved_level then
-- 퀘스트 시작 가능 안내(보상은 current_achieve_level에 따라서)
if current_achieve_level == 10 then
dlg_text( "@90993409" ) -- 10 레벨 보상 안내 및 10레벨 달성하셈
elseif current_achieve_level == 20 then
dlg_text( "@90993410" ) -- 20 레벨 보상 안내 및 20레벨 달성하셈
elseif current_achieve_level == 30 then
dlg_text( "@90993411" ) -- 30 레벨 보상 안내 및 30레벨 달성하셈
elseif current_achieve_level == 40 then
dlg_text( "@90993412" ) -- 40 레벨 보상 안내 및 40레벨 달성하셈
elseif current_achieve_level == 50 then
dlg_text( "@90993413" ) -- 50 레벨 보상 안내 및 50레벨 달성하셈
else
dlg_text( "@90993408" ) -- 이벤트 대상 레벨이 아님
dlg_menu( "@90010002", " " )
dlg_show()
return
end
-- 퀘스트 시작 상태 저장
set_flag( "q21", current_achieve_level )
set_flag( "q22", "1" )
else
-- 퀘스트를 이미 했거나 렙다한 경우
dlg_text( "@90993406" ) -- 현재 레벨대 달성 보상을 이미 받으셨네요. 다음 렙대로 업하고 오든가 집에 가셈
end
-- 퀘스트 진행 중인 경우
else
-- 목표 달성 레벨보다 현재 레벨이 높으면 완료
if max_achieved_level <= level then
insert_item( get_reward_item_of_level_up( max_achieved_level ), 1 ) -- 보상 상자 지급
-- 퀘스트 상태 저장
set_flag( "q22", "0" )
dlg_text( "@90993404" ) -- 추카추카 선물 받으셨삼
dlg_menu( "@90010175", "Second_level_up()" ) -- 다시 퀘스트 받기 체크
else
-- 목표 레벨보다 현재 레벨이 낮음
dlg_text( "@90993405" ) -- 아직 수련이 부족하구나~ 더 업하고 오거라
end
end
end
dlg_menu( "@90010002", " " )
dlg_show()
end
-- 캐릭터가 레벨업 했을 때 보상을 주는 이벤트.
function get_reward_item_of_level_up( achieve_level )
local state_code = get_local_info()
if state_code == 8 or state_code == 128 then -- 독일, 프랑스
if achieve_level == 10 then
return 2902146 -- 10 레벨 업 선물 상자<2009유럽레벨업이벤트>
elseif achieve_level == 20 then
return 2902147 -- 20 레벨 업 선물 상자<2009유럽레벨업이벤트>
elseif achieve_level == 30 then
return 2902148 -- 30 레벨 업 선물 상자<2009유럽레벨업이벤트>
elseif achieve_level == 40 then
return 2902149 -- 40 레벨 업 선물 상자<2009유럽레벨업이벤트>
elseif achieve_level == 50 then
return 2902150 -- 50 레벨 업 선물 상자<2009유럽레벨업이벤트>
end
else
return 0
end
end
----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
-------------------------------------흑 송 미 녀 이 벤 트 ------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
function NPC_darkwood_lady_contact()
dlg_title( "@90993801" )
dlg_text( "@90408502" )
dlg_menu( "@90993803", "darkwood_event_1()" )
dlg_menu( "@90010002", " " )
dlg_show()
end
function darkwood_event_1()
if get_value( "level" ) >= 15 then
open_popup("game.taiwan_darkwood_event_url", 1,0)
else
dlg_title( "@90993801" )
dlg_text( "@90993810" )
end
dlg_menu( "@90010002", " " )
dlg_show()
end
function darkwood_event_2()
-- 다이얼로그 출력
dlg_title( "@90993801" )
dlg_text( "@90993802" )
dlg_menu( "@90993806", "darkwood_point()" )
dlg_menu( "@90010003", " NPC_darkwood_lady_contact() " )
dlg_menu( "@90010002", " " )
dlg_show()
end
function darkwood_point()
local count1 = find_item( 2010262 )
local count2 = find_item( 2010263 )
local count3 = find_item( 2010264 )
local count4 = find_item( 2010265 )
local count5 = find_item( 2010266 )
if count1 >= 1 and count2 >= 1 and count3 >= 1 and count4 >= 1 and count5 >= 1 then
dlg_title( "@90993801" )
dlg_text( "@90993807" )
insert_item( 2010272, 1 )
delete_item( get_item_handle( 2010262), 1 )
delete_item( get_item_handle( 2010263), 1 )
delete_item( get_item_handle( 2010264), 1 )
delete_item( get_item_handle( 2010265), 1 )
delete_item( get_item_handle( 2010266), 1 )
else
dlg_title( "@90993801" )
dlg_text( "@90993808" )
end
dlg_menu( "@90010003", " darkwood_event_2() " )
dlg_menu( "@90010002", " " )
dlg_show()
end
----------------------------------------------------------------------------
----------------------------------------------------------------------------
------------------- 골든 위크 이벤트 npc (기존 단술/벚꽃 이벤트)------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
function NPC_golden_event_init()
cprint( "!찰떡 도매상" )
set_npc_name( "@90996900" )
end
function NPC_golden_event_contact()
dlg_title( "@90996901" )
dlg_text( "@90996902" )
-- 당신은 누구죠?
dlg_menu( "@90996907", 'golden_event_who_are_you()' )
-- 무엇을 도와드릴까요?
dlg_menu( "@90996908", 'golden_event_question()' )
-- 찰떡 주문서 교환
dlg_menu( "@90996909", 'golden_event_exchange()' )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
-- 당신은 누구?
function golden_event_who_are_you()
-- 다이얼로그 출력
dlg_title( "@90996901" )
dlg_text( "@90996903" )
--돌아가기
dlg_menu( "@90010003", 'NPC_golden_event_contact()' )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
-- 무엇을 도와드릴까요?
function golden_event_question()
-- 다이얼로그 출력
dlg_title( "@90996901" )
dlg_text( "@90996904" )
--돌아가기
dlg_menu( "@90010003", 'NPC_golden_event_contact()' )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
-- 찰떡 교환
function golden_event_exchange()
local item_count = find_item ( 2000258 )
item_handle = get_item_handle ( 2000258 )
if item_count >= 50 then
-- 찰떡 주문서 교환 성공시(6개의 정제된 조각 지급)
dlg_title( "@90996901" )
dlg_text( "@90996905" )
delete_item ( item_handle, 50 )
insert_item ( 2600001, 1 )
insert_item ( 2600002, 1 )
insert_item ( 2600003, 1 )
insert_item ( 2600004, 1 )
insert_item ( 2600005, 1 )
insert_item ( 2600006, 1 )
else
-- 찰떡 주문서 모자랄 경우
dlg_title( "@90996901" )
dlg_text( "@90996906" )
end
--돌아가기
dlg_menu( "@90010003", 'NPC_golden_event_contact()' )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
----------------------------------------------------------------------------
--------------linrey 퀘스트 테스트 용 임시 ---------------------------------
----------------------------------------------------------------------------
function NPC_linrey_test1_init()
cprint( "!linrey test" )
set_npc_name( "@90999241" )
end
function NPC_linrey_test1_contact()
-- 다이얼로그 출력
dlg_title( "@90999240" )
dlg_text( "@90999242" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 상인 오르니토<로밍 테스트>
--============================================================
function NPC_Quest_roaming_merchant_init()
cprint( "!선착장 경비병<좌> 가동" )
set_npc_name( "@90999039" )
end
function NPC_Quest_roaming_merchant_contact()
-- 다이얼로그 출력
dlg_title( "@90999040" )
dlg_text( "@90999041" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 나무꾼 트리슈
--============================================================
function NPC_Quest_firewood_Treeshoe_init()
cprint( "!나무꾼 트리슈 가동" )
set_npc_name( "@90999543" )
end
function NPC_Quest_firewood_Treeshoe_contact()
dlg_title( "@90999544" )
dlg_text( "@90999545" )
dlg_menu( "@90010002", " " )
dlg_show()
end
function Quest_Link_110_1()
local count = find_item( 1000051 )
if count == 0 then
insert_item( 1000051, 15 )
else
end
end
--============================================================
--=============== 마도사 케르바
--============================================================
function NPC_Quest_ascetic_kerva_init()
cprint( "!마도사 케르바 가동" )
set_npc_name( "@90999548" )
end
function NPC_Quest_ascetic_kerva_contact()
dlg_title( "@90999549" )
dlg_text( "@90999550" )
dlg_menu( "@90010002", " " )
dlg_show()
end
function Quest_Link_112_1()
local count = find_item( 1100305 )
if count == 0 then
insert_item( 1100305, 1 )
end
end
--============================================================
--=============== 붉은농장 쥬시
--============================================================
function NPC_mainquest_juicy_init()
cprint( "!붉은농장 쥬시 가동" )
set_npc_name( "@90999634" )
end
function NPC_mainquest_juicy_contact()
local gender = get_value('sex')
local state_level = get_state_level( 6007 )
local quest_progress1 = get_quest_progress( 2004 )
if quest_progress1 == 255 then
dlg_title( "@90999857" ) -- 상처입은 쥬시 다이얼로그 출력
dlg_text( "@90999858" )
else
dlg_title( "@90999635" )
if state_level == 1 then -- 홀드 상태인지를 체크(펜릴의 단검을 뽑아주다 걸린다.)
if gender == 2 then -- 남성일때
dlg_text( "@90999640" )
elseif gender == 1 then -- 여성일때
dlg_text( "@90999641" )
end
dlg_menu( "@90999655", "juicy_talkLink_2()" ) -- 조각을 뽑는다.
else
if gender == 2 then -- 남성일때
dlg_text( "@90999636" )
elseif gender == 1 then -- 여성일때
dlg_text( "@90999637" )
end
dlg_menu( "@90999638", "juicy_talkLink_1()" ) -- 붉은 머리 소녀에 대해 이야기힌다.
end
end -- 상처입은 쥬시
dlg_menu( "@90010002", " " )
dlg_show()
end
function juicy_talkLink_1()
dlg_title( "@90999635" )
dlg_text( "@90999639" )
dlg_menu( "@90010002", " " )
dlg_show()
end
-- 단검 뽑기를 도와준다.
function juicy_talkLink_2()
local gender = get_value('sex')
dlg_title( "@90999635" )
if gender == 2 then -- 남성일때
dlg_text( "@90999645" )
elseif gender == 1 then -- 여성일때
dlg_text( "@90999646" )
end
dlg_menu( "@90999638", "juicy_talkLink_2_1()" ) -- 붉은 머리 소녀에 대해 이야기힌다.
dlg_menu( "@90010002", " " )
dlg_show()
end
-- 단검 뽑기를 도와준다_2
function juicy_talkLink_2_1()
local gender = get_value('sex')
dlg_title( "@90999635" )
if gender == 2 then -- 남성일때
dlg_text( "@90999683" )
elseif gender == 1 then -- 여성일때
dlg_text( "@90999684" )
end
dlg_menu( "@90999686", "juicy_talkLink_2_1_1()" ) -- 내가 누구인지 물어본다.
dlg_menu( "@90010002", " " )
dlg_show()
end
-- 내가 누구인지 물어본다.
function juicy_talkLink_2_1_1()
dlg_title( "@90999635" )
dlg_text( "@90999687" )
local quest_progress10 = get_quest_progress(2001) -- 엘로힘 강인 한다리
if quest_progress10 == 0 then
dlg_menu( "@90999688", "juicy_talkLink_2_1_1_1()" ) -- 내가 누구인지 재차 물어본다.
end
dlg_menu( "@90010002", " " )
dlg_show()
end
-- 엘로힘 퀘스트 시작
function juicy_talkLink_2_1_1_1()
show_quest_info_without_npc( 2001 )
end
--============================================================
--=============== 펜릴 레인카스
--============================================================
function NPC_mainquest_rainkas_init()
cprint( "!펜릴 레인카스 가동" )
set_npc_name( "@90999647" )
end
function NPC_mainquest_rainkas_contact()
dlg_title( "@90999648" )
dlg_text( "@90999649" )
dlg_menu( "@90999650", "fenrir_talkLink_1()" ) -- 머리를 쓰다듬는다.
dlg_menu( "@90999651", "fenrir_talkLink_2()" ) -- 먹이를 준다.
dlg_menu( "@90010002", " " )
dlg_show()
end
function fenrir_talkLink_1() -- 머리를 쓰다듬는다.
cprint( "@90999653" )
add_state(6006, 1, 100)
end
function fenrir_talkLink_2() -- 먹이를 준다.
local item_fenrir_food = find_item ( 1000092 )
local item_fenrir_food_handle = get_item_handle ( 1000092 )
-- 먹이가 없을 경우
if item_fenrir_food == 0 or is_erasable_item( item_fenrir_food_handle ) == 0 then
cprint( "@90999652" )
else
dlg_title( "@90999648" )
dlg_text( "@90999654" )
delete_item( get_item_handle( 1000092 ), 1 )
dlg_menu( "@90999655", "fenrir_talkLink_2_1()" ) -- 단검을 뽑는다.
dlg_menu( "@90010002", " " )
dlg_show()
end
end
function fenrir_talkLink_2_1() -- 단검을 뽑는다.
dlg_title( "@90999648" )
dlg_text( "@90999656" )
add_state(6007, 1, 1500) -- 지속효과 홀드 레벨 1, 3초간 유효
dlg_menu( "@90010002", " " )
dlg_show()
end
--=====================================================================================
--=============== '엘로힘'의 자격: 강인한 다리
--=====================================================================================
--엘로힘의 자격:강인한 다리
function quest_start_2001()
add_field_prop( 30028, 300, 128707 + math.random(0, 100), 102013 + math.random(0, 100))
add_field_prop( 30028, 300, 126761 + math.random(0, 100), 100882 + math.random(0, 100))
add_field_prop( 30028, 300, 125554 + math.random(0, 100), 102645 + math.random(0, 100))
end
function quest_end_2001()
--엘로힘의 문장 카운트 구하기
local item_ellohimmark_count = find_item ( 1000086 )
if item_ellohimmark_count >= 1 then
for i = 0, 10 do
-- 엘로힘의 문장 남은 아이템 없애기
delete_item( get_item_handle( 1000086 ), item_ellohimmark_count )
end
end
end
function quest_end_2001_prop()
add_state( 1013, 3, 3000) -- 이동속도 증가( 10레벨 , 30초)
end
--=====================================================================================
--=============== '엘로힘'의 자격: 차가운 눈
--=====================================================================================
-- 엘로힘의 자격: 차가운 눈
function quest_start_2002()
local dice = math.random( 0, 1)
--local questflag01 = get_flag( "mainquest_warp" )
if dice == 0 then
set_flag( "mainquest_warp", "0")
elseif dice == 1 then
set_flag( "mainquest_warp", "1")
end
cprint( "@90999698" ) -- <#6DD67D>남쪽에서 워프게이트의 마력이 느껴진다.
end
--=====================================================================================
--=============== '엘로힘'의 자격: 차가운 눈 워프 게이트 수정
--=====================================================================================
-- 0이 정답인 프랍
function quest_start_2002_prop_redfarm_1()
local qwarpflag01 = get_flag( "mainquest_warp" )
local dice = math.random( 0, 1 )
if qwarpflag01 == 0 then
warp( 121277 + math.random(0,10) , 110241 + math.random(0,10) )
cprint( "@90999700" ) -- <#6DD67D>서쪽에서 워프게이트의 마력이 느껴진다.
elseif qwarpflag01 == 1 then
warp( 126572 + math.random(0,10) , 102406 + math.random(0,10) ) -- 다시 시작
cprint( "@90999698" ) -- <#6DD67D>남쪽에서 워프게이트의 마력이 느껴진다.
end
if dice == 0 then
set_flag( "mainquest_warp", "1")
elseif dice == 1 then
set_flag( "mainquest_warp", "0")
end
end
-- 1이 정답인 프랍
function quest_start_2002_prop_redfarm_2()
local qwarpflag01 = get_flag( "mainquest_warp" )
local dice = math.random( 0, 1 )
if qwarpflag01 == 1 then
warp( 121277 + math.random(0,10) , 110241 + math.random(0,10) )
cprint( "@90999700" ) -- <#6DD67D>서쪽에서 워프게이트의 마력이 느껴진다.
elseif qwarpflag01 == 0 then
warp( 126572 + math.random(0,10) , 102406 + math.random(0,10) ) -- 다시 시작
cprint( "@90999698" ) -- <#6DD67D>남쪽에서 워프게이트의 마력이 느껴진다.
end
if dice == 0 then
set_flag( "mainquest_warp", "1")
elseif dice == 1 then
set_flag( "mainquest_warp", "0")
end
end
-- 0이 정답인 프랍_여명의 과수원
function quest_start_2002_prop_fruit_1()
local qwarpflag02 = get_flag( "mainquest_warp" )
local dice = math.random( 0, 1 )
if qwarpflag02 == 0 then
warp( 141842 + math.random(0,10) , 134561 + math.random(0,10) )
cprint( "@90999697" ) -- <#6DD67D>언덕 위에서 워프게이트의 마력이 느껴진다.
elseif qwarpflag02 == 1 then
warp( 126572 + math.random(0,10) , 102406 + math.random(0,10) ) -- 다시 시작
cprint( "@90999698" ) -- <#6DD67D>남쪽에서 워프게이트의 마력이 느껴진다.
end
if dice == 0 then
set_flag( "mainquest_warp", "1")
elseif dice == 1 then
set_flag( "mainquest_warp", "0")
end
end
-- 1이 정답인 프랍_여명의 과수원
function quest_start_2002_prop_fruit_2()
local qwarpflag02 = get_flag( "mainquest_warp" )
local dice = math.random( 0, 1 )
if qwarpflag02 == 1 then
warp( 141842 + math.random(0,10) , 134561 + math.random(0,10) )
cprint( "@90999697" ) -- <#6DD67D>언덕 위에서 워프게이트의 마력이 느껴진다.
elseif qwarpflag02 == 0 then
warp( 126572 + math.random(0,10) , 102406 + math.random(0,10) ) -- 다시 시작
cprint( "@90999698" ) -- <#6DD67D>남쪽에서 워프게이트의 마력이 느껴진다.
end
if dice == 0 then
set_flag( "mainquest_warp", "1")
elseif dice == 1 then
set_flag( "mainquest_warp", "0")
end
end
-- 0이 정답인 프랍_세이렌 섬
function quest_start_2002_prop_siland_1()
local qwarpflag03 = get_flag( "mainquest_warp" )
local dice = math.random( 0, 1 )
if qwarpflag03 == 0 then
warp( 134442 + math.random(0,10) , 157208 + math.random(0,10) )
cprint( "@90999871" ) -- <#6DD66D>차가운 눈의 자격을 증명하였다.
cprint( "@90999699" ) -- <#6DD66D>폭포 수 방향의 냉철함의 영혼석을 탐색하자.
set_flag( "mainquest_warp", "3")
elseif qwarpflag03 == 1 then
warp( 126572 + math.random(0,10) , 102406 + math.random(0,10) ) -- 다시 시작
cprint( "@90999698" ) -- <#6DD67D>남쪽에서 워프게이트의 마력이 느껴진다.
if dice == 0 then
set_flag( "mainquest_warp", "1")
elseif dice == 1 then
set_flag( "mainquest_warp", "0")
end
end
end
-- 1이 정답인 프랍_세이렌 섬
function quest_start_2002_prop_siland_2()
local qwarpflag03 = get_flag( "mainquest_warp" )
local dice = math.random( 0, 1 )
if qwarpflag03 == 1 then
warp( 134442 + math.random(0,10) , 157208 + math.random(0,10) )
cprint( "@90999871" ) -- <#6DD66D>차가운 눈의 자격을 증명하였다.
cprint( "@90999699" ) -- <#6DD66D>폭포 수 방향의 냉철함의 영혼석을 탐색하자.
set_flag( "mainquest_warp", "3")
elseif qwarpflag03 == 0 then
warp( 126572 + math.random(0,10) , 102406 + math.random(0,10) ) -- 다시 시작
cprint( "@90999698" ) -- <#6DD67D>남쪽에서 워프게이트의 마력이 느껴진다.
if dice == 0 then
set_flag( "mainquest_warp", "1")
elseif dice == 1 then
set_flag( "mainquest_warp", "0")
end
end
end
-- 퀘스트 완료시 쥬시에게로 워프 : 냉철함의 영혼석 (요정의 숲)
function quest_end_2002()
local qwarpflag_end = get_flag( "mainquest_warp" )
local dice = math.random( 0, 1 )
--엘로힘의 목걸이 카운트 구하기
local item_ellohimnecklace_count = find_item ( 1000093 )
if qwarpflag_end == 3 then
warp( 126572 + math.random(0,10) , 102406 + math.random(0,10) )
if item_ellohimnecklace_count >= 1 then
for i = 0, 10 do
-- 엘로힘의 목걸이 남은 아이템 없애기
delete_item( get_item_handle( 1000093 ), item_ellohimnecklace_count )
end
end
-- 엘로힘의 목걸이 넣어주기
insert_item( 1000093, 1 )
else
warp( 126572 + math.random(0,10) , 102406 + math.random(0,10) )
cprint( "@90999698" ) -- <#6DD67D>남쪽에서 워프게이트의 마력이 느껴진다.
if dice == 0 then
set_flag( "mainquest_warp", "1")
elseif dice == 1 then
set_flag( "mainquest_warp", "0")
end
end
end
-----------------안쓰는거 같음-----------------
function quest_start_2002_1()
local dice = math.random( 0, 1)
warp( 121277 + math.random(0,10) , 110241 + math.random(0,10) )
-- 여명의 과수원 수정 워프게이트 좌측
if dice == 0 then
add_field_prop( 30030, 30, 120996 + math.random(0, 30), 110200 + math.random(0, 40) )
add_field_prop( 30032, 30, 121040 + math.random(0, 30), 110326 + math.random(0, 40) )
-- 여명의 과수원 수정 워프게이트 우측
elseif dice == 1 then
add_field_prop( 30032, 30, 120996 + math.random(0, 30), 110200 + math.random(0, 40) )
add_field_prop( 30030, 30, 121040 + math.random(0, 30), 110326 + math.random(0, 40) )
end
cprint( "@90999700" ) -- <#6DD67D>서쪽에서 워프게이트의 마력이 느껴진다.
end
function quest_start_2002_2()
local dice = math.random( 0, 1)
warp( 141842 + math.random(0,10) , 134561 + math.random(0,10) )
-- 세이렌 섬 수정 워프게이트 좌측
if dice == 0 then
add_field_prop( 30031, 30, 142343 + math.random(0, 30), 134663 + math.random(0, 50) )
add_field_prop( 30032, 30, 142357 + math.random(0, 30), 134476 + math.random(0, 50) )
-- 세이렌 섬 수정 워프게이트 우측
elseif dice == 1 then
add_field_prop( 30032, 30, 142343 + math.random(0, 30), 134663 + math.random(0, 50) )
add_field_prop( 30031, 30, 142357 + math.random(0, 30), 134476 + math.random(0, 50) )
end
cprint( "@90999697" ) -- <#6DD67D>언덕 위에서 워프게이트의 마력이 느껴진다.
end
function quest_start_2002_3()
warp( 134442 + math.random(0,10) , 157208 + math.random(0,10) )
add_field_prop( 30027, 30, 126537 + math.random(0, 30), 102257 + math.random(0, 50) )
cprint( "@90999871" ) -- <#6DD66D>폭포 수 방향에서 마나의 흐름이 느껴진다.
cprint( "@90999699" ) -- <#6DD66D>엘로힘 마력이 느껴진다. 영혼석을 탐색하자.
end
-- 퀘스트 프랍 무저갱 행(퀘스트 실패)
function quest_start_2002_end()
warp( 126572 + math.random(0,10) , 102406 + math.random(0,10) )
-- 처음으로 다시 돌아왔다.
local dice = math.random( 0, 1)
-- 붉은 농장 수정 워프게이트 좌측
if dice == 0 then
add_field_prop( 30029, 30, 126537 + math.random(0, 30), 102257 + math.random(0, 30) )
add_field_prop( 30032, 30, 126621 + math.random(0, 30), 102258 + math.random(0, 30) )
-- 붉은 농장 수정 워프게이트 우측
elseif dice == 1 then
add_field_prop( 30032, 30, 126537 + math.random(0, 30), 102257 + math.random(0, 30) )
add_field_prop( 30029, 30, 126621 + math.random(0, 30), 102258 + math.random(0, 30) )
end
cprint( "@90999698" ) -- <#6DD67D>남쪽에서 워프게이트의 마력이 느껴진다.
end
-----------------안쓰는거 같음-----------------
-- 퀘스트 완료시 쥬시에게로 워프
function quest_end_2005()
warp( 126572 + math.random(0,10) , 102406 + math.random(0,10) )
end
-- 퀘스트 완료시 쥬시에게로 워프
function quest_end_2006()
warp( 126572 + math.random(0,10) , 102406 + math.random(0,10) )
end
-- 퀘스트 완료시 쥬시에게로 워프
function quest_end_2007()
warp( 126572 + math.random(0,10) , 102406 + math.random(0,10) )
end
--=====================================================================================
--=============== 메인 퀘스트 etc
--=====================================================================================
-- 쥬시 복수하기 (광신도 암살자)
function quest_start_2004_end()
cprint( "@90999870" ) -- <#6DD66D>급격한 마나의 흐름으로 데미지를 입었습니다.
-- 지속효과 부여 => add_state( 지속효과ID, 레벨, 시간 )
add_state( 12602, 30, 60000) -- 정신통일(크리티컬 증가) 10레벨
add_state( 6004, 5, 30000) -- 출혈(무속성 지속데미지) 5레벨
--show_quest_info_without_npc( 2008 )
end
-- 대륙의 과거 무녀제이나에게 워프
function quest_start_2005()
warp( 120321 + math.random(0,10) , 72102 + math.random(0,10) )
end
-- 대륙의 과거 사막지기 엘레노에게 워프
function quest_start_2006()
warp( 120752 + math.random(0,10) , 86799 + math.random(0,10) )
end
-- 대륙의 과거 엘로힘 시아페에게 워프
function quest_start_2007()
warp( 127542 + math.random(0,10) , 121326 + math.random(0,10) )
end
-- 광신도 암살자 진행을 위한 힌트
function quest_end_2008()
cprint("@90999877") --<<#6DD66D>대륙의 광신도를 무찌르자. 광신도의 정보를 얻기 위해 마을로 가자.
cprint("@90999878") --<#6DD66D>사람들은 쥬시의 정체는 모르더라도 광신도에 대해서는 알 것이다. 미래를 예언하는 소녀 쥬시의 원수!
--cprint("@90999726") --<#6DD66D>(외침) 엄청난 마법이다. 마법 실험지 북쪽에 엄청난 마력의 마녀가 부활했다!
del_flag( "mainquest_warp" )
end
-- 반스치 만나기 워프
function quest_start_2014_end()
warp( 109354 + math.random(10,20) , 71864 + math.random(10,20) )
end
-- 하인젤워커 만나기 워프
function quest_start_2016_end()
warp( 132678 + math.random(10,20) , 140055 + math.random(10,20) )
end
-- 마녀 부활의 외침들
function quest_end_2017()
cprint("@90999739") --<#6DD66D>(외침)마녀가 나타났다! 마녀가 부활했다! 으악~ 살려줘!
cprint("@90999725") --<#6DD66D>(외침) 마법 실험지에 마녀가 나타났어! 실험지 북쪽이다!
cprint("@90999726") --<#6DD66D>(외침) 엄청난 마법이다. 마법 실험지 북쪽에 엄청난 마력의 마녀가 부활했다!
end
-- 마법 실험지 몬스터 리젠
--[[ function quest_start_2017_start()
--local dice = math.random( 0, 3)
-- 광신도 소환
add_npc( 131766 + math.random( 10, 50), 140998 + math.random( 10, 50), 85005, 1 + math.random( 0, 3) , 60000 )
add_npc( 131766 + math.random( 10, 50), 140998 + math.random( 10, 50), 85006, 1 + math.random( 0, 1) , 60000 )
add_npc( 130646 + math.random( 10, 50), 142164 + math.random( 10, 50), 85005, 1 + math.random( 0, 3) , 60000 )
add_npc( 130646 + math.random( 10, 50), 142164 + math.random( 10, 50), 85006, 1 + math.random( 0, 1) , 60000 )
add_npc( 132888 + math.random( 10, 50), 142000 + math.random( 10, 50), 85005, 1 + math.random( 0, 3) , 80000 )
add_npc( 132888 + math.random( 10, 50), 142000 + math.random( 10, 50), 85006, 1 + math.random( 0, 1) , 80000 )
add_npc( 132910 + math.random( 10, 50), 141977 + math.random( 10, 50), 85005, 1 + math.random( 0, 3) , 80000 )
add_npc( 132910 + math.random( 10, 50), 141977 + math.random( 10, 50), 85006, 1 + math.random( 0, 1) , 80000 )
add_npc( 131230 + math.random( 10, 50), 139236 + math.random( 10, 50), 85005, 1 + math.random( 0, 3) , 60000 )
add_npc( 131230 + math.random( 10, 50), 139236 + math.random( 10, 50), 85006, 1 + math.random( 0, 1) , 60000 )
add_npc( 130271 + math.random( 10, 50), 139426 + math.random( 10, 50), 85005, 1 + math.random( 0, 3) , 60000 )
add_npc( 130271 + math.random( 10, 50), 139426 + math.random( 10, 50), 85006, 1 + math.random( 0, 1) , 60000 )
--end
cprint( "@90999865" ) -- <#6DD66D>마녀의 어둠의 마나의 기운이 느껴진다. 마법실험지를 정화하자.
end ]]
-- 마법실험지 가짜마녀 리젠
function quest_start_2018_start()
cprint( "@90999879" ) -- <#6DD67D>마녀의 부활? 마법 실험지 북쪽이다!
--add_npc( 132678 + math.random(0, 10), 140055 + math.random(0, 10), 76006, 1, 180000 )
end
-- 루시앙 만나기 워프(마녀 부활 보고)
function quest_start_2019_start()
warp( 138903 + math.random(10,20) , 142444 + math.random(10,20) )
end
-- 광신도 출몰의 외침들
function quest_end_2019()
cprint("@90999772") --<#6DD66D>(외침)라크 시에 광신도가 나타났다는 전갈이옵니다!
cprint("@90999773") --<#6DD66D>(외침)호라이즌에도 광신도와 마녀가 나타났다는 전갈이옵니다!
cprint("@90999774") --<#6DD66D>(외침)카탄을 비롯한 가이아 대륙 곳곳에 광신도의 습격을 받았다는 전갈 이옵니다.
end
-- 페넌트 만나기(광신도 척결 선포, 상아탑 광신도 소탕)
function quest_start_2020_start()
warp( 121506 + math.random(10,20) , 152792 + math.random(10,20) )
end
-- 리처드 만나기 워프(어쌔신 길드 지원)
function quest_start_2022_start()
warp( 102577 + math.random(10,20) , 71378 + math.random(10,20) )
end
-- 루시앙 만나기 워프(어쌔신 길드 소탕 보고)
function quest_start_2024_end()
warp( 138903 + math.random(10,20) , 142444 + math.random(10,20) )
end
-- 헥토르 소환 워프
function quest_start_2025_start()
local quest_respawn_start = get_flag( "hectorspawn" )
set_flag( "hectorspawn", "0" )
warp( 120899 + math.random(10,20) , 73265 + math.random(10,20) )
-- 지역진입 카운트 초기화
--set_event_area_enter_count( 이벤트영역ID, get_event_area_enter_count( 이벤트영역ID ) - 1 )
set_event_area_enter_count( 70401, get_event_area_enter_count( 70401 ) - 1 )
set_event_area_enter_count( 70402, get_event_area_enter_count( 70402 ) - 1 )
set_event_area_enter_count( 70403, get_event_area_enter_count( 70403 ) - 1 )
set_event_area_enter_count( 70404, get_event_area_enter_count( 70404 ) - 1 )
set_event_area_enter_count( 70405, get_event_area_enter_count( 70405 ) - 1 )
set_event_area_enter_count( 70406, get_event_area_enter_count( 70406 ) - 1 )
set_event_area_enter_count( 70407, get_event_area_enter_count( 70407 ) - 1 )
end
-- 마녀사냥 지원 워프
function quest_start_2026_start()
warp( 138665 + math.random(10,20) , 75192 + math.random(10,20) )
--순백의 바스타드 소드 카운트 구하기
local item_whitesword_count = find_item ( 1000090 )
if item_whitesword_count >= 1 then
for i = 0, 10 do
-- 순백의 바스타드 소드 남은 아이템 없애기
delete_item( get_item_handle( 1000090 ), item_whitesword_count )
end
end
-- 순백의 바스타드 소드 넣어주기
insert_item( 1000090, 1 )
end
-- 마녀사냥 워프게이트 생성
function quest_start_2027()
--add_field_prop( 30040, 180, 139305 + math.random(1, 2), 73822 + math.random(1, 2) )
warp( 139541 + math.random(0,2) , 73447 + math.random(0,2) )
end
-- 마녀사냥 순백의 바스타드 소드 삭제
function quest_end_2027()
--순백의 바스타드 소드 카운트 구하기
local item_whitesword_count = find_item ( 1000090 )
if item_whitesword_count >= 1 then
for i = 0, 10 do
-- 순백의 바스타드 소드 남은 아이템 없애기
delete_item( get_item_handle( 1000090 ), item_whitesword_count )
end
end
del_flag( "hectorspawn" )
end
-- 마녀사냥 워프게이트 생성
function quest_start_2027_prop()
--add_field_prop( 30040, 180, 139305 + math.random(1, 2), 73822 + math.random(1, 2) )
warp( 139256 + math.random(0,2) , 73908 + math.random(0,2) ) --MohcenMaher, S.A
end
-- 레인카스 먹이 구하기
function quest_start_2028()
--warp( 138615 + math.random(10,20) , 75156 + math.random(10,20) )
end
-- 상아탑 광신도 리젠
--[[ function quest_start_2021_start()
add_npc( 119644 + math.random(0, 10), 156120 + math.random(0, 10), 81007, 1, 60000 )
add_npc( 119644 + math.random(0, 10), 156120 + math.random(0, 10), 81008, 2+ math.random( 0, 4), 60000 )
add_npc( 120394 + math.random(0, 20), 156403 + math.random(0, 20), 81009, 1+ math.random( 0, 3), 60000 )
add_npc( 120394 + math.random(0, 20), 156403 + math.random(0, 20), 81006, 5+ math.random( 0, 4), 60000 )
add_npc( 120762 + math.random(0, 50), 156596 + math.random(0, 50), 81008, 2+ math.random( 0, 4), 70000 )
add_npc( 120762 + math.random(0, 50), 156596 + math.random(0, 50), 81009, 1, 70000 )
add_npc( 121451 + math.random(0, 50), 155799 + math.random(0, 50), 81006, 4+ math.random( 0, 5), 70000 )
add_npc( 121451 + math.random(0, 50), 155799 + math.random(0, 50), 81007, 1+ math.random( 0, 3), 70000 )
add_npc( 121740 + math.random(0, 50), 154852 + math.random(0, 50), 81006, 5+ math.random( 0, 4), 80000 )
add_npc( 120892 + math.random(0, 50), 154332 + math.random(0, 50), 81008, 5+ math.random( 0, 4), 80000 )
end ]]
--어쌔신 길드 광신도 리젠
--[[ function quest_start_2023_start()
add_npc( 102720 + math.random(0, 10), 69459 + math.random(0, 10), 85006, 1, 70000 )
add_npc( 102720 + math.random(0, 20), 69459 + math.random(0, 20), 85008, 1, 70000 )
add_npc( 102720 + math.random(0, 50), 69459 + math.random(0, 50), 85005, 4+ math.random( 0, 3), 70000 )
add_npc( 102720 + math.random(0, 50), 69459 + math.random(0, 50), 85007, 3+ math.random( 0, 3), 70000 )
--add_npc( 102720 + math.random(0, 50), 69459 + math.random(0, 50), 85007, 4, 600 )
--add_npc( 102720 + math.random(0, 50), 69459 + math.random(0, 50), 85005, 5, 600 )
--add_npc( 101960 + math.random(0, 10), 69294 + math.random(0, 10), 85006, 1, 600 )
--add_npc( 101960 + math.random(0, 20), 69294 + math.random(0, 20), 85008, 1, 600 )
add_npc( 101960 + math.random(0, 50), 69294 + math.random(0, 50), 85005, 2+ math.random( 0, 3), 80000 )
add_npc( 101960 + math.random(0, 50), 69294 + math.random(0, 50), 85007, 3+ math.random( 0, 3), 80000 )
add_npc( 101960 + math.random(0, 50), 69294 + math.random(0, 50), 85007, 4+ math.random( 0, 3), 80000 )
add_npc( 101960 + math.random(0, 50), 69294 + math.random(0, 50), 85005, 5+ math.random( 0, 3), 80000 )
add_npc( 102570 + math.random(0, 10), 70130 + math.random(0, 10), 85006, 1+ math.random( 0, 2), 70000 )
add_npc( 102570 + math.random(0, 20), 70130 + math.random(0, 20), 85008, 1+ math.random( 0, 2), 70000 )
--add_npc( 102570 + math.random(0, 50), 70130 + math.random(0, 50), 85005, 2, 600 )
--add_npc( 102570 + math.random(0, 50), 70130 + math.random(0, 50), 85007, 3, 600 )
add_npc( 102570 + math.random(0, 50), 70130 + math.random(0, 50), 85007, 4+ math.random( 0, 3), 70000 )
add_npc( 102570 + math.random(0, 50), 70130 + math.random(0, 50), 85005, 5+ math.random( 0, 3), 70000 )
end ]]
--=====================================================================================
--=============== '엘로힘'의 자격: 영롱한 영혼
--=====================================================================================
function quest_start_2003()
--영롱한 백합 카운트 구하기
local item_lily_count = find_item ( 1000088 )
if item_lily_count >= 1 then
for i = 0, 10 do
-- 영롱한 백합 남은 아이템 제거
delete_item( get_item_handle( 1000088 ), item_lily_count )
end
end
-- 영롱한 백합 아이템 새로 넣어준다.
insert_item( 1000088, 1 )
-- 지역진입 카운트 초기화
--set_event_area_enter_count( 이벤트영역ID, get_event_area_enter_count( 이벤트영역ID ) - 1 )
set_event_area_enter_count( 70601, get_event_area_enter_count( 70601 ) - 1 )
set_event_area_enter_count( 70602, get_event_area_enter_count( 70602 ) - 1 )
set_event_area_enter_count( 70603, get_event_area_enter_count( 70603 ) - 1 )
set_event_area_enter_count( 70604, get_event_area_enter_count( 70604 ) - 1 )
set_event_area_enter_count( 70605, get_event_area_enter_count( 70605 ) - 1 )
set_event_area_enter_count( 70606, get_event_area_enter_count( 70606 ) - 1 )
set_event_area_enter_count( 70607, get_event_area_enter_count( 70607 ) - 1 )
set_event_area_enter_count( 70608, get_event_area_enter_count( 70608 ) - 1 )
end
function quest_end_2003()
--영롱한 백합 카운트 구하기
local item_lily_count = find_item ( 1000088 )
if item_lily_count >= 1 then
for i = 0, 10 do
-- 영롱한 백합 남은 아이템 제거
delete_item( get_item_handle( 1000088 ), item_lily_count )
end
cprint( "@90999849" ) -- <#6DD66D>영롱한 백합이 사라졌습니다.
end
end
function mainquest_region_redfarm_level1()
--local dice = math.random( 0, 3)
-- 붉은 농장 수정 워프게이트 좌측
--if dice == 0 then
--영롱한 백합 카운트 구하기
local item_lily_count = find_item ( 1000088 )
if item_lily_count >= 1 then
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 52014, 1 + math.random( 2, 6) , 60000 )
cprint( "@90999863" ) -- <#6DD67D>남쪽에서 워프게이트의 마력이 느껴진다.
else
cprint( "@90999876" ) -- <#6DD66D>영롱한 백합이 요정들의 관심을 모을 수 있습니다.
end
end
function quest_start_2015()
-- 지역진입 카운트 초기화
--set_event_area_enter_count( 이벤트영역ID, get_event_area_enter_count( 이벤트영역ID ) - 1 )
set_event_area_enter_count( 60401, get_event_area_enter_count( 60401 ) - 1 )
set_event_area_enter_count( 60402, get_event_area_enter_count( 60402 ) - 1 )
set_event_area_enter_count( 60403, get_event_area_enter_count( 60403 ) - 1 )
set_event_area_enter_count( 60404, get_event_area_enter_count( 60404 ) - 1 )
set_event_area_enter_count( 60405, get_event_area_enter_count( 60405 ) - 1 )
end
function mainquest_region_redfarm_level2()
-- 처음으로 다시 돌아왔다.
--local dice = math.random( 0, 3)
-- 붉은 농장 수정 워프게이트 좌측
--if dice == 0 then
--영롱한 백합 카운트 구하기
local item_lily_count = find_item ( 1000088 )
if item_lily_count >= 1 then
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 52014, 1 + math.random( 2, 6) , 60000 )
cprint( "@90999863" ) -- <#6DD67D>남쪽에서 워프게이트의 마력이 느껴진다.
else
cprint( "@90999876" ) -- <#6DD66D>영롱한 백합이 요정들의 관심을 모을 수 있습니다.
end
end
-- 헥토르 소환(화형터 지역)
function mainquest_region_pyresite_level1()
local dice = math.random( 0, 3)
local dice2 = math.random( 0, 3)
local quest_respawn02 = get_flag( "hectorspawn" )
if quest_respawn02 == 0 then
-- 광신도 소환
if dice == 0 or dice == 1 then
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85006, 1 + math.random( 2, 3) , 60000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85007, 1 + math.random( 1, 4) , 60000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85006, 1 + math.random( 2, 3) , 60000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85007, 1 + math.random( 1, 4) , 60000 )
cprint( "@90999864" ) -- <#6DD66D>광신도가 나타났다.
cprint( "@90999881" ) -- <#6DD67D>나를 찾으러 왔나? 나 헥토르를?
set_flag( "hectorspawn", "1" )
elseif dice == 2 then
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 86005, 1 , 120000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85006, 1 + math.random( 2, 3) , 60000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 86006, 1 + math.random( 1, 4) , 60000 )
cprint( "@90999880" ) -- <#6DD66D>헥토르의 도플갱어가 나타났습니다. 시간이 지나면 사라집니다.
cprint( "@90999882" ) -- <#6DD67D>헥토르의 사념이 담긴 도플갱어입니다.
set_flag( "hectorspawn", "7" )
elseif dice == 3 then
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 86006, 1 + math.random( 0, 3) , 60000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85006, 1 + math.random( 2, 3) , 60000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85007, 1 + math.random( 1, 4) , 60000 )
cprint( "@90999880" ) -- <#6DD66D>헥토르의 도플갱어가 나타났습니다. 시간이 지나면 사라집니다.
set_flag( "hectorspawn", "2" )
end
elseif quest_respawn02 == 1 then
if dice2 == 0 then
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 86005, 1 , 120000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85006, 1 + math.random( 2, 3) , 60000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 86006, 1 + math.random( 1, 4) , 60000 )
cprint( "@90999880" ) -- <#6DD66D>헥토르의 도플갱어가 나타났습니다. 시간이 지나면 사라집니다.
cprint( "@90999882" ) -- <#6DD67D>헥토르의 사념이 담긴 도플갱어입니다.
set_flag( "hectorspawn", "7" )
elseif dice2 == 1 or dice2 == 2 or dice2 == 3 then
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 86006, 1 + math.random( 0, 3) , 60000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85006, 1 + math.random( 2, 3) , 60000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85007, 1 + math.random( 1, 4) , 60000 )
cprint( "@90999880" ) -- <#6DD66D>헥토르의 도플갱어가 나타났습니다. 시간이 지나면 사라집니다.
set_flag( "hectorspawn", "2" )
end
elseif quest_respawn02 == 2 then
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 86005, 1 , 120000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85006, 1 + math.random( 2, 3) , 60000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 86006, 1 + math.random( 1, 4) , 60000 )
cprint( "@90999880" ) -- <#6DD66D>헥토르의 도플갱어가 나타났습니다. 시간이 지나면 사라집니다.
cprint( "@90999882" ) -- <#6DD67D>헥토르의 사념이 담긴 도플갱어입니다.
set_flag( "hectorspawn", "7" )
end
end
-- 헥토르 소환(화형터 지역)
function mainquest_region_pyresite_level2()
local dice = math.random( 0, 3)
local dice2 = math.random( 0, 3)
local quest_respawn02 = get_flag( "hectorspawn" )
if quest_respawn02 == 0 then
-- 광신도 소환
if dice == 0 or dice == 1 then
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85006, 1 + math.random( 2, 3) , 60000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85007, 1 + math.random( 1, 4) , 60000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85006, 1 + math.random( 2, 3) , 60000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85007, 1 + math.random( 1, 4) , 60000 )
cprint( "@90999864" ) -- <#6DD66D>광신도가 나타났다.
cprint( "@90999881" ) -- <#6DD67D>나를 찾으러 왔나? 나 헥토르를?
set_flag( "hectorspawn", "1" )
elseif dice == 2 then
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 86005, 1 , 120000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85006, 1 + math.random( 2, 3) , 60000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 86006, 1 + math.random( 1, 4) , 60000 )
cprint( "@90999880" ) -- <#6DD66D>헥토르의 도플갱어가 나타났습니다. 시간이 지나면 사라집니다.
cprint( "@90999882" ) -- <#6DD67D>헥토르의 사념이 담긴 도플갱어입니다.
set_flag( "hectorspawn", "7" )
elseif dice == 3 then
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 86006, 1 + math.random( 0, 3) , 60000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85006, 1 + math.random( 2, 3) , 60000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85007, 1 + math.random( 1, 4) , 60000 )
cprint( "@90999880" ) -- <#6DD66D>헥토르의 도플갱어가 나타났습니다. 시간이 지나면 사라집니다.
set_flag( "hectorspawn", "2" )
end
elseif quest_respawn02 == 1 then
if dice2 == 0 then
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 86005, 1 , 120000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85006, 1 + math.random( 2, 3) , 60000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 86006, 1 + math.random( 1, 4) , 60000 )
cprint( "@90999880" ) -- <#6DD66D>헥토르의 도플갱어가 나타났습니다. 시간이 지나면 사라집니다.
cprint( "@90999882" ) -- <#6DD67D>헥토르의 사념이 담긴 도플갱어입니다.
set_flag( "hectorspawn", "7" )
elseif dice2 == 1 or dice2 == 2 or dice2 == 3 then
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 86006, 1 + math.random( 0, 3) , 60000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85006, 1 + math.random( 2, 3) , 60000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85007, 1 + math.random( 1, 4) , 60000 )
cprint( "@90999880" ) -- <#6DD66D>헥토르의 도플갱어가 나타났습니다. 시간이 지나면 사라집니다.
set_flag( "hectorspawn", "2" )
end
elseif quest_respawn02 == 2 then
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 86005, 1 , 120000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 85006, 1 + math.random( 2, 3) , 60000 )
add_npc( get_value( "x" ) + math.random( 10, 50), get_value( "y" ) + math.random( 10, 50), 86006, 1 + math.random( 1, 4) , 60000 )
cprint( "@90999880" ) -- <#6DD66D>헥토르의 도플갱어가 나타났습니다. 시간이 지나면 사라집니다.
cprint( "@90999882" ) -- <#6DD67D>헥토르의 사념이 담긴 도플갱어입니다.
set_flag( "hectorspawn", "7" )
end
end
-- 마녀의 흔적(사이라그 폐허)
function mainquest_region_siragruins_level1()
--local dice = math.random( 0, 3)
-- 광신도 소환
--if dice == 0 or dice == 1 or dice == 2 then
add_npc( get_value( "x" ) + math.random( 5, 25), get_value( "y" ) + math.random( 5, 25), 75007, 1 + math.random( 2, 5) , 60000 )
add_npc( get_value( "x" ) + math.random( 5, 25), get_value( "y" ) + math.random( 5, 25), 77010, 1 + math.random( 1, 5) , 60000 )
cprint( "@90999875" ) -- <#6DD66D> 몬스터가 나타났다.
--end
end
function mainquest_item_lily()
--add_npc( 126590 + math.random(0, 10), 102545 + math.random(0, 10), 1004, 1 + math.random(0, 5))
end
-- 지속효과 부여 => add_state( 지속효과ID, 레벨, 시간 )
function mainquest_item_whitesword()
add_state( 1003, 10, 30000 ) --( HP재생률 향상, 10레벨, 5분)
add_state( 1001, 10, 300 ) --( MAX HP 증가, 10레벨, 5분)
cprint( "@90999855" ) -- <#6DD66D>순백의 바스타드에서 성스러운 기운이 퍼집니다.
end
--============================================================
--=============== 마을사람 데바 남
--============================================================
function NPC_mainquest_dem__init()
cprint( "!마을사람 데바 남 가동" )
set_npc_name( "@90999039" )
end
function NPC_mainquest_dem_contact()
-- 다이얼로그 출력
dlg_title( "@90999040" )
dlg_text( "@90999041" )
-- 대화 1?
dlg_menu( "@90999129", "lamiagirl_talkLink_1()" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 마을 주민 데바 여
--============================================================
function NPC_mainquest_def__init()
cprint( "!마을 주민 데바 여 가동" )
set_npc_name( "@90999039" )
end
function NPC_mainquest_def_contact()
-- 다이얼로그 출력
dlg_title( "@90999040" )
dlg_text( "@90999041" )
-- 대화 1?
dlg_menu( "@90999129", "lamiagirl_talkLink_1()" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 마을 주민 가이아 남
--============================================================
function NPC_mainquest_gam__init()
cprint( "!마을 주민 가이아 남 가동" )
set_npc_name( "@90999039" )
end
function NPC_mainquest_gam_contact()
-- 다이얼로그 출력
dlg_title( "@90999040" )
dlg_text( "@90999041" )
-- 대화 1?
dlg_menu( "@90999129", "lamiagirl_talkLink_1()" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 마을 주민 가이아 여
--============================================================
function NPC_mainquest_gaf__init()
cprint( "!마을 주민 가이아 여 가동" )
set_npc_name( "@90999039" )
end
function NPC_mainquest_gaf_contact()
-- 다이얼로그 출력
dlg_title( "@90999040" )
dlg_text( "@90999041" )
-- 대화 1?
dlg_menu( "@90999129", "lamiagirl_talkLink_1()" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 마을 주민 아수라 남
--============================================================
function NPC_mainquest_asm__init()
cprint( "!마을 주민 아수라 남 가동" )
set_npc_name( "@90999039" )
end
function NPC_mainquest_asm_contact()
-- 다이얼로그 출력
dlg_title( "@90999040" )
dlg_text( "@90999041" )
-- 대화 1?
dlg_menu( "@90999129", "lamiagirl_talkLink_1()" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 마을 주민 아수라 여
--============================================================
function NPC_mainquest_asf__init()
cprint( "!마을 주민 아수라 여 가동" )
set_npc_name( "@90999039" )
end
function NPC_mainquest_asf_contact()
-- 다이얼로그 출력
dlg_title( "@90999040" )
dlg_text( "@90999041" )
-- 대화 1?
dlg_menu( "@90999129", "lamiagirl_talkLink_1()" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 마녀 사냥의 영웅 헥토르
--============================================================
function NPC_mainquest_hector_init()
cprint( "!마녀 사냥의 영웅 헥토르 가동" )
set_npc_name( "@90999850" )
end
function NPC_mainquest_hector_contact()
-- 다이얼로그 출력
dlg_title( "@90999851" )
dlg_text( "@90999852" )
--대화 헥토르의 정체
dlg_menu( "@90999853", "hector_talkLink_1()" )
-- 퀘스트 상태 체크 get_quest_progress(ID)
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 255 : 이미종료
local quest_progress3272 = get_quest_progress(3272) -- <(version:7.3)>[마스터]마스터 던전으로
local quest_progress3322 = get_quest_progress(3322) -- <(version:7.3)>[마스터]새로운 기운
local quest_progress3335 = get_quest_progress(3335) -- <(version:7.3)>[마스터]마지막 시련2
-- 퀘스트 종료시 대사
if quest_progress3272 == 255 then
-- 마스터 던전으로 이동
dlg_menu( "@91002085", 'warp( 17818, 40213, gv("layer") )' )
end
if quest_progress3335 == 255 then
dlg_menu( "@90010002", " " )
dlg_show()
elseif quest_progress3335 == 1 or quest_progress3335 == 2 then
dlg_menu( "@91002474" , "card_choose()" ) --넘긴다.
dlg_menu( "@90010002", " " )
dlg_show()
else
end
--마스터 클래스이면 TP 포인트에 대한 설명 추가
if get_value( "job_depth" ) == 3 then
--TP 포인트란?
dlg_menu( "@91002550", "tp_point()")
else
end
if get_value( "job_depth" ) == 2 and quest_progress3322 == 255 and get_value( "level" ) > 147 and get_value( "job_level" ) == 50 then
--좋아~ 마스터 사탄에게 보내주겠네
dlg_text( "@91002562" )
dlg_menu( "@91002561", "goto_master_satan()")
elseif get_value( "job_depth" ) == 3 then
dlg_menu( "@90010002", " " )
dlg_show()
elseif quest_progress3322 == 255 then
--아직이야! 더 자격을 갖추라고!
-- dlg_title( "@90999851" )
dlg_text( "@91002560")
else
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function goto_master_satan()
warp( 30651, 41454, gv("layer") )
end
function hector_talkLink_1()
-- 다이얼로그 출력
dlg_title( "@90999851" )
dlg_text( "@90999854" )
-- 대화종료
dlg_menu( "@90010003","NPC_mainquest_hector_contact()" ) -- 돌아가기
dlg_menu( "@90010002", " " )
dlg_show()
end
function tp_point()
-- 다이얼로그 출력
dlg_title( "@90999851" )
dlg_text( "@91002551" )
--특성 스킬이란?
dlg_menu( "@91002554", "tp_skill()")
-- 대화종료
dlg_menu( "@90010003","NPC_mainquest_hector_contact()" ) -- 돌아가기
dlg_menu( "@90010002", " " )
dlg_show()
end
function tp_skill()
-- 다이얼로그 출력
dlg_title( "@90999851" )
--TP 포인트 분배는 어쩌구 저쩌구
dlg_text( "@91002553" )
--상위 특성 스킬이란?
dlg_menu( "@91002556", "upper_tp_skill()")
-- 하위 특성 스킬이란?
dlg_menu( "@91002558", "lower_tp_skill()")
-- 대화종료
dlg_menu( "@90010003","tp_point()" ) -- 돌아가기
dlg_menu( "@90010002", " " )
dlg_show()
end
function upper_tp_skill()
-- 다이얼로그 출력
dlg_title( "@90999851" )
-- 상위 특성 스킬은 어쩌구 저쩌구
dlg_text( "@91002557" )
-- 대화종료
dlg_menu( "@90010003","tp_skill()" ) -- 돌아가기
dlg_menu( "@90010002", " " )
dlg_show()
end
function lower_tp_skill()
-- 다이얼로그 출력
dlg_title( "@90999851" )
-- 하위 특성 스킬은 어쩌구 저쩌구
dlg_text( "@91002559" )
-- 대화종료
dlg_menu( "@90010003","tp_skill()" ) -- 돌아가기
dlg_menu( "@90010002", " " )
dlg_show()
end
function quest_start_3334()
local quest_progress3335 = get_quest_progress(3335) -- <(version:7.3)>[마스터]마지막 시련2
if quest_progress3335 == 255 then
dlg_text( "@91002472" )
dlg_menu( "@90010002", " " ) -- 종료
dlg_show()
else
dlg_menu( "@90010002", " " ) -- 종료
dlg_show()
end
end
function quest_end_3334()
local talentp = get_value( 'tp' )
talentp = talentp + 1
set_value( "tp", talentp )
end
function quest_start_3335()
local quest_progress3334 = get_quest_progress(3334) -- <(version:7.3)>[마스터]마지막 시련1
local quest_progress3335 = get_quest_progress(3335) -- <(version:7.3)>[마스터]마지막 시련2
if quest_progress3334 == 255 then
dlg_text( "@91002472" )
dlg_menu( "@90010002", " " ) -- 종료
dlg_show()
else
dlg_menu( "@90010002", " " ) -- 종료
dlg_show()
end
end
function quest_end_3335()
local talentp = get_value( 'tp' )
talentp = talentp + 2
set_value( "tp", talentp )
dlg_text_without_quest_menu( "@91002477" )
dlg_menu( "@90010002", " " ) -- 종료
dlg_show()
end
function card_choose()
-- 다이얼로그 출력
dlg_title( "@90999851" )
-- 가지고 있는 스페셜 레어 카드 장수를 세고, 메뉴로 보여준다(켈베로스, 지니, 미스틱지니, 큐브)
local checked_card_id = { 540061, 540063, 540036, 540076 }
local existed_card_id = {}
local existed_card_count = 0
local found_item_handle = {}
local i, j
for i = 1, 4 do
found_item_handle = get_item_handle_list( checked_card_id[i] )
if found_item_handle ~= 0 then
for j =1, table.getn( found_item_handle ) do
existed_card_count = existed_card_count + 1
existed_card_id[existed_card_count] = checked_card_id[i]
end
else
end
end
-- 카드가 몇장 있구만! 어떤걸로 받치겠는가
if existed_card_count == 0 then
--크리처를 보긴 한건가?!
dlg_text_without_quest_menu( "@91002475" )
else
dlg_text_without_quest_menu( "@91002476" )
for i = 1, existed_card_count do
dlg_menu( tostring( get_item_name_by_code( existed_card_id[i] ) ), "card_delete(" .. existed_card_id[i] .. ")" )
end
end
dlg_menu( "@90010003","NPC_mainquest_hector_contact()" ) -- 돌아가기
dlg_show() -- 보이기
end
function card_delete( item_code )
if is_erasable_item ( get_item_handle( item_code ) ) == 0 then
--정말 자네가 편성한 크리처를 받칠 것인가?! 다시 생각해보게.
dlg_text_without_quest_menu( "@91002481" )
dlg_menu( "@90010003","NPC_mainquest_hector_contact()" )
dlg_show()
end
local success = delete_item( get_item_handle( item_code ), 1 )
if( success == 1 ) then
-- 성공
-- 퀘스트 완료 상태로 만들어줌
set_quest_status( 3335, 1, 1 )
dlg_text_without_quest_menu( "@91002482" )
cprint( '@91002483' )
dlg_menu( "@90010002", " " )
dlg_show()
else
-- 실패
end
end
--============================================================
--=============== 빛의 대교주 루시앙
--============================================================
function NPC_mainquest_rusian_init()
cprint( "!빛의 대교주 루시앙 가동" )
set_npc_name( "@90999765" )
end
function NPC_mainquest_rusian_contact()
-- 다이얼로그 출력
dlg_title( "@90999766" )
dlg_text( "@90999767" )
-- 대화 1?
--dlg_menu( "@90999129", "lamiagirl_talkLink_1()" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 사막지기 엘레노
--============================================================
function NPC_mainquest_eleno_init()
cprint( "!사막지기 엘레노" )
set_npc_name( "@90999720" )
end
function NPC_mainquest_eleno_contact()
-- 다이얼로그 출력
dlg_title( "@90999721" )
dlg_text( "@90999722" )
-- 대화 1?
--dlg_menu( "@90999129", "lamiagirl_talkLink_1()" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 교육관 반스치
--============================================================
function NPC_mainquest_vansch_init()
cprint( "!교육관 반스치" )
set_npc_name( "@90999727" )
end
function NPC_mainquest_vansch_contact()
-- 다이얼로그 출력
dlg_title( "@90999728" )
dlg_text( "@90999729" )
-- 대화 1?
--dlg_menu( "@90999129", "lamiagirl_talkLink_1()" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 교육관 하인젤워커
--============================================================
function NPC_mainquest_hwalker_init()
cprint( "!교육관 하인젤 워커" )
set_npc_name( "@90999734" )
end
function NPC_mainquest_hwalker_contact()
-- 다이얼로그 출력
dlg_title( "@90999735" )
dlg_text( "@90999736" )
-- 대화 1?
--dlg_menu( "@90999129", "lamiagirl_talkLink_1()" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 엘로힘 시아페
--============================================================
function NPC_mainquest_siape_init()
cprint( "!엘로힘 시아페" )
set_npc_name( "@90999758" )
end
function NPC_mainquest_siape_contact()
-- 다이얼로그 출력
dlg_title( "@90999759" )
dlg_text( "@90999760" )
-- 대화 1?
--dlg_menu( "@90999129", "lamiagirl_talkLink_1()" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 소탕군 사령관 페넌트
--============================================================
function NPC_mainquest_pennent_init()
cprint( "!소탕군 사령관 페넌트" )
set_npc_name( "@90999777" )
end
function NPC_mainquest_pennent_contact()
-- 다이얼로그 출력
dlg_title( "@90999778" )
dlg_text( "@90999779" )
-- 대화 1?
--dlg_menu( "@90999129", "lamiagirl_talkLink_1()" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 소탕군 사령관 리처드
--============================================================
function NPC_mainquest_richard_init()
cprint( "!소탕군 사령관 리처드" )
set_npc_name( "@90999785" )
end
function NPC_mainquest_richard_contact()
-- 다이얼로그 출력
dlg_title( "@90999786" )
dlg_text( "@90999787" )
-- 대화 1?
--dlg_menu( "@90999129", "lamiagirl_talkLink_1()" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
-- <ep7>간호대원 아가덴
function NPC_lost_island_agaden_contact()
-- 다이얼로그 출력
dlg_title("@91000687")
dlg_text( "@91000689" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
-- <ep7>설원 탐사대 데릭
function NPC_lost_island_derick_contact()
-- 다이얼로그 출력
dlg_title("@91000690")
dlg_text( "@91000692" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
-- <ep7>몬스터 연구원 시카
function quest_start_3041()
local count = find_item( 1000132)
if count == 0 then
insert_item( 1000130, 1 )
else
end
end
-- <ep7>몬스터 연구원 시카
function quest_end_3041()
local count = find_item( 1000132)
if count == 0 then
delete_item( 1000130, 1 )
else
end
end
-- <ep7>간호대원 아가덴
function quest_start_3054()
local count = find_item( 1000141)
if count == 0 then
insert_item( 1000141, 1 )
else
end
end
-- <ep7>간호대원 아가덴
function quest_end_3054()
local count = find_item( 1000141)
if count == 1 then
delete_item( get_item_handle(1000141), count )
else
end
end
-- <ep7>간호대원 아가덴
function quest_end_3051()
local count = find_item( 1000144)
if count == 1 then
delete_item( get_item_handle(1000144), count )
else
end
end
-- <ep7>봉인 해체(카이넨 퀘스트)
function quest_start_3069()
local count = find_item( 1000152)
if count == 0 then
insert_item( 1000152, 1 )
else
end
end
-- <ep7>몬스터 연구원 시카
function quest_end_3069()
local count = find_item( 1000152)
if count == 1 then
delete_item( get_item_handle(1000152), count )
else
end
end
-- <ep7>병사 캐치칸
function quest_start_3073()
local count = find_item( 1000122)
if count == 0 then
insert_item( 1000122, 1 )
else
end
end
-- <ep7>병사 캐치칸
function quest_end_3073()
local count = find_item( 1000122)
if count == 1 then
delete_item( get_item_handle(1000122), count )
else
end
end
-- <ep7>설원 탐사대 체샤
function NPC_lost_island_kodia_checha()
-- 다이얼로그 출력
dlg_title("@91000702")
dlg_text( "@91000703" )
dlg_menu( "@90010002", " " )
dlg_show()
end
-- <(version:7.2)> 신비한 광석1
function quest_start_3058()
local count = find_item( 1000146 )
if count == 0 then
insert_item( 1000146, 1 )
else
end
end
-- <(version:7.2)> 신비한 광석1
function quest_end_3058()
local count = find_item( 1000146)
if count == 1 then
delete_item( get_item_handle(1000146), 1 )
else
end
end
-- <(version:7.2)> 신비한 광석2
function quest_start_3059()
local count = find_item( 1000146)
if count == 0 then
insert_item( 1000146, 1 )
else
end
end
-- <(version:7.2)> 신비한 광석2
function quest_end_3059()
local count = find_item( 1000146)
if count == 1 then
delete_item( get_item_handle(1000146), 1 )
else
end
end
--============================================================
--=============== 탐사대장 케인
--============================================================
function NPC_lost_island_kain_init()
cprint( "!탐사대장 케인" )
set_npc_name( "@91000550" )
end
function NPC_lost_island_kain_contact()
-- 다이얼로그 출력
dlg_title( "@91000551" )
dlg_text( "@91000552" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 간호대원 루엘리
--============================================================
function NPC_lost_island_ruely_init()
cprint( "!간호대원 루엘리" )
set_npc_name( "@91000553" )
end
function NPC_lost_island_ruely_contact()
-- 다이얼로그 출력
dlg_title( "@91000554" )
dlg_text( "@91000555" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 탐사대원 치닉
--============================================================
function NPC_lost_island_chignik_init()
cprint( "!탐사대원 치닉" )
set_npc_name( "@91000559" )
end
function NPC_lost_island_chignik_contact()
-- 다이얼로그 출력
dlg_title( "@91000560" )
dlg_text( "@91000561" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 탐사대원 마르테즈
--============================================================
function NPC_lost_island_maldez_init()
cprint( "!탐사대원 마르테즈" )
set_npc_name( "@91000562" )
end
function NPC_lost_island_maldez_contact()
-- 다이얼로그 출력
dlg_title( "@91000563" )
dlg_text( "@91000564" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 용의 신관 에스터
--============================================================
function NPC_dragonservicer_easter_init()
cprint( "!용의 신관 에스터" )
set_npc_name( "@91001003" )
end
function NPC_dragonservicer_easter_contact()
-- 다이얼로그 출력
dlg_title( "@91001004" )
dlg_text( "@91001005" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 약초 채집가 발룬
--============================================================
function NPC_medicalherbcollector_balune_init()
cprint( "!약초 채집가 발룬" )
set_npc_name( "@91001006" )
end
function NPC_medicalherbcollector_balune_contact()
-- 다이얼로그 출력
dlg_title( "@91001007" )
dlg_text( "@91001008" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 여행자 실피느
--============================================================
function NPC_traveler_silpyne_init()
cprint( "!여행자 실피느" )
set_npc_name( "@91000994" )
end
function NPC_traveler_silpyne_contact()
-- 다이얼로그 출력
dlg_title( "@91000995" )
dlg_text( "@91000996" )
-- 퀘스트 상태 체크 get_quest_progress(ID)
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 255 : 이미종료
local quest_progress3263 = get_quest_progress(3263)
-- 퀘스트 종료시 대사
if quest_progress3263 == 0 then
local count = find_item( 1000114 )
if count == 0 then
cprint("@91002083")
insert_item( 1000114, 1 )
else
end
-- 퀘스트 수행 전,
elseif quest_progress3263 == 255 or quest_progress3263 == 0 or quest_progress3263 == -1 then
dlg_title( "@91000995" )
dlg_text( "@91000996" )
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 여행자 실피느의 유니콘
--============================================================
function NPC_traveler_silpyne_unicorn_init()
cprint( "!유니콘" )
set_npc_name( "@91000997" )
end
function NPC_traveler_silpyne_unicorn_contact()
-- 다이얼로그 출력
dlg_title( "@91000998" )
dlg_text( "@91000999" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 골드픽시 미리엘
--============================================================
function NPC_goldpixi_miriel_init()
cprint( "!골드픽시 미리엘" )
set_npc_name( "@91001000" )
end
function NPC_goldpixi_miriel_contact()
-- 퀘스트 상태 체크 get_quest_progress(ID)
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 255 : 이미종료
local quest_progress3263 = get_quest_progress(3263)
local quest_progress3264 = get_quest_progress(3264)
local quest_progress3265 = get_quest_progress(3265)
local count = find_item(1000114)
-- 퀘스트 종료시 대사
if quest_progress3265 == 255 and count == 1 then
dlg_title( "@91001001" )
dlg_text( "@91001009" )
elseif quest_progress3264 == 255 and count == 1 then
dlg_title( "@91001001" )
dlg_text( "@91000983" )
-- 퀘스트 수행 전, 수행 중 대사
elseif quest_progress3263 == 255 and count == 1 then
dlg_title( "@91001001" )
dlg_text( "@91000980" )
-- 퀘스트 수행 전, 수행 중 대사
else
dlg_title( "@91001001" )
dlg_text( "@91001002" )
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 시체가 가진 편지 퀘스트
--============================================================
-- <(version:7.2)>
function quest_prop_lostlsland_exploerer()
local count = find_item(1000105)
if count == 0 then
insert_item( 1000105, 1 )
else
end
end
--============================================================
--=============== 귀환 퀘스트
--============================================================
function quest_start_3267()
end
function quest_end_3267()
local count = find_item(1000114)
if count == 1 then
delete_item( get_item_handle(1000114), 1 )
cprint("@91002084")
else
end
end
--============================================================
--=============== 잃어버린 섬 카이넨 퀘스트
--============================================================
function quest_prop_add_npc( id )
cprint( "@91002015" )
local x = gv( "x" ) + math.random( 30, 50 )
local y = gv( "y" ) + math.random( 30, 50 )
add_npc( x, y, id, 1, 60000 )
end
--============================================================
--=============== 잃어버린 섬 카이넨 퀘스트 봉인의열쇠
--============================================================
function quest_start_3065()
warp( 201346, 167805, gv("layer") )
end
function quest_start_3066()
warp( 201409, 151671, gv("layer") )
end
function quest_start_3067()
warp( 201338, 135572, gv("layer") )
end
function quest_start_3068()
warp( 89082, 121414, gv("layer") )
end
function prop_quest_LostIsland_WindyPaper()
end
--============================================================
--=============== NPC 돈 크리스 ( 7.2단품퀘스트)
--============================================================
function NPC_qeest_single_doncris_contact()
-- 다이얼로그 출력
dlg_title( "@91001012" )
dlg_text( "@91001014" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== NPC 대장장이 티에리 ( 7.2단품퀘스트)
--============================================================
function NPC_qeest_single_thierry_contact()
-- 다이얼로그 출력
dlg_title( "@91001015" )
if get_local_info() == 1 then
dlg_text( "@90610217" )
dlg_menu( "@90100703", "open_market( 'Broken_Taming_Card' )" )
else
dlg_text( "@91001017" )
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end --============================================================
--=============== NPC 종단사무관 칸 ( 7.2단품퀘스트)
--============================================================
function NPC_qeest_single_khan_contact()
-- 다이얼로그 출력
dlg_title( "@91001018" )
dlg_text( "@91001020" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end --============================================================
--=============== NPC 지 브릴 ( 7.2단품퀘스트)
--============================================================
function NPC_qeest_single_gbril_contact()
-- 다이얼로그 출력
dlg_title( "@91001021" )
dlg_text( "@91001023" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
-- <(version:7.2)> 해고통보
function quest_start_3323()
local count = find_item( 1000156 )
if count == 0 then
insert_item( 1000156, 1 )
else
end
end
-- <(version:7.2)> 해고통보
function quest_end_3323()
local count = find_item( 1000156)
if count == 1 then
delete_item( get_item_handle(1000156), 1 )
else
end
end
-- <(version:7.2)> 위기의 대장장이
function quest_start_3325()
local count = find_item( 1000157 )
if count == 0 then
insert_item( 1000157, 1 )
else
end
end
-- <(version:7.2)> 위기의 대장장이
function quest_end_3325()
local count = find_item( 1000157)
if count == 1 then
delete_item( get_item_handle(1000157), 1 )
else
end
end
-- <(version:7.2)> 지브릴의 책 조사1
function quest_start_3328()
local count = find_item( 1000158 )
if count == 0 then
insert_item( 1000158, 1 )
else
end
end
-- <(version:7.2)> 지브릴의 책 조사2
function quest_end_3329()
local count = find_item( 1000158)
if count == 1 then
delete_item( get_item_handle(1000158), 1 )
else
end
end
-- <(version:7.2)> 마법해제 2
function quest_start_3331()
local count = find_item( 1000159 )
if count == 0 then
insert_item( 1000159, 1 )
else
end
end
-- <(version:7.2)> 마법해제 2
function quest_end_3331()
local count = find_item( 1000159)
if count == 1 then
delete_item( get_item_handle(1000159), 1 )
else
end
end
-- <(version:7.2)> 부메랑
function quest_start_3332()
local count = find_item( 1000156 )
if count == 0 then
insert_item( 1000156, 1 )
else
end
end
-- <(version:7.2)> 부메랑
function quest_end_3332()
local count = find_item( 1000156)
if count == 1 then
delete_item( get_item_handle(1000156), 1 )
else
end
end
--============================================================
--=============== NPC 마스터 사탄 소녀 ( 7.3 )
--============================================================
function quest_start_3336()
dlg_title( "@91001001" )
dlg_text( "@91002484" )
warp( 138645, 75174, gv("layer") )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 대륙 무역 조합원 ( 8.1 불카누스 던전 )
--============================================================
-- 론도 : 프란츠
function NPC_Vulcanus_Rondoh_init()
cprint( "!불카누스 던전 NPC 프란츠 가동" )
set_npc_name( "@90604700" )
end
function NPC_Vulcanus_Rondoh_contact()
-- 다이얼로그 출력
dlg_title( "@90604701" )
dlg_text( "@90604702" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
-- 라크시 : 알폰소
function NPC_Vulcanus_Deva_init()
cprint( "!불카누스 던전 NPC 알폰소 가동" )
set_npc_name( "@90604783" )
end
function NPC_Vulcanus_Deva_contact()
-- 다이얼로그 출력
dlg_title( "@90604784" )
dlg_text( "@90604702" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--카탄 : 피르케
function NPC_Vulcanus_Asura_init()
cprint( "!불카누스 던전 NPC 피르케 가동" )
set_npc_name( "@90604785" )
end
function NPC_Vulcanus_Asura_contact()
-- 다이얼로그 출력
dlg_title( "@90604786" )
dlg_text( "@90604702" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--호라이즌 : 에인세
function NPC_Vulcanus_Gaia_init()
cprint( "!불카누스 던전 NPC 에인세 가동" )
set_npc_name( "@90604787" )
end
function NPC_Vulcanus_Gaia_contact()
-- 다이얼로그 출력
dlg_title( "@90604788" )
dlg_text( "@90604702" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== <8.1>불카누스 던전 퀘스트 - 일반 몹
--============================================================
function Vulcanus_hunt_collect_quest()
-- 퀘스트 상태 체크 get_quest_progress(ID)
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 100 : 실패 / 255 : 이미종료
local quest_progress_3368 = get_quest_progress(3368) -- 던전탐사 : 고대인의 유물 1개 수집
local quest_progress_3369 = get_quest_progress(3369) -- 고대인의 유산 : 불카누스의 일지 상,중,하 수집
local quest_progress_3370 = get_quest_progress(3370) -- 불카누스의 열쇠 : 열쇠 몸통,머리,보석
local quest_progress_3373 = get_quest_progress(3373) -- 탄생의 비밀 : 몬스터의 알 20개 수집
local quest_progress_3374 = get_quest_progress(3374) -- 탄생의 비밀-재료수집 : 몬스터의 알 20개 수집
local quest_progress_3375 = get_quest_progress(3375) -- 저주받은 나무 : 나무껍질 20개 수집
local quest_progress_3376 = get_quest_progress(3376) -- 저주받은 나무-재료수집 : 나무껍질 20개 수집
local quest_progress_3377 = get_quest_progress(3377) -- 고대인의 흔적 : 고대석판 20개 수집
local quest_progress_3378 = get_quest_progress(3378) -- 고대인의 흔적-자료수집 : 고대석판 20개 수집
local shout = math.random(1, 10)
if quest_progress_3368 == 1 then -- 던전탐사 : 고대인의 유물 1개 획득
if shout >= 9 then
local count = find_item ( 1000406 )
if count == 0 then
drop_item( get_target_value('x'), get_target_value('y'), get_target_value('layer'), 1000406, 1 )
end
end
end
if quest_progress_3369 == 1 then -- 고대인의 유산 : 불카누스의 일지 상,중,하
if shout == 1 or shout == 2 then
--불카누스 일지 상
local count = find_item ( 1000407 )
if count == 0 then
drop_item( get_target_value('x'), get_target_value('y'), get_target_value('layer'), 1000407, 1 )
end
elseif shout == 3 or shout == 4 then
--불카누스 일지 중
local count = find_item ( 1000408 )
if count == 0 then
drop_item( get_target_value('x'), get_target_value('y'), get_target_value('layer'), 1000408, 1 )
end
elseif shout == 5 or shout == 6 then
--불카누스 일지 하
local count = find_item ( 1000409 )
if count == 0 then
drop_item( get_target_value('x'), get_target_value('y'), get_target_value('layer'), 1000409, 1 )
end
end
end
if quest_progress_3370 == 1 then -- 불카누스의 열쇠 : 열쇠 몸통,머리,보석
if shout == 1 or shout == 2 then
--불카누스 열쇠 몸통
local count = find_item ( 1000418 )
if count == 0 then
drop_item( get_target_value('x'), get_target_value('y'), get_target_value('layer'), 1000418, 1 )
end
elseif shout == 3 or shout == 4 then
--불카누스 열쇠 머리
local count = find_item ( 1000419 )
if count == 0 then
drop_item( get_target_value('x'), get_target_value('y'), get_target_value('layer'), 1000419, 1 )
end
elseif shout == 5 or shout == 6 then
--불카누스 열쇠 보석
local count = find_item ( 1000420 )
if count == 0 then
drop_item( get_target_value('x'), get_target_value('y'), get_target_value('layer'), 1000420, 1 )
end
end
end
if quest_progress_3373 == 1 or quest_progress_3374 == 1 then -- 탄생의 비밀 : 몬스터의 알 20개 수집 (반복퀘 포함)
if shout > 5 then
local count = find_item ( 1000412 )
if count < 20 then
drop_item( get_target_value('x'), get_target_value('y'), get_target_value('layer'), 1000412, 1 )
end
end
end
if quest_progress_3375 == 1 or quest_progress_3376== 1 then -- 저주받은 나무 : 나무껍질 20개 수집 (반복퀘 포함)
if shout > 5 then
local count = find_item ( 1000413 )
if count < 20 then
drop_item( get_target_value('x'), get_target_value('y'), get_target_value('layer'), 1000413, 1 )
end
end
end
if quest_progress_3377 == 1 or quest_progress_3378 == 1 then -- 고대인의 흔적 : 고대석판 20개 수집 (반복퀘 포함)
if shout > 5 then
local count = find_item ( 1000414 )
if count < 20 then
drop_item( get_target_value('x'), get_target_value('y'), get_target_value('layer'), 1000414, 1 )
end
end
end
end
--============================================================
--============= <8.1>불카누스 던전 퀘스트 - 보스 몹 : 불카누스
--============================================================
function Vulcanus_boss_hunt_quest()
-- 퀘스트 상태 체크 get_quest_progress(ID)
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 100 : 실패 / 255 : 이미종료
local quest_progress_3371 = get_quest_progress(3371) -- 진실의 상자 : 불카누스의 심장 1개 수집
local quest_progress_3379 = get_quest_progress(3379) -- 생명의 원천 : 빛의 크리스탈, 어둠의 크리스탈, 정령석 1개씩 수집
local quest_progress_3380 = get_quest_progress(3380) -- 생명의 원천-끝없는부활 : 빛의 크리스탈, 어둠의 크리스탈, 정령석 1개씩 수집
local quest_progress_3384 = get_quest_progress(3384) -- [일일]생명의 원천-끝없는부활 : 빛의 크리스탈, 어둠의 크리스탈, 정령석 1개씩 수집
local shout = math.random(1, 10)
--불카누스 타임 레코드
local create_time = get_instance_dungeon_flag( 20000, get_value("layer"), 'date' ) -- on_create_vulcanus_instance( layer ) 함수에서 세팅한 던전 시작 시간 불러옴
local leave_time = get_os_time() -- 던전 종료 시간 불러옴
local country_time = get_os_date("%H",0)
local turnaround_time = (leave_time - create_time) -- 소요시간 계산
local print_turnaround_time = turnaround_time +(24 -country_time) * 3600
local best_vul_record = get_global_variable( "best_vul_record" ) --현재 서버내 최고기록 불러옴
local best_vul_record_name = get_global_variable("best_vul_record_name") --현재 서버내 최고기록 보유자 불러옴
cprint(sconv("@690000084", "#@create_time@#", get_os_date("%c", create_time ))) -- 던전 시작시간 출력
cprint(sconv("@690000085", "#@leave_time@#", get_os_date("%c", leave_time ))) -- 던전 종료시간 출력
--최고기록이 갱신될 경우 기록과 기록 보유자 저장, 알림
if best_vul_record == nil or best_vul_record == "" or best_vul_record > turnaround_time then
set_global_variable( "best_vul_record", turnaround_time )
set_global_variable( "best_vul_record_name", get_value("name") )
cprint(sconv("@690000086", "#@turnaround_time@#", get_os_date("%X", print_turnaround_time )))
announce(sconv("@690000083", "#@user_name@#", get_value("name"),"#@vul_record@#",get_os_date("%X", print_turnaround_time )))
--최고기록보다 저조한 기록일 경우 단순 알림
elseif best_vul_record < turnaround_time or best_vul_record == turnaround_time then
cprint(sconv("@690000086", "#@turnaround_time@#", get_os_date("%X", print_turnaround_time)))
--소요시간이 24시간이 넘어갈 경우 알림
elseif turnaround_time > 24*60*60 then
cprint("@690000087")
end
if quest_progress_3371 == 1 then -- 진실의 상자 : 불카누스의 심장 1개 획득
local count = find_item ( 1000411 )
if count == 0 then
drop_item( get_target_value('x'), get_target_value('y'), get_target_value('layer'), 1000411, 1 )
cprint( "@90604916" ) -- <(version:7.3)><#6DD66D>그런가...... 억겁의 세월이 ...... 흘렀구나. 슈마즈의 손길을 피하기 위해.... 우리의 흔적을 남기기 위해 나의 생명을 버린 것이 성공한 것이구나.
cprint( "@90604917" ) -- <(version:7.3)><#6DD66D>나의 기록을 되짚어 나가는 이여, 진실의 상자는 나의 심장......이다.
end
end
if quest_progress_3379 == 1 or quest_progress_3380 == 1 or quest_progress_3384 == 1 then -- 생명의 원천 : 빛의 크리스탈, 어둠의 크리스탈, 정령석 1개씩 수집 (반복퀘 포함)
drop_item( get_target_value('x'), get_target_value('y'), get_target_value('layer'), 1000415, 1 )
drop_item( get_target_value('x'), get_target_value('y'), get_target_value('layer'), 1000416, 1 )
drop_item( get_target_value('x'), get_target_value('y'), get_target_value('layer'), 1000417, 1 )
end
--MohcenMaher
--if math.random(1,1000)>=950 and get_instance_dungeon_type_id( 20000, gv('layer') )==18 then drop_item( gtv('x'), gtv('y'), gtv('layer'), 800000058, 1 ) end
end
-- <(version:8.1)>새로운 게이트 조사 start
function quest_start_3337()
local count = find_item( 1000424 )
for i = 0, 10 do
-- 남은 아이템 없애기
delete_item( get_item_handle( 1000424 ), 1 )
end
if count == 0 then
insert_item( 1000424, 1 )
cprint( "@90604745" ) -- <(version:8.1)><#6DD66D>대륙무역조합 공고문을 받았습니다.
add_field_prop ( 126022, 180, 140398, 106190 )
else
end
end
-- <(version:8.1)>새로운 게이트 조사 end
function quest_end_3337()
local count = find_item( 1000424)
if count == 1 then
delete_item( get_item_handle(1000424), 1 )
else
end
end
-- <(version:8.3)>새로운 게이트 조사 drop
function quest_drop_3337()
local count = find_item( 1000424)
if count == 1 then
delete_item( get_item_handle(1000424), 1 )
else
end
end
-- <(version:8.1)>새로운 게이트 조사
--function enter_vulcanus()
-- 퀘스트 상태 체크 get_quest_progress(ID)
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 100 : 실패 / 255 : 이미종료
--local quest_progress_3367 = get_quest_progress(3367)
--if quest_progress_3367 == 1 then
--set_quest_status( 3367, 1, 1 )
--cprint( "@90604746" ) -- <(version:8.1)><#6DD66D>새로운 게이트를 발견하였습니다.
--end
--end
-- <(version:8.1)>진실의 상자 start
function quest_start_3338()
local count = find_item( 1000423 )
for i = 0, 10 do
-- 남은 아이템 없애기
delete_item( get_item_handle( 1000423 ), 1 )
end
if count == 0 then
insert_item( 1000423, 1 )
cprint( "@90604748" ) -- <(version:8.1)><#6DD66D>복원된 불카누스의 마법열쇠를 받았습니다.
else
end
end
-- <(version:8.1)>진실의 상자 end
function quest_end_3338()
local count = find_item( 1000423)
if count == 1 then
delete_item( get_item_handle(1000423), 1 )
else
end
end
-- <(version:8.3)>탄생의 비밀 - 실험용 재료 수집: 클리어 링크
function quest_end_3374()
insert_gold( 160*get_value( "level" )*12.5 )
--보상 Exp/Jp 일일 퀘스트 보상으로 지급될때만 가능한 수치다. 일일 퀘스트 보상에만 사용
add_exp_jp( (get_value( "level" )/2)*(get_value( "level" )/2)*(get_value( "level" )/2)*(get_value( "level" )/2), ((get_value( "level" )/2)*(get_value( "level" )/2)*(get_value( "level" )/2)*(get_value( "level" )/2))/5 )
cprint( '@1240' )
reset_finished_quest( 3374 )
end
-- <(version:8.3)>저주받은 나무 - 실험용 재료 수집: 클리어 링크
function quest_end_3376()
insert_gold( 160*get_value( "level" )*12.5 )
--보상 Exp/Jp 일일 퀘스트 보상으로 지급될때만 가능한 수치다. 일일 퀘스트 보상에만 사용
add_exp_jp( (get_value( "level" )/2)*(get_value( "level" )/2)*(get_value( "level" )/2)*(get_value( "level" )/2), ((get_value( "level" )/2)*(get_value( "level" )/2)*(get_value( "level" )/2)*(get_value( "level" )/2))/5 )
cprint( '@1240' )
reset_finished_quest( 3376 )
end
-- <(version:8.3)>고대인의 흔적 - 분석용 자료 수집: 클리어 링크
function quest_end_3378()
insert_gold( 160*get_value( "level" )*12.5 )
--보상 Exp/Jp 일일 퀘스트 보상으로 지급될때만 가능한 수치다. 일일 퀘스트 보상에만 사용
add_exp_jp( (get_value( "level" )/2)*(get_value( "level" )/2)*(get_value( "level" )/2)*(get_value( "level" )/2), ((get_value( "level" )/2)*(get_value( "level" )/2)*(get_value( "level" )/2)*(get_value( "level" )/2))/5 )
cprint( '@1240' )
reset_finished_quest( 3378 )
end
function quest_end_3384()
--보상 Exp/Jp 일일 퀘스트 보상으로 지급될때만 가능한 수치다. 일일 퀘스트 보상에만 사용
add_exp_jp( (get_value( "level" )/2)*(get_value( "level" )/2)*(get_value( "level" )/2)*(get_value( "level" )/2), ((get_value( "level" )/2)*(get_value( "level" )/2)*(get_value( "level" )/2)*(get_value( "level" )/2))/5 )
cprint( '@1240' )
reset_finished_quest( 3384 )
end
-- <(version:8.1)>유물상자 ( 반복퀘스트용 랜덤 보상 아이템 )
function Vulcanus_random_box()
local level = get_value( "level" )
local item_code -- 2013010 데바의 축복 아바타 귀속
local item_code2 -- 2013011 공격의 루나칩 1시간 아바타 귀속
local item_code3 -- -540027 노말 베이직 크리처 카드
--local item_code4
local v_count
local v_count2
local v_count3
--local v_count4
if level >= 30 and level < 40 then
item_code = 2013010 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count = 1
item_code2 = 2013011 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count2 = 1
item_code3 = -541007 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count3 = 1
elseif level >= 40 and level < 60 then
item_code = 2013010 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count = 1
item_code2 = 2013011 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count2 = 1
item_code3 = -541007 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count3 = 1
elseif level >= 60 and level < 80 then
item_code = 2013010 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count = 1
item_code2 = 2013011 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count2 = 1
item_code3 = -540027 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count3 = 1
elseif level >= 80 and level < 100 then
item_code = 2013010 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count = 1
item_code2 = 2013011 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count2 = 1
item_code3 = -540027 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count3 = 1
elseif level >= 100 and level < 120 then
item_code = 2013010 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count = 1
item_code2 = 2013011 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count2 = 1
item_code3 = -540027 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count3 = 1
elseif level >= 120 and level < 140 then
item_code = 2013010 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count = 1
item_code2 = 2013011 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count2 = 1
item_code3 = -540027 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count3 = 1
elseif level >= 140 and level < 160 then
item_code = 2013010 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count = 1
item_code2 = 2013011 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count2 = 1
item_code3 = -540027 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count3 = 1
elseif level >= 160 then
item_code = 2013010 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count = 1
item_code2 = 2013011 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count2 = 1
item_code3 = -540027 -- 여기에 레벨구간별로 적정한 보상 아이템을 넣어주세요~
v_count3 = 1
end
insert_item( item_code, v_count )
local text = sconv( "@90604789", "#@item_name@#", "@" .. tostring( item_code + 10000000 ) )
cprint( text )
insert_item( item_code2, v_count2 )
local text = sconv( "@90604789", "#@item_name@#", "@" .. tostring( item_code2 + 10000000 ) )
cprint( text )
item_code3 = -541007
local item = pick_item_in_drop_group( item_code3 )
local item_name = get_item_name_id( item[1] )
insert_item( item[1], v_count3 )
local text = sconv( "@90604789", "#@item_name@#", "@" .. tostring( item_name ) )
--local text = sconv( "@90604789", "#@item_name@#", "@" .. tostring( 7224 ) )
cprint( text )
end
-- 프랍 링크
------------------------------------------------------------------------------------------
function quest_prop_Vulcanus_30179()
--<(version:8.1)>새로운 게이트 조사
--set_quest_status( 3367, 1, 1 )
cprint( "@90604913" ) --<(version:7.3)><#6DD66D>처음 발견된 불카누스 입구로 관련 정보 조사에 큰 영향을 미쳤다. 지금은 입구로서의 작동은 하지 않는다.
enter_vulcanus() --MohcenMaher,S.A
end
--============================================================
--===============================================
--=============== TP 퀘스트
--===============================================
--============================================================
-- 프랍 링크
------------------------------------------------------------------------------------------
function quest_prop_summon_creature_30171()
local state_code = get_local_info()
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 100 : 실패 / 255 : 이미종료
local quest_progress3352 = get_quest_progress(3352) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-1
local quest_progress3353 = get_quest_progress(3353) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-2
local quest_progress3354 = get_quest_progress(3354) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-3
local quest_progress3355 = get_quest_progress(3355) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-4
local quest_progress3356 = get_quest_progress(3356) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-5
local state_level = get_state_level( 4554 ) --위협수준 증가
local monster_num
if state_level == 1 then
cprint( "@90604778" ) --<(version:7.3)><#6DD66D>분노의 기운으로 인하여 몬스터를 소환할 수 없습니다.
else
-- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-1
if quest_progress3352 == 1 then
monster_num = math.random( 1, 3 )
if monster_num == 1 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 110011, 1 , 55000 ) -- 판테라 소환
elseif monster_num == 2 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 110012, 1 , 55000 ) -- 토르터스 소환
elseif monster_num == 3 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 110013, 1 , 55000 ) -- 폴트리 소환
end
if state_code == 4 or state_code == 8 or state_code == 128 or state_code == 16384 or state_code == 32768 or state_code == 65536 then
add_state( 4554 , 1, 12000) -- 위협수준 증가
cprint( "@90604777" ) --<(version:7.3)><#6DD66D>크리쳐 왕들의 분노로 위협 수준이 높아 집니다.
else
add_state( 4554 , 1, 55000) -- 위협수준 증가
cprint( "@90604777" ) --<(version:7.3)><#6DD66D>크리쳐 왕들의 분노로 위협 수준이 높아 집니다.
end
-- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-2
elseif quest_progress3353 == 1 then
monster_num = math.random( 1, 8 )
if monster_num == 1 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 120004, 1 , 55000 ) -- 오크 소환
elseif monster_num == 2 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 120005, 1 , 55000 ) -- 예티 소환
elseif monster_num == 3 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 120006, 1 , 55000 ) -- 스켈레톤 소환
elseif monster_num == 4 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 120007, 1 , 55000 ) -- 레드픽시 소환
elseif monster_num == 5 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 120008, 1 , 55000 ) -- 블루픽시 소환
elseif monster_num == 6 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 120009, 1 , 55000 ) -- 세이렌 소환
elseif monster_num == 7 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 120010, 1 , 55000 ) -- 울프 소환
elseif monster_num == 8 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 120011, 1 , 55000 ) -- 크라켄 소환
end
if state_code == 4 or state_code == 8 or state_code == 128 or state_code == 16384 or state_code == 32768 or state_code == 65536 then
add_state( 4554 , 1, 12000) -- 위협수준 증가
cprint( "@90604777" ) --<(version:7.3)><#6DD66D>크리쳐 왕들의 분노로 위협 수준이 높아 집니다.
else
add_state( 4554 , 1, 55000) -- 위협수준 증가
cprint( "@90604777" ) --<(version:7.3)><#6DD66D>크리쳐 왕들의 분노로 위협 수준이 높아 집니다.
end
-- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-3
elseif quest_progress3354 == 1 then
monster_num = math.random( 1, 5 )
if monster_num == 1 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 130011, 1 , 60000 ) -- 호크맨 소환
elseif monster_num == 2 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 130012, 1 , 60000 ) -- 샐러맨더 소환
elseif monster_num == 3 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 130013, 1 , 60000 ) -- 윈드송 소환
elseif monster_num == 4 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 130014, 1 , 60000 ) -- 유니콘 소환
elseif monster_num == 5 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 130015, 1 , 60000 ) -- 다크혼 소환
end
if state_code == 4 or state_code == 8 or state_code == 128 or state_code == 16384 or state_code == 32768 or state_code == 65536 then
add_state( 4554 , 1, 12000) -- 위협수준 증가
cprint( "@90604777" ) --<(version:7.3)><#6DD66D>크리쳐 왕들의 분노로 위협 수준이 높아 집니다.
else
add_state( 4554 , 1, 55000) -- 위협수준 증가
cprint( "@90604777" ) --<(version:7.3)><#6DD66D>크리쳐 왕들의 분노로 위협 수준이 높아 집니다.
end
-- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-4
elseif quest_progress3355 == 1 then
monster_num = math.random( 1, 5 )
if monster_num == 1 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 140008, 1 , 60000 ) -- 켄타우로스 소환
elseif monster_num == 2 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 140009, 1 , 60000 ) -- 아이무스 소환
elseif monster_num == 3 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 140010, 1 , 60000 ) -- 타파리 소환
elseif monster_num == 4 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 140011, 1 , 60000 ) -- 카이넨 소환
elseif monster_num == 5 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 140012, 1 , 60000 ) -- 엔젤 소환
end
if state_code == 4 or state_code == 8 or state_code == 128 or state_code == 16384 or state_code == 32768 or state_code == 65536 then
add_state( 4554 , 1, 12000) -- 위협수준 증가
cprint( "@90604777" ) --<(version:7.3)><#6DD66D>크리쳐 왕들의 분노로 위협 수준이 높아 집니다.
else
add_state( 4554 , 1, 55000) -- 위협수준 증가
cprint( "@90604777" ) --<(version:7.3)><#6DD66D>크리쳐 왕들의 분노로 위협 수준이 높아 집니다.
end
-- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-5
elseif quest_progress3356 == 1 then
monster_num = math.random( 1, 4 )
if monster_num == 1 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 150021, 1 , 65000 ) -- 켈베로스 소환
elseif monster_num == 2 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 150022, 1 , 65000 ) -- 지니 소환
elseif monster_num == 3 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 150023, 1 , 65000 ) -- 미스틱 지니 소환
elseif monster_num == 4 then
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), 150025, 1 , 65000 ) -- 큐브 소환
end
if state_code == 4 or state_code == 8 or state_code == 128 or state_code == 16384 or state_code == 32768 or state_code == 65536 then
add_state( 4554 , 1, 12000) -- 위협수준 증가
cprint( "@90604777" ) --<(version:7.3)><#6DD66D>크리쳐 왕들의 분노로 위협 수준이 높아 집니다.
else
add_state( 4554 , 1, 55000) -- 위협수준 증가
cprint( "@90604777" ) --<(version:7.3)><#6DD66D>크리쳐 왕들의 분노로 위협 수준이 높아 집니다.
end
else
cprint( "@90604912" ) --<(version:7.3)>소환진을 사용할 수 없습니다.
end
end
end
function quest_prop_summon_creature_30172()
local state_code = get_local_info()
local state_level = get_state_level( 4554 ) --위협수준 증가
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 100 : 실패 / 255 : 이미종료
local quest_progress3357 = get_quest_progress(3357) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #2
local monster_id
local selected = { 110011, 110012, 110013,
120004, 120005, 120006, 120007, 120008, 120009, 120010, 120011,
130011, 130012, 130013, 130014, 130015,
140008, 140009, 140010, 140011, 140012,
150021, 150022, 150023, 150025,
160012, 160013, 160014 }
for i = 1, 2 do
monster_id = math.random( i, 28 )
local temp = selected[ i ]
selected[ i ] = selected[ monster_id ]
selected[ monster_id ] = temp
end
if state_level == 1 then
cprint( "@90604778" ) --<(version:7.3)><#6DD66D>분노의 기운으로 인하여 몬스터를 소환할 수 없습니다.
else
if quest_progress3357 == 1 then
monster_id = selected[ 1 ]
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), monster_id, 1 , 100000 ) -- 몬스터 소환 1
monster_id = selected[ 2 ]
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), monster_id, 1 , 100000 ) -- 몬스터 소환 2
if state_code == 4 or state_code == 8 or state_code == 128 or state_code == 16384 or state_code == 32768 or state_code == 65536 then
add_state( 4554 , 1, 12000) -- 위협수준 증가
cprint( "@90604777" ) --<(version:7.3)><#6DD66D>크리쳐 왕들의 분노로 위협 수준이 높아 집니다.
else
add_state( 4554 , 1, 55000) -- 위협수준 증가
cprint( "@90604777" ) --<(version:7.3)><#6DD66D>크리쳐 왕들의 분노로 위협 수준이 높아 집니다.
end
else
cprint( "@90604776" )--<(version:7.3)><#6DD66D>해당 퀘스트를 진행 중에만 사용 가능 합니다.
end
end
end
function quest_prop_summon_creature_30173()
local state_code = get_local_info()
local state_level = get_state_level( 4554 ) --위협수준 증가
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 100 : 실패 / 255 : 이미종료
local quest_progress3358 = get_quest_progress(3358) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #3
local monster_id
local selected = { 110011, 110012, 110013,
120004, 120005, 120006, 120007, 120008, 120009, 120010, 120011,
130011, 130012, 130013, 130014, 130015,
140008, 140009, 140010, 140011, 140012,
150021, 150022, 150023, 150025,
160012, 160013, 160014 }
for i = 1, 3 do
monster_id = math.random( i, 28 )
local temp = selected[ i ]
selected[ i ] = selected[ monster_id ]
selected[ monster_id ] = temp
end
if state_level == 1 then
cprint( "@90604778" ) --<(version:7.3)><#6DD66D>분노의 기운으로 인하여 몬스터를 소환할 수 없습니다.
else
if quest_progress3358 == 1 then
monster_id = selected[ 1 ]
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), monster_id, 1 , 100000 ) -- 몬스터 소환 1
monster_id = selected[ 2 ]
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), monster_id, 1 , 100000 ) -- 몬스터 소환 2
monster_id = selected[ 3 ]
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), monster_id, 1 , 100000 ) -- 몬스터 소환 3
if state_code == 4 or state_code == 8 or state_code == 128 or state_code == 16384 or state_code == 32768 or state_code == 65536 then
add_state( 4554 , 1, 12000) -- 위협수준 증가
cprint( "@90604777" ) --<(version:7.3)><#6DD66D>크리쳐 왕들의 분노로 위협 수준이 높아 집니다.
else
add_state( 4554 , 1, 55000) -- 위협수준 증가
cprint( "@90604777" ) --<(version:7.3)><#6DD66D>크리쳐 왕들의 분노로 위협 수준이 높아 집니다.
end
else
cprint( "@90604776" )--<(version:7.3)><#6DD66D>해당 퀘스트를 진행 중에만 사용 가능 합니다.
end
end
end
function quest_prop_summon_creature_30174()
local state_code = get_local_info()
local state_level = get_state_level( 4554 ) --위협수준 증가
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 100 : 실패 / 255 : 이미종료
local quest_progress3359 = get_quest_progress(3359) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #5
local monster_id
local selected = { 110011, 110012, 110013,
120004, 120005, 120006, 120007, 120008, 120009, 120010, 120011,
130011, 130012, 130013, 130014, 130015,
140008, 140009, 140010, 140011, 140012,
150021, 150022, 150023, 150025,
160012, 160013, 160014 }
for i = 1, 5 do
monster_id = math.random( i, 28 )
local temp = selected[ i ]
selected[ i ] = selected[ monster_id ]
selected[ monster_id ] = temp
end
if state_level == 1 then
cprint( "@90604778" ) --<(version:7.3)><#6DD66D>분노의 기운으로 인하여 몬스터를 소환할 수 없습니다.
else
if quest_progress3359 == 1 then
monster_id = selected[ 1 ]
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), monster_id, 1 , 150000 ) -- 몬스터 소환 1
monster_id = selected[ 2 ]
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), monster_id, 1 , 150000 ) -- 몬스터 소환 2
monster_id = selected[ 3 ]
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), monster_id, 1 , 150000 ) -- 몬스터 소환 3
monster_id = selected[ 4 ]
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), monster_id, 1 , 150000 ) -- 몬스터 소환 4
monster_id = selected[ 5 ]
add_npc( gv('x') + math.random( 10, 50), gv('y') + math.random( 10, 50), monster_id, 1 , 150000 ) -- 몬스터 소환 5
if state_code == 4 or state_code == 8 or state_code == 128 or state_code == 16384 or state_code == 32768 or state_code == 65536 then
add_state( 4554 , 1, 12000) -- 위협수준 증가
cprint( "@90604777" ) --<(version:7.3)><#6DD66D>크리쳐 왕들의 분노로 위협 수준이 높아 집니다.
else
add_state( 4554 , 1, 55000) -- 위협수준 증가
cprint( "@90604777" ) --<(version:7.3)><#6DD66D>크리쳐 왕들의 분노로 위협 수준이 높아 집니다.
end
else
add_state(6006, 1, 500) -- 스턴
cprint( "@90604776" )--<(version:7.3)><#6DD66D>해당 퀘스트를 진행 중에만 사용 가능 합니다.
end
end
end
function quest_prop_summon_creature_30175()
end
function quest_prop_summon_creature_30176()
end
function quest_prop_summon_creature_30177()
end
function quest_prop_summon_creature_30178()
end
------------------3350, <(version:7.3)>탐험의 왕------------------------------------------
function quest_prop_mana_stone(num)
--MohcenMaher, A.A
local add = math.random(0,3)
local tp_finding = get_quest_status( --[[3350]]6006 , 1 ) + add --num
set_quest_status( --[[3350]]6006, 1, tp_finding )
end
-- 퀘스트 링크
------------------------------------------------------------------------------------------
function quest_end_3350()
local talentp = get_value( 'tp' )
talentp = talentp + 1
set_value( "tp", talentp )
cprint( "@90604780" ) -- <(version:7.3)><#6DD66D>TP 포인트가 1 지급 되었습니다.
del_flag( "over_bluepoint_lakcity" )
del_flag( "over_bluepoint_horizon" )
del_flag( "over_bluepoint_katan" )
del_flag( "over_bluepoint_rondoh" )
del_flag( "over_redpoint_lakcity" )
del_flag( "over_redpoint_horizon" )
del_flag( "over_redpoint_katan" )
del_flag( "over_redpoint_rondoh" )
del_flag( "over_greenpoint_lakcity" )
del_flag( "over_greenpoint_horizon" )
del_flag( "over_greenpoint_katan" )
del_flag( "over_greenpoint_rondoh" )
end
------------------------------------------------------------------------------------------
function quest_end_3351()
local talentp = get_value( 'tp' )
talentp = talentp + 1
set_value( "tp", talentp )
cprint( "@90604780" ) -- <(version:7.3)><#6DD66D>TP 포인트가 1 지급 되었습니다.
end
------------------------------------------------------------------------------------------
function quest_end_3359()
local talentp = get_value( 'tp' )
talentp = talentp + 1
set_value( "tp", talentp )
cprint( "@90604780" ) -- <(version:7.3)><#6DD66D>TP 포인트가 1 지급 되었습니다.
end
------------------------------------------------------------------------------------------
function quest_start_3381()
-- 대륙의 과거 엘로힘 시아페에게 워프
warp( 127542 + math.random(0,10) , 121326 + math.random(0,10) )
end
function quest_end_3381()
end
------------------------------------------------------------------------------------------
function quest_start_3382()
-- 대륙의 과거 사막지기 엘레노에게 워프
warp( 120752 + math.random(0,10) , 86799 + math.random(0,10) )
end
function quest_end_3382()
end
------------------------------------------------------------------------------------------
function quest_start_3383()
-- 대륙의 과거 무녀제이나에게 워프
warp( 120321 + math.random(0,10) , 72102 + math.random(0,10) )
end
function quest_end_3383()
end
-- 몬스터 링크
------------------------------------------------------------------------------------------
function tp_quest_creature_adventure_1_1()
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 100 : 실패 / 255 : 이미종료
local quest_progress3352 = get_quest_progress(3352) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-1
--local quest_progress3353 = get_quest_progress(3353) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-2
--local quest_progress3354 = get_quest_progress(3354) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-3
--local quest_progress3355 = get_quest_progress(3355) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-4
--local quest_progress3356 = get_quest_progress(3356) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-5
local quest_progress3357 = get_quest_progress(3357) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #2
local quest_progress3358 = get_quest_progress(3358) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #3
local quest_progress3359 = get_quest_progress(3359) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #5
if quest_progress3352 == 1 then
local tp_creature_monster = get_quest_status( 3352 , 1 ) + 1
set_quest_status( 3352, 1, tp_creature_monster )
end
if quest_progress3357 == 1 then
local tp_creature_monster = get_quest_status( 3357 , 1 ) + 1
set_quest_status( 3357, 1, tp_creature_monster )
end
if quest_progress3358 == 1 then
local tp_creature_monster = get_quest_status( 3358 , 1 ) + 1
set_quest_status( 3358, 1, tp_creature_monster )
end
if quest_progress3359 == 1 then
local tp_creature_monster = get_quest_status( 3359 , 1 ) + 1
set_quest_status( 3359, 1, tp_creature_monster )
end
end
function tp_quest_creature_adventure_1_2()
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 100 : 실패 / 255 : 이미종료
--local quest_progress3352 = get_quest_progress(3352) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-1
local quest_progress3353 = get_quest_progress(3353) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-2
--local quest_progress3354 = get_quest_progress(3354) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-3
--local quest_progress3355 = get_quest_progress(3355) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-4
--local quest_progress3356 = get_quest_progress(3356) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-5
local quest_progress3357 = get_quest_progress(3357) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #2
local quest_progress3358 = get_quest_progress(3358) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #3
local quest_progress3359 = get_quest_progress(3359) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #5
if quest_progress3353 == 1 then
local tp_creature_monster = get_quest_status( 3353 , 1 ) + 1
set_quest_status( 3353, 1, tp_creature_monster )
end
if quest_progress3357 == 1 then
local tp_creature_monster = get_quest_status( 3357 , 1 ) + 1
set_quest_status( 3357, 1, tp_creature_monster )
end
if quest_progress3358 == 1 then
local tp_creature_monster = get_quest_status( 3358 , 1 ) + 1
set_quest_status( 3358, 1, tp_creature_monster )
end
if quest_progress3359 == 1 then
local tp_creature_monster = get_quest_status( 3359 , 1 ) + 1
set_quest_status( 3359, 1, tp_creature_monster )
end
end
function tp_quest_creature_adventure_1_3()
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 100 : 실패 / 255 : 이미종료
--local quest_progress3352 = get_quest_progress(3352) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-1
--local quest_progress3353 = get_quest_progress(3353) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-2
local quest_progress3354 = get_quest_progress(3354) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-3
--local quest_progress3355 = get_quest_progress(3355) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-4
--local quest_progress3356 = get_quest_progress(3356) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-5
local quest_progress3357 = get_quest_progress(3357) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #2
local quest_progress3358 = get_quest_progress(3358) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #3
local quest_progress3359 = get_quest_progress(3359) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #5
if quest_progress3354 == 1 then
local tp_creature_monster = get_quest_status( 3354 , 1 ) + 1
set_quest_status( 3354, 1, tp_creature_monster )
end
if quest_progress3357 == 1 then
local tp_creature_monster = get_quest_status( 3357 , 1 ) + 1
set_quest_status( 3357, 1, tp_creature_monster )
end
if quest_progress3358 == 1 then
local tp_creature_monster = get_quest_status( 3358 , 1 ) + 1
set_quest_status( 3358, 1, tp_creature_monster )
end
if quest_progress3359 == 1 then
local tp_creature_monster = get_quest_status( 3359 , 1 ) + 1
set_quest_status( 3359, 1, tp_creature_monster )
end
end
function tp_quest_creature_adventure_1_4()
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 100 : 실패 / 255 : 이미종료
--local quest_progress3352 = get_quest_progress(3352) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-1
--local quest_progress3353 = get_quest_progress(3353) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-2
--local quest_progress3354 = get_quest_progress(3354) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-3
local quest_progress3355 = get_quest_progress(3355) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-4
--local quest_progress3356 = get_quest_progress(3356) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-5
local quest_progress3357 = get_quest_progress(3357) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #2
local quest_progress3358 = get_quest_progress(3358) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #3
local quest_progress3359 = get_quest_progress(3359) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #5
if quest_progress3355 == 1 then
local tp_creature_monster = get_quest_status( 3355 , 1 ) + 1
set_quest_status( 3355, 1, tp_creature_monster )
end
if quest_progress3357 == 1 then
local tp_creature_monster = get_quest_status( 3357 , 1 ) + 1
set_quest_status( 3357, 1, tp_creature_monster )
end
if quest_progress3358 == 1 then
local tp_creature_monster = get_quest_status( 3358 , 1 ) + 1
set_quest_status( 3358, 1, tp_creature_monster )
end
if quest_progress3359 == 1 then
local tp_creature_monster = get_quest_status( 3359 , 1 ) + 1
set_quest_status( 3359, 1, tp_creature_monster )
end
end
function tp_quest_creature_adventure_1_5()
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 100 : 실패 / 255 : 이미종료
--local quest_progress3352 = get_quest_progress(3352) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-1
--local quest_progress3353 = get_quest_progress(3353) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-2
--local quest_progress3354 = get_quest_progress(3354) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-3
--local quest_progress3355 = get_quest_progress(3355) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-4
local quest_progress3356 = get_quest_progress(3356) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-5
local quest_progress3357 = get_quest_progress(3357) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #2
local quest_progress3358 = get_quest_progress(3358) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #3
local quest_progress3359 = get_quest_progress(3359) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #5
if quest_progress3356 == 1 then
local tp_creature_monster = get_quest_status( 3356 , 1 ) + 1
set_quest_status( 3356, 1, tp_creature_monster )
end
if quest_progress3357 == 1 then
local tp_creature_monster = get_quest_status( 3357 , 1 ) + 1
set_quest_status( 3357, 1, tp_creature_monster )
end
if quest_progress3358 == 1 then
local tp_creature_monster = get_quest_status( 3358 , 1 ) + 1
set_quest_status( 3358, 1, tp_creature_monster )
end
if quest_progress3359 == 1 then
local tp_creature_monster = get_quest_status( 3359 , 1 ) + 1
set_quest_status( 3359, 1, tp_creature_monster )
end
end
function tp_quest_creature_adventure_1_6()
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 100 : 실패 / 255 : 이미종료
--local quest_progress3352 = get_quest_progress(3352) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-1
--local quest_progress3353 = get_quest_progress(3353) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-2
--local quest_progress3354 = get_quest_progress(3354) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-3
--local quest_progress3355 = get_quest_progress(3355) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-4
--local quest_progress3356 = get_quest_progress(3356) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #1-5
local quest_progress3357 = get_quest_progress(3357) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #2
local quest_progress3358 = get_quest_progress(3358) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #3
local quest_progress3359 = get_quest_progress(3359) -- <(version:7.3)><(version:7.3)>크리쳐의 왕 #5
if quest_progress3357 == 1 then
local tp_creature_monster = get_quest_status( 3357 , 1 ) + 1
set_quest_status( 3357, 1, tp_creature_monster )
end
if quest_progress3358 == 1 then
local tp_creature_monster = get_quest_status( 3358 , 1 ) + 1
set_quest_status( 3358, 1, tp_creature_monster )
end
if quest_progress3359 == 1 then
local tp_creature_monster = get_quest_status( 3359 , 1 ) + 1
set_quest_status( 3359, 1, tp_creature_monster )
end
end
---------------------------------------------------------
function quest_start_3600()
end
function quest_end_3600()
end
---------------------------------------------------------
-- <(version:7.4)>[큐브릭]로미오 구출
function quest_start_3601()
set_flag( "romeo_finding" , math.random( 0, 2 ) )
end
function quest_end_3601()
end
---------------------------------------------------------
function quest_start_3602()
end
function quest_end_3602()
end
-- <(version:7.4)>[큐브릭]줄리엣 구출
---------------------------------------------------------
function quest_start_3603()
set_flag( "juliet_finding" , math.random( 0, 2 ) )
end
function quest_end_3603()
end
---------------------------------------------------------
function quest_start_3604()
end
function quest_end_3604()
end
---------------------------------------------------------
function quest_start_3605()
end
function quest_end_3605()
end
---------------------------------------------------------
function quest_start_3606()
end
function quest_end_3606()
end
---------------------------------------------------------
function quest_start_3607()
-- 던전 내에서 퀘스트를 새로 시작하면 퀘스트 진행하고 있는 유저 카운트 증가
if get_instance_dungeon_id() == 30000 then
local layer = gv( 'layer' )
set_instance_dungeon_flag( 30000, layer, 'QuestInProgressCount', get_instance_dungeon_flag( 30000, layer, 'QuestInProgressCount' ) + 1 )
end
end
function quest_end_3607()
end
function quest_drop_3607()
-- 진행 중이었던 유저가 포기하면 던전 내에서 해당 퀘스트를 진행하고 있던 유저 카운트를 감소
if get_instance_dungeon_id() == 30000 and get_quest_progress( 3607 ) == 1 then
local layer = gv( 'layer' )
set_instance_dungeon_flag( 30000, layer, 'QuestInProgressCount', get_instance_dungeon_flag( 30000, layer, 'QuestInProgressCount' ) - 1 )
end
end
---------------------------------------------------------
-- function quest_start_3608()
-- set_flag( "alram_count_01" , 0 )
-- set_flag( "alram_count_02" , 0 )
-- set_flag( "alram_count_03" , 0 )
-- set_flag( "alram_count_04" , 0 )
-- set_flag( "alram_count_05" , 0 )
-- set_flag( "alram_count_06" , 0 )
-- end
-- function quest_end_3608()
-- end
---------------------------------------------------------
function quest_start_3609()
-- 현재 인던 내부에서 이미 보스 몬스터가 리젠되었었다면 추가적으로 리젠하지 않게 차단
local layer = gv( 'layer' )
if get_instance_dungeon_id() == 30000 and get_instance_dungeon_flag( 30000, layer, 'AdditionalBossRespawned' ) == 0 then
set_instance_dungeon_flag( 30000, layer, 'AdditionalBossRespawned', 1 )
add_npc( 99954 + math.random( 2, 50 ), 31539 + math.random( 2, 50 ), 20170002, 1, 30000 )
add_npc( 99954 + math.random( 2, 50 ), 31539 + math.random( 2, 50 ), 20180002, 1, 30000 )
add_npc( 99954 + math.random( 2, 50 ), 31539 + math.random( 2, 50 ), 20185002, 1, 30000 )
end
end
function quest_end_3609()
-- 출구 프랍이 중복해서 여러 개 리젠되지 않도록 체크
local layer = gv( 'layer' )
if get_instance_dungeon_id() == 30000 and get_instance_dungeon_flag( 30000, layer, 'ExitPropRespawned' ) == 0 then
set_instance_dungeon_flag( 30000, layer, 'ExitPropRespawned', 1 )
add_field_prop(60102, 0, 99954, 31539, layer, 0 )
end
--플래그 삭제
-- del_flag( "alram_count_01" )
-- del_flag( "alram_count_02" )
-- del_flag( "alram_count_03" )
-- del_flag( "alram_count_04" )
-- del_flag( "alram_count_05" )
-- del_flag( "alram_count_06" )
del_flag( "juliet_finding" )
del_flag( "romeo_finding" )
end
function npc_quest_cubric_mullog()
-- 다이얼로그 출력
dlg_title( "@90604989" )
dlg_text( "@90604990" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function npc_quest_cubric_livedy()
-- 다이얼로그 출력
dlg_title( "@90604988" )
dlg_text( "@90604990" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function npc_quest_cubric_Unidentified01()
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 100 : 실패 / 255 : 이미종료
local quest_progress3601 = get_quest_progress(3601) -- <(version:7.4)>[큐브릭]로미오 구출
local quest_progress3608 = get_quest_progress(3608) -- <(version:7.4)>[큐브릭]종식
local romeo = get_flag( "romeo_finding")
-- 다이얼로그 출력
dlg_title( "@90605012" )
dlg_text( "@90605013" )
if quest_progress3601 == 1 then
if romeo == 0 then
dlg_menu( "@90605022", 'romeo_question_real()' )
else
dlg_menu( "@90605022", 'romeo_question_fake()' )
end
end
if quest_progress3608 == 1 then
dlg_menu( "@90605057", 'alarm()' )
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function romeo_question_real()
-- 다이얼로그 출력
dlg_title( "@90605012" )
dlg_text( "@90605025" )
dlg_menu( "@90605026", 'romeo_question_real_talk1()' )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function romeo_question_real_talk1()
-- 다이얼로그 출력
dlg_title( "@90605012" )
dlg_text( "@90605027" )
dlg_menu( "@90605028", 'romeo_question_real_talk2()' )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function romeo_question_real_talk2()
-- <(version:7.4)>[큐브릭]로미오 구출
set_quest_status( 3601, 1, 1 )
end
function npc_quest_cubric_Unidentified02()
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 100 : 실패 / 255 : 이미종료
local quest_progress3601 = get_quest_progress(3601) -- <(version:7.4)>[큐브릭]로미오 구출
local quest_progress3608 = get_quest_progress(3608) -- <(version:7.4)>[큐브릭]종식
local romeo = get_flag( "romeo_finding")
-- 다이얼로그 출력
dlg_title( "@90605015" )
dlg_text( "@90605016" )
if quest_progress3601 == 1 then
if romeo == 1 then
dlg_menu( "@90605022", 'romeo_question_real()' )
else
dlg_menu( "@90605022", 'romeo_question_fake()' )
end
end
if quest_progress3608 == 1 then
dlg_menu( "@90605057", 'alarm()' )
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function npc_quest_cubric_Unidentified03()
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 100 : 실패 / 255 : 이미종료
local quest_progress3601 = get_quest_progress(3601) -- <(version:7.4)>[큐브릭]로미오 구출
local quest_progress3608 = get_quest_progress(3608) -- <(version:7.4)>[큐브릭]종식
local romeo = get_flag( "romeo_finding")
-- 다이얼로그 출력
dlg_title( "@90605018" )
dlg_text( "@90605019" )
if quest_progress3601 == 1 then
if romeo == 2 then
dlg_menu( "@90605022", 'romeo_question_real()' )
else
dlg_menu( "@90605022", 'romeo_question_fake()' )
end
end
if quest_progress3608 == 1 then
dlg_menu( "@90605057", 'alarm()' )
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function romeo_question_fake()
local romeo_dice = math.random(0, 1)
-- 다이얼로그 출력
dlg_title( "@90605012" )
if romeo_dice == 0 then
dlg_text( "@90605023" )
else
dlg_text( "@90605024" )
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function npc_quest_cubric_Unidentified04()
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 100 : 실패 / 255 : 이미종료
local quest_progress3603 = get_quest_progress(3603) -- <(version:7.4)>[큐브릭]줄리엣 구출
local quest_progress3608 = get_quest_progress(3608) -- <(version:7.4)>[큐브릭]종식
local juliet = get_flag( "juliet_finding")
-- 다이얼로그 출력
dlg_title( "@90605030" )
dlg_text( "@90605031" )
if quest_progress3603 == 1 then
if juliet == 0 then
dlg_menu( "@90605047", 'juliet_question_real()' )
else
dlg_menu( "@90605047", 'juliet_question_fake()' )
end
end
if quest_progress3608 == 1 then
dlg_menu( "@90605057", 'alarm()' )
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function juliet_question_real()
-- 다이얼로그 출력
dlg_title( "@90605012" )
dlg_text( "@90605050" )
dlg_menu( "@90605051", 'juliet_question_real_talk1()' )
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
function juliet_question_real_talk1()
-- 다이얼로그 출력
dlg_title( "@90605012" )
dlg_text( "@90605052" )
dlg_menu( "@90605053", 'juliet_question_real_talk2()' )
dlg_menu( "@90010002", " " )-- 대화종료
dlg_show()
end
function juliet_question_real_talk2()
-- <(version:7.4)>[큐브릭]줄리엣 구출
set_quest_status( 3603, 1, 1 )
end
function juliet_question_fake()
local juliet_dice = math.random(0, 1)
-- 다이얼로그 출력
dlg_title( "@90605012" )
if juliet_dice == 0 then
dlg_text( "@90605048" )
else
dlg_text( "@90605049" )
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function npc_quest_cubric_Unidentified05()
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 100 : 실패 / 255 : 이미종료
local quest_progress3603 = get_quest_progress(3603) -- <(version:7.4)>[큐브릭]줄리엣 구출
local quest_progress3608 = get_quest_progress(3608) -- <(version:7.4)>[큐브릭]종식
local juliet = get_flag( "juliet_finding")
-- 다이얼로그 출력
dlg_title( "@90605033" )
dlg_text( "@90605034" )
if quest_progress3603 == 1 then
if juliet == 1 then
dlg_menu( "@90605047", 'juliet_question_real()' )
else
dlg_menu( "@90605047", 'juliet_question_fake()' )
end
end
if quest_progress3608 == 1 then
dlg_menu( "@90605057", 'alarm()' )
end
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
function npc_quest_cubric_Unidentified06()
-- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 100 : 실패 / 255 : 이미종료
local quest_progress3603 = get_quest_progress(3603) -- <(version:7.4)>[큐브릭]줄리엣 구출
local quest_progress3608 = get_quest_progress(3608) -- <(version:7.4)>[큐브릭]종식
local juliet = get_flag( "juliet_finding")
-- 다이얼로그 출력
dlg_title( "@90605036" )
dlg_text( "@90605037" )
if quest_progress3603 == 1 then
if juliet == 2 then
dlg_menu( "@90605047", 'juliet_question_real()' )
else
dlg_menu( "@90605047", 'juliet_question_fake()' )
end
end
if quest_progress3608 == 1 then
dlg_menu( "@90605057", 'alarm()' )
end
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
function alarm()
dlg_title( "@90605036" )
local dice = math.random( 0, 2 )
if dice == 0 then
dlg_text( "@90605058" )
elseif dice == 1 then
dlg_text( "@90605059" )
elseif dice == 2 then
dlg_text( "@90605060" )
end
set_quest_status( 3608, 1, 1 ) -- <(version:7.4)>[큐브릭]종식
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
function npc_quest_cubric_into_livedy()
-- 다이얼로그 출력
dlg_title( "@90605039" )
dlg_text( "@90605040" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function npc_quest_cubric_romeo()
-- 다이얼로그 출력
dlg_title( "@90605042" )
dlg_text( "@90605043" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function npc_quest_cubric_juliet()
-- 다이얼로그 출력
dlg_title( "@90605045" )
dlg_text( "@90605046" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 전령사 메호
--============================================================
function NPC_Quest_slaugter1_init()
set_npc_name( "@90605392" )
end
function NPC_Quest_slaugter1_contact()
-- 다이얼로그 출력
dlg_title( "@90605392" )
dlg_text( "@90605393" )
--dlg_menu( "@90605517", 'NPC_Quest_warp()' )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function NPC_Quest_warp()
-- 다이얼로그 출력
dlg_title( "@90605392" )
dlg_text( "@90605516" )
local quest_warp = get_value( "level" )
if quest_warp >= 80 then
dlg_menu( "@90605512", 'NPC_Quest_warp_1()' )
end
if quest_warp >= 100 then
dlg_menu( "@90605513", 'NPC_Quest_warp_2()' )
end
if quest_warp >= 120 then
dlg_menu( "@90605514", 'NPC_Quest_warp_3()' )
end
if quest_warp >= 150 then
dlg_menu( "@90605515", 'NPC_Quest_warp_4()' )
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function NPC_Quest_warp_1()
warp( 116525 + math.random(0,50) , 89736 + math.random(0,50), gv("layer") )
end
function NPC_Quest_warp_2()
warp( 136287 + math.random(0,50) , 106956 + math.random(0,50), gv("layer") )
end
function NPC_Quest_warp_3()
warp( 122864 + math.random(0,50) , 121769 + math.random(0,50), gv("layer") )
end
function NPC_Quest_warp_4()
warp( 96598 + math.random(0,50) , 101299 + math.random(0,50), gv("layer") )
end
--============================================================
--=============== 경비대장 이셀라
--============================================================
function NPC_Quest_slaugter2_init()
set_npc_name( "@90605400" )
end
function NPC_Quest_slaugter2_contact()
dlg_title( "@90605400" )
dlg_text( "@90605401" )
local state_code = get_local_info()
local current_time = get_os_date( "%Y-%m-%d %H:%M:%S" )
if state_code == 4 or state_code == 8 or state_code == 128 or state_code == 16384 or state_code == 32768 or state_code == 65536 then
if '2019-04-16 07:00:00' <= current_time and current_time <= '2019-05-14 08:00:00' then
dlg_menu( "@90610623", "NPC_Event_2018_WZ_9_Anni()" ) -- Devildom Purge event
end
end
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
--============================================================
--=============== 몬스터 연구원 크루아
--============================================================
function NPC_Quest_slaugter3_init()
set_npc_name( "@90605406" )
end
function NPC_Quest_slaugter3_contact()
-- 다이얼로그 출력
dlg_title( "@90605406" )
dlg_text( "@90605407" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 몬스터 연구원 니크
--============================================================
function NPC_Quest_slaugter4_init()
set_npc_name( "@90605408" )
end
function NPC_Quest_slaugter4_contact()
-- 다이얼로그 출력
dlg_title( "@90605408" )
local quest_progress3618 = get_quest_progress(3618) -- <(version:8.1)>공포의괴물
if quest_progress3618 == 0 then
dlg_text( "@90605411" )
-- 퀘스트 수행 전, 수행 중 대사
else
dlg_text( "@90605409" )
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 고고학자 블라브
--============================================================
function NPC_Quest_minotaur1_init()
set_npc_name( "@90605415" )
end
function NPC_Quest_minotaur1_contact()
-- 다이얼로그 출력
dlg_title( "@90605415" )
dlg_text( "@90605416" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 선발대장 미엘
--============================================================
function NPC_Quest_bapho1_init()
set_npc_name( "@90605426" )
end
function NPC_Quest_bapho1_contact()
-- 다이얼로그 출력
dlg_title( "@90605426" )
dlg_text( "@90605430" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 선발대원 라호무
--============================================================
function NPC_Quest_bapho2_init()
set_npc_name( "@90605427" )
end
function NPC_Quest_bapho2_contact()
-- 다이얼로그 출력
dlg_title( "@90605427" )
dlg_text( "@90605431" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 선발대원 히라
--============================================================
function NPC_Quest_bapho3_init()
set_npc_name( "@90605428" )
end
function NPC_Quest_bapho3_contact()
-- 다이얼로그 출력
dlg_title( "@90605428" )
dlg_text( "@90605432" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 선발대원 제리크로
--============================================================
function NPC_Quest_bapho4_init()
set_npc_name( "@90605429" )
end
function NPC_Quest_bapho4_contact()
-- 다이얼로그 출력
dlg_title( "@90605429" )
dlg_text( "@90605433" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 경계하는 마녀단원
--============================================================
function NPC_Quest_bapho5_init()
set_npc_name( "@90605441" )
end
function NPC_Quest_bapho5_contact()
-- 다이얼로그 출력
dlg_title( "@90605441" )
dlg_text( "@90605442" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 숲의 주인 마히베흐
--============================================================
function NPC_Quest_undine1_init()
set_npc_name( "@90605451" )
end
function NPC_Quest_undine1_contact()
-- 다이얼로그 출력
dlg_title( "@90605451" )
dlg_text( "@90605455" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 숲의 정령 로
--============================================================
function NPC_Quest_undine2_init()
set_npc_name( "@90605452" )
end
function NPC_Quest_undine2_contact()
-- 다이얼로그 출력
dlg_title( "@90605452" )
dlg_text( "@90605456" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 숲의 정령 히르
--============================================================
function NPC_Quest_undine3_init()
set_npc_name( "@90605453" )
end
function NPC_Quest_undine3_contact()
-- 다이얼로그 출력
dlg_title( "@90605453" )
dlg_text( "@90605456" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 숲의 정령 헤이르
--============================================================
function NPC_Quest_undine4_init()
set_npc_name( "@90605454" )
end
function NPC_Quest_undine4_contact()
-- 다이얼로그 출력
dlg_title( "@90605454" )
dlg_text( "@90605456" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 현장감독 헤더
--============================================================
function NPC_Quest_pick1_init()
set_npc_name( "@90605460" )
end
function NPC_Quest_pick1_contact()
-- 다이얼로그 출력
dlg_title( "@90605460" )
dlg_text( "@90605465" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 기계공학자 셸
--============================================================
function NPC_Quest_pick2_init()
set_npc_name( "@90605461" )
end
function NPC_Quest_pick2_contact()
-- 다이얼로그 출력
dlg_title( "@90605461" )
dlg_text( "@90605466" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 기계공학자 동수
--============================================================
function NPC_Quest_pick3_init()
set_npc_name( "@90605462" )
end
function NPC_Quest_pick3_contact()
-- 다이얼로그 출력
dlg_title( "@90605462" )
dlg_text( "@90605467" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 기계공학자 머피나
--============================================================
function NPC_Quest_pick4_init()
set_npc_name( "@90605463" )
end
function NPC_Quest_pick4_contact()
-- 다이얼로그 출력
dlg_title( "@90605463" )
dlg_text( "@90605468" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 기계공학자 오더크
--============================================================
function NPC_Quest_pick5_init()
set_npc_name( "@90605464" )
end
function NPC_Quest_pick5_contact()
-- 다이얼로그 출력
dlg_title( "@90605464" )
dlg_text( "@90605469" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--================================================================
------------------------- 퀘스트 링크 스크립트--------------------
--================================================================
-- 경비대장에게 보고 : 수락
-- 퀘템 인벤토리에 넣어주기
function quest_start_3615()
--퀘템 카운트 구하기
local item_slt3615_qitem_count = find_item ( 1000426 )
if item_slt3615_qitem_count >= 1 then
for i = 0, 10 do
-- 퀘템 남은 아이템 없애기
delete_item( get_item_handle( 1000426 ), item_slt3615_qitem_count )
end
else
-- 퀘템 넣어주기
insert_item( 1000426, 1 )
cprint( "@90605479" ) -- 퀘템 받아?
end
end
-- 경비대장에게 보고 : 클리어
-- 퀘템 인벤토리에서 삭제
function quest_end_3615()
--퀘템 카운트 구하기
local item_slt3615_qitem_count = find_item ( 1000426 )
if item_slt3615_qitem_count >= 1 then
for i = 0, 10 do
-- 퀘템 남은 아이템 없애기
delete_item( get_item_handle( 1000426 ), item_slt3615_qitem_count )
end
cprint( "@90605480" ) -- 퀘템 뺏었긔
end
end
------------------------------------------------------------
--퀘스트 포기 아이템 삭제
------------------------------------------------------------
-- 경비대장에게 보고 : 포기
-- 퀘템 인벤토리에서 삭제
function quest_drop_3615()
--퀘템 카운트 구하기
local item_slt3615_qitem_count = find_item ( 1000426 )
if item_slt3615_qitem_count >= 1 then
for i = 0, 10 do
-- 퀘템 남은 아이템 없애기
delete_item( get_item_handle( 1000426 ), item_slt3615_qitem_count )
end
end
end
-- 비밀기지인가? : 포기
-- 퀘템 인벤토리에서 삭제
function quest_drop_3616()
--퀘템 카운트 구하기
local item_slt3616_qitem_count = find_item ( 1000427 )
if item_slt3616_qitem_count >= 1 then
for i = 0, 10 do
-- 퀘템 남은 아이템 없애기
delete_item( get_item_handle( 1000427 ), item_slt3616_qitem_count )
end
end
end
-- 사막의 수다쟁이 : 포기
-- 퀘템 인벤토리에서 삭제
function quest_drop_3619()
--퀘템 카운트 구하기
local item_slt3619_qitem_count = find_item ( 1000428 )
if item_slt3619_qitem_count >= 1 then
for i = 0, 10 do
-- 퀘템 남은 아이템 없애기
delete_item( get_item_handle( 1000428 ), item_slt3619_qitem_count )
end
end
end
-- 무너진 미궁탐사 : 포기
-- 퀘템 인벤토리에서 삭제
function quest_drop_3621()
--퀘템 카운트 구하기
local item_slt3621_qitem_count = find_item ( 1000429 )
if item_slt3621_qitem_count >= 1 then
for i = 0, 10 do
-- 퀘템 남은 아이템 없애기
delete_item( get_item_handle( 1000429 ), item_slt3621_qitem_count )
end
end
end
-- 물품상자 회수 : 포기
-- 퀘템 인벤토리에서 삭제
function quest_drop_3623()
--퀘템 카운트 구하기
local item_slt3623_qitem_count = find_item ( 1000430 )
if item_slt3623_qitem_count >= 1 then
for i = 0, 10 do
-- 퀘템 남은 아이템 없애기
delete_item( get_item_handle( 1000430 ), item_slt3623_qitem_count )
end
end
end
-- 어둠의힘과 숲의 주인 : 포기
-- 퀘템 인벤토리에서 삭제
function quest_drop_3629()
--퀘템 카운트 구하기
local item_slt3629_qitem_count = find_item ( 1000431 )
if item_slt3629_qitem_count >= 1 then
for i = 0, 10 do
-- 퀘템 남은 아이템 없애기
delete_item( get_item_handle( 1000431 ), item_slt3629_qitem_count )
end
end
end
-- 수정회수 : 포기
-- 퀘템 인벤토리에서 삭제
function quest_drop_3630()
--퀘템 카운트 구하기
local item_slt3630_qitem_count = find_item ( 1000433 )
if item_slt3630_qitem_count >= 1 then
for i = 0, 10 do
-- 퀘템 남은 아이템 없애기
delete_item( get_item_handle( 1000433 ), item_slt3630_qitem_count )
end
end
end
-- 수정협곡의 조사 : 포기
-- 퀘템 인벤토리에서 삭제
function quest_drop_3631()
--퀘템 카운트 구하기
local item_slt3631_qitem_count = find_item ( 1000432 )
if item_slt3631_qitem_count >= 1 then
for i = 0, 10 do
-- 퀘템 남은 아이템 없애기
delete_item( get_item_handle( 1000432 ), item_slt3631_qitem_count )
end
end
end
-----------------------------------------------------------------------------
--일퀘로 AP지급 - 슬래터20//미노타우르스:30//바포메트:40//운디네:50//픽 :100ap 지급
--1일 총 240ap 획득 가능
-- 슬래터 일퀘완료시 관련 퀘스트 플래그 삭제
--MohcenMaher
function quest_end_3618()
--해당 연퀘 초기화
local fbossap = get_value( 'ap' )
local questapbonus_a = 10--100
if gv( "premium" ) == 1 then
questapbonus_a = 20--200
end
local fbossap = fbossap + questapbonus_a
set_value( "ap", fbossap )
cprint(sconv("@90605481","#@questapbonus_a@#", tostring(questapbonus_a) ) )
reset_finished_quest( 3613 )
--reset_finished_quest( 3614 )
reset_finished_quest( 3615 )
--reset_finished_quest( 3616 )
reset_finished_quest( 3617 )
reset_finished_quest( 3618 )
end
-- 미노타우르스 일퀘완료시 관련 퀘스트 플래그 삭제
function quest_end_3621()
--해당 연퀘 초기화
-------------------------------
local fbossap = get_value( 'ap' )
local questapbonus_a = 10--100
if gv( "premium" ) == 1 then
questapbonus_a = 20--200
end
local fbossap = fbossap + questapbonus_a
set_value( "ap", fbossap )
cprint(sconv("@90605481","#@questapbonus_a@#", tostring(questapbonus_a) ) )
reset_finished_quest( 3619 )
reset_finished_quest( 3620 )
reset_finished_quest( 3621 )
end
-- 바포메트 일퀘완료시 관련 퀘스트 플래그 삭제
function quest_end_3627()
--해당 연퀘 초기화
-------------------------------
local fbossap = get_value( 'ap' )
local questapbonus_a = 10--100
if gv( "premium" ) == 1 then
questapbonus_a = 20--200
end
local fbossap = fbossap + questapbonus_a
set_value( "ap", fbossap )
cprint(sconv("@90605481","#@questapbonus_a@#", tostring(questapbonus_a) ) )
reset_finished_quest( 3622 )
--reset_finished_quest( 3623 )
--reset_finished_quest( 3624 )
--reset_finished_quest( 3625 )
reset_finished_quest( 3626 )
reset_finished_quest( 3627 )
end
-- 운다인 일퀘완료시 관련 퀘스트 플래그 삭제
function quest_end_3629()
--해당 연퀘 초기화
-------------------------------
local fbossap = get_value( 'ap' )
local questapbonus_a = 10--100
if gv( "premium" ) == 1 then
questapbonus_a = 20--200
end
local fbossap = fbossap + questapbonus_a
set_value( "ap", fbossap )
cprint(sconv("@90605481","#@questapbonus_a@#", tostring(questapbonus_a) ) )
reset_finished_quest( 3628 )
reset_finished_quest( 3629 )
end
-- 픽 일퀘완료시 관련 퀘스트 플래그 삭제
function quest_end_3632()
--해당 연퀘 초기화
-------------------------------
local fbossap = get_value( 'ap' )
local questapbonus_a = 10--100
if gv( "premium" ) == 1 then
questapbonus_a = 20--200
end
local fbossap = fbossap + questapbonus_a
set_value( "ap", fbossap )
cprint(sconv("@90605481","#@questapbonus_a@#", tostring(questapbonus_a) ) )
--reset_finished_quest( 3630 )
--reset_finished_quest( 3631 )
reset_finished_quest( 3632 )
end
--4대인던 일일퀘스트 수락/완료 스크립트
function quest_start_3644()
end
function quest_end_3644()
reset_finished_quest( 3640 )
reset_finished_quest( 3644 )
end
function quest_start_3645()
end
function quest_end_3645()
reset_finished_quest( 3641 )
reset_finished_quest( 3645 )
end
function quest_start_3646()
end
function quest_end_3646()
reset_finished_quest( 3642 )
reset_finished_quest( 3646 )
end
function quest_start_3647()
end
function quest_end_3647()
reset_finished_quest( 3643 )
reset_finished_quest( 3647 )
end
--4대 인던 반복 퀘스트 수락/완료 스크립트
function quest_start_3648()
end
function quest_end_3648()
reset_finished_quest( 3648 )
end
--8.3 신규 일일퀘스트 수락/완료 스크립트
function quest_end_3712()
reset_finished_quest( 3712 )
end
function quest_end_3713()
reset_finished_quest( 3713 )
end
function quest_end_3714()
reset_finished_quest( 3714 )
end
function quest_end_3715()
reset_finished_quest( 3715 )
end
function quest_end_3716()
reset_finished_quest( 3716 )
end
function quest_end_3717()
reset_finished_quest( 3717 )
end
function quest_end_3718()
reset_finished_quest( 3718 )
end
function quest_end_3719()
reset_finished_quest( 3719 )
end
function quest_end_3720()
reset_finished_quest( 3720 )
end
function quest_end_3721()
reset_finished_quest( 3721 )
end
function quest_end_3722()
reset_finished_quest( 3722 )
end
function quest_end_3723()
reset_finished_quest( 3723 )
end
function quest_end_3724()
reset_finished_quest( 3724 )
end
function quest_end_3725()
reset_finished_quest( 3725 )
end
function quest_end_3726()
reset_finished_quest( 3726 )
end
function quest_end_3727()
reset_finished_quest( 3727 )
end
function quest_end_3728()
reset_finished_quest( 3728 )
end
function quest_end_3729()
reset_finished_quest( 3729 )
end
function quest_end_3730()
reset_finished_quest( 3730 )
end
function quest_end_3731()
reset_finished_quest( 3731 )
end
function quest_end_3732()
reset_finished_quest( 3732 )
end
function quest_end_3733()
reset_finished_quest( 3733 )
end
function quest_end_3734()
reset_finished_quest( 3734 )
end
function quest_end_3735()
reset_finished_quest( 3735 )
end
function quest_end_3736()
reset_finished_quest( 3736 )
end
--9.1 신규 일일퀘스트 수락/완료 스크립트
function quest_end_4000()
reset_finished_quest( 4000 )
end
function quest_end_4001()
reset_finished_quest( 4001 )
end
function quest_end_4002()
reset_finished_quest( 4002 )
end
function quest_end_4003()
reset_finished_quest( 4003 )
end
function quest_end_4004()
reset_finished_quest( 4004 )
end
function quest_end_4005()
reset_finished_quest( 4005 )
end
function quest_end_4006()
reset_finished_quest( 4006 )
end
function quest_end_4007()
reset_finished_quest( 4007 )
end
function quest_end_4008()
reset_finished_quest( 4008 )
end
-- <ep9>선발대원 소유
function NPC_circus_soyu()
-- 다이얼로그 출력
dlg_title("@90606169")
dlg_text( "@90606170" )
dlg_menu( "@90010002", " " )
dlg_show()
end
function NPC_circus_maximus()
-- 다이얼로그 출력
dlg_title("@90606171")
dlg_text( "@90606172" )
dlg_menu( "@90010002", " " )
dlg_show()
end
function NPC_circus_tesker()
-- 다이얼로그 출력
dlg_title("@90606173")
dlg_text( "@90606174" )
dlg_menu( "@90010002", " " )
dlg_show()
end
function NPC_circus_teo()
-- 다이얼로그 출력
dlg_title("@90606175")
dlg_text( "@90606176" )
dlg_menu( "@90010002", " " )
dlg_show()
end
function NPC_circus_glasse()
-- 다이얼로그 출력
dlg_title("@90606177")
dlg_text( "@90606178" )
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 호라이즌 삐에로
--============================================================
function NPC_pierrot_Horizon_init()
cprint( "!호라이즌 삐에로 가동" )
set_npc_name( "@90610036" )
end
function NPC_pierrot_Horizon_contact()
local state_code = get_local_info()
local level = get_value( "level" )
-- 다이얼로그 출력
dlg_title( "@90610037" )
dlg_text( "@90610038" )
if state_code == 256 and level >= 80 then
dlg_menu( "@90610039","Exchange_lucky_gift_1()" )
else
dlg_menu( "@90610039","Exchange_lucky_gift_1()" )
end
if state_code == 16 then
dlg_menu( "@90010062", "open_market( 'Locked_Treasure_Chest' )" )
end
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function Exchange_lucky_gift_1()
-- 다이얼로그 출력
dlg_title( "@90610037" )
dlg_text( "@90610040" )
dlg_menu( "@90610041","Exchange_lucky_gift_2(1)" )
dlg_menu( "@90610042","Exchange_lucky_gift_2(2)" )
dlg_menu( "@90610043","Exchange_lucky_gift_2(3)" )
dlg_menu( "@12016073","Exchange_lucky_gift_2(4)" ) -- ????
dlg_menu( "@12014008","Exchange_lucky_gift_2(5)" ) -- ??? ????????
dlg_menu( "@90610046","Exchange_lucky_gift_2(6)" )
dlg_menu( "@90610047","Exchange_lucky_gift_2(7)" )
dlg_menu( "@11000109","Exchange_lucky_gift_2(8)" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function Exchange_lucky_gift_2(gift)
-- 다이얼로그 출력
dlg_title( "@90610037" )
if gift == 1 then
dlg_text( "@90610049" )
local item_count_3 = find_item ( 1000460 )
if item_count_3 >= 1 then
dlg_menu( "@90610057","Exchange_lucky_gift_process(1)" )
end
elseif gift == 2 then
dlg_text( "@90610050" )
local item_count_5 = find_item ( 1000462 )
if item_count_5 >= 1 then
dlg_menu( "@90610058","Exchange_lucky_gift_process(2)" )
end
elseif gift == 3 then
dlg_text( "@90610051" )
local item_count_11 = find_item ( 1000468 )
if item_count_11 >= 1 then
dlg_menu( "@90610059","Exchange_lucky_gift_process(3)" )
end
elseif gift == 4 then
dlg_text( "@90610052" )
local item_count_8 = find_item ( 1000465 )
local item_count_15 = find_item ( 1000472 )
if item_count_8 >= 1 and item_count_15 >= 1 then
dlg_menu( "@71102553","Exchange_lucky_gift_process(4)" )
end
elseif gift == 5 then
dlg_text( "@90610053" )
local item_count_2 = find_item ( 1000459 )
local item_count_6 = find_item ( 1000463 )
local item_count_13 = find_item ( 1000470 )
if item_count_2 >= 1 and item_count_6 >= 1 and item_count_13 >= 1 then
dlg_menu( "@12014008","Exchange_lucky_gift_process(5)" )
end
elseif gift == 6 then
dlg_text( "@90610054" )
local item_count_9 = find_item ( 1000466 )
local item_count_12 = find_item ( 1000469 )
local item_count_18 = find_item ( 1000475 )
if item_count_9 >= 1 and item_count_12 >= 1 and item_count_18 >= 1 then
dlg_menu( "@90610062","Exchange_lucky_gift_process(6)" )
end
elseif gift == 7 then
dlg_text( "@90610055" )
local item_count_4 = find_item ( 1000461 )
local item_count_16 = find_item ( 1000473 )
local item_count_19 = find_item ( 1000476 )
if item_count_4 >= 1 and item_count_16 >= 1 and item_count_19 >= 1 then
dlg_menu( "@90610063","Exchange_lucky_gift_process(7)" )
end
elseif gift == 8 then
dlg_text( "@90610056" )
local item_count_1 = find_item ( 1000458 )
local item_count_7 = find_item ( 1000464 )
local item_count_10 = find_item ( 1000467 )
local item_count_14 = find_item ( 1000471 )
local item_count_17 = find_item ( 1000474 )
local item_count_20 = find_item ( 1000477 )
if item_count_1 >= 1 and item_count_7 >= 1 and item_count_10 >= 1 and item_count_14 >= 1 and item_count_17 >= 1 and item_count_20 >= 1 then
dlg_menu( "@11000109","Exchange_lucky_gift_process(8)" )
end
end
-- 돌아가기
dlg_menu( "@90010003", "Exchange_lucky_gift_1()" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function Exchange_lucky_gift_process(gift)
if gift == 1 then
--조건 확인해서 아이템 다 들고 있으면 교환해주고 Exchange_lucky_gift_success()로 보내주기. 선택메뉴 다시
local item_count_3 = find_item ( 1000460 )
if item_count_3 >= 1 then
insert_item( 2013203, 1 )
delete_item( get_item_handle( 1000460 ), 1 )
Exchange_lucky_gift_success()
return
end
elseif gift == 2 then
local item_count_5 = find_item ( 1000462 )
if item_count_5 >= 1 then
insert_item( 2013202, 1 )
delete_item( get_item_handle( 1000462 ), 1 )
Exchange_lucky_gift_success()
return
end
elseif gift == 3 then
local item_count_11 = find_item ( 1000468 )
if item_count_11 >= 1 then
insert_item( 2013201, 1 )
delete_item( get_item_handle( 1000468 ), 1 )
Exchange_lucky_gift_success()
return
end
elseif gift == 4 then
local item_count_8 = find_item ( 1000465 )
local item_count_15 = find_item ( 1000472 )
if item_count_8 >= 1 and item_count_15 >= 1 then
insert_item( 2016073, 5 )
delete_item( get_item_handle( 1000465 ), 1 )
delete_item( get_item_handle( 1000472 ), 1 )
Exchange_lucky_gift_success()
return
end
elseif gift == 5 then
local item_count_2 = find_item ( 1000459 )
local item_count_6 = find_item ( 1000463 )
local item_count_13 = find_item ( 1000470 )
if item_count_2 >= 1 and item_count_6 >= 1 and item_count_13 >= 1 then
insert_item( 2014008, 1 )
delete_item( get_item_handle( 1000459 ), 1 )
delete_item( get_item_handle( 1000463 ), 1 )
delete_item( get_item_handle( 1000470 ), 1 )
Exchange_lucky_gift_success()
return
end
elseif gift == 6 then
local item_count_9 = find_item ( 1000466 )
local item_count_12 = find_item ( 1000469 )
local item_count_18 = find_item ( 1000475 )
if item_count_9 >= 1 and item_count_12 >= 1 and item_count_18 >= 1 then
insert_item( 1000482, 2 )
delete_item( get_item_handle( 1000466 ), 1 )
delete_item( get_item_handle( 1000469 ), 1 )
delete_item( get_item_handle( 1000475 ), 1 )
Exchange_lucky_gift_success()
return
end
elseif gift == 7 then
local item_count_4 = find_item ( 1000461 )
local item_count_16 = find_item ( 1000473 )
local item_count_19 = find_item ( 1000476 )
if item_count_4 >= 1 and item_count_16 >= 1 and item_count_19 >= 1 then
insert_item( 1000483, 2 )
delete_item( get_item_handle( 1000461 ), 1 )
delete_item( get_item_handle( 1000473 ), 1 )
delete_item( get_item_handle( 1000476 ), 1 )
Exchange_lucky_gift_success()
return
end
elseif gift == 8 then
local item_count_1 = find_item ( 1000458 )
local item_count_7 = find_item ( 1000464 )
local item_count_10 = find_item ( 1000467 )
local item_count_14 = find_item ( 1000471 )
local item_count_17 = find_item ( 1000474 )
local item_count_20 = find_item ( 1000477 )
if item_count_1 >= 1 and item_count_7 >= 1 and item_count_10 >= 1 and item_count_14 >= 1 and item_count_17 >= 1 and item_count_20 >= 1 then
insert_item( 2013162, 1 )
insert_item( 2013163, 1 )
insert_item( 2013165, 1 )
delete_item( get_item_handle( 1000458 ), 1 )
delete_item( get_item_handle( 1000464 ), 1 )
delete_item( get_item_handle( 1000467 ), 1 )
delete_item( get_item_handle( 1000471 ), 1 )
delete_item( get_item_handle( 1000474 ), 1 )
delete_item( get_item_handle( 1000477 ), 1 )
Exchange_lucky_gift_success()
return
end
end
-- 다이얼로그 출력
dlg_title( "@90610037" )
-- 조건 맞는거 없으면 종이 들고 오라고 하고 닫기 메뉴 출력
dlg_text( "@90610066" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
function Exchange_lucky_gift_success()
-- 다이얼로그 출력
dlg_title( "@90610037" )
dlg_text( "@90610065" )
dlg_menu( "@90610041","Exchange_lucky_gift_2(1)" )
dlg_menu( "@90610042","Exchange_lucky_gift_2(2)" )
dlg_menu( "@90610043","Exchange_lucky_gift_2(3)" )
dlg_menu( "@12016073","Exchange_lucky_gift_2(4)" )
dlg_menu( "@12014008","Exchange_lucky_gift_2(5)" )
dlg_menu( "@90610046","Exchange_lucky_gift_2(6)" )
dlg_menu( "@90610047","Exchange_lucky_gift_2(7)" )
dlg_menu( "@11000109","Exchange_lucky_gift_2(8)" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 유적도시 헥토르
--============================================================
function NPC_Hector_RuinCity_init()
cprint( "!무사 헥토르 가동" )
set_npc_name( "@90610120" )
end
function NPC_Hector_RuinCity_contact()
-- 다이얼로그 출력
dlg_title( "@90610121" )
dlg_text( "@90610122" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 유적도시 마녀의 아이 샤비
--============================================================
function NPC_Xabi_RuinCity_init()
cprint( "!마녀의 아이 샤비 가동" )
set_npc_name( "@90610123" )
end
function NPC_Xabi_RuinCity_contact()
-- 다이얼로그 출력
dlg_title( "@90610124" )
dlg_text( "@90610125" )
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
--============================================================
--=============== 사이라그 폐허 수호군 NPC
--============================================================
function NPC_Guard_Sirag_init()
cprint( "!수호군 NPC 가동" )
set_npc_name( "@90610126" )
end
function NPC_Guard_Sirag_contact()
-- 다이얼로그 출력
dlg_title( "@90610127" )
dlg_text( "@90610128" )
if get_guild_grade(gv("guild_id"))>10 then dlg_menu("@1937","request_dungeon_raid(121100)") end --MohcenMaher
-- 대화종료
dlg_menu( "@90010002", " " )
dlg_show()
end
-- 공용 퀘스트 종료후 리셋 테스트
function common_quest_end(questID)
reset_finished_quest( questID )
end
--============================================================
--=============== 9.4 NPC
--============================================================
-- 승선 안내원 얀
function NPC_Guide_aboard_yarn_contact()
-- 다이얼로그 출력
--[[ dlg_title( "@90610255" )
if get_minute() >= 0 and get_minute() <= 10 then
dlg_text("@1174") -- 탑승시 곧 배가 출항합니다.
else
dlg_text( sconv( "@90610256" , "#@min@#", tostring(60-get_minute()) )) -- 출항 ~분 남았습니다.
end
dlg_menu( "@90610257", "shepard_boarding()" ) -- 탑승
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show() ]]
dlg_title( "@90610255" )
local left_min = get_minute()
if left_min > 30 then
left_min = left_min - 30
end
if left_min >= 0 and left_min <= 5 then
dlg_text("@1174") -- 탑승시 곧 배가 출항합니다.
else
dlg_text( sconv( "@90610256" , "#@min@#", tostring(30-left_min) )) -- 출항 ~분 남았습니다.
end
dlg_menu( "@90610257", "shepard_boarding()" ) -- 탑승
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
function shepard_boarding()
if find_item( 2016091 ) >= 1 then
--private_notice( "@90610259" )
message( "@90610259" )
warp (155347, 149512)
else
-- 다이얼로그 출력
dlg_title( "@90610255" ) -- 승선 안내원 얀
dlg_text( "@90610258" ) -- 탑승권 필요
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
end
-- 유적 탐사대 샐리, 밀리
function NPC_Expedition_Sally_Milli_contact()
--[[ if get_value( "x" ) >= 155211 and get_value( "x" ) <= 155483 and get_value( "y" ) >= 149451 and get_value( "y" ) <= 149574 then ]]
local npc_id = get_npc_id()
-- 다이얼로그 출력
if npc_id == 15040 then
dlg_title( "@90610260" ) -- 샐리
dlg_text( "@90610262" )
dlg_menu( "@90610263", "Luciad_protection_buff()" ) -- 샐리 : 루시아드 보호
dlg_menu( "@90610264", "Luciad_blessing_buff()" ) -- 밀리 : 루시아드 가호 --MohcenMaher, 9.7
elseif npc_id == 15042 then
dlg_title( "@90610261" ) -- 밀리
dlg_text( "@90610262" )
dlg_menu( "@90610264", "Luciad_blessing_buff()" ) -- 밀리 : 루시아드 가호
end
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
--[[ end ]]
end
function Luciad_protection_buff()
dlg_title( "@90610260" ) -- 유적 탐사대 샐리
if find_item( 2016092 ) >= 1 then
dlg_text( "@90610275" )
add_state(1067, 1,360000) -- 55분 퀘스트 플래그 체크 --MohcenMaher, 9.7, 33>36
delete_item( get_item_handle( 2016092 ), 1 )
else
dlg_text( "@90610274" ) -- 신들의 흔적 필요
end
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
function Luciad_blessing_buff()
dlg_title( "@90610261" ) -- 유적 탐사대 밀리
if find_item( 2016092 ) >= 1 then
dlg_text( "@90610275" )
add_state(1068, 1,360000) -- 55분 퀘스트 플래그 체크 --MohcenMaher, 9.7, 33>36
delete_item( get_item_handle( 2016092 ), 1 )
else
dlg_text( "@90610274" ) -- 신들의 흔적 필요
end
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
-- 선장 매클리 마을
function NPC_shepard_captain_Town_contact()
dlg_title( "@90610265" )
if get_minute() >= 0 and get_minute() <= 10 then
dlg_text("@1175") -- 곧 배가 출항합니다.
else
dlg_text( sconv( "@90610266" , "#@min@#", tostring(60-get_minute()) )) -- 출항 ~분 남았습니다.
end
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
-- 선장 매클리 섬
function NPC_shepard_captain_Island_contact()
dlg_title( "@90610265" )
dlg_text( "@90610267") -- 많은 성과...
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
-- 하급 선원
function NPC_Junior_crew_contact()
dlg_title( "@90610268" )
dlg_text( "@90610269")
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
-- 상급 선원
function NPC_Senior_crew_contact()
dlg_title( "@90610270" )
dlg_text( "@90610271")
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
-- 등대지기 노팅겔
function NPC_lighthouse_keeper_contact()
dlg_title( "@90610272" )
dlg_text( "@90610273")
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
-- 루시아드 학회 파견관 루스
function NPC_dispatched_Ruth_contact()
local state_code = get_local_info()
--AnmraEdit
dlg_title( "@90610280" )
dlg_text( "@90610281")
if state_code == 4 or state_code == 8 or state_code == 128 or state_code == 16384 or state_code == 32768 or state_code == 65536 then
dlg_menu( "@90610488", "NPC_Event_2017_dispatched_Ruth_trade()" ) -- Trade 20 Sign of Forgotten Gods
end
dlg_menu( "閣權?飾픽?20 安蓍 햐텁幹玟?" , "NPC_Event_2017_dispatched_Ruth_trade()" )
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
function dlg_menu_exchange ( item , dlg ) -- 교환아이템을 보유중일때만 메뉴에 뜨는 펑션
local cnt1 = find_item( item )
if cnt1 > 0 then
dlg_menu( "@90610870\v#@item1@#\v@"..(10000000+item).."\v#@number1@#\v"..cnt1, dlg ) -- <#AA99AA>#@item1@# (보유: #@number1@#)
end
end
------------------------------------------------------
function NPC_dailyquest_9_2_exchang() -- 주화 교환원
-----------------------------------------------------
NPC_dailyquest_coin_exchange()
end
--AnmraEdit
function NPC_dailyquest_coin_exchange() -- 주화교환원 스크립트명에서 9_2 -> coin
local state_code = get_local_info()
dlg_title( "@690000128" )
dlg_text( "@90610872" ) -- 무엇을 원하시나요?
dlg_menu( "@90610871", "exchange_coin(0)" ) -- 주화로 아이템 교환
--dlg_menu( "@90610309", "exchange_skillcard_Anmra(0)" ) -- 스킬 카드 교환
if state_code ~= 512 and state_code ~= 4096 then
--dlg_menu( "<#ebe6ad>|@90610938|<#ff0000>NEW", "exchange_devildom_Anmra(0)" ) -- <#6DD66D> 상자/주머니 열기 는 초록색
--dlg_menu( "@90610840", "exchange_cube(0,0)" ) -- 7랭크 큐브 제작/교환
end
-- 변화의힘 교환 북미, 태국, 필리핀 제외
if state_code == 1 or state_code == 256 --[[or state_code == 8192]] then --MohcenMaher, S.A
dlg_menu_exchange( 705014, "exchange_alteration(0,0)")
dlg_menu_exchange( 705009, "exchange_alteration(1,0)")
end
-- 캐랙터 귀속 이벤트 아이템 계정 귀속으로 교환
if state_code == 1 or state_code == 256 or state_code == 8192 then --MohcenMaher, S.A
dlg_menu( "@7814 |@90606604", "exchange_locked(0)" )
dlg_menu( "@90611046", "exchange_attribute(0)" ) -- 장비 속성 추가
end
dlg_menu( "@90010002", " " ) --대화 종료
dlg_show()
end
function exchange_attribute(sel,handle, effect)
local code
dlg_title( "@690000128" )
if sel == 0 then
dlg_text( "@90611047" )
for i = 0, 12 do
if i == 12 then
handle = get_wear_item_handle(26)
--cprint(handle)
elseif i == 7 then
--continue
else
handle = get_wear_item_handle( i )
end
if handle > 0 then
code = get_item_code(handle)
local eff = get_item_effect(handle)
local grade = get_item_grade(handle)
if code > 30000000 and code < 35000000 and eff < 100000 and grade>=1 and grade <= 7 then
dlg_menu( "<#ebe6ad>|@" .. tostring(get_item_name_id(code)) , "exchange_attribute(1," .. handle .. ")" )
end
end
end
elseif sel == 1 then
dlg_text( "@90611050" )
code = get_item_code(handle)
local grade = get_item_grade(handle)
local type = get_item_type(handle)
local pbase = { 100932, 100932, 100965, 100954, 100976, 100987, 100998, 0, 101020, 100921, 100921, 101009, 100943,
400089, 400089, 400161, 400137, 400185, 400209, 400233, 0, 400041, 400065, 400065, 400017, 400113 }
--우,좌,갑,투,장,부,벨,망,목,반,반,귀,쌍
local base = 0
if grade >=1 and grade <=3 then
if type == 99 then
base = pbase[12+1]
elseif type >=0 and type <=11 then
base = pbase[type+1]
end
if base > 0 and grade >=1 and grade <=3 then
dlg_menu( "<#ebe6ad>|@90610953|@" .. tostring(get_item_name_id(code)) , "exchange_attribute(2," .. handle .. "," .. base+0 .. ")" ) -- 90610953
dlg_menu( "<#ebe6ad>|@90610954|@" .. tostring(get_item_name_id(code)) , "exchange_attribute(2," .. handle .. "," .. base+1 .. ")" ) -- 90610954
dlg_menu( "<#ebe6ad>|@90610955|@" .. tostring(get_item_name_id(code)) , "exchange_attribute(2," .. handle .. "," .. base+2 .. ")" ) -- 90610955
dlg_menu( "<#ebe6ad>|@90610956|@" .. tostring(get_item_name_id(code)) , "exchange_attribute(2," .. handle .. "," .. base+3 .. ")" ) -- 90610956
dlg_menu( "<#ebe6ad>|@90610957|@" .. tostring(get_item_name_id(code)) , "exchange_attribute(2," .. handle .. "," .. base+4 .. ")" ) -- 90610957
dlg_menu( "<#ebe6ad>|@90610958|@" .. tostring(get_item_name_id(code)) , "exchange_attribute(2," .. handle .. "," .. base+5 .. ")" ) -- 90610958
dlg_menu( "<#ebe6ad>|@90610959|@" .. tostring(get_item_name_id(code)) , "exchange_attribute(2," .. handle .. "," .. base+6 .. ")" ) -- 90610959
dlg_menu( "<#ebe6ad>|@90610960|@" .. tostring(get_item_name_id(code)) , "exchange_attribute(2," .. handle .. "," .. base+7 .. ")" ) -- 90610960
dlg_menu( "<#ebe6ad>|@90610961|@" .. tostring(get_item_name_id(code)) , "exchange_attribute(2," .. handle .. "," .. base+8 .. ")" ) -- 90610961
dlg_menu( "<#ebe6ad>|@90610962|@" .. tostring(get_item_name_id(code)) , "exchange_attribute(2," .. handle .. "," .. base+9 .. ")" ) -- 90610962
dlg_menu( "<#ebe6ad>|@90610963|@" .. tostring(get_item_name_id(code)) , "exchange_attribute(2," .. handle .. "," .. base+10 .. ")" ) -- 90610963
end
elseif grade >=5 and grade <=7 then
if type == 99 then
base = pbase[12+14]
elseif type >=0 and type <=11 then
base = pbase[type+14]
end
if base > 0 then
dlg_menu( "<#ebe6ad>|@90610964|@" .. tostring(get_item_name_id(code)) , "exchange_attribute(2," .. handle .. "," .. base+0 .. ")" ) -- 90610964
dlg_menu( "<#ebe6ad>|@90610965|@" .. tostring(get_item_name_id(code)) , "exchange_attribute(2," .. handle .. "," .. base+1 .. ")" ) -- 90610965
dlg_menu( "<#ebe6ad>|@90610966|@" .. tostring(get_item_name_id(code)) , "exchange_attribute(2," .. handle .. "," .. base+2 .. ")" ) -- 90610966
dlg_menu( "<#ebe6ad>|@90610967|@" .. tostring(get_item_name_id(code)) , "exchange_attribute(2," .. handle .. "," .. base+3 .. ")" ) -- 90610967
dlg_menu( "<#ebe6ad>|@90610968|@" .. tostring(get_item_name_id(code)) , "exchange_attribute(2," .. handle .. "," .. base+4 .. ")" ) -- 90610968
dlg_menu( "<#ebe6ad>|@90610969|@" .. tostring(get_item_name_id(code)) , "exchange_attribute(2," .. handle .. "," .. base+5 .. ")" ) -- 90610969
dlg_menu( "<#ebe6ad>|@90610970|@" .. tostring(get_item_name_id(code)) , "exchange_attribute(2," .. handle .. "," .. base+6 .. ")" ) -- 90610970
dlg_menu( "<#ebe6ad>|@90610971|@" .. tostring(get_item_name_id(code)) , "exchange_attribute(2," .. handle .. "," .. base+7 .. ")" ) -- 90610971
end
end
elseif sel == 2 then
local prev = get_item_effect(handle,effect)
if prev == nill or prev <100000 then
set_item_effect(handle,effect)
dlg_text( "@90611048" )
else
dlg_text( "@90611049" )
end
end
if sel == 1 then
dlg_menu( "@90010003", "exchange_attribute(0)" ) --돌아가기
else
dlg_menu( "@90010003", "NPC_dailyquest_coin_exchange()" ) --돌아가기
end
dlg_menu( "@90010002", " " ) --대화 종료
dlg_show()
end
function exchange_locked(sel)
local psrc = { 2012787, 2013821, 950117 }
local pdst = { 2013698, 2013699, 950112 }
local szdata = table.getn(psrc);
local cnt = 0
dlg_title( "@690000128" )
if (sel==0) then
dlg_text( "@90610865" ) -- 어떤 아이템으로 교환하겠습니까?
for i = 1, szdata do
cnt = find_item(psrc[i])
if cnt >0 then
dlg_menu( "<#ebe6ad>|@" .. 10000000 + psrc[i] .. "|(".. tostring(cnt) .. ")" , "exchange_locked(" .. i ..")" ) --돌아가기
else
dlg_menu( "@" .. 10000000 + psrc[i] .. "|(".. tostring(cnt) .. ")" , "exchange_locked(" .. i ..")" ) --돌아가기
end
end
elseif sel >=1 and sel <= szdata then
cnt = find_item(psrc[sel])
if cnt <= 0 then
dlg_text( "@90610297" ) -- 교환이 성공적으로 진행되었습니다.
else
delete_item( get_item_handle(psrc[sel]),cnt )
insert_item( pdst[sel],cnt)
dlg_text( "@90605296" ) -- 교환이 성공적으로 진행되었습니다.
end
end
dlg_menu( "@90010003", "NPC_dailyquest_coin_exchange()" ) --돌아가기
dlg_menu( "@90010002", " " ) --대화 종료
dlg_show()
end
-- 꾸미기 강화 스크롤 : 레어
-- 베이직: 로마검투사 꾸미기 랜덤상자
-- 베이직: 다크메이지 꾸미기 랜덤상자
-- 베이직: 인디언 꾸미기 랜덤상자
-- 숫자 상자
-- 모두의 축복 상자
-- 공격의 루나칩 1시간
function exchange_coin(sel)
--AnmraEdit
dlg_title( "@690000128" )
dlg_text( "@90610872" ) -- 무엇을 원하시나요?
dlg_menu( "@99000012", "exchange_coin_Accessories("..sel..")" ) --Accessories
dlg_menu( "@99000013", "exchange_coin_Development_Tools("..sel..")" ) -- Development tools
dlg_menu( "@99000015", "exchange_coin_Other_Tools("..sel..")" ) -- other tools
dlg_menu( "@90010003", "NPC_dailyquest_coin_exchange()" ) --처음으로
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
function exchange_coin_Accessories(sel)
local item_src = 1000535 -- 마드리갈
local pitem = { 950127,950129,2013681,2016113,2016114,2013414,2000252,2000253,2000254,2000255,2000256,2013062,2013063,2013064 }
local pcost = { 1, 10, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }
local szitem = table.getn(pitem)
local npc_name = "@"..get_npc_type().."|@"..get_npc_name()
dlg_title( npc_name)
local cnt = find_item(item_src)
if sel == 0 then
dlg_text( "@90610082\v#@number@#\v"..cnt)
else
local cost = pcost[sel];
if cnt < cost then
dlg_text( "@90610078" )
message("@90610078")
else
local item_idx = pitem[sel]
delete_item( get_item_handle(item_src), cost )
insert_item(item_idx,1)
cnt = cnt - cost
dlg_text( "@90605296|<BR> (|@" .. 10000000+item_src .. "|: " .. tostring(cnt) .. ")" ) -- 교환이 성공적으로 진행되었습니다.
message( "<#00ffff>|" .. sconv( "@253", "#@item_name@#", "@"..tostring(get_item_name_id( item_idx ))) )
end
end
for i = 1, szitem do
if cnt >= pcost[i] then
dlg_menu( "<#ebe6ad>|@" .. 10000000 + pitem[i] .. "|(" .. pcost[i] .. ")" , "exchange_coin_Accessories(" .. i ..")" )
else
dlg_menu( "@" .. 10000000 + pitem[i] .. "|(" .. pcost[i] .. ")" , "exchange_coin_Accessories(" .. i ..")" )
end
end
dlg_menu( "@90010003", "NPC_dailyquest_coin_exchange()" ) --처음으로
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
function exchange_coin_Development_Tools(sel)
local item_src = 1000535 -- 마드리갈
local pitem = { 920014, 960123,--[[601100517,]] 2020001, 2020002, 601100513}
local pcost = { 1, 10, --[[30,]] 10, 100, 250}
local szitem = table.getn(pitem)
local npc_name = "@"..get_npc_type().."|@"..get_npc_name()
dlg_title( npc_name)
local cnt = find_item(item_src)
if sel == 0 then
dlg_text( "@90610082\v#@number@#\v"..cnt)
else
local cost = pcost[sel];
if cnt < cost then
dlg_text( "@90610078" )
message("@90610078")
else
local item_idx = pitem[sel]
delete_item( get_item_handle(item_src), cost )
insert_item(item_idx,1)
cnt = cnt - cost
dlg_text( "@90605296|<BR> (|@" .. 10000000+item_src .. "|: " .. tostring(cnt) .. ")" ) -- 교환이 성공적으로 진행되었습니다.
message( "<#00ffff>|" .. sconv( "@253", "#@item_name@#", "@"..tostring(get_item_name_id( item_idx ))) )
end
end
for i = 1, szitem do
if cnt >= pcost[i] then
dlg_menu( "<#ebe6ad>|@" .. 10000000 + pitem[i] .. "|(" .. pcost[i] .. ")" , "exchange_coin_Development_Tools(" .. i ..")" )
else
dlg_menu( "@" .. 10000000 + pitem[i] .. "|(" .. pcost[i] .. ")" , "exchange_coin_Development_Tools(" .. i ..")" )
end
end
dlg_menu( "@90010003", "NPC_dailyquest_coin_exchange()" ) --처음으로
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
function exchange_coin_Other_Tools(sel)
local item_src = 1000535 -- 마드리갈
local pitem = { 2016098,3800270,3800273,3800276,1000484,2016090,2013705,2013011 }
local pcost = { 50, 30, 30, 30, 20, 10, 10, 5 }
local szitem = table.getn(pitem)
local npc_name = "@"..get_npc_type().."|@"..get_npc_name()
dlg_title( npc_name)
local cnt = find_item(item_src)
if sel == 0 then
dlg_text( "@90610082\v#@number@#\v"..cnt)
else
local cost = pcost[sel];
if cnt < cost then
dlg_text( "@90610078" )
else
local item_idx = pitem[sel]
delete_item( get_item_handle(item_src), cost )
insert_item(item_idx,1)
cnt = cnt - cost
dlg_text( "@90605296|<BR> (|@" .. 10000000+item_src .. "|: " .. tostring(cnt) .. ")" ) -- 교환이 성공적으로 진행되었습니다.
message( "<#00ffff>|" .. sconv( "@253", "#@item_name@#", "@"..tostring(get_item_name_id( item_idx ))) )
end
end
for i = 1, szitem do
if cnt >= pcost[i] then
dlg_menu( "<#ebe6ad>|@" .. 10000000 + pitem[i] .. "|(" .. pcost[i] .. ")" , "exchange_coin(" .. i ..")" )
else
dlg_menu( "@" .. 10000000 + pitem[i] .. "|(" .. pcost[i] .. ")" , "exchange_coin(" .. i ..")" )
end
end
dlg_menu( "@90010003", "NPC_dailyquest_coin_exchange()" ) --처음으로
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
function exchange_alteration(type,sel)
local psrc = { 705014,705009 }
local pitem = { 705031,705032,705033,705034,705035, 705036,705037,705038,705039,705040, 705041,705042,705043,705044,705045,
705016,705017,705018,705019,705020, 705021,705022,705023,705024,705025, 705026,705027,705028,705029,705030 }
local item_src = psrc[type+1]
local szitem = table.getn(pitem)
dlg_title( "@690000128" )
if (sel==0) then
dlg_text( "@90610865" ) -- 어떤 아이템으로 교환하겠습니까?
for i = 1, 15 do
dlg_menu( "@" .. 10000000 + pitem[type*15+i] , "exchange_alteration(".. type .. "," .. i ..")" ) --돌아가기
end
elseif sel >=1 and sel <= szitem then
local cnt = find_item(item_src)
if cnt <= 0 then -- 변경
dlg_text( "@90610297" ) -- 변경
else
dlg_text( "@90605296" ) -- 교환이 성공적으로 진행되었습니다.
local item_idx = pitem[type*15+sel]
delete_item( get_item_handle(item_src),1 )
insert_item(item_idx,1)
message( "<#00ffff>|" .. sconv( "@253", "#@item_name@#", "@"..tostring(get_item_name_id( item_idx ))) )
end
end
dlg_menu( "@90010003", "NPC_dailyquest_coin_exchange()" ) --돌아가기
dlg_menu( "@90010002", " " ) --대화 종료
dlg_show()
end
function exchange_cube(sel,cnt,title)
dlg_title( "@690000128" )
local pcube = {700112, 700212, 700657, 700757}
local ppart = {701001, 702001, 701003, 702003}
local piron = {28, 14, 112, 56}
-- sel:0 기본교환메뉴
if sel == 0 then
if title==nill or title == "" then
dlg_text( "@90610841" ) -- 어떤 아이템을 만드시겠습니까?
else
dlg_text( title )
end
dlg_menu( "@10" .. pcube[1], "exchange_cube(1,0)" )
dlg_menu( "@10" .. pcube[2], "exchange_cube(2,0)" )
dlg_menu( "@10" .. pcube[3], "exchange_cube(3,0)" )
dlg_menu( "@10" .. pcube[4], "exchange_cube(4,0)" )
dlg_menu( "@90610842", "exchange_cube(5,0)" ) -- 스트라이크 큐브 10개를 축복받은 카벙클 큐브로
dlg_menu( "@90610843", "exchange_cube(6,0)" ) -- 디펜스큐브 10개를 축복받은 카벙클 큐브로
dlg_menu( "@90010003", "NPC_dailyquest_coin_exchange()" ) --돌아가기
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
return
end
-- sel:5,6 - 7Rank 일반 10개로 카벙클
if sel == 5 or sel == 6 then
local ncube = pcube[sel-4] -- 1,2
local nout = pcube[sel-2] -- 3,4
local cnt_cube = find_item( ncube)
if cnt == 0 then
cnt = math.floor(cnt_cube / 10)
dlg_text("@90610867\v#@item1@#\v@".. 10000000+ncube.."\v#@number1@#\v"..cnt_cube.."\v#@item2@#\v@".. 10000000+nout.."\v#@number2@#\v"..cnt)
if cnt >= 100 then
dlg_menu("@90610294\v#@number@#\v100", "exchange_cube("..sel..",100)" )
dlg_menu("@90610294\v#@number@#\v10", "exchange_cube("..sel..",10)" )
elseif cnt >10 then
dlg_menu( "@90610294\v#@number@#\v"..cnt,"exchange_cube("..sel..",".. cnt ..")" )
dlg_menu("@90610294\v#@number@#\v10", "exchange_cube("..sel..",10)" )
elseif cnt >0 then
dlg_menu( "@90610294\v#@number@#\v"..cnt,"exchange_cube("..sel..",".. cnt ..")" )
end
dlg_menu( "@90010003", "NPC_dailyquest_coin_exchange()" ) --돌아가기
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
return
end
if cnt_cube < cnt*10 then
exchange_cube(0,0, "@90610297" ) -- 재료가 부족합니다
else
delete_item( get_item_handle( ncube ), cnt * 10 )
insert_item( nout, cnt)
exchange_cube(0,0, "@90610866" ) -- 교환하였습니다.
end
return
end
--sel:1~4
if sel >= 1 or sel <= 4 then
local niron = find_item( 1100103 )
local ciron = math.floor(niron/piron[sel])
local npart = find_item(ppart[sel]) -- 큐브 스트라이크 조각 7+14
local cpart = math.floor(npart/14)
local max_cnt = cpart
if cpart > ciron then
max_cnt = ciron
end
--cnt = math.floor(cnt)
--cprint(cnt)
--cprint(max_cnt)
if cnt == 0 then
--dlg_text( "연마된 강철: "..niron.."개 보유 (/"..piron[sel].."),<br> 큐브 조각: " .. npart .. "개 보유 (/14),<br>|@10" .. pcube[sel] .. "|최대 " .. cnt .. "개 제작 가능합니다." )
dlg_text("@90610868\v#@number1@#\v"..niron.."\v#@piron@#\v"..piron[sel].."\v#@number2@#\v"..npart.."\v#@item1@#\v@".. 10000000+pcube[sel].."\v#@number3@#\v"..max_cnt )
if max_cnt >= 100 then
dlg_menu( "@90610844\v#@number@#\v100", "exchange_cube("..sel..",100)" )
dlg_menu( "@90610844\v#@number@#\v10", "exchange_cube("..sel..",10)" )
elseif max_cnt > 10 then
dlg_menu( "@90610844\v#@number@#\v"..max_cnt, "exchange_cube("..sel..",".. max_cnt ..")" )
dlg_menu( "@90610844\v#@number@#\v10", "exchange_cube("..sel..",10)" )
elseif max_cnt > 0 then
dlg_menu( "@90610844\v#@number@#\v"..max_cnt, "exchange_cube("..sel..",".. max_cnt ..")" )
end
dlg_menu( "@90010003", "NPC_dailyquest_coin_exchange()" ) --돌아가기
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
elseif cnt > 0 and cnt <= 100 then
if ciron < cnt or cpart < cnt then
exchange_cube(0,0, "@90610297" ) -- 재료가 부족합니다
else
delete_item( get_item_handle( ppart[sel] ), cnt*14 )
delete_item( get_item_handle( 1100103 ), cnt*piron[sel] )
insert_item( pcube[sel], cnt)
--dlg_text( "@10" .. pcube[sel] .. "|" .. cnt .. "|개 제작 하였습니다." )
local out_text = "@90610869\v#@item1@#\v@".. 10000000+pcube[sel].."\v#@number1@#\v" .. cnt
exchange_cube(0,0, out_text)
end
end
end
end
function exchange_skillcard_Anmra(sel)
-- 기본 직업상자, 기본 1차 직업상자, 기본 2차 직업상자,기본 마스터 상자
local pitem = { 1100405, 1100406, 1100407, 1100408, 1100410, 1100411, 1100412, 1100413, 1100414, 1100415, 1100416, 1100417, 1100418, 1100419, 1100420, 1100421, 1100422, 1100423, 1100424 }
local pdrop = { -3000406,-3000407,-3000408,-3000409, -5801200,-5801210,-5801220,-5801230,-5801240,-5802200,-5802210,-5802220,-5802230,-5802240,-5803200,-5803210,-5803220,-5803230,-5803240 }
local szitem = table.getn(pitem)
--dlg_title( "@690000128" )
local npc_name = "@"..get_npc_type().."|@"..get_npc_name()
dlg_title( npc_name)
if sel == 0 then
dlg_text( "@90610319" ) -- 어떤 스킬카드 상자를...
elseif sel >= 1 and sel <=szitem then
local cnt = find_item( pitem[sel] )
if cnt <= 0 then
dlg_text( "@90610321" ) -- 상자 부족
else
dlg_text( "@90610320" ) -- 확인해라
if cnt > 5000 then --100 then --MohcenMaher, 9.8
cnt = 5000
end
delete_item (get_item_handle(pitem[sel]), cnt)
for i=1,cnt do
local result = pick_item_in_drop_group( pdrop[sel] )
insert_item( result[1], result[2] )
end
end
end
for i = 1, szitem do
local cnt = find_item( pitem[i] )
if cnt >0 then
dlg_menu( "<#ebe6ad>|@" .. 10000000 + pitem[i] .. "|(" .. cnt .. ")" , "exchange_skillcard_Anmra(" .. i ..")" )
else
dlg_menu( "@" .. 10000000 + pitem[i] .. "|(" .. cnt .. ")" , "exchange_skillcard_Anmra(" .. i ..")" )
end
end
dlg_menu( "@90010003", "NPC_Albus_Anmra_contant()" ) --돌아가기
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
--2016127 정제된 마계의 결정체 상자
--2016131 정제된 마계의 결정체 상자<케릭터 귀속>
--2016153 마계의 영혼 주머니
--2016154 영혼의 구슬 상자
--2016160 드래곤의 구슬상자
function exchange_devildom_Anmra(sel)
-- 기본 직업상자, 기본 1차 직업상자, 기본 2차 직업상자,기본 마스터 상자
local pitem = { 2016127 , 2016131, 2016153, 2016154 } -- , 2016160 } 드래곤 상자는 100개 50개 10개 인데 드랍그룹이 아니다.
local pdrop = {-9007245, -9007245, -9007281, -9007284 }
local szitem = table.getn(pitem)
local npc_name = "@"..get_npc_type().."|@"..get_npc_name()
dlg_title( npc_name)
if sel == 0 then
dlg_text( "@90610935" ) -- 어떤 스킬카드 상자를...에서 스킬을 뺐다
elseif sel >= 1 and sel <=szitem then
local cnt = find_item( pitem[sel] )
if cnt <= 0 then
dlg_text( "@90610936" ) -- 스킬 상자가 부족합니다. 에서 스킬을 뺐다
else
dlg_text( "@90610937" ) -- 스킬상자를 열었습니다. 에서 스킬을 뺐다
if cnt > 1000 then
cnt = 1000
end
delete_item (get_item_handle(pitem[sel]), cnt)
for i=1,cnt do
local result = pick_item_in_drop_group( pdrop[sel] )
insert_item( result[1], result[2] )
end
end
end
for i = 1, szitem do
local cnt = find_item( pitem[i] )
if cnt >0 then
dlg_menu( "<#ebe6ad>|@" .. 10000000 + pitem[i] .. "|(" .. cnt .. ")" , "exchange_devildom_Anmra(" .. i ..")" )
else
dlg_menu( "@" .. 10000000 + pitem[i] .. "|(" .. cnt .. ")" , "exchange_devildom_Anmra(" .. i ..")" )
end
end
dlg_menu( "@90010003", "NPC_Albus_Anmra_contant()" ) --돌아가기
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
--주화 타입 교환은 주화 교체 일정시기만
function exchange_type( count ) -- 교환메뉴
dlg_title( "@690000128" )
-- 데바 to 마드리갈 주화
local count = math.floor( find_item( 1000485 ) / 3 )
local del_count = math.floor( find_item( 1000485 ) / 3 ) * 3
if find_item( 1000485 ) >= 3 then -- 일퀘 데바의 주화
dlg_text( "@90610254" ) -- 대사
insert_item ( 1000535, count ) -- 마드리갈 주화 넣어줌
delete_item( get_item_handle( 1000485 ), del_count ) -- 주화 삭제
else
dlg_text( "@90610078" ) -- 주화가 없는 경우
end
dlg_menu( "@90010003", "NPC_dailyquest_coin_exchange()" ) --처음으로
dlg_menu( "@90010002", " " ) --대화 종료
dlg_show()
end
------------------------------------------------------------------------------------------------
-------------------------------------------켈프 공성-----------------------------------------
------------------------------------------------------------------------------------------------
--- Lua 스크립트 암호화
local state_code = get_local_info()
_G = {}
if state_code == 4 or state_code == 8 or state_code == 128 or state_code == 16384 or state_code == 32768 or state_code == 65536 then
_G.siege_day = { 6 } --
_G.siege_hour = { 2, 6, 10, 14, 18, 22 } -- PM 8,10
else
_G.siege_day = { 6 } -- 0 sunday
--_G.siege_hour = { 18, 19, 20, 21, 22, 23 } -- PM 8,10 --MohcenMaher
_G.siege_hour = { 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 }
end
_G.point_per_day= 100 -- added cost for early preservation.
_G.min_point = 1000 -- minimum point.
------------------------------------------------------------------------------------------------
--function NPC_Siege_Contact() 모든 캘프 공성 관련 NPC는 이 펑션을 호출한다.
--function NPC_Siege_Mercenary(i,confirm) 모병담당관
--function NPC_Siege_Shop(sel) 루시아드 행정관 (메달 상점)
--function siege_board(sel) 랭킹 게시판 (프랍). 클릭시 번호 (sel)
--function si()
--function siege_info() 정보확인
--function siege_test() 공성 강제 발생
--function siege_clear( keep_test ) parm을 주지 않으면 siege_test도 해제된다
--function siege_process(tick) 메인 프로세스. tick에는 0~179가 들어간다.
--function siege_start() 서버 부팅시 1회 실행. NPC를 복제한다.
--function siege_notice( message ) 특정 지역에 공지 >> guild notice로 대체
--function on_siege_end(click)
--function siege_kill( num , knight ) 몬스터 사망시호출. 남은몬스터갯수를 변경.
--function siege_regen(num ,remain_art) 몬스터생성 num:1~6 6은 데스나이트.
--function mess_generate(pdata, duration,startx,starty) siege_regen의 하위펑션
--function siege_warp(no) 문은 클릭해서 들어가는 워프. no는 문번호 1~5
--function siege_gate(no, state) 문상태 변경 state: 0 삭제, 1 빨강, 2 파랑
--function siege_mage(no,state) 문앞의 마법사 생성 삭제.
--function siege_day_start() 공성당일 0시. 레코드타임리셋+유찰시간 포인트 할인후 기록
--function siege_day_end() 신청길드명 리셋
--function siege_record(guild, wsec) 공성 완료시 시간기록
--function siege_get_min_sec(wsec) 공성 레코드는 초로 기록된다. 이것을 "00:00" 으로 리턴
--function siege_get_weekday() 금일을 포함한 가장 가까운 공성 진행 요일을 구하는 펑션.
--function siege_get_remainday() 금일을 포함한 가장 가까운 공성 날짜까지 남은 숫자. 0이면 공성 당일.
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
_G.weekday = { '@90610898', '@90610899', '@90610900', '@90610901', '@90610902', '@90610903', '@90610904' } -- 일요일 ~ 토요일
------------------------------------------------------------------------------------------------
function NPC_Siege_Contact()
local code = get_npc_id() -- 이것은 항상 유저가 NPC를 클릭했을때 발생하므로 player의 contact npc가 존재한다.
if code == 15104 or code == 15109 then -- 일단 모병관은 우선 예외처리
NPC_Siege_Mercenary()
return
elseif code == 15110 then
NPC_Siege_Shop()
return
end
local npc_name = "@"..get_npc_type().."|@"..get_npc_name()
dlg_title( npc_name)
local progress = tonumber( ggv("siege_progress")) or 0
if code == 15103 then -- 본진 병사
dlg_text( "@90610915") -- 적의 병력이 너무 많아 힘든 전투가 될 것 같습니다.
elseif code == 15105 then -- 파견관 루스
dlg_text( "@90610916") -- 반갑네. 자네를 여기서 또 보게 되는군. <br>마신을 소환하여 조종하겠다는 생각은 어리석은 생각일세. 그들은 크리쳐가 아니야. 대륙을 파멸로 몰고가고 말 것이네.<br>우리 학회는 세력 다툼에 관여할 생각이 없지만, 이번일을 방관할수 없어 학회의 마법사들의 지원하기로 결정하였다네
elseif code == 15106 then -- 사령관 리버
dlg_text( "@90610917") -- 이번 전쟁에 참전에 주어 감사하오.<br> 우리의 공격 목표는 켈프 산성 정상의 마신소환 제단이오 <br> 현재는 입구가 결계에 막혀 있으나 루시아드 파견 마법사들이 해제해 줄것이오<br>문제는 마법병단의 겔프산성의 우리 마법사들의 결계 해제를 방해하고 있어 그쪽도 신경쓰지 않을수 없소.<br>우리의 병력은 충분치 않으니, 귀관들의 부대도 적절히 병력을 배분해주기 바라오.")
elseif code == 15107 then -- 본진 마법사. 기본적인 대화만 하자
dlg_text( "@90610918") -- 우리 같은 학자들이 이런 난잡한 전투에 뛰어든다는것은 아주 불쾌한 일이야. 정의를 위해서 어쩔수 없이 나섰다만, 자네들이 우리를 잘 지켜야 하네!")
elseif code == 15108 then -- 보급대 병사
dlg_text( "@90610919") -- 헥토르님이 계시면 큰 힘이 될텐데. 무슨 던전 탐사를 떠나셔서 아직 돌아오지 않으셨다고 합니다.")
elseif code == 15111 then -- 마법병단 1차
if progress == 3 then
dlg_text( "@90610920") -- 이곳이 마법병단의 입구군. 잠시만 기다려 주게 곧 해지가 가능하네")
elseif progress == 4 then
dlg_text( "@90610921") -- 마법 시전중에 말걸지말라고! 너때문에 집중력이 흩어지면 다시해야 한다고!")
elseif progress == 5 then
dlg_text( "@@90610922") -- 자자, 빨리빨리 올라가서 싹쓸어버리라구. 그래야 다음 결계를 해지하지")
end
elseif code == 15112 then -- 마법병단 2차
if progress == 6 then
dlg_text( "@90610923") -- 야이 멍청한놈아! 시전중에 말걸지 말라고 했잖아!. 젠장, 다시해야 하는군." )
else
dlg_text( "@90610924") -- 서둘러, 저 방해 마법을 쓰고 있는 놈들을 제거해야, 본대가 진격할수 할수 있다구")
end
elseif code == 15113 then -- 페헤른 1차
if progress < 8 then
dlg_text( "@90610925") -- 마법병단의 방해장으로 결계 해제가 불가하네. 마법병단의 방해를 차단해 주게." )
elseif progress == 8 then
dlg_text( "@90610926") -- 아~ 집중해야 되니, 말걸지 말게~")
else
dlg_text( "@90610927") -- 안전이 확보되어야 다음 목적지로 이동할수가 있네. 크흠")
end
elseif code == 15114 then
if progress < 11 then
dlg_text( "@90610928") -- 아, 별동대는 뭐하고 있는거야, 저 마법병단을 막아야 한다니까." )
elseif progress == 11 then
dlg_text( "@90610929") -- 이런! 끊겼다. 누구야, 자꾸 말거는게!")
else
dlg_text( "@90610930") -- 아아, 최악이군. 이번 전투는.")
end
elseif code == 15115 then
if progress < 13 then
dlg_text( "@90610931") -- 기다리라고! 저쪽 마법이 사라지기 전까지 ..
elseif progress == 13 then
dlg_text( "@90610932") -- 으악, 또, 너냐! 너, 캘프성의 스파이지!")
else
dlg_text( "@90610933") -- 마지막이다. 끝내 버려라!
end
end
dlg_menu( "@90010001", " " )
dlg_show()
end
-- 수호군 징병 담당관
function NPC_Siege_Mercenary(sel,confirm)
local rhour = siege_get_remainhour()
local state_code = get_local_info()
local str_week = siege_get_weekday() -- 0:일요일 공성
local sztime = table.getn(_G.siege_hour)
local npc_name = "@"..get_npc_type().."|@"..get_npc_name()
dlg_title( npc_name)
local code = get_npc_id()
---------------------------------------------------
local rday = siege_get_remainday() -- 공성일까지 남의 날수
local add = (rday-1) * _G.point_per_day -- 공성 전날은 종전가와 동일.
if add < 0 then
add= 0
end
---------------------------------------------------
if sel == nil or sel == "" or sel == 0 then
if code == 15109 then -- 론도 모병 모집관
dlg_text( "@90610905") -- 악마에게 영혼을 판 가이아왕 프로메테우스를 처단하자!<br>론도 시민 여러분, 지금 이 순간에도 프로메테우스는, 죄인들은 물론 죄없는 사람들까지도 악마의 제물로 바치고 있습니다.<br>이 세계를 지키기 위해 여러분들의 힘이 필요합니다.<br>수호군 공격대에 참여해 주십시오!
elseif code == 15104 then
dlg_text( "@90610906") -- 현재 용병대의 출전 예정을 알려드리고, 계약을 안내해 드리고 있습니다.<br>계약은 용병대장님이 직접 오셔야 합니다.
end
local i
for i = 1, sztime do
--------------------------------------------------------------------------------------
local cost = tonumber (ggv( "siege_point_" .. i ) ) or _G.min_point
-- if cost >= 3000 then
-- cost = cost + (add*3)
-- elseif cost >= 2000 then
-- cost = cost + (add*2)
-- else
-- cost = cost + add
-- end
cost = cost * 1.2
local guild_name = "@90610947"
local guild = tonumber( ggv( "siege_guild_" .. i ) ) or 0
local str_func = "NPC_Siege_Mercenary(" .. i .. ")"
if guild ~= nil and guild ~= "" and guild ~= 0 then
guild_name = get_guild_name(guild)
end
if guild_name == nil or guild_name == "" or guild_name == 0 then
guild_name = "@90610947"
end
--------------------------------------------------------------------------------------
local str_time
if (_G.siege_hour[i]) > 12 then
str_time = " PM " .. _G.siege_hour[i]-12
else
str_time = " AM " .. _G.siege_hour[i]
end
local text = sconv("#@week@# #@time@# - #@guild@# (#@point@#p)","#@week@#", str_week ,"#@time@#", str_time, "#@guild@#" , guild_name, "#@point@#",cost )
dlg_menu( text, str_func )
end
else
if state_code == 8 or state_code == 128 or state_code == 65536 then
if rhour <= 4 then
dlg_text( "@90610907") -- 공성 당일은 신청하실수 없습니다.
dlg_menu( "@90010002", " " )
dlg_show()
return
end
--else
--if rday == 0 then -- 일익 신청 허용으로 변경
-- dlg_text( "@90610907") -- 공성 당일은 신청하실수 없습니다.
--dlg_menu( "@90010002", " " )
--dlg_show()
--return
--end
end
local is_gl = is_guild_leader()
if is_gl == 0 and get_guild_permission() ~= 0 and gv('guild_id') > 0 then --MohcenMaher, 9.7: guild officer can enroll for siege
dlg_text( "@90610908") -- 길드마스터를 통해서만 신청을 받고 있습니다.
dlg_menu( "@90010002", " " )
dlg_show()
return
end
local guild = tonumber ( ggv( "siege_guild_" .. sel ) ) or 0
guild = gv('guild_id')
local cost = tonumber ( ggv( "siege_point_" .. sel ) ) or _G.min_point
cost = cost * 1.2
local guild_point = tonumber( get_guild_point(guild) ) or 0
if guild_point < cost or get_guild_grade(guild) < 5 then --MohcenMaher, S.A to prevent bullshit
dlg_text( "@90610910") -- 공성 신청에 필요한 길드 포인트가 부족합니다.
dlg_menu( "@90010002", " " )
dlg_show()
return
end
-- 한타임만 신청이 되게 하려면 나머지 타임을 모두 검사해야 한다.---------------------------------------------------
local i
for i = 1, sztime do
local tguild = tonumber( ggv( "siege_guild_" .. i ) ) or 0
if guild == tguild then
dlg_text( "@90610948") -- 이미 신청한 용병대입니다.
dlg_menu( "@90010002", " " )
dlg_show()
return
end
end
if confirm ~= nil and confirm ~= "" then
add_guild_point(guild,-cost)
-- if state_code == 4 or state_code == 8 or state_code == 128 or state_code == 16384 or state_code == 32768 or state_code == 65536 then
-- if ggv("siege_guild_"..sel) ~= 0 then
-- add_guild_point(ggv("siege_guild_"..sel), ggv("siege_point_"..sel))
-- end
-- end
if ggv("siege_guild_"..sel) ~= 0 then
add_guild_point(ggv("siege_guild_"..sel), ggv("siege_point_"..sel))
end
sgv("siege_guild_"..sel, guild)
sgv("siege_point_"..sel, cost)
dlg_text( "@90610934") -- 신청이 접수되었습니다.
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
else
local str_time
if (_G.siege_hour[sel]) > 12 then
str_time = str_week .. " PM " .. _G.siege_hour[sel]-12
else
str_time = str_week .. " AM " .. _G.siege_hour[sel]
end
dlg_text( sconv( "@90610911", "#@point@#" , guild_point)) -- 공성을 신청하시겠습니까?<BR>(보유길드 포인트: #@point@#)
dlg_menu( "@11", "NPC_Siege_Mercenary(" .. sel .. ",1)" ) -- 11:확인
end
end
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
function NPC_Siege_Shop(sel)
local item_src = 2013527 -- 루시아드 메달 (아이콘:JP서비스 기념 주화)
local pitem = {3100105,3100101, 3100102, 3100103, 3100104, 2013902, --[[2013920,]] 2016205, 2016199, 2016200, 2016201, 2016202, 2016203, 2016204 } -- 메달 3종 -- MohcenMaher
local pcost = { 9999,30, 20, 10, 50, 100, --[[100,]] 10, 10, 10, 10, 10, 10, 10 } -- MohcenMaher
local szitem = table.getn(pitem)
local npc_name = "@"..get_npc_type().."|@"..get_npc_name()
dlg_title( npc_name)
local cnt = find_item(item_src)
if sel==nil or sel =="" or sel == 0 then
dlg_text( sconv("@90610894","#@cnt@#",cnt)) -- 루시아드 메달로 마법물풀음 교환하실수 있습니다.현재 보유하신 수량은 " .. cnt .. "개입니다.
for i = 1, szitem do
dlg_menu( "@" .. 10000000 + pitem[i] .. "|(" .. pcost[i] .. ")" , "NPC_Siege_Shop(" .. i ..")" )
end
elseif sel >=1 and sel <= szitem then
if cnt < pcost[sel] then
dlg_text( "@90610895") -- 루시아드 메달이 부족합니다
else
dlg_text( "@90610897" ) -- 교환하였습니다.
local item_idx = pitem[sel]
delete_item( get_item_handle(item_src),pcost[sel] )
insert_item(item_idx,1)
message( "<#00ffff>|" .. sconv( "@253", "#@item_name@#", "@"..tostring(get_item_name_id( item_idx ))) )
end
end
dlg_menu( "@90010002", " " ) -- 대화종료
dlg_show()
end
--function exchange_coin_Development_Tools(sel)
-- local item_src = 1000535 -- 마드리갈
-- local pitem = { 920014,960123,601100517,2016206 }
-- local pcost = { 50, 30, 30, 30 }
-- local szitem = table.getn(pitem)
-- local npc_name = "@"..get_npc_type().."|@"..get_npc_name()
-- dlg_title( npc_name)
-- local cnt = find_item(item_src)
--
-- if sel == 0 then
-- dlg_text( "@90610082\v#@number@#\v"..cnt)
-- else
-- local cost = pcost[sel];
--
-- if cnt < cost then
-- dlg_text( "@90610078" )
-- message("@90610078")
-- else
--
-- local item_idx = pitem[sel]
-- delete_item( get_item_handle(item_src), cost )
-- insert_item(item_idx,1)
--
-- cnt = cnt - cost
-- dlg_text( "@90605296|<BR> (|@" .. 10000000+item_src .. "|: " .. tostring(cnt) .. ")" ) -- 교환이 성공적으로 진행되었습니다.
-- message( "<#00ffff>|" .. sconv( "@253", "#@item_name@#", "@"..tostring(get_item_name_id( item_idx ))) )
-- end
-- end
--
-- for i = 1, szitem do
-- if cnt >= pcost[i] then
-- dlg_menu( "<#ebe6ad>|@" .. 10000000 + pitem[i] .. "|(" .. pcost[i] .. ")" , "exchange_coin_Development_Tools(" .. i ..")" )
-- else
-- dlg_menu( "@" .. 10000000 + pitem[i] .. "|(" .. pcost[i] .. ")" , "exchange_coin_Development_Tools(" .. i ..")" )
-- end
-- end
-- dlg_menu( "@90010003", "NPC_dailyquest_coin_exchange()" ) --처음으로
-- dlg_menu( "@90010002", " " ) -- 대화종료
-- dlg_show()
--end
function gaia_quest_bigbillboard01_01_004()
siege_board()
end
-- 번호 클릭. 보상
function siege_board(sel)
if sel==nil then
local pcolor = { "<#f3c587>","<#d6e9f7>", "<#c67c55>" , "<#cccccc>", "<#cccccc>"}
local menu = {}
local i
for i = 1, 5 do
local tguild = tonumber( ggv( "siege_record_guild_" .. i ) ) or 0
local wsec = ggv("siege_record_time_" .. i)
if tguild~=0 and wsec ~=0 then
local name = get_guild_name(tguild)
if name==nil or name == "" then
name = "Guild:" .. tostring(tguild)
end
local time = siege_get_min_sec(wsec)
menu[i] = sconv(pcolor[i] .. "|@90610913" , "#@no@#" , i , "#@guild@#" , name , "#@time@#" ,time) -- #@no@#: #@guild@# [#@time@#]
else
menu[i] = sconv(pcolor[i] .. "|@90610914" , "#@no@#" , i ) -- #@no@#: -NA-
end
end
dlg_special_menu( '@90610912' , 'War record', menu[1], "siege_board(1)", menu[2], "siege_board(2)", menu[3], "siege_board(3)" , menu[4], "siege_board(4)",menu[5],"siege_board(5)" ) --금주 용병단 전공 순위
return
end
local tguild = tonumber( ggv("siege_record_guild_" .. sel ) ) or 0
local myguild = gv('guild_id')
if myguild ~= tguild or myguild == 0 then
return
end
if sel <1 or sel >3 then -- 1~3등만 보상
cprint("@90610949") -- "1~3위만 보상 수령이 가능합니다."
return
end
local rday = siege_get_remainday()
if rday == 0 then
cprint("@90610950") -- "공성 익일부터 상품 수령이 가능합니다."
return
end
local pdata ={ 3100101, 3100102, 3100103, 3100104 } -- 수호군 공헌 금,은,동,망토
local code = pdata[sel] -- 수호군 공헌 금,은,동,망토
local cnt = 1 -- 1개
local flag = 128 -- 잠금
local count = find_item( code )
if count > 0 then
cprint("@90610951") -- "이미 상품을 수령하셨습니다."
return
end
local diff = rday*24*60*60 - tonumber(get_os_date("%H"))*3600 - tonumber(get_os_date("%M"))*60 -- 현재가 월요일 새벽 1시라면, 일요일까지 5일23시간 남았다.
insert_item( code, cnt, 0, 1, flag, diff) -- cprint( get_item_name_by_code(code) .. "를 획득하였습니다")
message( "<#00ffff>|" .. sconv( "@253", "#@item_name@#", "@"..tostring(get_item_name_id( code ))) )
--MohcenMaher,
insert_item(2013902,1)
message( "<#00ffff>|" .. sconv( "@253", "#@item_name@#", "@12013902"))
--MohcenMaher,
local rank = get_guild_permission() -- 길마 부길마용 지휘관 망토
if rank == 7 or rank == 0 then
code = pdata[4]
count = find_item( code )
if count == 0 then
insert_item( code, cnt, 0, 1, flag, diff)
message( "<#00ffff>|" .. sconv( "@253", "#@item_name@#", "@"..tostring(get_item_name_id( code ))) ) -- #@item_name@# 아이템을 획득했습니다.
end
end
end
function si()
siege_info()
end
function siege_info()
cprint( "siege_guild_1:" .. ggv("siege_guild_1") .. ":" .. ggv("siege_guild_2") ..":" .. ggv("siege_guild_3") .. ":" .. ggv("siege_guild_4") ..":" .. ggv("siege_guild_5") )
cprint( "siege_point_1:" .. ggv("siege_point_1") .. ":" .. ggv("siege_point_2") ..":" .. ggv("siege_point_3") .. ":" .. ggv("siege_point_4") ..":" .. ggv("siege_point_5") )
cprint( "siege_record_1:" .. ggv("siege_record_1") .. ":" .. ggv("siege_record_2") ..":" .. ggv("siege_record_3") ..":" .. ggv("siege_record_4") ..":" .. ggv("siege_record_5") )
cprint( "siege_parm_1:" .. ggv("siege_parm_1") .. ":" .. ggv("siege_parm_2") ..":" .. ggv("siege_parm_3") .. ":" .. ggv("siege_parm_4") ..":" .. ggv("siege_parm_5") )
cprint( "siege_progress:" .. ggv("siege_progress") )
cprint( "siege_guild:" .. ggv("siege_guild") )
cprint( "siege_test:" .. ggv("siege_test") )
end
function siege_test() -- 경과시간을 저장하여 테스트의 편이를 기한다
siege_clear()
if progress == nil or progress == "" then
progress = 0
end
local tick = get_os_date("%M") *3 +3
if tick >= 180 then
tick = tick - 180
end
sgv("siege_test", tick ) -- 1분에 3틱 10분1초 30틱 경과 10분 50초 32틱 경과
local myguild = gv('guild_id')
sgv("siege_guild_1" , myguild )
end
function siege_clear( keep_test )
for i = 1, 5 do
sgv("siege_parm_" .. i,0)
siege_mage(i, 0) -- 0 hide, 1 show 마법사는 모두 숨긴다.
end
siege_gate(0, 0) -- id 0번을 주면 전체에 적용
sgv("siege_progress", 0 )
sgv("siege_guild", 0 )
if keep_test == nil then
del_global_variable("siege_test" ) -- 테스트 모드 삭제
end
end
function siege_process(tick)
local rday = siege_get_remainday()
local pgate = {"@90610880","@90610881","@90610882","@90610883","@90610884"} -- 마법병단 입구결계,마법병단 최종결계,캘프성 입구결계,캘프성 중간결계,캘프성 최종결계
local sztime= table.getn(_G.siege_hour)
local whour = tonumber(get_os_date("%H"))
------------------------------------------------------
local siege_test = ggv("siege_test")
local state_code = get_local_info()
if state_code ~= 512 and state_code ~= 4096 then
if siege_test ~=nil and siege_test ~= "" and siege_test >= 0 then
rday = 0
whour = _G.siege_hour[1] -- 첫번째 공성
tick = tick - siege_test
if tick < 0 then
tick = tick + 60*3
end
end
------------------------------------------------------
if (rday ~= 0 ) then -- 이하는 공성 당일 프로세스
return
end
if whour == 0 and tick == 1 then -- 당일 00시 01분. 공성이 시작되는날.
siege_day_start() -- 레코드 초기화, 미신청 타임 할인
end
if whour == 23 and tick == 60*3-1 then -- 당일 23시 59분. 공성이 끝난날, 날자 넘어가기 직전 리셋 ( 30초마다 실행되면 2번 불린다.)
siege_day_end()
end
local progress = tonumber( ggv("siege_progress") ) or 0 -- 공성이 진행중이 아니면 공성 시작여부체크. 실패시 55분. progress를 0으로 바꾸면,
if progress == 0 and tick <= 1 then --MohcenMaher, == -> <= (avoiding bugs)
for i = 1, sztime do
if whour == _G.siege_hour[i] then
siege_clear(1)
local tguild = tonumber( ggv( "siege_guild_" .. i ) ) or 0
sgv( "siege_guild", tguild )
if tguild >0 then
progress = 1
else
progress = 16
end
break
end
end
end
if progress == 0 then
return
end
local remain_art = math.floor((170-tick)*20)*100 -- 10틱 = (3분20초) 정도 여유를 둔다
------------------------------------------------- -- 디버깅코드. 차후 삭제
if siege_test ~= nil and siege_test ~= "" then
local p1 = ggv("siege_parm_1")
local p2 = ggv("siege_parm_2")
local p3 = ggv("siege_parm_3")
local p4 = ggv("siege_parm_4")
local p5 = ggv("siege_parm_5")
notice("rd:" .. rday .. " hr:" .. whour .. " tick:" .. tick .. " pr:"..progress .. " parm:" .. p1 .. " " .. p2 .. " " .. p3 .. " " .. p4 .. " " .. p5 .. " art:" .. remain_art )
end
--------------------------------------------------
if progress == 1 then
local tguild = ggv( "siege_guild")
local guild_name = get_guild_name(tguild)
notice( sconv( "@90610885", "#@guild@#", guild_name), 0,0 ) -- xxxx 길드가 캘프 공성을 시작하였습니다 -- sconv 로 변경
sgv("siege_progress",2)
elseif progress == 2 then
siege_notice( sconv( "@90610886", "#@gate@#", pgate[3]) ) -- "마법병단이 방해장을 펼쳐 #@gate@# 를 봉인하였습니다."
siege_gate(3,1)
siege_gate(1,1) -- 어디선가는 블럭을 해야 하니.
siege_mage(3,1)
sgv("siege_progress",3)
elseif progress == 3 then
siege_notice( sconv( "@90610887", "#@gate@#", pgate[1]) ) -- "루시아드 마법사들이 #@gate@# 를 해제하기 시작했습니다.."
siege_mage(1,1)
siege_regen(1,remain_art)
sgv("siege_progress",4)
elseif progress == 4 then -- 마법병단 입구 해제중-> 해제완료
siege_notice( sconv( "@90610888" ,"#@gate@#", pgate[1]) ) -- "#@gate@#가 해제되었습니다!!"
siege_gate(1,2)
sgv("siege_progress",5)
elseif progress == 5 and ggv("siege_parm_1") == 0 then -- 마법병단 입구 방어군 전멸
siege_notice( sconv( "@90610887", "#@gate@#", pgate[2]) ) --"루시아드 마법사들이 #@gate@# 를 해제하기 시작했습니다.."
siege_mage(1,0)
siege_mage(2,1)
siege_gate(2,1)
siege_regen(2,remain_art)
sgv("siege_progress",6)
elseif progress == 6 then
siege_notice( sconv( "@90610888" ,"#@gate@#", pgate[2]) ) -- "#@gate@#가 해제되었습니다!!"
siege_gate(2,2)
sgv("siege_progress",7)
elseif progress == 7 and ggv("siege_parm_2") == 0 then -- 마법병단 본진 병력 전멸 = 본선 결계 해제가 가능하다.
siege_notice( sconv( "@90610887", "#@gate@#", pgate[3]) ) -- "루시아드 마법사들이 #@gate@# 를 해제하기 시작했습니다.."
siege_regen(3,remain_art)
sgv("siege_progress",8)
elseif progress == 8 then
siege_notice( sconv( "@90610888" , "#@gate@#",pgate[3]) ) -- "#@gate@#가 해제되었습니다!!"
siege_gate(3,2)
sgv("siege_progress",9)
elseif progress == 9 and ggv("siege_parm_3") <= 20 then -- total 42
siege_notice( sconv( "@90610886", "#@gate@#", pgate[4]) ) -- "마법병단이 방해장을 펼쳐 #@gate@# 를 봉인하였습니다."
siege_gate(4,1)
siege_regen(2,remain_art)
sgv("siege_progress",10)
elseif progress == 10 and ggv("siege_parm_2") == 0 and ggv("siege_parm_3") == 0 then
siege_notice( sconv( "@90610887", "#@gate@#", pgate[4]) ) --"루시아드 마법사들이 #@gate@# 를 해제하기 시작했습니다.."
siege_mage(3,0)
siege_mage(4,1)
siege_regen(4,remain_art)
sgv("siege_progress",11)
elseif progress == 11 then
siege_notice( sconv( "@90610888" ,"#@gate@#", pgate[4]) ) --"#@gate@#가 해제되었습니다!!"
siege_gate(4,2)
sgv("siege_progress",12)
elseif progress == 12 and ggv("siege_parm_4") <= 20 then -- total 84
siege_notice( sconv( "@90610886", "#@gate@#", pgate[5]) ) --"마법병단이 방해장을 펼쳐 #@gate@# 를 봉인하였습니다."
siege_gate(5,1)
siege_regen(2,remain_art)
sgv("siege_progress",13)
elseif progress == 13 and ggv("siege_parm_2") == 0 and ggv("siege_parm_4") == 0 then
siege_notice( sconv( "@90610887", "#@gate@#", pgate[5]) ) --"루시아드 마법사들이 #@gate@# 를 해제하기 시작했습니다.."
siege_mage(4,0)
siege_mage(5,1)
siege_regen(5,remain_art)
sgv("siege_progress",14)
elseif progress == 14 then
siege_notice( sconv( "@90610888" ,"#@gate@#", pgate[5]) ) --"#@gate@#가 해제되었습니다!!"
siege_gate(5,2)
sgv("siege_progress",15)
elseif progress == 15 and ggv("siege_parm_5") == 0 then
local tguild = ggv( "siege_guild") -- 이것은 30초마다 체크되나 onkill 에서 이미 완료 상태로 만들어 놓고 있다.
local gname = get_guild_name(tguild)
local wsec = ggv("siege_time")
local elapsed = siege_get_min_sec(wsec)
local no = siege_record(tguild, wsec)
if no == 6 then
notice(sconv( "@90610890","#@guild@#",gname,"#@elapsed@#", elapsed)) -- "#@guild@# 길드가 캘프 공성에 성공하였습니다. (#@elapsed@#)"
else
notice(sconv("@90610891","#@guild@#",gname,"#@elapsed@#",elapsed,"#@no@#",no)) --"#@guild@# 길드가 캘프 공성에 성공하였습니다. (#@elapsed@# 현재 #@no@#위)",
end
sgv("siege_progress",16) -- 16 공성 성공
end
if progress < 16 then -- 남은 시간은 공성이 완료되면 알려줄 필요없다.
if tick ==45*3 or tick ==50*3 or tick ==52*3 or tick ==54*3 then
local left = 55-(tick/3)
siege_notice( sconv("@90610893","#@min@#",left)) --"공성 종료 #@min@# 전입니다."
elseif tick ==55*3 then
local tguild = ggv( "siege_guild")
local guild_name = get_guild_name(tguild)
notice(sconv( "@90610892", "#@guild@#", guild_name)) --"#@guild@# 길드가 캘프 공성에 실패하였습니다."
end
end
if progress ~= 0 and tick > 55*3 then
sgv("siege_progress",0) -- 성공이던 실패던 55분 이후에는 귀환을 시킨다.
end
end
end
function siege_start() -- gaia_quest_exchangetexture_bigbillboard01_01_004
local state_code = get_local_info()
if state_code ~= 512 and state_code ~= 4096 then
add_field_prop( 1004,0,137765,105365,0,0,0,0,0.2,0.5,0.5,0.5, 0,0 ) -- 론도 모병관 옆 간판(id, sec, x,y,layer, zoff, rotx, roty,rotz, scalex,scaley,scalez, lockheight,fheight)
add_npc_to_world( 137796,105374,0,15109) -- 론도 모병관 분수 남쪽
add_npc_to_world( 128802,108843,0,15104 ) -- 론도 모병관 공성캠프에 한마리
add_npc_to_world( 128781,108667,0,15105 ) -- 루시아드 파견관 루스 + 마법사
add_npc_to_world( 128839,108700,0,15107 )
add_npc_to_world( 128834,108668,0,15107 )
add_npc_to_world( 128780,108793,0,15106) -- 사령관 리버 + 병사
add_npc_to_world( 128966,108781,0,15103)
add_npc_to_world( 128960,108820,0,15103)
add_npc_to_world( 128939,108853,0,15103)
add_npc_to_world( 128877,108758,0,15103)
add_npc_to_world( 128866,108798,0,15103)
add_npc_to_world( 128855,108835,0,15103)
add_npc_to_world( 129727,109236,0,15108) -- 후방 막사 병사.
add_npc_to_world( 129727,109168,0,15108)
add_npc_to_world( 129572,108785,0,15108)
add_npc_to_world( 129620, 108814,0,15110) -- 루시아드 행정관
siege_clear()
siege_mage(6, 1) -- 6번은 본진에서 대기중인 메이지
end
end
------------------------------------------------------------------------------
function siege_notice( message ) -- 특정 지역에 공지 >> guild notice로 대체
local gid = ggv("siege_guild")
gnotice(gid,message)
end
function on_siege_end(click) -- 자동실행에서 공성 귀환 포탈 클릭으로 변경. 성공(16) 이 아니면 이것이 존재하지 않는다.
local progress = tonumber( ggv("siege_progress")) or 0
local xx = 128766 - 30 + math.random(61)
local yy = 108911 - 30 + math.random(61)
local pdata = { 4060, 4061, 4062, 4063, 4064, 4065, 4066 }
local ptime = { 60, 60, 55, 50, 45, 40, 35 } -- 타임어택퀘스트. 분 32 30 28 27,26...
local szdata = table.getn(pdata)
local progress = ggv("siege_progress" )
local tguild = ggv("siege_guild" )
local myguild = gv('guild_id')
if click==nil or click=="" then
click = 1 -- 프랍 스크립트에서 아무것도 안넘기는경우 대비
end
if click==2 or progress == 0 or progress == 17 or myguild ~= tguild then -- click2는 로그인시강제 리콜을 위한 커맨드
common_warp_gate( xx, yy )
return
end
if click ~= 1 or progress ~= 16 then
return
end
local wsec = ggv("siege_time")
if wsec > 0 then
local wmin = math.floor(wsec/60)
for i = 1, szdata do
local quest_pr = get_quest_progress( pdata[i]) -- 반환값 -1 : 아무것도 아님 / 0 : 수락가 / 1 : 수행중 / 2 : 종료가능 / 255 : 이미종료
if --[[wmin <= ptime[i] and]] quest_pr == 1 then -- QUEST_EXTERNAL_CONTROL = 701,// 외부제어(set_quest_status 스크립트 함수에 의해서만 완료 가능)
set_quest_status( pdata[i], 1, 1 ) -- 슬롯 1~6을 1로 하면 완료가능
cprint( "@91000797" ) -- 목표 달성.
end
end
end
common_warp_gate( xx, yy )
end
function siege_kill( num , knight )
if num <1 or num >5 then
return
end
if knight ~= nil and knight ~= "" then
siege_regen(6)
end
local parm = ggv("siege_parm_" .. num)
parm = parm - 1
if parm < 0 then
parm = 0
end
sgv("siege_parm_" .. num, parm)
if --[[num == 5 and]] parm== 0 then
if num==5 then
local progress = tonumber( ggv("siege_progress")) or 0
if progress == 15 then
local sec = tonumber(get_os_date("%M")) * 60 + tonumber(get_os_date("%S")) -- 공성시간은 테스트와 무관하게 정시를 기록!
sgv("siege_time", sec)
siege_notice( "@90610889")
local prop_handle = add_field_prop( 90002, 0, 126630,111903, 0) -- 중앙에 퀘스트 완료 및 귀환 프랍을 생성 gate6에 핸들을 저장 -- gate_6 에 등록하면 siege_clear에서 자동으로 삭제된다
sgv("siege_gate_6" , prop_handle )
end
end
end
end
function siege_regen(num ,remain_art)
-- 1.병단 오르막길
local pdata1= {
22300179, 126904,108975, 126896,108933, 126972,108977, 126971,108914, 127027,108964, 127023,108908, 127076,108951, 127063,108901, 0,0,
22300179, 127126,108941, 127114,108882, 127171,108923, 127155,108872, 127213,108906, 127194,108857, 127260,108882, 127241,108833, 0,0,
22300179, 127281,108813, 127303,108862, 127315,108795, 127352,108835, 127359,108766, 127395,108815, 127395,108742, 127439,108780, 0,0,
22300179, 127482,108745, 127437,108715, 127519,108713, 127480,108676, 127554,108691, 127516,108649, 127589,108663, 127558,108618, 0,0,
22300180, 126933,108950, 127054,108929, 127139,108903, 127222,108870, 127316,108827, 127398,108778, 127483,108709, 127557,108651, 0,0,
22300178, 127621, 108601, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, -- 지휘관
}
-- 2.병단 본진
local pdata2= {
22300177, 127325,108180, 127325,108210, 127325,108280, 127325,108330, 127375,108180, 127375,108210, 127375,108280, 127375,108330, 0,0,
22300177, 127425,108180, 127425,108210, 127425,108280, 127425,108330, 127475,108180, 127475,108210, 127475,108280, 127475,108330, 0,0,
22300177, 127525,108180, 127525,108210, 127525,108280, 127525,108330, 127575,108180, 127575,108210, 127575,108280, 127575,108330, 0,0,
22300177, 127525,108180, 127525,108210, 127525,108280, 127525,108330, 0,0, 0,0, 0,0, 0,0, 0,0, -- 이하 2개가 매5분 마다?
22300176, 127704,108256, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, -- 도착지를 지정했으나 출발지를 지정해 이동했으면 좋겠다.
}
-- 3.페른입구
local pdata3= { -- 2열 -- 3열
22300187, 128245,110453, 128249,110408, 128257,110365, 128252,110460, 128261,110413, 128263,110370, 128278,110465, 128283,110423, 128283,110365,
22300187, 128115,110638, 128163,110633, 128215,110617, 128126,110654, 128173,110643, 128220,110633, 128121,110659, 128168,110654, 128226,110649,
22300187, 127974,110433, 127995,110475, 128010,110517, 127963,110439, 127984,110481, 128000,110523, 127947,110449, 127968,110496, 127989,110533,
22300187, 127769,109950, 127727,109929, 127690,109908, 127774,109940, 127737,109919, 127690,109898, 127779,109919, 127737,109903, 127695,109877,
22300187, 127695,110155, 127617,110129, 127580,110108, 127648,110166, 127611,110145, 127569,110118, 127638,110176, 127596,110150, 127559,110134,
22300184, 128142,110465, 127674,110034, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0,
}
-- 4.페른 중간
local pdata4= {
22300188, 127050,109880, 127000,109880, 126950,109880, 127050,109870, 127000,109870, 126950,109870, 127050,109860, 127000,109860, 126950,109860,
22300188, 126811,109945, 126780,109984, 126754,110021, 126802,109939, 126772,109976, 126746,110015, 126790,109930, 126760,109966, 126733,110006,
22300188, 126685,110199, 126696,110248, 126702,110293, 126676,110202, 126684,110249, 126689,110297, 126662,110204, 126668,110249, 126675,110296,
22300188, 126754,110483, 126773,110524, 126791,110565, 126744,110489, 126762,110528, 126779,110570, 126732,110494, 126749,110532, 126767,110573,
22300188, 126904,110673, 126949,110683, 126992,110697, 126901,110681, 126945,110694, 126991,110707, 126895,110692, 126941,110707, 126985,110722,
22300188, 127185,110729, 127231,110742, 127274,110753, 127182,110741, 127230,110753, 127268,110765, 127177,110750, 127224,110769, 127265,110777,
22300188, 127132,110228, 127167,110673, 127202,110283, 127138,110219, 127173,110249, 127208,110276, 127146,110209, 127180,110238, 127218,110265,
22300188, 127317,110380, 127351,110407, 127389,110435, 127325,110372, 127356,110395, 127395,110425, 127334,110362, 126941,110707, 127558,110579,
22300188, 127511,110559, 127533,110593, 127562,110631, 127521,110554, 127545,110587, 127572,110623, 127532,110545, 127224,110769, 127586,110617,
22300185, 126892,110202, 127008,110502, 127344,110607, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0,
}
-- 최종
local pdata5= {
22300189, 127287,111263, 127254,111297, 127230,111327, 127277,111257, 127247,111291, 127219,111322, 127262,111246, 127238,111282, 127205,111312,
22300189, 127386,111364, 127361,111390, 127328,111430, 127393,111371, 127370,111397, 127336,111438, 127402,111376, 127381,111407, 127346,111449,
22300195, 127416,111212, 127180,111369, 127199,111388, 127221,111408, 127244,111427, 127263,111446, 127281,111463, 127092,111500, 127120,111544,
-- 오르막길에 기사 한부대 추가 검토. 막사는 없어도 될듯.
22300196, 126982,111752, 126938,112134, 126582,112288, 126274,112054, 126321,111670, 126675,111521, 0,0, 0,0, 0,0,
}
-- 데스나이트는 타워 파괴시 3마리 소환된다.
local pdata6 = {
22300197, 126630,111903, 126630,111903, 126630,111903, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0,
}
if remain_art == nil or remain_art=="" then
local tick = get_os_date("%M")*3 + math.floor(get_os_date("%S")/20) -- 어림값 생성 59분이 최대이기 때문에 0~179으로 변환.
local siege_test = ggv("siege_test")
if siege_test ~=nil and siege_test ~="" then
tick = tick - tonumber(siege_test)
if tick < 0 then
tick = tick + 60*3
end
end
remain_art = math.floor((170-tick)*20)*100 -- 10틱 = (3분20초) 정도 여유를 둔다
end
local ret = 0
if num==1 then
ret = mess_generate(pdata1, remain_art, 127284, 108838)
elseif num==2 then
ret = mess_generate(pdata2, remain_art, 127246, 108254)
elseif num==3 then
ret = mess_generate(pdata3, remain_art)
elseif num==4 then
ret = mess_generate(pdata4, remain_art)
elseif num==5 then
ret = mess_generate(pdata5, remain_art)
elseif num==6 then
ret = mess_generate(pdata6, remain_art)
local prev = ggv("siege_parm_5")
sgv("siege_parm_5", prev + ret)
return
end
sgv("siege_parm_" .. num, tostring(ret))
end
function mess_generate(pdata, duration,startx,starty)
local ret = 0
local tmonster = 0
local szdata = table.getn(pdata)/19
for i = 1, szdata do
local base = (i-1)*19
local id = pdata[base+1]
for j = 1, 9 do
if pdata[base+(j*2)+1] == 0 then
break
end
if startx == nil or startx=="" then
tmonster = add_monster(pdata[base+1], pdata[base+(j*2)], pdata[base+(j*2)+1] , 0, duration)
if tmonster > 0 then
ret = ret +1
end
else
tmonster = add_monster( pdata[base+1], startx, starty, 0, duration )
if tmonster > 0 then
set_home(tmonster,pdata[base+(j*2)], pdata[base+(j*2)+1])
ret = ret + 1
end
end
end
end
return ret
end
function siege_warp(no)
local pdata ={ 126803, 108974, 127701, 108510, 128268, 109801, 127221, 109919, 127449, 110974, } --MohcenMaher, fixing
if no <1 or no > 5 then
return
end
-- 공성 시간대인지. 해당 시간대의 길드나 얼라이언스 인지 검사.
local progress = ggv("siege_progress" )
local tguild = ggv("siege_guild" )
if progress <1 or progress>=99 then
return
end
local myguild = gv('guild_id')
if myguild == 0 or myguild ~= tguild then
return
end
local pos_x = pdata[ no*2+1-2 ]
local pos_y = pdata[ no*2+2-2 ]
common_warp_gate( pos_x, pos_y )
end
function siege_gate(no, state) -- 0 삭제, 1 빨강, 2 파랑
local pdata ={ 2101,2201, 126724, 108973, 0, 1.57, 1.0,
2102,2202, 127652, 108577, 0, 1.57, 1.0,
2103,2203, 128299, 109702, 0, 1.57, 1.0,
2104,2204, 127337, 109935, 0, 1.57, 1.0,
2105,2205, 127457, 110864, 0, 1.57, 1.0,
}
if state<0 or state>2 then
return
end
local szdata = table.getn(pdata)/7
local first = 1
local final = szdata
if no ~= nil and no ~= "" and no > 0 and no <= szdata then
first = no
final = no
end
for i = first, final do
local pos_x = pdata[ i*7+3-7 ]
local pos_y = pdata[ i*7+4-7 ]
local height = pdata[ i*7+5-7 ]
local rotate = pdata[ i*7+6-7 ]
local scale = pdata[ i*7+7-7 ]
local prop_handle = ggv("siege_gate_" .. i) -- 1.이전의 프랍을 삭제한다.
if prop_handle ~= nil and prop_handle ~= "" and prop_handle > 0 then
remove_field_prop(prop_handle)
end
prop_handle = 0
if state > 0 then
local prop_id = pdata[ i*7+state-7 ]
prop_handle = add_field_prop( prop_id, 0, pos_x, pos_y, 0, height, 0, 0, rotate, scale ,scale, scale )
end
sgv("siege_gate_" .. i , prop_handle)
end
end
function siege_mage(no,state)
local pdata ={ 15111, 126708, 108994, 126709,108960, 170, -- 1차
15112, 127662, 108588, 127640,108575, 200, -- 2차
15113, 128287, 109692, 128311,109698, 90, -- 3차
15114, 127352, 109917, 127345,109950, 0, -- 4차
15115, 127440, 110851, 127469,110850, 90, -- 5차
15107, 128839, 108700, 128834,108668, 180, -- 6번은 본진 메이지
}
local hide = 0
if state == 0 then
hide = 1
end
local szdata = table.getn(pdata)/6
local first = 1
local final = szdata
if no ~= nil and no ~= "" and no > 0 and no <= szdata then
first = no
final = no
end
for i = first, final do
local code = pdata[ i*6+1-6 ]
local pos_x1 = pdata[ i*6+2-6 ]
local pos_y1 = pdata[ i*6+3-6 ]
local pos_x2 = pdata[ i*6+4-6 ]
local pos_y2 = pdata[ i*6+5-6 ]
local angle = pdata[ i*6+6-7 ]
show_npc( pos_x1, pos_y1, code, hide)
show_npc( pos_x2, pos_y2, code, hide)
end
end
function siege_day_start()
for i = 1 , 5, 1 do
sgv("siege_record_guild_" .. i,0) -- 일단 레코드는 모두 초기화
sgv("siege_record_time_" .. i,0)
local prev = tonumber ( ggv("siege_guild_"..i) ) or 0 -- 신청이 되지 않은 시간대를 _G.point_per_day 할인해서 기록한다.
local old = tonumber ( ggv("siege_point_"..i) ) or _G.min_point
if prev == 0 and old > _G.min_point then
sgv("siege_point_"..i, old-_G.point_per_day )
end
end
end
function siege_day_end()
for i = 1, 6 ,1 do
sgv("siege_guild_"..i, 0) -- 신청길드 리셋. 포인트는 리셋
del_global_variable("siege_point_"..i)
end
end
function siege_record(guild, wsec)
local myrank = 6
for i = 5, 1,-1 do
local tguild = tonumber( ggv("siege_record_guild_" .. i ) ) or 0
local tsec = tonumber( ggv("siege_record_time_" .. i) ) or 3600
if tguild~=0 and tsec~=0 and wsec >= tsec then -- i+1에 나를 넣는다.6번에 넣어도 상관없다.
break
end
sgv("siege_record_guild_" .. i+1, tguild)
sgv("siege_record_time_" .. i+1, tsec)
myrank = i
end
sgv("siege_record_guild_" .. myrank, guild)
sgv("siege_record_time_" .. myrank, wsec)
return myrank
end
function siege_get_min_sec(wsec)
local min = math.floor(wsec/60)
local sec = wsec - min*60
if min < 10 then
time = '0' .. tostring(min)
else
time = tostring(min)
end
time = time .. ":"
if sec < 10 then
time = time .. '0' .. tostring(sec)
else
time = time .. tostring(sec)
end
return time
end
function siege_get_weekday() -- 금일을 포함한 공성 진행 요일을 구하는 펑션.
local wday = tonumber(get_os_date("%w")) -- 현재 요일을 구한다 0:일
local sz = table.getn(_G.siege_day)
local min_diff = 7
local ret ="NA"
for i = 1 , sz do
local tday = _G.siege_day[i]
local diff = tday - wday
if diff < 0 then
diff = diff + 7
end
if diff < min_diff then
ret = _G.weekday[tday+1]
min_diff = diff
end
end
return ret
end
function siege_get_remainday()
local wday = tonumber(get_os_date("%w")) -- 현재 요일을 구한다 0:일
local sz = table.getn(_G.siege_day)
local min_diff = 7
for i = 1 , sz do
local tday = _G.siege_day[i]
local diff = tday - wday
if diff < 0 then
diff = diff + 7
end
if diff < min_diff then
min_diff = diff
end
end
return min_diff
end
function siege_get_remainhour()
local rday = siege_get_remainday()
local rhour = (rday * 24) - (tonumber(get_os_date("%H")))
local val = 0
if rday ~= 0 then
val = rhour
end
return val
end
--------------- webzen test server QA ------------------------
function NPC_WZ_QA( handle , handle2 )
if get_env("game.WZ_QA") ~= 1 then
return
else
local npc_name = "@"..get_npc_type().."|@"..get_npc_name()
dlg_title( npc_name)
dlg_text( "QA NPC Helper..." )
if handle == 1 then
dlg_menu("Shops" , "NPC_WZ_QA(2)" ) -- Open options for different market resource
dlg_menu("Quests" , "NPC_WZ_QA(3)" ) -- Opens options for force start of quests
dlg_menu("Level Changer", "NPC_WZ_QA(5)" )
dlg_menu("Buffs", "NPC_WZ_QA_Buffs(0)" )
dlg_menu( "Get JP", "sv('jp', '1000000000000')" )
dlg_menu( "Get TP", "sv('tp', '1')" )
dlg_menu( "Enchantment food", "NPC_WZ_QA_Food(0,0)" )
elseif handle == 2 then -- Shops
dlg_menu("Cash Items", "open_market( 'wz_qa_cash' )" )
dlg_menu("Equipment", "open_market( 'wz_qa_equip' )" )
dlg_menu("Cosumables", "open_market( 'wz_qa_consum' )" )
dlg_menu("Creatures", "open_market( 'wz_qa_creature' )" )
dlg_menu("Boss Cards", "open_market( 'wz_qa_boss' )" )
dlg_menu( "Get Money", "insert_item(602701, 1000, 0, 0, 2)" )
elseif handle == 3 then -- Quests
dlg_menu( "Force start DD Quest", "force_start_quest( 4032, 1 )" )
dlg_menu( "Vulc - Source of Life", "force_start_quest( 3380, 1 )" )
dlg_menu("Master Class", "force_start_quest( 3322, 1 )" )
dlg_menu("Warp to MC Final Platform", "warp(30640, 41496)" )
elseif handle == 4 then -- Lv. changer
dlg_menu("Set Character", "sv('lv', '".. (handle2)-1 .."')" )
dlg_menu("Set Pet", "smcv('lv', '".. (handle2)-1 .."')" )
elseif handle == 5 then
dlg_menu("Lv. 150", "NPC_WZ_QA(4,150)" )
dlg_menu("Lv. 155", "NPC_WZ_QA(4,155)" )
dlg_menu("Lv. 160", "NPC_WZ_QA(4,160)" )
dlg_menu("Lv. 165", "NPC_WZ_QA(4,165)" )
dlg_menu("Lv. 170", "NPC_WZ_QA(4,170)" )
dlg_menu("Lv. 175", "NPC_WZ_QA(4,175)" )
dlg_menu("Lv. 180", "NPC_WZ_QA(4,180)" )
dlg_menu("Lv. 185", "NPC_WZ_QA(4,185)" )
dlg_menu("Next Page", "NPC_WZ_QA(6)" )
elseif handle == 6 then
dlg_menu("Lv. 190", "NPC_WZ_QA(4,190)" )
dlg_menu("Lv. 195", "NPC_WZ_QA(4,195)" )
dlg_menu("Lv. 200", "NPC_WZ_QA(4,200)" )
dlg_menu("Lv. 201", "NPC_WZ_QA(4,201)" )
dlg_menu("Lv. 202", "NPC_WZ_QA(4,202)" )
dlg_menu("Lv. 203", "NPC_WZ_QA(4,203)" )
dlg_menu("Lv. 204", "NPC_WZ_QA(4,204)" )
dlg_menu("Lv. 205", "NPC_WZ_QA(4,205)" )
dlg_menu("Lv. 206", "NPC_WZ_QA(4,206)" )
dlg_menu("Previous Page", "NPC_WZ_QA(5)" )
dlg_menu("Next Page", "NPC_WZ_QA(7)" )
elseif handle == 7 then
dlg_menu("Lv. 207", "NPC_WZ_QA(4,207)" )
dlg_menu("Lv. 208", "NPC_WZ_QA(4,208)" )
dlg_menu("Lv. 209", "NPC_WZ_QA(4,209)" )
dlg_menu("Lv. 210", "NPC_WZ_QA(4,210)" )
dlg_menu("Previous Page", "NPC_WZ_QA(6)" )
end
if handle ~= 1 then
dlg_menu("Return" , "NPC_WZ_QA(1)" )
end
dlg_menu( "@90010002", " " )
dlg_show()
end
end
function NPC_WZ_QA_Buffs ( level )
local npc_name = "@"..get_npc_type().."|@"..get_npc_name()
dlg_title( npc_name)
dlg_text("make a choice")
if level == 0 then
dlg_menu( "Get HV Buff", "NPC_Secroute_mage_contact1()" )
dlg_menu( "Level 1", "NPC_WZ_QA_Buffs ( 1 )" )
dlg_menu( "Level 2", "NPC_WZ_QA_Buffs ( 2 )" )
dlg_menu( "Level 3", "NPC_WZ_QA_Buffs ( 3 )" )
dlg_menu( "Level 4", "NPC_WZ_QA_Buffs ( 4 )" )
dlg_menu( "Heaven", "NPC_WZ_QA_Buffs ( 5 ) " )
elseif level == 1 then
add_state( 163404, 62 , 180000 ) -- Blessing of Vitality
add_state( 163405, 62 , 180000 ) -- Blessing of Intelligence
add_state( 163406, 62 , 180000 ) -- Blessing of Wisdom
add_state( 163407, 62 , 180000 ) -- Blessing of Strength
add_state( 163433, 110 , 180000 ) -- Shining Armor
add_state( 2505, 200 , 180000 ) -- Shining Weapon
add_state( 2507, 200 , 180000 ) -- Shining Weapon
add_state( 13423, 45 , 180000 ) -- Speed of the Wind
add_state( 13424, 358 , 180000 ) -- Rock Energy
add_state( 13425, 366 , 180000 ) -- Force of Sacred Fire
add_state( 163429, 14 , 180000 ) -- Wind Weapon
add_state( 2506, 49 , 180000 ) -- Dark Might
add_state( 2508, 49 , 180000 ) -- Dark Might
add_state( 314049, 166 , 180000 ) -- Insight
add_state( 163449, 46 , 180000 ) -- Protector's Force
add_state( 163448, 46 , 180000 ) -- Angel's Force
add_state( 163440, 140 , 180000 ) -- Rally
add_state( 314099, 115 , 180000 ) -- Howl at the Moon
add_state( 314039, 4 , 180000 ) -- Demonic Howl
add_state( 314016, 120 , 180000 ) -- Divine Purpose
add_state( 314017, 180 , 180000 ) -- Asuran Haste
add_state( 314018, 120 , 180000 ) -- Gaian Strength
add_cstate( 163404, 62 , 180000 ) -- Blessing of Vitality
add_cstate( 163405, 62 , 180000 ) -- Blessing of Intelligence
add_cstate( 163406, 62 , 180000 ) -- Blessing of Wisdom
add_cstate( 163407, 62 , 180000 ) -- Blessing of Strength
add_cstate( 163433, 110 , 180000 ) -- Shining Armor
add_cstate( 2505, 200 , 180000 ) -- Shining Weapon
add_cstate( 2507, 200 , 180000 ) -- Shining Weapon
add_cstate( 13423, 45 , 180000 ) -- Speed of the Wind
add_cstate( 13424, 358 , 180000 ) -- Rock Energy
add_cstate( 13425, 366 , 180000 ) -- Force of Sacred Fire
add_cstate( 163429, 14 , 180000 ) -- Wind Weapon
add_cstate( 2506, 49 , 180000 ) -- Dark Might
add_cstate( 2508, 49 , 180000 ) -- Dark Might
add_cstate( 314049, 166 , 180000 ) -- Insight
add_cstate( 163449, 46 , 180000 ) -- Protector's Force
add_cstate( 163448, 46 , 180000 ) -- Angel's Force
add_cstate( 163440, 140 , 180000 ) -- Rally
add_cstate( 314099, 115 , 180000 ) -- Howl at the Moon
add_cstate( 314039, 4 , 180000 ) -- Demonic Howl
add_cstate( 314016, 120 , 180000 ) -- Divine Purpose
add_cstate( 314017, 180 , 180000 ) -- Asuran Haste
add_cstate( 314018, 120 , 180000 ) -- Gaian Strength
elseif level == 2 then
add_state( 163404, 72 , 180000 ) -- Blessing of Vitality
add_state( 163405, 72 , 180000 ) -- Blessing of Intelligence
add_state( 163406, 72 , 180000 ) -- Blessing of Wisdom
add_state( 163407, 72 , 180000 ) -- Blessing of Strength
add_state( 163433, 130 , 180000 ) -- Shining Armor
add_state( 2505, 240 , 180000 ) -- Shining Weapon
add_state( 2507, 240 , 180000 ) -- Shining Weapon
add_state( 13423, 51 , 180000 ) -- Speed of the Wind
add_state( 13424, 424 , 180000 ) -- Rock Energy
add_state( 13425, 436 , 180000 ) -- Force of Sacred Fire
add_state( 163429, 17 , 180000 ) -- Wind Weapon
add_state( 2506, 58 , 180000 ) -- Dark Might
add_state( 2508, 58 , 180000 ) -- Dark Might
add_state( 314049, 194 , 180000 ) -- Insight
add_state( 163449, 54 , 180000 ) -- Protector's Force
add_state( 163448, 54 , 180000 ) -- Angel's Force
add_state( 163440, 162 , 180000 ) -- Rally
add_state( 314099, 135 , 180000 ) -- Howl at the Moon
add_state( 314039, 5 , 180000 ) -- Demonic Howl
add_state( 314016, 150 , 180000 ) -- Divine Purpose
add_state( 314017, 240 , 180000 ) -- Asuran Haste
add_state( 314018, 150 , 180000 ) -- Gaian Strength
add_cstate( 163404, 72 , 180000 ) -- Blessing of Vitality
add_cstate( 163405, 72 , 180000 ) -- Blessing of Intelligence
add_cstate( 163406, 72 , 180000 ) -- Blessing of Wisdom
add_cstate( 163407, 72 , 180000 ) -- Blessing of Strength
add_cstate( 163433, 130 , 180000 ) -- Shining Armor
add_cstate( 2505, 240 , 180000 ) -- Shining Weapon
add_cstate( 2507, 240 , 180000 ) -- Shining Weapon
add_cstate( 13423, 51 , 180000 ) -- Speed of the Wind
add_cstate( 13424, 424 , 180000 ) -- Rock Energy
add_cstate( 13425, 436 , 180000 ) -- Force of Sacred Fire
add_cstate( 163429, 17 , 180000 ) -- Wind Weapon
add_cstate( 2506, 58 , 180000 ) -- Dark Might
add_cstate( 2508, 58 , 180000 ) -- Dark Might
add_cstate( 314049, 194 , 180000 ) -- Insight
add_cstate( 163449, 54 , 180000 ) -- Protector's Force
add_cstate( 163448, 54 , 180000 ) -- Angel's Force
add_cstate( 163440, 162 , 180000 ) -- Rally
add_cstate( 314099, 135 , 180000 ) -- Howl at the Moon
add_cstate( 314039, 5 , 180000 ) -- Demonic Howl
add_cstate( 314016, 150 , 180000 ) -- Divine Purpose
add_cstate( 314017, 240 , 180000 ) -- Asuran Haste
add_cstate( 314018, 150 , 180000 ) -- Gaian Strength
elseif level == 3 then
add_state( 163404, 82 , 180000 ) -- Blessing of Vitality
add_state( 163405, 82 , 180000 ) -- Blessing of Intelligence
add_state( 163406, 82 , 180000 ) -- Blessing of Wisdom
add_state( 163407, 82 , 180000 ) -- Blessing of Strength
add_state( 163433, 150 , 180000 ) -- Shining Armor
add_state( 2505, 280 , 180000 ) -- Shining Weapon
add_state( 2507, 280 , 180000 ) -- Shining Weapon
add_state( 13423, 57 , 180000 ) -- Speed of the Wind
add_state( 13424, 490 , 180000 ) -- Rock Energy
add_state( 13425, 506 , 180000 ) -- Force of Sacred Fire
add_state( 163429, 20 , 180000 ) -- Wind Weapon
add_state( 2506, 67 , 180000 ) -- Dark Might
add_state( 2508, 67 , 180000 ) -- Dark Might
add_state( 314049, 222 , 180000 ) -- Insight
add_state( 163449, 62 , 180000 ) -- Protector's Force
add_state( 163448, 62 , 180000 ) -- Angel's Force
add_state( 163440, 84 , 180000 ) -- Rally
add_state( 314099, 155 , 180000 ) -- Howl at the Moon
add_state( 314039, 7 , 180000 ) -- Demonic Howl
add_state( 314016, 180 , 180000 ) -- Divine Purpose
add_state( 314017, 300 , 180000 ) -- Asuran Haste
add_state( 314018, 180 , 180000 ) -- Gaian Strength
add_cstate( 163404, 82 , 180000 ) -- Blessing of Vitality
add_cstate( 163405, 82 , 180000 ) -- Blessing of Intelligence
add_cstate( 163406, 82 , 180000 ) -- Blessing of Wisdom
add_cstate( 163407, 82 , 180000 ) -- Blessing of Strength
add_cstate( 163433, 150 , 180000 ) -- Shining Armor
add_cstate( 2505, 280 , 180000 ) -- Shining Weapon
add_cstate( 2507, 280 , 180000 ) -- Shining Weapon
add_cstate( 13423, 57 , 180000 ) -- Speed of the Wind
add_cstate( 13424, 490 , 180000 ) -- Rock Energy
add_cstate( 13425, 506 , 180000 ) -- Force of Sacred Fire
add_cstate( 163429, 20 , 180000 ) -- Wind Weapon
add_cstate( 2506, 67 , 180000 ) -- Dark Might
add_cstate( 2508, 67 , 180000 ) -- Dark Might
add_cstate( 314049, 222 , 180000 ) -- Insight
add_cstate( 163449, 62 , 180000 ) -- Protector's Force
add_cstate( 163448, 62 , 180000 ) -- Angel's Force
add_cstate( 163440, 84 , 180000 ) -- Rally
add_cstate( 314099, 155 , 180000 ) -- Howl at the Moon
add_cstate( 314039, 7 , 180000 ) -- Demonic Howl
add_cstate( 314016, 180 , 180000 ) -- Divine Purpose
add_cstate( 314017, 300 , 180000 ) -- Asuran Haste
add_cstate( 314018, 180 , 180000 ) -- Gaian Strength
elseif level == 4 then
add_state( 163404, 87 , 180000 ) -- Blessing of Vitality
add_state( 163405, 87 , 180000 ) -- Blessing of Intelligence
add_state( 163406, 87 , 180000 ) -- Blessing of Wisdom
add_state( 163407, 87 , 180000 ) -- Blessing of Strength
add_state( 163433, 160 , 180000 ) -- Shining Armor
add_state( 2505, 300 , 180000 ) -- Shining Weapon
add_state( 2507, 300 , 180000 ) -- Shining Weapon
add_state( 13423, 60 , 180000 ) -- Speed of the Wind
add_state( 13424, 523 , 180000 ) -- Rock Energy
add_state( 13425, 541 , 180000 ) -- Force of Sacred Fire
add_state( 163429, 22 , 180000 ) -- Wind Weapon
add_state( 2506, 72 , 180000 ) -- Dark Might
add_state( 2508, 72 , 180000 ) -- Dark Might
add_state( 314049, 236 , 180000 ) -- Insight
add_state( 163449, 66 , 180000 ) -- Protector's Force
add_state( 163448, 66 , 180000 ) -- Angel's Force
add_state( 163440, 195 , 180000 ) -- Rally
add_state( 314099, 165 , 180000 ) -- Howl at the Moon
add_state( 314039, 7 , 180000 ) -- Demonic Howl
add_state( 314016, 195 , 180000 ) -- Divine Purpose
add_state( 314017, 330 , 180000 ) -- Asuran Haste
add_state( 314018, 195 , 180000 ) -- Gaian Strength
add_cstate( 163404, 87 , 180000 ) -- Blessing of Vitality
add_cstate( 163405, 87 , 180000 ) -- Blessing of Intelligence
add_cstate( 163406, 87 , 180000 ) -- Blessing of Wisdom
add_cstate( 163407, 87 , 180000 ) -- Blessing of Strength
add_cstate( 163433, 160 , 180000 ) -- Shining Armor
add_cstate( 2505, 300 , 180000 ) -- Shining Weapon
add_cstate( 2507, 300 , 180000 ) -- Shining Weapon
add_cstate( 13423, 60 , 180000 ) -- Speed of the Wind
add_cstate( 13424, 523 , 180000 ) -- Rock Energy
add_cstate( 13425, 541 , 180000 ) -- Force of Sacred Fire
add_cstate( 163429, 22 , 180000 ) -- Wind Weapon
add_cstate( 2506, 72 , 180000 ) -- Dark Might
add_cstate( 2508, 72 , 180000 ) -- Dark Might
add_cstate( 314049, 236 , 180000 ) -- Insight
add_cstate( 163449, 66 , 180000 ) -- Protector's Force
add_cstate( 163448, 66 , 180000 ) -- Angel's Force
add_cstate( 163440, 195 , 180000 ) -- Rally
add_cstate( 314099, 165 , 180000 ) -- Howl at the Moon
add_cstate( 314039, 7 , 180000 ) -- Demonic Howl
add_cstate( 314016, 195 , 180000 ) -- Divine Purpose
add_cstate( 314017, 330 , 180000 ) -- Asuran Haste
add_cstate( 314018, 195 , 180000 ) -- Gaian Strength
elseif level == 5 then
dlg_menu( "+5%", "NPC_WZ_QA_Buffs ( 6 ) " )
dlg_menu( "+10%", "NPC_WZ_QA_Buffs ( 7 ) " )
dlg_menu( "+20%", "NPC_WZ_QA_Buffs ( 8 ) " )
elseif level == 6 then
add_state( 314077 , 1 , 180000 ) -- Heaven 5%
add_cstate( 314077 , 1 , 180000 ) -- Heaven 5%
elseif level == 7 then
add_state( 314078 , 1 , 180000 ) -- Heaven 10%
add_cstate( 314078 , 1 , 180000 ) -- Heaven 10%
elseif level == 8 then
add_state( 314079 , 1 , 180000 ) -- Heaven 20%
add_cstate( 314079 , 1 , 180000 ) -- Heaven 20%
end
dlg_menu( "@90010002", "" )
dlg_show()
end
function NPC_WZ_QA_Food ( wep, plus )
local npc_name = "@"..get_npc_type().."|@"..get_npc_name()
dlg_title( npc_name)
dlg_text("make a choice")
if wep == 0 then
dlg_menu( "Weapon", "NPC_WZ_QA_Food ( 1, 0 )" )
dlg_menu( "Armor", "NPC_WZ_QA_Food ( 2, 0 )" )
elseif wep == 1 and plus == 0 then
dlg_menu( "20", "NPC_WZ_QA_Food ( 1, 20 )" )
dlg_menu( "21", "NPC_WZ_QA_Food ( 1, 21 )" )
dlg_menu( "22", "NPC_WZ_QA_Food ( 1, 22 )" )
dlg_menu( "23", "NPC_WZ_QA_Food ( 1, 23 )" )
dlg_menu( "24", "NPC_WZ_QA_Food ( 1, 24 )" )
elseif wep == 2 and plus == 0 then
dlg_menu( "20", "NPC_WZ_QA_Food ( 2, 20 )" )
dlg_menu( "21", "NPC_WZ_QA_Food ( 2, 21 )" )
dlg_menu( "22", "NPC_WZ_QA_Food ( 2, 22 )" )
dlg_menu( "23", "NPC_WZ_QA_Food ( 2, 23 )" )
dlg_menu( "24", "NPC_WZ_QA_Food ( 2, 24 )" )
else
if wep == 1 then
insert_item(101720504, 1, plus, 1, 2)
elseif wep == 2 then
insert_item(201720804, 1, plus, 1, 2)
end
end
dlg_menu( "@90010002", "" )
dlg_show()
end
--------------- webzen test server QA end ------------------------