TheGuruSupremacy
Full Member
Posts: 367 Reputation: 19
34 / /
Joined: Nov 2006
|
RE: HELP!
quote: Originally posted by Ashylay
Okay so Im not the best at scripting and I was just wondering how this would happen.
So basically with the pre-installed scripts when you type say /name your name changes to whatever you type after the /name command so I just want to know how do you reffer to what you type after that.
I want it so say you type:
/command Hello!
A toast appears with the text 'Hello!'
Help?!?
code: function OnGetScriptCommands(){
var commands = "<ScriptCommands>";
commands += " <Command>"
commands += " <Name>command</Name>"
commands += " <Description>TheGuruSupremacy</Description>"
commands += " </Command>"
commands += "</ScriptCommands>"
return commands;
}
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
var split=Message.split(" ")
if(split[0]=="/command"){
MsgPlus.DisplayToast("Example",split[1])
return "";}}
This post was edited on 04-01-2007 at 12:57 PM by TheGuruSupremacy.
|
|