Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AION 하우징 스크립트 - 어그린트
------------------------- 여기부터
-- 작성일: 2011-12-01 02:27
-- 참고한 게시물: http://aion.plaync.co.kr/board/server/view?articleID=4064053
-- 계산은 틀릴 수도 있습니다. 점검 시간에 따라 약간 달라질 수 있습니다.
DT20111125 = 1322226000;
DTBASE = DT20111125;
FREQ = 223200;
FREQ_SEASON = FREQ * 3;
function OnInit()
-- 초기화 스크립트를 입력하세요.
end
-- 사용자가 채팅을 하면 호출됩니다.
function OnUserSay(str)
if (string.find(str, "어그린트")) then
CheckTime(os.time());
end
end
function GetSeasonName(Now)
Season = (math.floor(((Now - DTBASE) / FREQ_SEASON) ) % 4);
SeasonName = "(Error)";
if Season == 0 then
SeasonName = "여름";
elseif Season == 1 then
SeasonName = "가을";
elseif Season == 2 then
SeasonName = "겨울";
elseif Season == 3 then
SeasonName = "";
end
return SeasonName;
end
function CheckTime(Now)
H.PlaySound(0, "r[1]");
X = FREQ - ((Now - DTBASE) % FREQ);
Day = math.floor(X / 86400);
Hour = math.floor( (X - Day * 86400) / 3600 );
Minute = math.floor( (X % 3600) / 60);
Second = math.floor(X % 60);
SeasonName = GetSeasonName(Now + X);
H.Say(1, Day .. "" .. Hour .. "시간 " .. Minute .. "" .. Second .. "초 후 " .. SeasonName .. "의 어그린트가 나옵니다.");
end
------------------------ 여기까지~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.