function get_module_name()
return "on_player_level_up"
end
function on_player_level_up()
--local tx, ty, current_x, island_number
local lv = get_value( "level" )
if lv == 5 then
-- 각 1번 섬의 텔레포트 좌표
-- tx = 30315
-- ty = 5480
-- 현재귀환 위치를 가져옴.
current_x = get_flag( "rx" )
-- 몇 번 째 섬인지 확인.
-- local i
-- for i = 1, 6 do
-- if current_x < ( 18816 * (i-1) + tx) and current_x + 3000 > ( (18816 * (i-1) + tx) - 10000) then
-- island_number = i
-- end
-- end
-- 귀환지역을 현재 초보자섬 캠프으로 설정
set_flag( "rx", 172543 + math.random(0,100))
set_flag( "ry", 51847 + math.random(0,100))
end
-- 국가 코드 읽어오기
-- get_local_info()의 반환값들
--LOCAL_INFO_KOREA = 1
--LOCAL_INFO_HONGKONG = 2
--LOCAL_INFO_AMERICA = 4
--LOCAL_INFO_GERMANY = 8
--LOCAL_INFO_JAPAN = 16
--LOCAL_INFO_TAIWAN = 32
--LOCAL_INFO_CHINA = 64
--LOCAL_INFO_FRANCE = 128
--LOCAL_INFO_RUSSIA = 256
local state_code = get_local_info()
-- 18레벨 이상이나 수련자의 섬 내에 있는 경우 종족 마을로 귀환 지점 설정
local current_x = gv("x")
local current_y = gv("y")
local race = get_value( "race" )
-- 미국이면 무조건 안보냄 (전 국가 적용 안함으로 변경 08.07.29)
if state_code == 511 then
-- 아무짓도 안해요
elseif lv >= 18 then
-- 수련자의 섬에 있는지 여부 체크
if current_x >= 161280 and current_x <= 177408 then
if current_y >= 48384 and current_y <= 64512 then
-- 현재귀환 위치를 가져옴.
local return_x = get_flag( "rx" )
local return_y = get_flag( "ry" )
-- 수련자의 섬이 귀환인지 체크
if return_x == 173183 and return_y == 52299 then
-- 귀환지역을 해당 종족 마을로 설정
-- 데바일 경우
if race == 4 then
set_flag( "rx", 6625 + math.random(0,100))
set_flag( "ry", 6980 + math.random(0,100))
-- 아수라일 경우
elseif race == 5 then
set_flag( "rx", 116799 + math.random(0,100))
set_flag( "ry", 58205 + math.random(0,100))
-- 가이아일 경우
else
set_flag( "rx", 153513 + math.random(0,100))
set_flag( "ry", 77203 + math.random(0,100))
end -- if race == 4 then
-- 수련자의 섬에 있고 18레벨 이상이기 때문에 해당 종족 마을로 강제 귀환 설정 됐다는 메시지 날림.
message( "@235")
end -- if return_x == 173183 and return_y == 52299
end -- if current_y >= 48384 and current_y <= 64512 then
end -- if current_x >= 161280 and current_x <= 177408 then
end -- if lv >= 18 then
-- 오토로 세팅된 캐릭터라면 저 멀리 날려 버리자~
kick_auto_to_another_world()
-- 수련자 섬에 있는 오토들은 본토로 날려 버리자
local current_x = gv("x")
local current_y = gv("y")
local race = get_value( "race" )
if current_x >= 161280 and current_x <= 177408 then
if current_y >= 48384 and current_y <= 64512 then
local is_auto, quest_count
quest_count, is_auto = anti_auto_quest_check()
if is_auto then
if race == 4 then
RunTeleport_Auto_TO_City( 6625 , 6980 )
elseif race == 5 then
RunTeleport_Auto_TO_City( 116799 , 58205 )
else
RunTeleport_Auto_TO_City( 153506 , 77175 )
end
end -- if is_auto then
end -- if current_y >= 48384 and current_y <= 64512 then
end -- if current_x >= 161280 and current_x <= 177408 then
save()
-- 레벨업 달성 이벤트 처리
-- 국가 코드 읽어오기
-- get_local_info()의 반환값들
--LOCAL_INFO_KOREA = 1
--LOCAL_INFO_HONGKONG = 2
--LOCAL_INFO_AMERICA = 4
--LOCAL_INFO_GERMAN = 8
--LOCAL_INFO_JAPAN = 16
--LOCAL_INFO_TAIWAN = 32
--LOCAL_INFO_CHINA = 64
--LOCAL_INFO_FRANCE = 128
--LOCAL_INFO_RUSSIA = 256
--LOCAL_INFO_MALAYSIA = 512
--LOCAL_INFO_SINGAPORE = 1024
--LOCAL_INFO_VIETNAM = 2048
--LOCAL_INFO_THAILAND = 4096
--LOCAL_INFO_MIDEAST = 8192
--LOCAL_INFO_TURKEY = 16384
local state_code = get_local_info()
if state_code == 8 or state_code == 128 then
local max_reached_level = gv( "max_reached_level" )
local i
for i = max_reached_level + 1 , lv do
if i == 5 then
insert_item( 3600289, 1 )
if i == 3 then
insert_item( 3600289, 10 )
insert_item(103100, 1, 10, 10, -2147483648 )
insert_item(103100, 1, 10, 10, -2147483648 )
add_state(1001, 100, 1800000)
add_state(1002, 100, 1800000)
add_state(1003, 100, 1800000)
add_state(1004, 100, 1800000)
add_state(1005, 100, 1800000)
add_state(1006, 100, 1800000)
add_state(1007, 100, 1800000)
add_state(1008, 100, 1800000)
add_state(1009, 100, 1800000)
add_state(1010, 100, 1800000)
add_state(1011, 100, 1800000)
add_state(1012, 100, 1800000)
add_state(1013, 100, 1800000)
add_state(1014, 100, 1800000)
add_state(1015, 100, 1800000)
add_state(1016, 100, 1800000)
add_state(1017, 100, 1800000)
add_state(1018, 100, 1800000)
add_state(1019, 100, 1800000)
add_state(1051, 100, 1800000)
add_state(1052, 100, 1800000)
add_state(1053, 100, 1800000)
add_state(1054, 100, 1800000)
add_state(1055, 100, 1800000)
add_state(1056, 100, 1800000)
add_state(1057, 100, 1800000)
elseif i == 5 then
RunTeleport( 0 ,153481, 77239 )
elseif i == 10 then
insert_item( 3600289, 1 )
elseif i == 15 then
insert_item( 3600289, 1 )
elseif i == 20 then
insert_item( 3600289, 1 )
elseif i == 25 then
insert_item( 3600289, 1 )
elseif i == 30 then
insert_item( 3600289, 1 )
elseif i == 35 then
insert_item( 3600289, 1 )
elseif i == 40 then
insert_item( 3600289, 1 )
elseif i == 45 then
insert_item( 3600289, 1 )
elseif i == 50 then
insert_item( 3600289, 1 )
elseif i == 55 then
insert_item( 3600289, 1 )
elseif i == 60 then
insert_item( 3600289, 1 )
elseif i == 65 then
insert_item( 3600289, 1 )
elseif i == 70 then
insert_item( 3600289, 1 )
elseif i == 75 then
insert_item( 3600289, 1 )
elseif i == 80 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 85 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 90 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 95 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 100 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 105 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 110 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 115 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 120 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 125 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 130 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 135 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 140 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 145 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 150 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 155 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 160 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 165 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 170 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
end
end
end
-- 레벨업 시 가이드 메시지 출력
on_player_level_joblevel_guide()
end
function on_player_level_joblevel_guide()
--작업중
local lv = get_value( "level" )
local job_lv = get_value( "job_level" )
local job_dp = get_value( "job_depth" )
if job_dp == 0 and lv >= 10 and job_lv >= 10 then
cprint( "@1200" )
--cprint( "@254" )
cprint( "@1201" )
elseif lv == 20 then
cprint( "@1202" )
cprint( "@1203" )
elseif lv == 50 then
cprint( "@1204" )
cprint( "@1205" )
elseif job_dp== 1 and lv >= 50 and job_lv >= 40 then
cprint( "@1206" )
cprint( "@1207" )
cprint( "@1208" )
elseif lv == 80 then
cprint( "@1209" )
cprint( "@1210" )
elseif lv == 100 then
cprint( "@1211" )
cprint( "@1212" )
end
end
end
return "on_player_level_up"
end
function on_player_level_up()
--local tx, ty, current_x, island_number
local lv = get_value( "level" )
if lv == 5 then
-- 각 1번 섬의 텔레포트 좌표
-- tx = 30315
-- ty = 5480
-- 현재귀환 위치를 가져옴.
current_x = get_flag( "rx" )
-- 몇 번 째 섬인지 확인.
-- local i
-- for i = 1, 6 do
-- if current_x < ( 18816 * (i-1) + tx) and current_x + 3000 > ( (18816 * (i-1) + tx) - 10000) then
-- island_number = i
-- end
-- end
-- 귀환지역을 현재 초보자섬 캠프으로 설정
set_flag( "rx", 172543 + math.random(0,100))
set_flag( "ry", 51847 + math.random(0,100))
end
-- 국가 코드 읽어오기
-- get_local_info()의 반환값들
--LOCAL_INFO_KOREA = 1
--LOCAL_INFO_HONGKONG = 2
--LOCAL_INFO_AMERICA = 4
--LOCAL_INFO_GERMANY = 8
--LOCAL_INFO_JAPAN = 16
--LOCAL_INFO_TAIWAN = 32
--LOCAL_INFO_CHINA = 64
--LOCAL_INFO_FRANCE = 128
--LOCAL_INFO_RUSSIA = 256
local state_code = get_local_info()
-- 18레벨 이상이나 수련자의 섬 내에 있는 경우 종족 마을로 귀환 지점 설정
local current_x = gv("x")
local current_y = gv("y")
local race = get_value( "race" )
-- 미국이면 무조건 안보냄 (전 국가 적용 안함으로 변경 08.07.29)
if state_code == 511 then
-- 아무짓도 안해요
elseif lv >= 18 then
-- 수련자의 섬에 있는지 여부 체크
if current_x >= 161280 and current_x <= 177408 then
if current_y >= 48384 and current_y <= 64512 then
-- 현재귀환 위치를 가져옴.
local return_x = get_flag( "rx" )
local return_y = get_flag( "ry" )
-- 수련자의 섬이 귀환인지 체크
if return_x == 173183 and return_y == 52299 then
-- 귀환지역을 해당 종족 마을로 설정
-- 데바일 경우
if race == 4 then
set_flag( "rx", 6625 + math.random(0,100))
set_flag( "ry", 6980 + math.random(0,100))
-- 아수라일 경우
elseif race == 5 then
set_flag( "rx", 116799 + math.random(0,100))
set_flag( "ry", 58205 + math.random(0,100))
-- 가이아일 경우
else
set_flag( "rx", 153513 + math.random(0,100))
set_flag( "ry", 77203 + math.random(0,100))
end -- if race == 4 then
-- 수련자의 섬에 있고 18레벨 이상이기 때문에 해당 종족 마을로 강제 귀환 설정 됐다는 메시지 날림.
message( "@235")
end -- if return_x == 173183 and return_y == 52299
end -- if current_y >= 48384 and current_y <= 64512 then
end -- if current_x >= 161280 and current_x <= 177408 then
end -- if lv >= 18 then
-- 오토로 세팅된 캐릭터라면 저 멀리 날려 버리자~
kick_auto_to_another_world()
-- 수련자 섬에 있는 오토들은 본토로 날려 버리자
local current_x = gv("x")
local current_y = gv("y")
local race = get_value( "race" )
if current_x >= 161280 and current_x <= 177408 then
if current_y >= 48384 and current_y <= 64512 then
local is_auto, quest_count
quest_count, is_auto = anti_auto_quest_check()
if is_auto then
if race == 4 then
RunTeleport_Auto_TO_City( 6625 , 6980 )
elseif race == 5 then
RunTeleport_Auto_TO_City( 116799 , 58205 )
else
RunTeleport_Auto_TO_City( 153506 , 77175 )
end
end -- if is_auto then
end -- if current_y >= 48384 and current_y <= 64512 then
end -- if current_x >= 161280 and current_x <= 177408 then
save()
-- 레벨업 달성 이벤트 처리
-- 국가 코드 읽어오기
-- get_local_info()의 반환값들
--LOCAL_INFO_KOREA = 1
--LOCAL_INFO_HONGKONG = 2
--LOCAL_INFO_AMERICA = 4
--LOCAL_INFO_GERMAN = 8
--LOCAL_INFO_JAPAN = 16
--LOCAL_INFO_TAIWAN = 32
--LOCAL_INFO_CHINA = 64
--LOCAL_INFO_FRANCE = 128
--LOCAL_INFO_RUSSIA = 256
--LOCAL_INFO_MALAYSIA = 512
--LOCAL_INFO_SINGAPORE = 1024
--LOCAL_INFO_VIETNAM = 2048
--LOCAL_INFO_THAILAND = 4096
--LOCAL_INFO_MIDEAST = 8192
--LOCAL_INFO_TURKEY = 16384
local state_code = get_local_info()
if state_code == 8 or state_code == 128 then
local max_reached_level = gv( "max_reached_level" )
local i
for i = max_reached_level + 1 , lv do
if i == 5 then
insert_item( 3600289, 1 )
if i == 3 then
insert_item( 3600289, 10 )
insert_item(103100, 1, 10, 10, -2147483648 )
insert_item(103100, 1, 10, 10, -2147483648 )
add_state(1001, 100, 1800000)
add_state(1002, 100, 1800000)
add_state(1003, 100, 1800000)
add_state(1004, 100, 1800000)
add_state(1005, 100, 1800000)
add_state(1006, 100, 1800000)
add_state(1007, 100, 1800000)
add_state(1008, 100, 1800000)
add_state(1009, 100, 1800000)
add_state(1010, 100, 1800000)
add_state(1011, 100, 1800000)
add_state(1012, 100, 1800000)
add_state(1013, 100, 1800000)
add_state(1014, 100, 1800000)
add_state(1015, 100, 1800000)
add_state(1016, 100, 1800000)
add_state(1017, 100, 1800000)
add_state(1018, 100, 1800000)
add_state(1019, 100, 1800000)
add_state(1051, 100, 1800000)
add_state(1052, 100, 1800000)
add_state(1053, 100, 1800000)
add_state(1054, 100, 1800000)
add_state(1055, 100, 1800000)
add_state(1056, 100, 1800000)
add_state(1057, 100, 1800000)
elseif i == 5 then
RunTeleport( 0 ,153481, 77239 )
elseif i == 10 then
insert_item( 3600289, 1 )
elseif i == 15 then
insert_item( 3600289, 1 )
elseif i == 20 then
insert_item( 3600289, 1 )
elseif i == 25 then
insert_item( 3600289, 1 )
elseif i == 30 then
insert_item( 3600289, 1 )
elseif i == 35 then
insert_item( 3600289, 1 )
elseif i == 40 then
insert_item( 3600289, 1 )
elseif i == 45 then
insert_item( 3600289, 1 )
elseif i == 50 then
insert_item( 3600289, 1 )
elseif i == 55 then
insert_item( 3600289, 1 )
elseif i == 60 then
insert_item( 3600289, 1 )
elseif i == 65 then
insert_item( 3600289, 1 )
elseif i == 70 then
insert_item( 3600289, 1 )
elseif i == 75 then
insert_item( 3600289, 1 )
elseif i == 80 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 85 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 90 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 95 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 100 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 105 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 110 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 115 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 120 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 125 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 130 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 135 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 140 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 145 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 150 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 155 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 160 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 165 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
elseif i == 170 then
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
insert_item( 3600289, 1 )
end
end
end
-- 레벨업 시 가이드 메시지 출력
on_player_level_joblevel_guide()
end
function on_player_level_joblevel_guide()
--작업중
local lv = get_value( "level" )
local job_lv = get_value( "job_level" )
local job_dp = get_value( "job_depth" )
if job_dp == 0 and lv >= 10 and job_lv >= 10 then
cprint( "@1200" )
--cprint( "@254" )
cprint( "@1201" )
elseif lv == 20 then
cprint( "@1202" )
cprint( "@1203" )
elseif lv == 50 then
cprint( "@1204" )
cprint( "@1205" )
elseif job_dp== 1 and lv >= 50 and job_lv >= 40 then
cprint( "@1206" )
cprint( "@1207" )
cprint( "@1208" )
elseif lv == 80 then
cprint( "@1209" )
cprint( "@1210" )
elseif lv == 100 then
cprint( "@1211" )
cprint( "@1212" )
end
end
end
Script\on_plauer_level_up.lua:367: 'end' expected (to close 'function' at line 5) near"
[string "on_plauer_level_up ( 'Char' )"]1: attempt to call global 'on_plauer_level_up' (a nil value)