require( "common" ) ------------------------------------------------------------------------------------------------------ -- -- DATA -- ------------------------------------------------------------------------------------------------------ EVENT_INFO = -- [À̺¥Æ® Á¤º¸] { MapIndex = "E_Olympic", -- ¸Ê À妽º QuestNPC = "E_Ski_QuestNPC", -- Äù½ºÆ® NPC NPCDirect = 180, MaxRanking = 20, -- ·©Å· ÃÖ´ë°ª MaxPlayer = 200, -- Ç÷¹À̾î ÃÖ´ë°ª SeasonProcressSec = 3000, -- ½ÃÁð ÁøÇà ½Ã°£ SeasonRestSec = 600, -- ½ÃÁð ´ë±â ½Ã°£ GameResultLogType = 2026, -- °æ±â °á°ú °ÔÀÓ·Î±× Å¸ÀÔ SeasonbRewardLogType = 2027, -- ½ÃÁ𠺸»ó °ÔÀÓ·Î±× Å¸ÀÔ GameResultType = -- °ÔÀÓ °á°ú ŸÀÔ { GRT_SeasonEnd = 1, -- ½ÃÁð Á¾·á·Î ÀÎÇÑ : ½ÇÆÐ GRT_StanbyTimeout = 2, -- Ãâ¹ß ¼±À» Á¦ÇÑ ½Ã°£¾È¿¡ ³ÑÁö ¾ÊÀ½ : ½ÇÆÐ GRT_RunTimeout = 3, -- °ñ ¼±À» Á¦ÇÑ ½Ã°£¾È¿¡ ³ÑÁö ¾ÊÀ½ : ½ÇÆÐ GRT_Goal = 4, -- ¼º°ø }, GoalNPCLink = -- °ñÁöÁ¡ NPC ¸µÅ© Á¤º¸ { MapIndex = "E_Olympic", x = 5463, y = 22711, }, TimerDeleteSec = 20, -- ŸÀÌ¸Ó »èÁ¦ ½Ã°£ } GAME_INFO = -- [°ÔÀÓ Á¤º¸] { StanbyTimeout = 60, -- Âü°¡ ÈÄ Á¦ÇÑ ½Ã°£ RunTimeout = 300, -- Ãâ¹ß ÈÄ Á¦ÇÑ ½Ã°£ PointTimeout = 60, -- Æ÷ÀÎÆ® µæÁ¡ Á¦ÇÑ ½Ã°£ ( Á¦ÇÑ ½Ã°£ ÀÌÈÄ Æ÷ÀÎÆ® °¨¼Ò ) PointIncPerSec = 2, -- ÃÊ´ç Áõ°¡ Æ÷ÀÎÆ® PointDecPerSec = 2, -- Åä´ç °¨¼Ò Æ÷ÀÎÆ® StartLineArea = "Area_Start", -- Ãâ¹ß ¿µ¿ª À̸§ GoalLineArea = "Area_Finish", -- °ñ ¿ª¿ª À̸§ StartEffectMsg = EFFECT_MSG_TYPE["EMT_START_OLYMPIC"], -- ½ÃÀÛ ÀÌÆåÆ® ¸Þ½ÃÁö GoalEffectMsg = EFFECT_MSG_TYPE["EMT_GOAL_OLYMPIC"], -- °ñ ÀÌÆåÆ® ¸Þ½ÃÁö FailEffectMsg = EFFECT_MSG_TYPE["EMT_FAIL"], -- ½ÇÆÐ(½Ç°Ý) ÀÌÆåÆ® ¸Þ½ÃÁö -- ij¸¯ÅÍ Å¸ÀÌƲ ¹øÈ£·Î, ·ÎÄà ¾÷µ¥ÀÌÆ®½Ã º¯°æµÉ¼ö ÀÖ´Â ºÎºÐÀÔ´Ï´Ù. RankingReward = -- º¸»ó Á¤º¸ { { TitleType = 117, ElementNo = 0 }, -- ±Ý { TitleType = 118, ElementNo = 0 }, -- Àº { TitleType = 119, ElementNo = 0 }, -- µ¿ }, GoalReward = { AbsIndex = "StaE_Ski_Reward", AbsStr = 1, AbsKeepTime = 3600000, }, } MSG_INFO = -- [¸Þ½ÃÁö Á¤º¸] { GoalMsg_Point = "E_Olympic_A01", -- %s´ÔÀº ÃÑ %sPoint¸¦ ½ÀµæÇÏ¿´½À´Ï´Ù. GoalMsg_RankingFail1 = "E_Olympic_A02", -- ¾Æ½±Áö¸¸, 20À§ ±Ç¿¡ ÀÔ»óÇÏÁö ¸øÇÏ¿´½À´Ï´Ù. GoalMsg_RankingFail2 = "E_Olympic_A08", -- ÀÌÀü ±â·ÏÀÇ Á¡¼ö°¡ ´õ ³ô¾Æ ÇöÀç Á¡¼ö¸¦ ±â·ÏÇÏÁö ¾Ê½À´Ï´Ù. GoalMsg_RankingSuc = "E_Olympic_A03", -- ÃàÇϵ帳´Ï´Ù. %dÀ§¿¡ ÀÔ»óÇϼ̽À´Ï´Ù. Season_Start = "E_Olympic_A04", -- Ä«ÇÒ ½ºÅ°´ëȸ ½ÃÁðÀ» ½ÃÀÛÇÕ´Ï´Ù. Season_End = "E_Olympic_A05", -- Ä«ÇÒ ½ºÅ°´ëȸ ½ÃÁðÀ» Á¾·áÇÕ´Ï´Ù. Season_Ranking = "E_Olympic_A06", -- À̹ø ½ÃÁð 1À§´Â %s´Ô, 2À§´Â %s´Ô, 3À§´Â %s´Ô ÀÔ´Ï´Ù. Season_RankingEmpty = "E_Olympic_A07", -- À̹ø ½ÃÁðÀº 1,2,3À§ ¼ö»óÀÚ°¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù. Error_SeasonEnd = "E_Olympic_F01", -- ½ÃÁðÀÌ Á¾·áµÇ¾ú½À´Ï´Ù. ´ÙÀ½ ½ÃÁð¿¡ ´Ù½Ã µµÀüÇØ ÁÖ¼¼¿ä. Error_SeasonRest = "E_Olympic_F02", -- Áö±ÝÀº ¿ÀÇÁ½ÃÁðÀÔ´Ï´Ù. »õ·Î¿î ½ÃÁðÀÌ ½ÃÀÛµÇ¸é ´Ù½Ã µµÀüÇØ ÁÖ¼¼¿ä. Error_JoinPlayer = "E_Olympic_F03", -- ÀÌ¹Ì Âü°¡ÀÚ ¸í´Ü¿¡ µî·ÏµÇ¼Ì½À´Ï´Ù. ¾î¼­ Ãâ¹ßÇØ ÁÖ¼¼¿ä. Error_StanbyTimeout = "E_Olympic_F07", -- Error_RunTimeout = "E_Olympic_F07", -- Á¦Çѽ𣳻¿¡ Finish¶óÀο¡ µµÂøÇÏÁö ¸øÇϼ̳׿ä. ¾Æ½±°Ôµµ ½Ç°ÝÀÔ´Ï´Ù. NPCChat = -- NPC äÆà { { Index = "E_Olympic_MC01", Interval = 20, }, -- Ä«ÇÒ ½ºÅ°´ëȸ ÇöÀç 1À§´Â %s´Ô ÀÔ´Ï´Ù. { Index = "E_Olympic_MC02", Interval = 20, }, -- ¿©·¯ºÐ!! ¾î¼­ 1À§¿¡ µµÀüÇØ º¸¼¼¿ä~ { Index = "E_Olympic_MC03", Interval = 20, }, -- ÀÚ~ ¾î¼­¿À¼¼¿ä~ ½ºÅ°´ëȸ¿¡ ÃâÀüÇϽðí ǪÁüÇÑ »óÇ°À» ¹Þ¾Æ°¡¼¼¿ä~ }, Game_Guide = -- Âü°¡ ½Åû ÈÄ Ãâ·ÂµÇ´Â °¡À̵å { { Index = "E_Olympic_F04", Interval = 10 }, -- Á¦Çѽð£ 5ºÐ¾È¿¡ Finish¶óÀο¡ µµÂøÇÏ¼Å¾ß ÇÕ´Ï´Ù. Á¦Çѽ𣿡 ÁÖÀÇÇØÁÖ¼¼¿ä. { Index = "E_Olympic_F05", Interval = 10 }, -- Finish ¶óÀÎÀ» Åë°úÇÑ ½Ã°£°ú ±â¹®Åë°úȽ¼ö·Î Á¾ÇÕÁ¡¼ö¸¦ »êÃâÇÕ´Ï´Ù. { Index = "E_Olympic_F06", Interval = 10 }, -- Àå¾Ö¹°¿¡ Á¢ÃË ¹× °ÔÀӽð£ 2ºÐ ÃÊ°ú½Ã ÆгÎƼ°¡ ÀÖÀ¸´Ï ÁÖÀÇÇØÁÖ¼¼¿ä. ÃÖ´ëÇÑ »¡¸® ¸¹Àº ±â¹®À» Åë°úÇϽô°ÍÀÌ À¯¸®ÇÕ´Ï´Ù. }, } FLAG_DOOR_INFO = -- [±â¹®] { Type = -- ±ê¹ß Á¤º¸ { { Index = "E_SkiFlag_Red", Point = 50, AbsIndex = "StaE_Ski_SpeedUp", AbsStr = 1, AbsKeepTime = 3000, SkillIndex = "E_SkiFlag_Red_Skill01_N" }, { Index = "E_SkiFlag_Blue", Point = 25, AbsIndex = "StaE_Ski_SpeedUp", AbsStr = 1, AbsKeepTime = 3000, SkillIndex = "E_SkiFlag_Red_Skill01_N" }, { Index = "E_SkiFlag_Gold", Point = 10, AbsIndex = "StaE_Ski_SpeedUp", AbsStr = 1, AbsKeepTime = 3000, SkillIndex = "E_SkiFlag_Red_Skill01_N" }, }, Location = -- À§Ä¡ Á¤º¸ { { { x = 3782, y = 21659 }, { x = 4082, y = 21659 }, { x = 3582, y = 21659 }, }, -- 1 { { x = 3604, y = 20531 }, { x = 3604, y = 20531 }, { x = 3604, y = 20531 }, }, -- 2 { { x = 4320, y = 19844 }, { x = 3920, y = 19844 }, { x = 4520, y = 19844 }, }, -- 3 { { x = 3591, y = 19028 }, { x = 3291, y = 19028 }, { x = 3791, y = 19028 }, }, -- 4 { { x = 4558, y = 18491 }, { x = 4708, y = 18491 }, { x = 4358, y = 18491 }, }, -- 5 { { x = 3829, y = 17885 }, { x = 3629, y = 17885 }, { x = 4000, y = 17885 }, }, -- 6 { { x = 4464, y = 17585 }, { x = 4264, y = 17585 }, { x = 4664, y = 17585 }, }, -- 7 { { x = 3864, y = 16568 }, { x = 3164, y = 16468 }, { x = 3664, y = 16368 }, }, -- 8 { { x = 3530, y = 15708 }, { x = 4730, y = 15708 }, { x = 4030, y = 15708 }, }, -- 9 { { x = 4322, y = 15240 }, { x = 4122, y = 15240 }, { x = 4522, y = 15240 }, }, -- 10 { { x = 3773, y = 14346 }, { x = 3973, y = 14346 }, { x = 4173, y = 14346 }, }, -- 11 { { x = 4164, y = 13314 }, { x = 3964, y = 13314 }, }, -- 12 { { x = 3704, y = 12899 }, { x = 4004, y = 12899 }, { x = 3505, y = 12899 }, }, -- 13 { { x = 3845, y = 12255 }, { x = 3545, y = 12255 }, { x = 3245, y = 12255 }, }, -- 14 { { x = 3139, y = 11496 }, { x = 3339, y = 11496 }, { x = 3539, y = 11496 }, }, -- 15 { { x = 3827, y = 10808 }, { x = 3527, y = 10808 }, { x = 3227, y = 10808 }, }, -- 16 { { x = 3287, y = 9869 }, { x = 3287, y = 9869 }, { x = 3287, y = 9869 }, }, -- 17 { { x = 3733, y = 9043 }, { x = 3433, y = 9043 }, { x = 3133, y = 9043 }, }, -- 18 { { x = 3397, y = 8387 }, { x = 2997, y = 8387 }, { x = 3697, y = 8387 }, }, -- 19 { { x = 4142, y = 7860 }, { x = 3742, y = 7860 }, { x = 4342, y = 7860 }, }, -- 20 { { x = 4049, y = 6588 }, { x = 4349, y = 6588 }, { x = 3849, y = 6588 }, }, -- 21 { { x = 5082, y = 5945 }, { x = 4482, y = 6045 }, { x = 4882, y = 5945 }, }, -- 22 { { x = 5119, y = 5023 }, { x = 5319, y = 5023 }, { x = 5519, y = 5023 }, }, -- 23 { { x = 6049, y = 4353 }, { x = 6349, y = 4353 }, { x = 5749, y = 4353 }, }, -- 24 { { x = 6826, y = 3842 }, { x = 6651, y = 4035 }, { x = 6670, y = 3628 }, }, -- 25 { { x = 7405, y = 3445 }, { x = 7583, y = 3621 }, { x = 7405, y = 3145 }, }, -- 26 { { x = 8078, y = 3749 }, { x = 8078, y = 3549 }, { x = 7878, y = 3749 }, }, -- 27 { { x = 8619, y = 3684 }, { x = 8619, y = 3884 }, { x = 8619, y = 4184 }, }, -- 28 { { x = 9417, y = 3928 }, { x = 9417, y = 4584 }, { x = 9619, y = 4384 }, }, -- 29 { { x = 10363, y = 4339 }, { x = 10172, y = 4487 }, { x = 10183, y = 4741 }, }, -- 30 { { x = 10928, y = 4593 }, { x = 10786, y = 4829 }, { x = 10599, y = 4992 }, }, -- 31 { { x = 11449, y = 5122 }, { x = 11449, y = 5422 }, { x = 11148, y = 5665 }, }, -- 32 { { x = 2894, y = 7960 }, { x = 2594, y = 7960 }, { x = 2194, y = 7960 }, }, -- 33 { { x = 2309, y = 7386 }, { x = 2099, y = 7276 }, { x = 1907, y = 7197 }, }, -- 34 { { x = 2007, y = 6727 }, { x = 1847, y = 6689 }, { x = 1745, y = 6509 }, }, -- 35 { { x = 1974, y = 6029 }, { x = 2094, y = 6106 }, { x = 1864, y = 5929 }, }, -- 36 { { x = 2238, y = 5317 }, { x = 2038, y = 5317 }, { x = 2438, y = 5317 }, }, -- 37 { { x = 2198, y = 4508 }, { x = 2333, y = 4553 }, { x = 2061, y = 4326 }, }, -- 38 { { x = 2500, y = 3923 }, { x = 2814, y = 3820 }, { x = 2563, y = 3261 }, }, -- 39 { { x = 3276, y = 2777 }, { x = 3518, y = 2810 }, { x = 3294, y = 2382 }, }, -- 40 { { x = 4215, y = 2400 }, { x = 4086, y = 2155 }, { x = 4360, y = 2518 }, }, -- 41 { { x = 4805, y = 1883 }, { x = 4988, y = 2126 }, { x = 5151, y = 2284 }, }, -- 42 { { x = 5817, y = 1694 }, { x = 5776, y = 1998 }, { x = 5996, y = 1532 }, }, -- 43 { { x = 6713, y = 1892 }, { x = 6922, y = 1876 }, { x = 6662, y = 2151 }, }, -- 44 { { x = 7233, y = 2166 }, { x = 7046, y = 2546 }, { x = 7630, y = 2240 }, }, -- 45 } } -- Àå¾Ö¹° : ½º³ë¿ì¸Ç SNOWMAN_INFO = { -- 1 { Index = "E_Ski_Snowman", Point = 5, x = 4002, y = 16760, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4002, y = 16760, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4002, y = 16760, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4002, y = 16760, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4002, y = 16760, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4002, y = 16760, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4002, y = 16760, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4002, y = 16760, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4002, y = 16760, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4002, y = 16760, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4002, y = 16760, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4002, y = 16760, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4002, y = 16760, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4002, y = 16760, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4002, y = 16760, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4002, y = 16760, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, -- 2 { Index = "E_Ski_Snowman", Point = 5, x = 4252, y = 14499, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4252, y = 14499, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4252, y = 14499, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4252, y = 14499, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4252, y = 14499, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4252, y = 14499, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4252, y = 14499, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4252, y = 14499, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4252, y = 14499, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4252, y = 14499, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4252, y = 14499, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4252, y = 14499, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4252, y = 14499, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4252, y = 14499, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4252, y = 14499, Range = 700, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, -- 3 { Index = "E_Ski_Snowman", Point = 5, x = 3352, y = 8311, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3352, y = 8311, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3352, y = 8311, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3352, y = 8311, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3352, y = 8311, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3352, y = 8311, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3352, y = 8311, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3352, y = 8311, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3352, y = 8311, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3352, y = 8311, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3352, y = 8311, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3352, y = 8311, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3352, y = 8311, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3352, y = 8311, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3352, y = 8311, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3352, y = 8311, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, -- 4 { Index = "E_Ski_Snowman", Point = 5, x = 7526, y = 3079, Range = 1000, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 7526, y = 3079, Range = 1000, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 7526, y = 3079, Range = 1000, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 7526, y = 3079, Range = 1000, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 7526, y = 3079, Range = 1000, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 7526, y = 3079, Range = 1000, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 7526, y = 3079, Range = 1000, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 7526, y = 3079, Range = 1000, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 7526, y = 3079, Range = 1000, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 7526, y = 3079, Range = 1000, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 7526, y = 3079, Range = 1000, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 7526, y = 3079, Range = 1000, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 7526, y = 3079, Range = 1000, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, -- 5 { Index = "E_Ski_Snowman", Point = 5, x = 4843, y = 5813, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4843, y = 5813, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4843, y = 5813, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4843, y = 5813, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4843, y = 5813, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4843, y = 5813, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4843, y = 5813, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4843, y = 5813, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4843, y = 5813, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4843, y = 5813, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4843, y = 5813, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 4843, y = 5813, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, -- 6 { Index = "E_Ski_Snowman", Point = 5, x = 3247, y = 2931, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3247, y = 2931, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3247, y = 2931, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3247, y = 2931, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3247, y = 2931, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3247, y = 2931, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3247, y = 2931, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3247, y = 2931, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3247, y = 2931, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3247, y = 2931, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3247, y = 2931, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 3247, y = 2931, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, -- 7 { Index = "E_Ski_Snowman", Point = 5, x = 10177, y = 4518, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 10177, y = 4518, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 10177, y = 4518, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 10177, y = 4518, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 10177, y = 4518, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 10177, y = 4518, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 10177, y = 4518, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 10177, y = 4518, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 10177, y = 4518, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 10177, y = 4518, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 10177, y = 4518, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 10177, y = 4518, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 10177, y = 4518, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, { Index = "E_Ski_Snowman", Point = 5, x = 10177, y = 4518, Range = 500, LifeTime_Min = 1, LifeTime_Max = 3, RegenInterval = 1 }, } -- Àå¾Ö¹° : ÇÏ´× HONEYING_INFO = { Index = "E_Ski_IDHoneying", MoveCheckInterval = 0.1, GoalDistInterval = 10, AbsIndex = "StaE_Ski_Stun", AbsStr = 1, AbsKeepTime = 3000, SkillIndex = "E_SkiFlag_Red_Skill01_N", -- 1 { Speed = 2000, { x = 1931, y = 4980 }, { x = 2502, y = 5738 } }, { Speed = 2000, { x = 1875, y = 5412 }, { x = 2406, y = 4954 } }, -- 2 { Speed = 2000, { x = 4320, y = 2671 }, { x = 4150, y = 1846 } }, { Speed = 2000, { x = 4231, y = 1766 }, { x = 4516, y = 2530 } }, -- 3 { Speed = 2000, { x = 9257, y = 4697 }, { x = 9075, y = 3774 } }, { Speed = 3000, { x = 9472, y = 4026 }, { x = 8728, y = 4510 } }, -- 4 { Speed = 3000, { x = 4025, y = 6381 }, { x = 4494, y = 6500 }, { x = 4171, y = 6137 }, { x = 4416, y = 6870 } }, -- 5 { Speed = 2000, { x = 3425, y = 12405 }, { x = 3924, y = 12177 } }, { Speed = 2000, { x = 3457, y = 12818 }, { x = 4161, y = 12742 } }, -- 6 { Speed = 2000, { x = 3458, y = 12773 }, { x = 3925, y = 12187 } }, { Speed = 2000, { x = 3388, y = 12428 }, { x = 4140, y = 12778 } }, -- 7 { Speed = 2000, { x = 2897, y = 10075 }, { x = 4055, y = 10314 } }, { Speed = 2000, { x = 3036, y = 10831 }, { x = 3917, y = 10550 } }, -- 8 { Speed = 2000, { x = 8418, y = 3376 }, { x = 8229, y = 4197 } }, { Speed = 2000, { x = 8099, y = 3970 }, { x = 8945, y = 3701 } }, -- 9 { Speed = 3000, { x = 7994, y = 4004 }, { x = 4055, y = 3017 } }, { Speed = 3000, { x = 4055, y = 3017 }, { x = 7075, y = 3100 } }, { Speed = 3000, { x = 7075, y = 3100 }, { x = 8105, y = 2860 } }, -- 10 { Speed = 2000, { x = 5084, y = 6205 }, { x = 4756, y = 5125 } }, { Speed = 2000, { x = 5474, y = 5833 }, { x = 4370, y = 5635 } }, -- 11 { Speed = 2000, { x = 2296, y = 5815 }, { x = 1656, y = 5806 }, { x = 2057, y = 6336} }, -- 12 { Speed = 2000, { x = 9825, y = 4692 }, { x = 10608, y = 4428 }, { x = 10670, y = 5122}, { x = 11437, y = 5053} , { x = 11168, y = 5751} , { x = 11838, y = 6131}, { x = 11263, y = 6616} }, -- 13 { Speed = 2000, { x = 9972, y = 4111 }, { x = 10056, y = 4748 }, { x = 10989, y = 4525}, { x = 10877, y = 5412} , { x = 11633, y = 5477} , { x = 11288, y = 5983}, { x = 11888, y = 6412} }, -- 14 { Speed = 2000, { x = 10852, y = 4508 }, { x = 10475, y = 4928 } }, { Speed = 2000, { x = 11471, y = 5153 }, { x = 10978, y = 5519 } }, } -- À̵¿¼Óµµ °¨¼Ò Áö¿ª SLOW_AREA = { { AreaName = "SlowArea01", AbsIndex = "StaE_Ski_ICE", AbsStr = 1, AbsKeepTime = 1000 }, { AreaName = "SlowArea02", AbsIndex = "StaE_Ski_ICE", AbsStr = 1, AbsKeepTime = 1000 }, { AreaName = "SlowArea03", AbsIndex = "StaE_Ski_ICE", AbsStr = 1, AbsKeepTime = 1000 }, { AreaName = "SlowArea04", AbsIndex = "StaE_Ski_ICE", AbsStr = 1, AbsKeepTime = 1000 }, { AreaName = "SlowArea05", AbsIndex = "StaE_Ski_ICE", AbsStr = 1, AbsKeepTime = 1000 }, { AreaName = "SlowArea06", AbsIndex = "StaE_Ski_ICE", AbsStr = 1, AbsKeepTime = 1000 }, { AreaName = "SlowArea07", AbsIndex = "StaE_Ski_ICE", AbsStr = 1, AbsKeepTime = 1000 }, { AreaName = "SlowArea08", AbsIndex = "StaE_Ski_ICE", AbsStr = 1, AbsKeepTime = 1000 }, } ------------------------------------------------------------------------------------------------------ -- -- GLOBAL VARIABLES -- ------------------------------------------------------------------------------------------------------ gEventMain = nil -- [À̺¥Æ® ¹öÆÛ] --{ -- NPCHandle = 0, -- NPC ÇÚµé -- FunctionCallSec = 0, -- ÇÔ¼ö È£Ã⠽ð£ -- Function = 0, -- ÇÔ¼ö -- ChatIndex = 0, -- äÆà À妽º -- ChatSec - 0, -- äÆà ½Ã°£ --} gSeasonTime = -- [½ÃÁð ½Ã°£] { StartSec = 0, -- ½ÃÀÛ ½Ã°£ EndSec = 0, -- Á¾·á ½Ã°£ } gPlayerCnt = 0 -- Ç÷¹ÀÌ¾î ¼ö gPlayerList = nil -- [Ç÷¹ÀÌ¾î ¸®½ºÆ®] --{ -- { -- CharNo = 0, -- ij¸¯ÅÍ ¹øÈ£ -- Handle = 0, -- ÇÚµé -- Score = 0, -- Á¡¼ö -- RegistSec = 0, -- Âü°¡ ½Ã°£ -- StartSec = 0, -- Ãâ¹ß ½Ã°£ -- GuideIndex = 0, -- °¡À̵å À妽º -- GuideSec = 0, -- °¡À̵å Ãâ·Â ½Ã°£ -- CheckFlagDoorList = {} -- Á¡¼ö ȹµæÇÑ ±â¹® ¸®½ºÆ® -- } --} gRankingList = nil -- [ÇöÀç ½ÃÁð ·©Å· ¸®½ºÆ®] gPreviousankingList = nil -- [ÀÌÀü ½ÃÁð ·©Å· ¸®½ºÆ®] --{ -- { -- nRanking = 0, -- ¼øÀ§ -- nCharNo = 0, -- ij¸¯ÅÍ ¹øÈ£ -- sCharID = "", -- ij¸¯ÅÍ ID -- nScore = 0, -- Á¡¼ö -- } --} gFlagDoorIndexList = nil -- ±â¹® À妽º ¸®½ºÆ® gFlagDoorList = nil -- [±â¹® ¸®½ºÆ®] --{ -- { -- Handle = 0, -- ÇÚµé -- TypeInfo = FLAG_DOOR_INFO["Type"][1],-- ±â¹® ŸÀÔ Á¤º¸ -- } --} gSnowManIndexList = nil gSnowManList = nil --{ -- { -- Handle -- RegenSec -- LifeTime -- } --} gHoneyingIndexList = nil gHoneyingList = nil --{ --- { -- Handle -- MoveInfo -- MoveCheckSec -- MoveIndex -- MoveBack -- } --} ------------------------------------------------------------------------------------------------------ -- -- FUNCTION : CPP -> LUA -- ------------------------------------------------------------------------------------------------------ function DummyFunction() end function E_Ski_CongressNPC( Handle, MapIndex ) cExecCheck( "E_Ski_CongressNPC" ) -- ¼­¹ö ½Ã°£ °¡Á®¿À±â local nCurSec = cCurrentSecond() -- À̺¥Æ® ÃʱâÈ­ if gEventMain == nil then -- ¸Ê È®ÀÎ if MapIndex ~= EVENT_INFO["MapIndex"] then cAIScriptSet( Handle ) return ReturnAI["END"] end -- ·ÎÄà ½Ã°£ °¡Á®¿À±â local CurLocalTime = os.date( "*t", os.time() ) -- ·ÎÄà ½Ã°£¿¡ µû¸¥ ÇöÀç ½ÃÁð »óÅ ¼³Á¤ gSeasonTime["StartSec"] = nCurSec-- + ((60 - CurLocalTime["min"]) * 60) - CurLocalTime["sec"] -- óÀ½ ½ÃÀ۽à ´ÙÀ½ Á¤°¢¿¡ ½ÃÀÛÇϵµ·Ï ¼³Á¤ gSeasonTime["EndSec"] = nCurSec -- AISctipt Function ¼³Á¤ cAIScriptFunc( Handle, "NPCClick", "WinterOlympic_Click" ) cAIScriptFunc( Handle, "NPCMenu", "WinterOlympic_Menu" ) -- EventNPC ¼³Á¤ gEventMain = {} gEventMain["NPCHandle"] = Handle gEventMain["FunctionCallSec"] = nCurSec gEventMain["Function"] = Season_Start gEventMain["ChatIndex"] = 1 gEventMain["ChatSec"] = nCurSec -- ±âŸ Àü¿ª º¯¼ö ÃʱâÈ­ gPlayerCnt = 0 gPlayerList = {} gRankingList = {} gPreviousankingList = {} gFlagDoorIndexList = {} gFlagDoorList = {} gSnowManIndexList = {} gSnowManList = {} gHoneyingIndexList = {} gHoneyingList = {} -- ¹æÇâ ¼³Á¤ cSetObjectDirect( Handle, EVENT_INFO["NPCDirect"] ) -- QuestNPC local QuestHandle = cGetNPCHandle( EVENT_INFO["MapIndex"], EVENT_INFO["QuestNPC"] ) if QuestHandle ~= nil then cAIScriptSet( QuestHandle, Handle ) cAIScriptFunc( QuestHandle, "Entrance", "DummyFunction" ) cAIScriptFunc( QuestHandle, "NPCMenu", "E_Ski_QuestNPC_Menu" ) end end -- ÇÚµé È®ÀÎ if gEventMain["NPCHandle"] ~= Handle then cAIScriptSet( Handle ) return ReturnAI["END"] end -- Á×Àº ¿ÀºêÁ§Æ®¸é, ½ºÅ©¸³Æ® ÇØÁ¦ ÈÄ ÇÔ¼ö Á¾·á if cIsObjectDead( Handle ) == 1 then cAIScriptSet( Handle ) FlagDoor_Delete() SnowMan_Delete() Honeying_Delete() gEventMain = nil gPlayerCnt = 0 gPlayerList = nil gRankingList = nil gPreviousankingList = nil cSetFieldScript( EVENT_INFO["MapIndex"] ) return ReturnAI["END"] end -- NPC äÆà if nCurSec >= gEventMain["ChatSec"] then local NPCChatInfo = MSG_INFO["NPCChat"][gEventMain["ChatIndex"]] if gEventMain["ChatIndex"] == 1 then if gRankingList[1] ~= nil then cScriptMsg( EVENT_INFO["MapIndex"], gEventMain["NPCHandle"], NPCChatInfo["Index"], gRankingList[1]["sCharID"] ) end else cScriptMsg( EVENT_INFO["MapIndex"], gEventMain["NPCHandle"], NPCChatInfo["Index"] ) end gEventMain["ChatIndex"] = gEventMain["ChatIndex"] + 1 gEventMain["ChatSec"] = nCurSec + NPCChatInfo["Interval"] if gEventMain["ChatIndex"] > #MSG_INFO["NPCChat"] then gEventMain["ChatIndex"] = 1 end end -- À̺¥Æ® ÁøÇà ÇÔ¼ö ½ÇÇà if nCurSec >= gEventMain["FunctionCallSec"] then gEventMain["Function"]( nCurSec ) gEventMain["FunctionCallSec"] = nCurSec + 0.1 end return ReturnAI["END"] end function WinterOlympic_Click( NPCHandle, PlyHandle, PlyCharNo ) cExecCheck( "WinterOlympic_Click" ) -- ´ÙÀ̾ó·Î±× ¸Þ´º Ãâ·Â cNPCMenuOpen( NPCHandle, PlyHandle ) end function WinterOlympic_Menu( NPCHandle, PlyHandle, PlyCharNo, Value ) cExecCheck( "WinterOlympic_Menu" ) -- ¼­¹ö ½Ã°£ °¡Á®¿À±â local nCurSec = cCurrentSecond() -- ´ëȸ Âü°¡ if Value == 1 then -- ½ÃÁð ÁøÇà ÁßÀÎÁö È®ÀÎ if nCurSec >= gSeasonTime["EndSec"] then cScriptMsg( PlyHandle, nil, MSG_INFO["Error_SeasonRest"] ) return end -- Âü¿©ÇÏ°í ÀÖ´Â Ç÷¹ÀÌ¾î ¼ö È®ÀÎ if gPlayerCnt >= EVENT_INFO["MaxPlayer"] then return end -- Ç÷¹À̾î Á¤º¸°¡ Á¸ÀçÇÏ´ÂÁö È®ÀÎ if gPlayerList[PlyCharNo] ~= nil then cScriptMsg( PlyHandle, nil, MSG_INFO["Error_JoinPlayer"] ) return end -- Âü¿© Ç÷¹À̾î Á¤º¸ ÃʱâÈ­ gPlayerList[PlyCharNo] = {} gPlayerList[PlyCharNo]["CharNo"] = PlyCharNo gPlayerList[PlyCharNo]["Handle"] = PlyHandle gPlayerList[PlyCharNo]["Score"] = 0 gPlayerList[PlyCharNo]["RegistSec"] = nCurSec gPlayerList[PlyCharNo]["StartSec"] = 0 gPlayerList[PlyCharNo]["GuideIndex"] = 1 gPlayerList[PlyCharNo]["GuideSec"] = nCurSec gPlayerList[PlyCharNo]["CheckFlagDoorList"] = {} gPlayerCnt = gPlayerCnt + 1 -- ¼øÀ§ º¸±â elseif Value == 2 then -- ·©Å· ¸®½ºÆ® UI Ãâ·Â cSendRankingList( PlyHandle, gPreviousankingList, gRankingList ) end end function E_Ski_QuestNPC_Menu( NPCHandle, PlyHandle, PlyCharNo, Value ) cExecCheck( "E_Ski_QuestNPC_Menu" ) -- ¼­¹ö ½Ã°£ °¡Á®¿À±â local nCurSec = cCurrentSecond() if Value == 1 then -- ·©Å· ¸®½ºÆ® UI Ãâ·Â cSendRankingList( PlyHandle, gPreviousankingList, gRankingList ) elseif Value == 2 then cLinkTo( PlyHandle, EVENT_INFO["GoalNPCLink"]["MapIndex"], EVENT_INFO["GoalNPCLink"]["x"], EVENT_INFO["GoalNPCLink"]["y"] ) end end function FlagDoor_NPCAction( MapIndex, NPCHandle, PlyHandle, PlyCharNo ) cExecCheck( "FlagDoor_NPCAction" ) -- ±â¹® Á¤º¸ °¡Á®¿À±â local nFlagInx = gFlagDoorIndexList[NPCHandle] if nFlagInx == nil then cAssertLog( "FlagDoor_NPCAction:gFlagDoorIndexList[NPCHandle] nil" ); cNPCVanish( NPCHandle ) return end if gFlagDoorList[nFlagInx] == nil then cAssertLog( "FlagDoor_NPCAction:gFlagDoorList[FlagInx] nil" ); cNPCVanish( NPCHandle ) return end local TypeInfo = gFlagDoorList[nFlagInx]["TypeInfo"] if TypeInfo == nil then cAssertLog( "FlagDoor_NPCAction:gFlagDoorList[nFlagInx][TypeInfo] nil" ); cNPCVanish( NPCHandle ) return end -- Ç÷¹À̾î Á¤º¸ °¡Á®¿À±â local PlyInfo = gPlayerList[PlyCharNo] if PlyInfo == nil then -- cAssertLog( "FlagDoor_NPCAction:gPlayerList[PlyCharNo] nil" ); return end -- Á¡¼ö °è»ê if PlyInfo["CheckFlagDoorList"][nFlagInx] == nil then PlyInfo["Score"] = PlyInfo["Score"] + TypeInfo["Point"] PlyInfo["CheckFlagDoorList"][nFlagInx] = true cSetAbstate( PlyHandle, TypeInfo["AbsIndex"], TypeInfo["AbsStr"], TypeInfo["AbsKeepTime"], NPCHandle ) cSkillBlast( NPCHandle, PlyHandle, TypeInfo["SkillIndex"] ) end end function SnowMan_NPCAction( MapIndex, NPCHandle, PlyHandle, PlyCharNo ) cExecCheck( "SnowMan_NPCAction" ) local nCurSec = cCurrentSecond() -- ±â¹® Á¤º¸ °¡Á®¿À±â local nSnowManInx = gSnowManIndexList[NPCHandle] if nSnowManInx == nil then cAssertLog( "SnowMan_NPCAction:gSnowManIndexList[NPCHandle] nil" ); cNPCVanish( NPCHandle ) return end if gSnowManList[nSnowManInx] == nil then cAssertLog( "SnowMan_NPCAction:gSnowManList[nSnowManInx] nil" ); cNPCVanish( NPCHandle ) return end local SnowManInfo = SNOWMAN_INFO[nSnowManInx] if SnowManInfo == nil then cAssertLog( "SnowMan_NPCAction:SNOWMAN_INFO[nSnowManInx] nil" ); cNPCVanish( NPCHandle ) gSnowManList[nSnowManInx] = nil gSnowManIndexList[NPCHandle] = nil return end -- Ç÷¹À̾î Á¤º¸ °¡Á®¿À±â local PlyInfo = gPlayerList[PlyCharNo] if PlyInfo == nil then -- cAssertLog( "SnowMan_NPCAction:gPlayerList[PlyCharNo] nil" ); return end -- Á¡¼ö °è»ê PlyInfo["Score"] = PlyInfo["Score"] - SnowManInfo["Point"] -- SnowMan »èÁ¦ / ÃʱâÈ­ cNPCVanish( NPCHandle ) gSnowManList[nSnowManInx]["Handle"] = nil gSnowManList[nSnowManInx]["RegenSec"] = nCurSec + SnowManInfo["RegenInterval"] gSnowManList[nSnowManInx]["LifeTime"] = 0 gSnowManIndexList[NPCHandle] = nil end function Honeying_Routine( Handle, MapIndex ) cExecCheck( "Honeying_Routine" ) -- ¼­¹ö ½Ã°£ °¡Á®¿À±â local nCurSec = cCurrentSecond() local nHoneyingInx = gHoneyingIndexList[Handle] if nHoneyingInx == nil then cAssertLog( "Honeying_Routine:gHoneyingIndexList[Handle] nil" ); cNPCVanish( Handle ) return ReturnAI["END"] end if gHoneyingList[nHoneyingInx] == nil then cAssertLog( "Honeying_Routine:gHoneyingList[nHoneyingInx] nil" ); cNPCVanish( Handle ) return ReturnAI["END"] end if gHoneyingList[nHoneyingInx]["MoveCheckSec"] > nCurSec then return ReturnAI["END"] end -- ÇÏ´× À̵¿ Á¦¾î local MoveInfo = gHoneyingList[nHoneyingInx]["MoveInfo"] local MoveInx = gHoneyingList[nHoneyingInx]["MoveIndex"] local MaxMoveInx = #gHoneyingList[nHoneyingInx]["MoveInfo"] local CurX, CurY = cObjectLocate( Handle ) if cDistanceSquar( CurX, CurY, MoveInfo[MoveInx]["x"], MoveInfo[MoveInx]["y"] ) < (HONEYING_INFO["GoalDistInterval"] * HONEYING_INFO["GoalDistInterval"]) then if gHoneyingList[nHoneyingInx]["MoveBack"] == false then MoveInx = MoveInx + 1 if MoveInx > MaxMoveInx then MoveInx = MaxMoveInx - 1 gHoneyingList[nHoneyingInx]["MoveBack"] = true end else MoveInx = MoveInx- 1 if MoveInx < 1 then MoveInx = 2 gHoneyingList[nHoneyingInx]["MoveBack"] = false end end cRunTo( Handle, MoveInfo[MoveInx]["x"], MoveInfo[MoveInx]["y"], MoveInfo["Speed"] ) gHoneyingList[nHoneyingInx]["MoveIndex"] = MoveInx else if cGetMoveState( Handle ) == 0 then cRunTo( Handle, MoveInfo[MoveInx]["x"], MoveInfo[MoveInx]["y"], MoveInfo["Speed"] ) end end gHoneyingList[nHoneyingInx]["MoveCheckSec"] = gHoneyingList[nHoneyingInx]["MoveCheckSec"] + HONEYING_INFO["MoveCheckInterval"] return ReturnAI["END"] end function Honeying_NPCAction( MapIndex, NPCHandle, PlyHandle, PlyCharNo ) cExecCheck( "Honeying_NPCAction" ) -- ±â¹® Á¤º¸ °¡Á®¿À±â local nHoneyingInx = gHoneyingIndexList[NPCHandle] if nHoneyingInx == nil then cAssertLog( "Honeying_NPCAction:gHoneyingIndexList[NPCHandle] nil" ); cNPCVanish( NPCHandle ) return end if gHoneyingList[nHoneyingInx] == nil then cAssertLog( "Honeying_NPCAction:gHoneyingList[nHoneyingInx] nil" ); cNPCVanish( NPCHandle ) return end -- Ç÷¹À̾î Á¤º¸ °¡Á®¿À±â if gPlayerList[PlyCharNo] == nil then -- cAssertLog( "SnowMan_NPCAction:gPlayerList[PlyCharNo] nil" ); return end cSetAbstate( PlyHandle, HONEYING_INFO["AbsIndex"], HONEYING_INFO["AbsStr"], HONEYING_INFO["AbsKeepTime"], NPCHandle ) cSkillBlast( NPCHandle, NPCHandle, HONEYING_INFO["SkillIndex"] ) end ------------------------------------------------------------------------------------------------------ -- -- FUNCTION : LUA -> LUA -- ------------------------------------------------------------------------------------------------------ function Season_Start( nCurSec ) cExecCheck( "Season_Start" ) -- À̺¥Æ® ½ÃÀÛ ½Ã°£ È®ÀÎ if nCurSec < gSeasonTime["StartSec"] then return end -- ±â¹® »ý¼º for i = 1, #FLAG_DOOR_INFO["Location"] do -- ·£´ýÇÏ°Ô ¼ÒÇÑÇϱâ À§ÇØ, ±â¹® Á¾·ù, À§Ä¡ °ª °¡Á®¿À±â local nTypeInx = cRandomInt( 1, #FLAG_DOOR_INFO["Type"] ) local nLocationInx = cRandomInt( 1, #FLAG_DOOR_INFO["Location"][i] ) -- ¼ÒȯÇÒ ±â¹® Á¤º¸ local TypeInfo = FLAG_DOOR_INFO["Type"][nTypeInx] local LocationInfo = FLAG_DOOR_INFO["Location"][i][nLocationInx] -- ±â¹® ¼Òȯ local FlagHandle = cMobRegen_XY( EVENT_INFO["MapIndex"], TypeInfo["Index"], LocationInfo["x"], LocationInfo["y"], 0 ) if FlagHandle ~= nil then gFlagDoorList[i] = {} gFlagDoorList[i]["Handle"] = FlagHandle gFlagDoorList[i]["TypeInfo"] = TypeInfo gFlagDoorIndexList[FlagHandle] = i cAIScriptSet( FlagHandle, gEventMain["NPCHandle"] ) cAIScriptFunc( FlagHandle, "Entrance", "DummyFunction" ) cAIScriptFunc( FlagHandle, "NPCAction", "FlagDoor_NPCAction" ) else cAssertLog( "FlagDoor regen fail : "..i.." X : "..LocationInfo["x"].." Y : "..LocationInfo["y"] ) end end -- ÇÔÁ¤ ¼Òȯ for i = 1, #HONEYING_INFO do local HoneyingHandle = cMobRegen_XY( EVENT_INFO["MapIndex"], HONEYING_INFO["Index"], HONEYING_INFO[i][1]["x"], HONEYING_INFO[i][1]["y"], 0 ) if HoneyingHandle ~= nil then gHoneyingList[i] = {} gHoneyingList[i]["Handle"] = HoneyingHandle gHoneyingList[i]["MoveInfo"] = HONEYING_INFO[i] gHoneyingList[i]["MoveCheckSec"] = nCurSec gHoneyingList[i]["MoveIndex"] = 1 gHoneyingList[i]["MoveBack"] = false gHoneyingIndexList[HoneyingHandle] = i cAIScriptSet( HoneyingHandle, gEventMain["NPCHandle"] ) cAIScriptFunc( HoneyingHandle, "Entrance", "Honeying_Routine" ) cAIScriptFunc( HoneyingHandle, "NPCAction", "Honeying_NPCAction" ) else cAssertLog( "Honeying regen fail : "..i.." X : "..HONEYING_INFO[i][1]["x"].." Y : "..HONEYING_INFO[i][1]["y"] ) end end -- ·©Å· Á¤º¸ ¼³Á¤ gPreviousankingList = gRankingList gRankingList = nil gRankingList = {} -- ½ÃÁ𠳡³ª´Â ½Ã°£ gSeasonTime["EndSec"] = nCurSec + EVENT_INFO["SeasonProcressSec"] -- ¿ùµå °øÁö cScriptMsg_World( nil, MSG_INFO["Season_Start"] ) -- ´ÙÀ½ ´Ü°è ÇÔ¼ö ¼³Á¤ gEventMain["Function"] = Season_Doing end function Season_Doing( nCurSec ) cExecCheck( "Season_Doing" ) -- À̺¥Æ® ½ÃÀÛ ½Ã°£ È®ÀÎ if nCurSec >= gSeasonTime["EndSec"] then gEventMain["Function"] = Season_End return end -- ½ÃÁð ÁøÇà Áß È®ÀÎ »çÇ× Player_Manager() SnowMan_Manager() end function Season_End( nCurSec ) cExecCheck( "Season_End" ) -- °ÔÀÓ Âü¿©ÁßÀÌ´ø Ç÷¹ÀÌ¾î ½Ç°Ý Ã³¸®, ¸®½ºÆ® ÃʱâÈ­ for nPlyInx, PlyValue in pairs( gPlayerList ) do cEffectMsg( PlyValue["Handle"], EFFECT_MSG_TYPE["EMT_FAIL"] ) cScriptMsg( PlyValue["Handle"], MSG_INFO["Error_SeasonEnd"] ) cTimerEnd( PlyValue["Handle"], EVENT_INFO["TimerDeleteSec"] ) cSendGameLogDataType_4( EVENT_INFO["GameResultLogType"], PlyValue["CharNo"], "", 0, 0, EVENT_INFO["GameResultType"]["GRT_SeasonEnd"], 0, 0, PlyValue["Score"] ) end gPlayerCnt = 0 gPlayerList = nil gPlayerList = {} -- 1, 2, 3 µî À̸§ local TopPlayerNameList = {} -- ·©Å· º¸»ó ó¸® for i = 1, #gRankingList do local nRanking = gRankingList[i]["nRanking"] local RewardInfo = GAME_INFO["RankingReward"][nRanking] if RewardInfo ~= nil then cAddCharacterTitle( gRankingList[i]["nCharNo"], RewardInfo["TitleType"], RewardInfo["ElementNo"] ) cSendGameLogDataType_4( EVENT_INFO["SeasonbRewardLogType"], gRankingList[i]["nCharNo"], "", 0, 0, 0, nRanking, RewardInfo["TitleType"], RewardInfo["ElementNo"] ) if TopPlayerNameList[nRanking] == nil then TopPlayerNameList[nRanking] = gRankingList[i]["sCharID"] end end end -- ¿ÀºêÁ§Æ® »èÁ¦ FlagDoor_Delete() SnowMan_Delete() Honeying_Delete() -- ¿ùµå °øÁö cScriptMsg_World( nil, MSG_INFO["Season_End"] ) if #gRankingList > 0 then for i = 1, 3 do if TopPlayerNameList[i] == nil then TopPlayerNameList[i] = " " end end cScriptMsg_World( nil, MSG_INFO["Season_Ranking"], TopPlayerNameList[1], TopPlayerNameList[2], TopPlayerNameList[3] ) else cScriptMsg_World( nil, MSG_INFO["Season_RankingEmpty"] ) end -- ´ÙÀ½ ½ÃÁð ¼³Á¤ gSeasonTime["StartSec"] = nCurSec + EVENT_INFO["SeasonRestSec"] -- ´ÙÀ½ ´Ü°è ÇÔ¼ö ¼³Á¤ gEventMain["Function"] = Season_Start end function Player_Manager() cExecCheck( "Player_Manager" ) -- ¾È³» ´ÙÀ̾ó·Î±× Á¤º¸ local GameGuideInfo = MSG_INFO["Game_Guide"] local nGameGuideCnt = #MSG_INFO["Game_Guide"] -- Âü°¡ÁßÀÎ Ç÷¹À̾î ó¸® for nPlyInx, PlyValue in pairs( gPlayerList ) do -- Ç÷¹À̾ ãÀ» ¼ö ¾øÀ¸¸é, ¸®½ºÆ®¿¡¼­ »èÁ¦ if cPlayerExist( PlyValue["Handle"] ) == nil then gPlayerList[nPlyInx] = nil gPlayerCnt = gPlayerCnt - 1 else local nCurSec = cCurSec() local PlyMapIndex = cGetCurMapIndex( PlyValue["Handle"] ) local PlyCharNo = cGetCharNo( PlyValue["Handle"] ) -- ¸Ê¿¡ ¾ø°Å³ª ij¸¯ÅÍ ¹øÈ£°¡ ´Ù¸£¸é, ¸®½ºÆ®¿¡¼­ »èÁ¦ if PlyMapIndex ~= EVENT_INFO["MapIndex"] or PlyCharNo ~= PlyValue["CharNo"] then gPlayerList[nPlyInx] = nil gPlayerCnt = gPlayerCnt - 1 -- Ãâ¹ß Àü elseif PlyValue["StartSec"] == 0 then -- Á¦ÇÑ ½Ã°£ ³Ñ±ä Ç÷¹ÀÌ¾î ½Ç°Ý Ã³¸® if (nCurSec - PlyValue["RegistSec"]) >= GAME_INFO["StanbyTimeout"] then gPlayerList[nPlyInx] = nil gPlayerCnt = gPlayerCnt - 1 cScriptMsg( PlyValue["Handle"], nil, MSG_INFO["Error_StanbyTimeout"] ) cEffectMsg( PlyValue["Handle"], GAME_INFO["FailEffectMsg"] ) cSendGameLogDataType_4( EVENT_INFO["GameResultLogType"], PlyValue["CharNo"], "", 0, 0, EVENT_INFO["GameResultType"]["GRT_StanbyTimeout"], 0, (nCurSec - PlyValue["RegistSec"]), PlyValue["Score"] ) -- Á¦ÇÑ ½Ã°£ ³ÑÁö ¾ÊÀº Ç÷¹À̾î else -- StartLine ³Ñ¾ú´ÂÁö È®ÀÎ if cIsInArea( PlyValue["Handle"], EVENT_INFO["MapIndex"], GAME_INFO["StartLineArea"] ) == true then PlyValue["StartSec"] = nCurSec cEffectMsg( PlyValue["Handle"], GAME_INFO["StartEffectMsg"] ) cTimerStart( PlyValue["Handle"] ) else -- °ÔÀÓ °¡À̵å Ãâ·Â if nCurSec >= PlyValue["GuideSec"] and PlyValue["GuideIndex"] <= nGameGuideCnt then local GameGuideMsg = GameGuideInfo[PlyValue["GuideIndex"]] cScriptMsg( PlyValue["Handle"], nil, GameGuideMsg["Index"] ) PlyValue["GuideSec"] = nCurSec + GameGuideMsg["Interval"] PlyValue["GuideIndex"] = PlyValue["GuideIndex"] + 1 end end end -- Ãâ¹ß ÈÄ else -- Á¦ÇÑ ½Ã°£ ³Ñ±ä Ç÷¹ÀÌ¾î ½Ç°Ý Ã³¸® if (nCurSec - PlyValue["StartSec"]) >= GAME_INFO["RunTimeout"] then gPlayerList[nPlyInx] = nil gPlayerCnt = gPlayerCnt - 1 cEffectMsg( PlyValue["Handle"], GAME_INFO["FailEffectMsg"] ) cScriptMsg( PlyValue["Handle"], nil, MSG_INFO["Error_RunTimeout"] ) cTimerEnd( PlyValue["Handle"], EVENT_INFO["TimerDeleteSec"] ) cSendGameLogDataType_4( EVENT_INFO["GameResultLogType"], PlyValue["CharNo"], "", 0, 0, EVENT_INFO["GameResultType"]["GRT_RunTimeout"], 0, (nCurSec - PlyValue["StartSec"]), PlyValue["Score"] ) -- Á¦ÇÑ ½Ã°£ ³ÑÁö ¾ÊÀº Ç÷¹À̾î else -- À̵¿¼Óµµ °¨¼Ò Áö¿ª È®ÀÎ for i = 1, #SLOW_AREA do if cIsInArea( PlyValue["Handle"], EVENT_INFO["MapIndex"], SLOW_AREA[i]["AreaName"] ) == true then cSetAbstate( PlyValue["Handle"], SLOW_AREA[i]["AbsIndex"], SLOW_AREA[i]["AbsStr"], SLOW_AREA[i]["AbsKeepTime"], PlyValue["Handle"] ) end end -- GoalLine ³Ñ¾ú´ÂÁö È®ÀÎ if cIsInArea( PlyValue["Handle"], EVENT_INFO["MapIndex"], GAME_INFO["GoalLineArea"] ) == true then -- µµÂø±îÁö °É¸° ½Ã°£ local nRunSec = (nCurSec - PlyValue["StartSec"]) local TimeScore = 0 -- ½Ã°£À¸·Î Á¡¼ö °è»ê if nRunSec < GAME_INFO["PointTimeout"] then TimeScore = ((GAME_INFO["PointTimeout"] - nRunSec) * GAME_INFO["PointIncPerSec"]) TimeScore = ((TimeScore * TimeScore) * 4) elseif nRunSec > GAME_INFO["PointTimeout"] then TimeScore = ((GAME_INFO["PointTimeout"] - nRunSec) * GAME_INFO["PointIncPerSec"]) TimeScore = (TimeScore * 20) end PlyValue["Score"] = PlyValue["Score"] + TimeScore if PlyValue["Score"] < 0 then PlyValue["Score"] = 0 end -- Ãß°¡ÇÒ ·©Å· Á¤º¸ local InsertRanking = {} InsertRanking["nRanking"] = 0 InsertRanking["nCharNo"] = PlyValue["CharNo"] InsertRanking["sCharID"] = cGetPlayerName( PlyValue["Handle"] ) InsertRanking["nScore"] = PlyValue["Score"] cScriptMsg( PlyValue["Handle"], nil, MSG_INFO["GoalMsg_Point"], InsertRanking["sCharID"], tostring(InsertRanking["nScore"]) ) -- ·©Å· ¸®½ºÆ®¿¡ Ãß°¡ local nRankingInx, nRankingScore = GetPlayerRankingScore( PlyValue["CharNo"], -1 ) if nRankingScore < PlyValue["Score"] then -- ·©Å· ¸®½ºÆ®¿¡¼­ ±âÁ¸ Á¤º¸ »èÁ¦ if nRankingInx ~= 0 then PlayerRankingDelete( nRankingInx ) end -- ·©Å· ¸®½ºÆ®¿¡ Á¤º¸ Ãß°¡ if PlayerRankingInsert( InsertRanking ) == true then cScriptMsg( PlyValue["Handle"], nil, MSG_INFO["GoalMsg_RankingSuc"], tostring(InsertRanking["nRanking"]) ) else cScriptMsg( PlyValue["Handle"], nil, MSG_INFO["GoalMsg_RankingFail1"] ) end else cScriptMsg( PlyValue["Handle"], nil, MSG_INFO["GoalMsg_RankingFail2"] ) end -- °ñ º¸»ó ¼³Á¤ cSetAbstate( PlyValue["Handle"], GAME_INFO["GoalReward"]["AbsIndex"], GAME_INFO["GoalReward"]["AbsStr"], GAME_INFO["GoalReward"]["AbsKeepTime"], PlyValue["Handle"] ) -- Ç÷¹ÀÌ¾î ¸®½ºÆ®¿¡¼­ »èÁ¦ gPlayerList[nPlyInx] = nil gPlayerCnt = gPlayerCnt - 1 cEffectMsg( PlyValue["Handle"], GAME_INFO["GoalEffectMsg"] ) cTimerEnd( PlyValue["Handle"], EVENT_INFO["TimerDeleteSec"] ) cSendGameLogDataType_4( EVENT_INFO["GameResultLogType"], InsertRanking["nCharNo"], "", 0, 0, EVENT_INFO["GameResultType"]["GRT_Goal"], InsertRanking["nRanking"], nRunSec, InsertRanking["nScore"] ) end end end end end end function SnowMan_Manager() cExecCheck( "SnowMan_Manager" ) for i = 1, #SNOWMAN_INFO do -- ÇöÀç ½Ã°£(ÃÊ ´ÜÀ§) local nCurSec = cCurrentSecond() local SnowManInfo = SNOWMAN_INFO[i] -- ±âº» Á¤º¸ ¼³Á¤ if gSnowManList[i] == nil then gSnowManList[i] = {} gSnowManList[i]["Handle"] = nil gSnowManList[i]["RegenSec"] = nCurSec + SnowManInfo["RegenInterval"] gSnowManList[i]["LifeTime"] = 0 end -- SnowManÀÌ Á×¾úÀ» °æ¿ì if gSnowManList[i]["Handle"] ~= nil then if cIsObjectDead( gSnowManList[i]["Handle"] ) then local SnowManHandle = gSnowManList[i]["Handle"] gSnowManList[i]["Handle"] = nil gSnowManList[i]["RegenSec"] = nCurSec + SnowManInfo["RegenInterval"] gSnowManList[i]["LifeTime"] = 0 gSnowManIndexList[SnowManHandle] = nil end end -- »ýÁ¸ ½Ã°£ÀÌ Áö³ª¸é »èÁ¦ if gSnowManList[i]["LifeTime"] ~= 0 and gSnowManList[i]["LifeTime"] <= nCurSec then local SnowManHandle = gSnowManList[i]["Handle"] cNPCVanish( SnowManHandle ) gSnowManList[i]["Handle"] = nil gSnowManList[i]["RegenSec"] = nCurSec + SnowManInfo["RegenInterval"] gSnowManList[i]["LifeTime"] = 0 gSnowManIndexList[SnowManHandle] = nil end -- SnowMan »ý¼º if gSnowManList[i]["RegenSec"] ~= 0 and gSnowManList[i]["RegenSec"] <= nCurSec then local SnowManHandle = cMobRegen_Circle( EVENT_INFO["MapIndex"], SnowManInfo["Index"], SnowManInfo["x"], SnowManInfo["y"], SnowManInfo["Range"] ) if SnowManHandle ~= nil then gSnowManList[i]["Handle"] = SnowManHandle gSnowManList[i]["LifeTime"] = nCurSec + cRandomInt( SnowManInfo["LifeTime_Min"], SnowManInfo["LifeTime_Max"] ) gSnowManList[i]["RegenSec"] = 0 gSnowManIndexList[gSnowManList[i]["Handle"]] = i cAIScriptSet( gSnowManList[i]["Handle"], gEventMain["NPCHandle"] ) cAIScriptFunc( gSnowManList[i]["Handle"], "Entrance", "DummyFunction" ) cAIScriptFunc( gSnowManList[i]["Handle"], "NPCAction", "SnowMan_NPCAction" ) end end end end function FlagDoor_Delete() cExecCheck( "FlagDoor_Delete" ) for i = 1, #FLAG_DOOR_INFO["Location"] do if gFlagDoorList[i] ~= nil then if gFlagDoorList[i]["Handle"] ~= nil then cNPCVanish( gFlagDoorList[i]["Handle"] ) end end end gFlagDoorList = nil gFlagDoorIndexList = nil gFlagDoorList = {} gFlagDoorIndexList = {} end function SnowMan_Delete() cExecCheck( "SnowMan_Delete" ) for i = 1, #SNOWMAN_INFO do if gSnowManList[i] ~= nil then if gSnowManList[i]["Handle"] ~= nil then cNPCVanish( gSnowManList[i]["Handle"] ) end end end gSnowManList = nil gSnowManIndexList = nil gSnowManList = {} gSnowManIndexList = {} end function Honeying_Delete() cExecCheck( "Honeying_Delete" ) for i = 1, #HONEYING_INFO do if gHoneyingList[i] ~= nil then if gHoneyingList[i]["Handle"] ~= nil then cNPCVanish( gHoneyingList[i]["Handle"] ) end end end gHoneyingList = nil gHoneyingIndexList = nil gHoneyingList = {} gHoneyingIndexList = {} end ------------------------------------------------------------ -- GetPlayerRankingScore( CharNo, DefaultValue ) -- gRankingList ¿¡ ÀÖ´Â Ç÷¹À̾î À妽º(nIndex), Á¡¼ö(nScore) ¹Ýȯ -- Ç÷¹À̾ ¾øÀ» °æ¿ì¿¡´Â DefaultValue °ªÀ» ¹Ýȯ ------------------------------------------------------------ function GetPlayerRankingScore( CharNo, DefaultValue ) cExecCheck( "GetPlayerRankingScore" ) local nScore = DefaultValue local nIndex = 0 for i = 1, #gRankingList do if gRankingList[i]["nCharNo"] == CharNo then nScore = gRankingList[i]["nScore"] nIndex = i break end end return nIndex, nScore end ------------------------------------------------------------ -- PlayerRankingDelete( nIndex ) -- gRankingList ¿¡ ÀÖ´Â Ç÷¹ÀÌ¾î »èÁ¦ ------------------------------------------------------------ function PlayerRankingDelete( nIndex ) cExecCheck( "PlayerRankingDelete" ) if nIndex == nil then return end if nIndex > #gRankingList then return end local bSameRanking = false -- gRankingList ¿¡ °°Àº Ranking ÀÌ ÀÖ´ÂÁö È®ÀÎ for i = 1, #gRankingList do if i ~= nIndex then if gRankingList[i]["nRanking"] == gRankingList[nIndex]["nRanking"] then bSameRanking = true break end end end -- gRankingList ¿¡¼­ Á¦°Å if nIndex == #gRankingList then gRankingList[nIndex] = nil else for i = (nIndex + 1), #gRankingList do if bSameRanking == false then gRankingList[i]["nRanking"] = gRankingList[i]["nRanking"] - 1 end gRankingList[i - 1] = gRankingList[i] end gRankingList[#gRankingList] = nil end end ------------------------------------------------------------ -- PlayerRankingInsert( RankingInfo ) -- gRankingList ¿¡ Ç÷¹À̾î Ãß°¡ -- ¹Ýȯ°ª -- true : Ç÷¹À̾î Ãß°¡ ¼º°ø -- false : Ç÷¹À̾î Ãß°¡ ½ÇÆÐ ------------------------------------------------------------ function PlayerRankingInsert( RankingInfo ) cExecCheck( "PlayerRankingInsert" ) local nInsertInx = 1 local nRankingCnt = #gRankingList local nRankingPlus = 1 RankingInfo["nRanking"] = 0 -- gRankingList ¿¡¼­ Ãß°¡ÇÒ À§Ä¡ ã±â for i = 1, nRankingCnt do -- Ãß°¡ÇÒ Á¤º¸ÀÇ Á¡¼ö°¡ ³ôÀ¸¸é, ÀÌ À§Ä¡¿¡ RankingInfo Ãß°¡ if gRankingList[i]["nScore"] < RankingInfo["nScore"] then -- ·©Å· ¼³Á¤ÀÌ ¾ÈµÇÀÖÀ¸¸é, ·©Å· ¼³Á¤ if RankingInfo["nRanking"] == 0 then RankingInfo["nRanking"] = gRankingList[i]["nRanking"] end nInsertInx = i break end -- °°Àº Á¡¼ö¸¦ °¡Áö°í ÀÖ´Â Ç÷¹À̾ ÀÖÀ¸¸é, °°Àº ·©Å·À¸·Î ¼³Á¤ÇÑ´Ù. if gRankingList[i]["nScore"] == RankingInfo["nScore"] then RankingInfo["nRanking"] = gRankingList[i]["nRanking"] nRankingPlus = 0 end nInsertInx = i + 1 end -- nInsertInx È®ÀÎ if nInsertInx > EVENT_INFO["MaxRanking"] then -- Ç÷¹À̾î Á¤º¸ Ãß°¡ ½ÇÆÐ return false end -- Ãß°¡µÉ À§Ä¡¿¡¼­ ºÎÅÍ ·©Å· Çϳª¾¿ ¹Ì·ç±â if nRankingCnt == nInsertInx then if nInsertInx < EVENT_INFO["MaxRanking"] then gRankingList[nInsertInx]["nRanking"] = gRankingList[nInsertInx]["nRanking"] + nRankingPlus gRankingList[nInsertInx + 1] = gRankingList[nInsertInx] end elseif nRankingCnt > nInsertInx then for i = nRankingCnt, nInsertInx, -1 do if (i + 1) <= EVENT_INFO["MaxRanking"] then gRankingList[i]["nRanking"] = gRankingList[i]["nRanking"] + nRankingPlus gRankingList[i + 1] = gRankingList[i] end end end -- ¼øÀ§ ¼³Á¤ÀÌ ¾ÈµÇ ¾úÀ» °æ¿ì. óÀ½À¸·Î Ç÷¹À̾ Ãß°¡µÇ´Â °æ¿ì if RankingInfo["nRanking"] == 0 then if nRankingCnt == 0 then RankingInfo["nRanking"] = 1 else RankingInfo["nRanking"] = gRankingList[nInsertInx - 1]["nRanking"] + 1 end end -- Ç÷¹À̾î Á¤º¸ Ãß°¡ gRankingList[nInsertInx] = RankingInfo return true end