Need help making a new script - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: Need help making a new script (/showthread.php?tid=73626) Need help making a new script by Emperor on 04-15-2007 at 04:51 PM
Hi, I am making a script for an online game I play, Torn City. It is a script that will search player ID's. One person helped me a little bit, but I still can't get it to work. This is my first script, so I'm not surprised. Please add me to msn to talk about it more privately and I will show you the code RE: Need help making a new script by win_crook on 04-16-2007 at 02:55 PM
You need to add two functions to your script. code: code: The parts which you will need to edit I have highlighted with "!!". Good Luck , David RE: Need help making a new script by Emperor on 04-17-2007 at 12:47 AM
I had the first one, but I didn't know about the second one, thanks. ^_^ RE: Need help making a new script by Lou on 04-17-2007 at 12:51 AM
You'll want to create a variable like so: code:(obviously you'll want to set that variable only when you select the id number. Now when you do that, you'll want to take the part where you open the url, and add idnumber to it, like this: code: RE: Need help making a new script by Emperor on 04-17-2007 at 09:08 PM Now its always searching for the ID number 2 RE: RE: Need help making a new script by matty on 04-18-2007 at 01:30 AM
quote: You will need to code it so it find the ID number based on the profile name or however its done. RE: Need help making a new script by Emperor on 04-18-2007 at 02:34 AM
quote: Well I want it so that I could type: /PlayerID *players ID here* So basically I just want that number to be attached to the end of the link the game is using. (Keep in mind this is the first thing I've written in JS ) Btw heres my code: function OnEvent_Initialize(MessengerStart) { } function OnGetScriptCommands() { var s = "<ScriptCommands>"; s += " <Command>"; s += " <Name>PlayerID</Name>"; s += " <Description>Search Player ID's!</Description>"; s += " </Command>"; s += "</ScriptCommands>"; return s; } Debug.Trace("Hello World!"); function OnEvent_ChatWndSendMessage(ChatWnd, strMessage) { if (strMessage.charAt(0) != '/') return strMessage; var arrMessage = strMessage.split(' '); var strCommand = arrMessage[0]; switch(strCommand){ case "/PlayerID": var idnumber = "2"; MsgPlus.DisplayToast("Game Search", "You have searched for idnumber", "Please wait."); //Interop.Call("shell32", "ShellExecuteW", ChatWnd.Handle, "open", "http://www.game.com/profiles.php?XID=" + idnumber; new ActiveXObject("WScript.Shell").Run("http://www.game.com/profiles.php?XID=" + idnumber); return ""; default: return strMessage; }} Debug.Trace("Hello World!"); function OnEvent_Uninitialize(MessengerExit) { } |