quote:
Originally posted by Malzzel
Okay, thanks matty!
Also you're code is horrible and I have no idea how it actually ran...
Javascript code:
function OnEvent_Initialize(MessengerStart)
// This was made by Mal-Zzel - Version 1.0
{function OnEvent_ChatWndSendMessage(ChatWnd,Message)
{var rn_txt = new Array();
{
rn_txt[1]="Death be thy compass.";
rn_txt[2]="Carry the Emperorīs will as your torch, with it destroy the shadows.";
rn_txt[3]="Blessed is the mind too small for doubt.";
rn_txt[4]="To admit defeat is to blaspheme against the Emperor. ";
rn_txt[5]="Prayer cleanses the soul, but pain cleanses the body.";
rn_txt[6]="There is only the Emperor, and he is our shield and protector.";
rn_txt[7]="A small mind is easily filled with faith.";
rn_txt[8]="Praise be, Emperor, Lord.";
rn_txt[9]="For those who seek perfection there can be no rest on this side of the grave.";
rn_txt[10]="The difference between heresy and treachery is ignorance."
{var i = Math.round(15*Math.random());
{var RANDOMISM = Message.replace(/\/itftd/,rn_txt[i]);
{return RANDOMISM;
}
This is how it could look...
Javascript code:
var rn_txt = [
"Death be thy compass."
, "Carry the Emperorīs will as your torch, with it destroy the shadows."
, "Blessed is the mind too small for doubt."
, "To admit defeat is to blaspheme against the Emperor."
, "Prayer cleanses the soul, but pain cleanses the body."
, "There is only the Emperor, and he is our shield and protector."
, "A small mind is easily filled with faith."
, "Praise be, Emperor, Lord."
, "For those who seek perfection there can be no rest on this side of the grave."
, "The difference between heresy and treachery is ignorance."
];
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
if (Message.match(/\/itftd/)
return rn_txt[Math.floor(Math.random()*rn_txt.length)];
}