This is my complete ETC_Script_Function.lua, including my version of the function is_premium(), which I use as a hack to allow nice looking access to HV:
Code:
-- Lua ½ºÅ©¸³Æ® ¾ÏÈ£È*
function get_module_name()
return "ETC_Script_Functions"
end
--get_server_category() ÇÔ¼ö¿Í °°ÀÌ »ç¿ë (¼*¹öÁ¦°ø ÇÔ¼ö)
function scf_get_server_index( category )
-- ¼*¹ö ÀÎÅØ½º ¹øÈ£
-- Á¤½Ä ¼*ºñ½º ¼*¹ö Å×½ºÆ®/°³¹ß ¼*¹ö
-- 1 ·¹ÀÌºì ½ºÄÌÆÄÀÌÅÍ
-- 2 ¾Æ¹ß¶õü QA¼*¹ö
-- 3 ¼¼ÀÌ·» !¹Ì¼ÒXÁ¤ºó¼*¹ö! (--;;)
-- 4 »ø·¯¸Ç´õ
-- 5 ¶óÀ̵ð¾ð
-- 7°ú AND ¿¬»ê ½ÃÄ×À» ¶§ ³ª¿À´Â ¼ö°¡ ¼*¹ö À妽º ¹øÈ£
local bin01 = math.mod( category, 2 )
local bin02 = math.mod( math.floor( category / 2 ), 2 ) * 2
local bin03 = math.mod( math.floor( category / 4 ), 2 ) * 4
return (bin01 + bin02 + bin03)
end
function scf_is_pk_server( category )
-- 8°ú AND ¿¬»ê ½ÃÄ×À» ¶§ 0 À̸é ÀϹݼ*¹ö, 8À̸é PK ¼*¹ö
if math.mod( math.floor( category / 268435456 ), 2 ) == 1 then
return true
else
return false
end
end
function scf_is_official_server( category )
-- 16°ú AND ¿¬»ê ½ÃÄ×À» ¶§ 0 À̸é Å×½ºÆ®¼*¹ö, 16À̸é Á¤½Ä ¼*¹ö
if math.mod( math.floor( category / 536870912 ), 2 ) == 1 then
return true
else
return false
end
end
--=========================================================================
-- ÇÁ¸®¹Ì¾ö ¼*ºñ½º üũ
--=========================================================================
function is_premium()
local has_hv_buff = get_state_level(9004)
if has_hv_buff >= 1 then
message("All your hacked HV pass access are belong to us.")
return true
end
return false
end
function is_premium2()
-- ±¹°¡ ÄÚµå Àоî¿À±â
-- 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()
local wtf = gv("premium")
local name = gv("name")
message( "name = " .. name .. " | wtf = " .. wtf .. " | state_code = " .. state_code )
-- Çѱ¹ÀÇ °æ¿ì º»¼·/Å×¼· ¸ðµÎ ½ÃÅ©·çÆ® ÇÁ¸®ÆÐ½º°¡ ÀÖÀ¸¸é true
if state_code == 1 and gv( "premium" ) == 1 then
message("We got premium!")
return true
end
if state_code == 1 then
return true
end
-- ½ÃÅ©·çÆ® ÇÁ¸®ÆÐ½º°¡ ÀÖÀ¸¸é true
if gv( "premium" ) == 1 and scf_is_official_server( get_server_category() ) then
return true
end
-- Å×½ºÆ® ¼*¹öÀÌ¸é ¹«Á¶°Ç true
if scf_is_official_server( get_server_category() ) == false then
-- return true
end
return false
end
--=========================================================================
-- 2Â÷ ÀüÁ÷ °¡´É üũ
--=========================================================================
function is_able_to_jobchange()
if get_value( "job_depth" ) == 0 then
if get_value( "level" ) < 10 or get_value( "job_level" ) < 10 then
return false
end
elseif get_value( "job_depth" ) == 1 then
if get_value( "level" ) < 50 or get_value( "job_level" ) < 40 then
return false
end
else
return false
end
-- 1Â÷ Á÷¾÷À̰í ÀüÁ÷ÀÌ °¡´ÉÇÑ Á¶°ÇÀÏ ¶§ Å×½ºÆ® ¼*¹ö´Â ÀüÁ÷ °¡´ÉÇϵµ·Ï true ¹Ýȯ
if ( get_value( "job_depth" ) == 1 ) then
return true
-- º»¼·Àº ºÒ°¡.
else
return false
end
return true
end
--=========================================================================
-- ÀÌ»óÇÑ °÷À¸·Î ÂѾƳ»±â (¿ÀÅ並 ¹«Àú°»À¸·Î)
--=========================================================================
function kick_auto_to_another_world()
if get_value("auto_used") == 1 then
-- ±ÍȯÁö¿ªÀ» ¿Üµý °÷À¸·Î ¼³Á¤ (Å×½ºÆ®¿ë ÇÁ¶ø ¹ÚÀº ±¸ ´øÀü, 11-7)
set_flag( "rx", 186987 + math.random(0,10))
set_flag( "ry", 160009 + math.random(0,10))
-- ¿Üµý °÷À¸·Î ³¯·Á ¹ö¸®±â
warp( 186987 + math.random(0,100) , 160009 + math.random(0,100) )
-- open_popup("game.helpdesk_url", 1, 0)
end
end
function RunTeleport_Auto_TO_City( x_pos , y_pos )
-- ±ÍȯÁö¿ªÀ» ´ë»óµµ½Ã·Î ¼³Á¤
set_flag( "rx", x_pos + math.random(0,100))
set_flag( "ry", y_pos + math.random(0,100))
save()
-- »óÀ§ Æã¼Ç¿¡¼* È£ÃâÇÑ x, yÁÂÇ¥¿¡ +100À» ·£´ý°ªÀ¸·Î ÅÚ·¹Æ÷Æ®ÇÔ
warp( x_pos + math.random(0,100) , y_pos + math.random(0,100) )
end
--=========================================================================
-- ¿ÀÅä ¹æÁö¿ë Äù½ºÆ® üũ ÇÔ¼ö
--=========================================================================
function anti_auto_quest_check()
-- ±¹°¡ ÄÚµå Àоî¿À±â
-- ±¹°¡ ÄÚµå Àоî¿À±â
-- 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()
local is_auto_char = false
local is_tranning_camp = false
local quest_clear_count = 0
local current_level = gv("level")
-- Å×¼·ÀÌ¸é ±×³É ¹«½Ã
if scf_is_official_server( get_server_category() ) then
else
return quest_clear_count, is_auto_char
end
-- ¹Ì±¹ÀÌ¸é ´Ù ¹«½Ã.
if state_code == 4 or state_code == 512 then
return quest_clear_count, is_auto_char
end
-- Áß±¹À̸é Äù½ºÆ® Á¦ÇѸ¸ OBT¿¡¼* Àӽ÷ΠÁ¦°Å.
-- OBT ÀÌÈÄ ÇùÀǸ¦ °ÅÃÄ Äù½ºÆ® Á¦ÇÑÀ» ºÎȰÇÏ´ø°¡, ¸»´ø°¡´Â ´Ù½Ã Á¤ÇÒ °Í.
if state_code == 64 then
-- ·¹º§ÀÌ 18 ÀÌ»óÀ̸é
if current_level >= 18 then
is_auto_char = true
end
return quest_clear_count, is_auto_char
end
--ÇöÀç °ÔÀÓ ³»¿¡ Á¸ÀçÇÏ´Â 40·¹º§ ¹Ì¸¸ÀÇ Äù½ºÆ®µé¿¡ ´ëÇÑ ¼öÇà ¿©ºÎ üũ
if ( get_quest_progress(1005) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1006) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1007) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1008) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1009) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1010) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1011) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1012) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1013) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1014) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1015) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1016) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1017) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1018) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1019) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1020) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1021) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1022) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1023) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1024) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1033) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1037) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1038) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1030) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1031) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1032) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1043) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1044) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1025) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1026) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1027) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1028) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1029) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1034) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1035) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1036) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1039) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1040) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1041) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1042) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1045) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1049) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1063) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1053) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1102) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1103) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1104) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1149) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1129) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1131) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1132) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1139) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1140) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1150) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1151) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1152) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1153) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1154) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1155) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1156) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1157) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1158) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1046) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1054) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1050) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1130) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1047) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1051) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1055) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1142) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1143) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1141) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1159) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1100) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1094) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1101) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1146) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1147) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1148) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1109) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1048) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1052) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1056) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1057) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1061) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1095) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1136) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1137) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1138) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1144) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1145) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1133) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1064) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1065) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1068) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1071) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1072) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1073) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1081) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1116) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1117) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1058) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1059) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1096) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1069) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1110) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1111) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1112) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1134) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
if ( get_quest_progress(1135) ) == 255 then
quest_clear_count = quest_clear_count + 1
end
-- ¼ö·ÃÀÚÀÇ ¼¶ ¾È¿¡ ÀÖÀ» ¶§
local current_x = gv("x")
local current_y = gv("y")
if current_x >= 161280 and current_x <= 177408 then
if current_y >= 48384 and current_y <= 64512 then
is_tranning_camp = true
end
end
-- ¼ö·ÃÀÚÀÇ ¼¶¿¡¼* ¿ÀÅä ÂѾƳ»±â
if is_tranning_camp then
-- ·¹º§¿¡ ´ëÇÑ Äù½ºÆ® üũ
-- ·¹º§ÀÌ 8~11 ÀÏ ¶§ Ŭ¸®¾îÇÑ Äù½ºÆ®°¡ 3°³ ¹Ì¸¸À̸é
if current_level >= 8 and current_level <= 11 then
if quest_clear_count < 3 then
is_auto_char = true
end
end
-- ·¹º§ÀÌ 12~17 ÀÏ ¶§ Ŭ¸®¾îÇÑ Äù½ºÆ®°¡ 6°³ ¹Ì¸¸À̸é
if current_level >= 12 and current_level <= 17 then
if quest_clear_count < 6 then
is_auto_char = true
end
end
-- ·¹º§ÀÌ 18 ÀÌ»óÀ̸é
if current_level >= 18 then
if quest_clear_count < 7 then
is_auto_char = true
end
end
-- ¼ö·ÃÀÚÀÇ ¼¶¿¡¼* ¿ÀÅä ÂѾƳ»±â if ¿Ï·á
end
return quest_clear_count, is_auto_char
end
Just remember to give your player the HV pass state buff,
#add_state(9004,2,96000,"CharName")
via Herlock for it to work.