Well ive started to creat this script, it sends random jokes when you tell it too. it all works fine exept for 1 bit, that bit is when you open a conversation and you click the script button its there but when i try and click on it it doesnt work, but it works if you type in the command. anyway please help...
Here is the script...
code:
//This script is created by Josh Brand
//Version - 1.0
//Released
//Last Updated
//Created for the Messenger Plus!
/*Changelog
0.1 - Script Created
0.2 - Made it functional
0.3 - Fixed most spelling/grammar mistakes
0.4 - Fixed bugs and some more grammar mistakes
0.5 - Fixed "unidentified" error =D (first real bug solved!)
0.6 - Added other insults!
0.7 - Added about window! =D
1.0 - Final Version! Finally!
*/
var sArray = new Array();
sArray[0] = "How did the blonde try to kill the bird? She threw it off a cliff.";
sArray[1] = "Did you hear about the blonde secretary who cut her fingers off so that she could write short hand?";
sArray[2] = "Your mom's so fat that Nasa octually orbits her.";
sArray[3] = "I'm not a steady drinker - my hand shakes too much.'";
sArray[4] = "Yo momma so ugly, she make blind muthafuckas cry.";
sArray[5] = "1 Tequila, 2 Tequila, 3 Tequila, Floor.";
sArray[6] = "How do you start an onion race? Onion marks! Get set! Go!";
sArray[7] = "Your mom.";
sArray[8] = "Your mom owes me money, you douche!";
sArray[9] = "Just cause you went to prom with Merv the Perv.";
sArray[10] = "Your mom is like a brick, flat on both sides and gets laid by Mexicans.";
sArray[11] = "Your Mom has a really nice hat...";
sArray[12] = "Don't worry, Your Mom is still a virgin. You were a backdoor baby.";
sArray[13] = "Your mom is poop.";
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
if(Message.substr(0,8).toLowerCase()=="/jokes"){
var i = Math.floor((Math.random()*(sArray.length-1)));
return "[c=blue]"+sArray[i]+"[/c]";
}
}
function OnGetScriptCommands(){
var commands = '<ScriptCommands>';
commands+='<Command>';
commands+='<Name>Jokes</Name>';
commands+='<Description>Sends a joke</Description>';
commands+='</Command>';
commands+='</ScriptCommands>';
return commands;
}
function OnEvent_MenuClicked(MenuItemId, Location, OriginWnd){
if(MenuItemId=="jk"){
OriginWnd.SendMessage(OnEvent_ChatWndSendMessage("", "/jokes"));
}
if(MenuItemId=="about"){
WndAbout = MsgPlus.CreateWnd("WndAbout.xml", "WndAbout");
}
}
function OnGetScriptMenu(nLocation){
var ScriptMenu = "<ScriptMenu>\n";
if(nLocation===2){
ScriptMenu += "<MenuEntry Id=\"JK\">Jokes</MenuEntry>";
ScriptMenu += "<Separator/>";
}
ScriptMenu += "<MenuEntry Id=\"about\">About</MenuEntry>";
ScriptMenu += "</ScriptMenu>";
return ScriptMenu;
}
oh and 1 more thing... the about box works fine.
Thanks ~joosh00~