quote:
Originally posted by Agret
markee I finally got around to testing your code and although it replaces the Message thing alright it doesn't actually replace the message that is sent to your recipient, I can only access the new value from a script
Sorry, you have to return the Msg variable, I just put in ... for if you wanted to do more in the script. If you just want to do that one thing then here is the script.
code:
function OnEvent_ChatWndSendMessage(Wnd,Msg){
Msg = Msg.replace(/\(\!MEH\)/g,variable);//replace (!MEH) with string in variable
return Msg;
}
Btw you can still add more than you want, I just wanted to give you an example or snippet of the code first rather than writing something fully.