<참고> 전 자바스크립트를 정식으로 배운적이 없습니다.
그래서 코드가 매우 난잡합니다.
if (msg.indexOf ("#공지") == 0) {
try { // 오류가 발생하지 않았을 때
var link = Utils.getWebText("http://mabinogi.nexon.com/page/news/notice_list.asp")
var alert = link.split ("<div class=\"board_common01 notice\">")[1]
var templi = alert.split (">")[6].split('?')[1].split('"')[0]
var content = Utils.getWebText("http://mabinogi.nexon.com/page/news/notice_view.asp?"+templi)
var tt = content.split ("<div class=\"view_cont\">")[1].split("</div>")[0].replace("<br>","\n").replace(/(<([^>]+)>)/g,"").replace(/ /g," ").replace(/\=/g,'').replace(/\u25A3/g, "\n*").replace(/^\s+|\s+$/g,'').replace(/</g,"<").replace(/>/g,">").replace(/^ +/gm,"").trim()
replier.reply (tt); // 값을 출력함
} catch (e) {
replier.reply ("점검중이거나 공지를 찾을 수 없습니다.");
}
}
---------
이제 최적화를 해야겠군요..