What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Replace letters

Replace letters
Author: Message:
KnRd_WC
Junior Member
**

Avatar
Florian PAQUET

Posts: 74
Reputation: 1
35 / Male / Flag
Joined: Aug 2006
RE: Replace letters
Hi again Snuzzer, I found the problem !

code:
var Status = "fra";
var Besked = "";

// LAVER BESKED TIL 1337 HVIS STATUS ER "TIL" // TJEKKER OM DER ER LAVET EN KOMMANDO : START
function OnEvent_ChatWndSendMessage(ChatWnd,Message)
{

// The problem was here...
// Cause when you will type "/leettil", Status will be changed to "til".. and in your original script, "if (Status == "til")..." was placed BEFORE checking the commands !
// So, the first time you typed "/leettil", it worked... and second time, it do not because, in your string remplacement, the return Message = "/1337711", :D

if (Message == "/leettil") {
Status = "til";
MsgPlus.DisplayToast("Leet beskeder", "Leet beskeder er slået til.");
return "";
}

if (Message == "/leetfra") {
Status = "fra";
MsgPlus.DisplayToast("Leet beskeder", "Leet beskeder er slået fra.");
return "";
}

if (Status == "til")
{
Message = Message.replace(/A/g,'4');
Message = Message.replace(/B/g,'8');
Message = Message.replace(/E/g,'3');
Message = Message.replace(/L/g,'1');
Message = Message.replace(/O/g,'0');
Message = Message.replace(/S/g,'5');
Message = Message.replace(/T/g,'7');
Message = Message.replace(/a/g,'4');
Message = Message.replace(/b/g,'8');
Message = Message.replace(/e/g,'3');
Message = Message.replace(/l/g,'1');
Message = Message.replace(/o/g,'0');
Message = Message.replace(/s/g,'5');
Message = Message.replace(/t/g,'7');
return Message;
}


}
// LAVER BESKED TIL 1337 HVIS STATUS ER "TIL" // TJEKKER OM DER ER LAVET EN KOMMANDO : SLUT

// LAVER KOMMANDO MENU : START
function OnGetScriptCommands(){
var kommandoer = '<ScriptCommands>';
kommandoer += '<Command>';
kommandoer += '<Name>leettil</Name>';
kommandoer += '<Description>Slår Leet beskeder til.</Description>';
kommandoer += '</Command>';
kommandoer += '<Command>';
kommandoer += '<Name>leetfra</Name>';
kommandoer += '<Description>Slår Leet beskeder fra.</Description>';
kommandoer += '</Command>';
kommandoer += '</ScriptCommands>';
return kommandoer;
}
// LAVER KOMMANDO MENU : SLUT


Oh, if you are interested, take a look here, you will find all leet codes

This post was edited on 08-19-2006 at 10:42 AM by KnRd_WC.
08-19-2006 10:34 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Replace letters - by SnuZZer on 08-18-2006 at 07:31 PM
RE: Replace letters - by KnRd_WC on 08-18-2006 at 08:22 PM
RE: Replace letters - by Ezra on 08-18-2006 at 08:54 PM
RE: Replace letters - by KnRd_WC on 08-18-2006 at 09:35 PM
RE: Replace letters - by SnuZZer on 08-19-2006 at 09:22 AM
RE: Replace letters - by KnRd_WC on 08-19-2006 at 09:53 AM
RE: Replace letters - by SnuZZer on 08-19-2006 at 10:24 AM
RE: Replace letters - by KnRd_WC on 08-19-2006 at 10:34 AM
RE: Replace letters - by SnuZZer on 08-19-2006 at 10:48 AM
RE: Replace letters - by CookieRevised on 08-19-2006 at 01:12 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On