matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: Delayed Writing
Untested...
js code: var oChatWnds = {};
function OnEvent_ChatWndSendMessage(pChatWnd, sMessage) {
if (sMessage.charAt(0) !== '/' && typeof oChatWnds[pChatWnd.Handle] === 'undefined') {
oChatWnds[pChatWnd.Handle] = {
Message : sMessage,
i : 0
};
MsgPlus.AddTimer(pChatWnd.Handle, 5000);
return '';
}
}
function OnEvent_Timer(sTimerId) {
var oChat = oChatWnds[sTimerId];
var Message = oChatWnds[sTimerId].Message.charAt(oChatWnds[sTimerId].i);
if (Message === '/') Message = '//';
++oChatWnds[sTimerId].i;
oChat.SendMessage(Message);
MsgPlus.AddTimer(sTimerId, 5000);
}
This post was edited on 06-05-2010 at 12:54 PM by matty.
|
|