Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-24-2008, 09:12 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
swear filter

talking to someone about it earlier, was fun to try out he he

PHP Code:
function onCreated() {
  
temp.chat "Hello you ****ing queer ****! I hope that you****ing die!!";
  
temp.illegal = {"****ing""queer""****"};

  
temp.token chat.tokenize();
  
temp.len null;
  
temp.res "";
  
  for (
temp.itoken) {
    if (
i in illegal) {
      for (
len 0len i.length(); len++) 
        
res @= randomstring("$""£""#");
    } else 
    for (
temp.cillegal) {
      if (
i.starts(c)) {
        for (
len i.charat(c); len c.length(); len++) 
          
res @= randomstring("$""£""#");
        
res @= i.substring(c.length());
      } else if(
i.ends(c)) {
        
res @= i.substring(0i.length() - c.length());
        for (
len i.charat(c); len c.length(); len++) 
          
res @= randomstring("$""£""#");
      }
    }
    if (
len == null)
      
res @= i;
    
    
temp.output @= res.trim() @ " ";
    
res "";
    
len null;
  }
  
  echo(
output);

Reply With Quote
  #2  
Old 04-24-2008, 09:17 PM
Programmer Programmer is offline
Coder
Programmer's Avatar
Join Date: Jan 2008
Location: -78.464422, 106.837328
Posts: 449
Programmer has a spectacular aura aboutProgrammer has a spectacular aura about
Send a message via AIM to Programmer Send a message via MSN to Programmer Send a message via Yahoo to Programmer
Quote:
Originally Posted by [email protected] View Post
talking to someone about it earlier, was fun to try out he he

PHP Code:
function onCreated() {
  
temp.chat "Hello you ****ing queer ****!";
  
temp.illegal = {"****ing""queer""****"};

  
temp.token chat.tokenize();
  
temp.len null;
  
temp.res "";
  
  for (
temp.itoken) {
    if (
i in illegal) {
      for (
len 0len i.length(); len++) 
        
res @= randomstring("$""£""#");
    } else 
    for (
temp.cillegal) {
      if (
i.starts(c)) {
        for (
len i.charat(c); len c.length(); len++) 
          
res @= randomstring("$""£""#");
        
res @= i.substring(c.length());
      }
    }
    if (
len == null)
      
res @= i;
    
    
temp.output @= res.trim() @ " ";
    
res "";
    
len null;
  }
  
  echo(
output);

Looks good, but I highly suggest you not use the Euro sign ... its not supported on some machines.
__________________
- Iᴀɴ Zɪᴍᴍᴇʀᴍᴀɴ
Reply With Quote
  #3  
Old 04-24-2008, 09:40 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Programmer View Post
Looks good, but I highly suggest you not use the Euro sign ... its not supported on some machines.
That's not the Euro sign ._.'
Reply With Quote
  #4  
Old 04-24-2008, 09:47 PM
Programmer Programmer is offline
Coder
Programmer's Avatar
Join Date: Jan 2008
Location: -78.464422, 106.837328
Posts: 449
Programmer has a spectacular aura aboutProgrammer has a spectacular aura about
Send a message via AIM to Programmer Send a message via MSN to Programmer Send a message via Yahoo to Programmer
Quote:
Originally Posted by Crow View Post
That's not the Euro sign ._.'
Pound sign, sorry.
__________________
- Iᴀɴ Zɪᴍᴍᴇʀᴍᴀɴ
Reply With Quote
  #5  
Old 04-24-2008, 09:42 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
whats the euro sign...? lol.......
Reply With Quote
  #6  
Old 04-24-2008, 09:47 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by [email protected] View Post
whats the euro sign...? lol.......
This is Euro -> €
But I guess Programmer was referring to £.

Edit:
Reply With Quote
  #7  
Old 04-24-2008, 10:04 PM
Desear Desear is offline
Live to Laugh
Desear's Avatar
Join Date: Apr 2008
Location: MD
Posts: 345
Desear is on a distinguished road
Send a message via AIM to Desear Send a message via MSN to Desear
Would be nice if their could actually be an option to disable the swear filter for more mature players, and such. That way it will satisfy the trash talkers, and the people who don't want to see it.

By any chance is that scripting making curse words appear like this, "@$$#" or something?
__________________
"Ha Bros before Ho's."
Reply With Quote
  #8  
Old 04-24-2008, 10:12 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
yes
Reply With Quote
  #9  
Old 04-24-2008, 10:20 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
It's okay, but why not just use:
http://graal.net/index.php/Creation/Dev/Word_Filter
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #10  
Old 04-25-2008, 02:00 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Swear filters are useless, there are any number of ways to get past them.
__________________

Last edited by Darlene159; 04-26-2008 at 05:35 AM..
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:46 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.