Is there a way to... |
Author: |
Message: |
elfangor93
Junior Member
Proud Nerd
Posts: 25
31 / / –
Joined: Feb 2006
|
O.P. Is there a way to...
Make a message replaced but only if it's its own word? For example... making k be replaced by ok automaticly, but then it replaces it in the middle of a word. Anyone know?
There are 10 types of peple in the world, those who know binary and those who don't.
|
|
08-15-2006 07:42 PM |
|
|
cloudhunter
Senior Member
Posts: 536 Reputation: 18
37 / – / –
Joined: Dec 2005
|
RE: Is there a way to...
Simple in script. Just use this code.
code: OnEvent_ChatWndSendMessage(ChatWnd,Message)
{
if (Message=="k")
{
return "ok";
}
}
Cloudy
This post was edited on 08-15-2006 at 08:19 PM by cloudhunter.
Sig by pirateok/marisaok/marisa
quote: Originally posted by Moulin Rouge
The greatest thing you'll ever learn, is just to love and be loved in return
6914 days, 5 hours, 39 minutes, 8 seconds ago
|
|
08-15-2006 07:46 PM |
|
|
Huhu_Manix
Full Member
Upload me again... *salivate*
Posts: 106
– / / –
Joined: Jul 2006
|
RE: Is there a way to...
code: function OnEvent_ChatWndSendMessage(ChatWnd, Message){
// Add space before and after the message ( if the message have only 1 word )
Message = " "+Message+" ";
// replace " k " by " ok "
while(Message.indexOf(" k "))Message=Message.replace(" k ", " ok ");
// Remove spaces
return Message.substring(1, Message.length-1);
}
This post was edited on 08-15-2006 at 07:47 PM by Huhu_Manix.
|
|
08-15-2006 07:46 PM |
|
|
elfangor93
Junior Member
Proud Nerd
Posts: 25
31 / / –
Joined: Feb 2006
|
O.P. RE: Is there a way to...
Ok thanks
Huhu_Manix, I tried that but it's not working.
Same with cloudhunter's script.
There are 10 types of peple in the world, those who know binary and those who don't.
|
|
08-15-2006 07:47 PM |
|
|
Silentdragon
Full Member
if(life==null && wrists) EmoAlert();
Posts: 148 Reputation: 2
34 / / –
Joined: Jun 2006
|
RE: Is there a way to...
code: OnEvent_ChatWndSendMessage(ChatWnd,Message)
{
Message = Message.replace(/\bk\b/i,"Ok");
return Message;
}
This post was edited on 08-15-2006 at 09:00 PM by Silentdragon.
|
|
08-15-2006 08:10 PM |
|
|
cloudhunter
Senior Member
Posts: 536 Reputation: 18
37 / – / –
Joined: Dec 2005
|
RE: Is there a way to...
Silentdragon's code should work. However i've just tried my first code, and it worked, however my second code didn't Sorry for that.
Sig by pirateok/marisaok/marisa
quote: Originally posted by Moulin Rouge
The greatest thing you'll ever learn, is just to love and be loved in return
6914 days, 5 hours, 39 minutes, 8 seconds ago
|
|
08-15-2006 08:18 PM |
|
|
elfangor93
Junior Member
Proud Nerd
Posts: 25
31 / / –
Joined: Feb 2006
|
O.P. RE: Is there a way to...
Oh ok, I tried your 2nd one. I'll try silentdragon's.
It doesn't work :\
This post was edited on 08-15-2006 at 08:24 PM by elfangor93.
There are 10 types of peple in the world, those who know binary and those who don't.
|
|
08-15-2006 08:21 PM |
|
|
cloudhunter
Senior Member
Posts: 536 Reputation: 18
37 / – / –
Joined: Dec 2005
|
RE: Is there a way to...
I just tried it myself, it doesn't work...
Bleah, who would have thought that a simple request would get so hard
I know for a fact my code that is there now though works...
Sig by pirateok/marisaok/marisa
quote: Originally posted by Moulin Rouge
The greatest thing you'll ever learn, is just to love and be loved in return
6914 days, 5 hours, 39 minutes, 8 seconds ago
|
|
08-15-2006 08:32 PM |
|
|
elfangor93
Junior Member
Proud Nerd
Posts: 25
31 / / –
Joined: Feb 2006
|
O.P. RE: Is there a way to...
It says it may be defective or i dont have the proper privilages to run scripts... is that the whole code or do I need to add something.
There are 10 types of peple in the world, those who know binary and those who don't.
|
|
08-15-2006 08:57 PM |
|
|
cloudhunter
Senior Member
Posts: 536 Reputation: 18
37 / – / –
Joined: Dec 2005
|
RE: Is there a way to...
No, that should be fine... Create a new script, and just copy and paste it in...
Cloudy
Sig by pirateok/marisaok/marisa
quote: Originally posted by Moulin Rouge
The greatest thing you'll ever learn, is just to love and be loved in return
6914 days, 5 hours, 39 minutes, 8 seconds ago
|
|
08-15-2006 08:59 PM |
|
|
Pages: (4):
« First
[ 1 ]
2
3
4
»
Last »
|
|