js code:
var DelayLength = 5000;
var FolderWithEmotes = "";
var DParray = new Array(
"",
"1.gif",
"2.gif",
"3.gif"
);
String.prototype.toArray = function(){
return this.split(' ');
}
function OnEvent_Timer(timerID)
{
if(timerID == "DPdelay")
{
Messenger.MyDisplayPicture = DParray[0];
}
}
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
var index = 0;
var msgwords = Message.toArray();
for (var i=0;i<msgwords.length;i++){
if(msgwords[i] == "blah"){
index = 1;
}
}
if (index > 0) {
DParray[0] = Messenger.MyDisplayPicture;
Messenger.MyDisplayPicture = FolderWithEmotes + DParray[index];
MsgPlus.AddTimer("DPdelay", DelayLength)
}
index = 0;
}
basically it scans a message for a word, and if its there it sets your DP to a specific image for a few seconds and then switches back.
And it does that, its just that sometimes it'll switch back to the temporary image.