Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-13-2003, 04:05 AM
Ghost Pirate Ghost Pirate is offline
Prepare to be monopolized
Ghost Pirate's Avatar
Join Date: Jan 2002
Location: 7th Underworld
Posts: 2,456
Ghost Pirate is on a distinguished road
Something that should be added.

A automatic internet type translator

so all those single letter "words" are made into the real words, I get so annoyed when I see this bullcrap. I pretty much want to kill the person(s) who came up with this crap.
__________________
Are you a member of the Idiotism Party?

Help fight the war on idiotism! Make your own War with IDIOTISM signature and spread the word.
Reply With Quote
  #2  
Old 03-13-2003, 04:31 AM
Kaiser2 Kaiser2 is offline
"Businessman" of Zormite
Kaiser2's Avatar
Join Date: Jan 2003
Location: New York
Posts: 1,785
Kaiser2 is on a distinguished road
Graal Bomy Moon made something like that, where curse words are replaced, and for example, plz becomes please, etc.
Reply With Quote
  #3  
Old 03-13-2003, 05:09 AM
--Chris-- --Chris-- is offline
Registered
--Chris--'s Avatar
Join Date: Jun 2002
Location: Trinidad
Posts: 2,767
--Chris-- will become famous soon enough
Send a message via MSN to --Chris--
I don't think it could be done with things such as "u" cause if someone were to say a word with the letter "u" in it, it would translate the individual letter into the word "you."

Example: Mush = Myoush

Unless of course they do something like (I suck at scripting but you get the idea)


string = 1 character
if input = "u"
print "you"

or a much longer versian if that's not possible like
if input = "u" then
print "you"
else
input = "mush"
print "mush"

*Repeat with every word that has the letter "u" in it*
__________________
"Make the *dreams* of today the *opportunities* of tomorrow."

Reply With Quote
  #4  
Old 03-13-2003, 05:33 AM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Quote:
Originally posted by --Chris--
I don't think it could be done with things such as "u" cause if someone were to say a word with the letter "u" in it, it would translate the individual letter into the word "you."

Example: Mush = Myoush

Unless of course they do something like (I suck at scripting but you get the idea)


string = 1 character
if input = "u"
print "you"

or a much longer versian if that's not possible like
if input = "u" then
print "you"
else
input = "mush"
print "mush"

*Repeat with every word that has the letter "u" in it*
tokenize works

By the way, GScript isn't BASIC or whatever variant you are using

NPC Code:

if (timeout) {
if (playerchats) {
tokenize #c;
this.wordcount = tokenscount;
for (this.i=0; this.i<tokenscount; this.i++) {
setstring chat#v(this.i),#t(this.i);
if (strequals(#s(chat#v(this.i)),u)) {
setstring chat#v(this.i),you;
}
}
setplayerprop #c,#s(chat0) #s(chat1) #s(chat2) ...; //this is the best way I can think of reconstructing the original text.
}
timeout = 0.1;
}



That should replace the 'u' with you. Although my method to reconstruct the original chat text could be better. I'm just not sure how to.
__________________
Reply With Quote
  #5  
Old 03-13-2003, 05:42 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
G_Yoshi, your method is horrible. Better version (untested but still way better):

NPC Code:

if (playerchats) {
tokenize #c;
for (i=0;i<tokenscount;i++) {
if (strequals(#t(i),u)) setstring local.chat,#s(local.chat)you ;
else setstring local.chat,#s(local.chat)#t(i) ;
}
setplayerprop #c,#s(local.chat);
setstring local.chat,;
}



Nesting event blocks is stupidstupidstupid.
__________________
Reply With Quote
  #6  
Old 03-13-2003, 06:27 PM
Jeff Jeff is offline
Registered User
Join Date: Oct 2002
Location: Nebraska, USA
Posts: 707
Jeff is on a distinguished road
Or better, " u " (note the spaces) in the censor with its replacement listed as " you "

*adds*



EDIT: Well, at least on newmain or any other server with a censor.



ANOTHER EDIT: Ah, I need to add a tokenize thing because strequals didn't take my thoughts right.


ONE LAST EDIT: Kai, I took advantage of your code, but with one modification. The spaces should be #K(160) or they won't show up in the output
__________________
Jeff, the Archduke of Dustari
Member of the LAT on Graal The Adventure
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GO d+ s++:+ !a C++ UL+(UL+++)@ P+ L+(++)>+++ E---- W++@ N- !o ?K w(w--) !O !M@ !V PS- PE+ Y PGP t+ 5 X R tv(tv+) b++(b+)>b++++ DI(DI+) D-- G e->e++++ h! !r y
------END GEEK CODE BLOCK------

Last edited by Jeff; 03-13-2003 at 06:46 PM..
Reply With Quote
  #7  
Old 03-13-2003, 11:10 PM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Quote:
Originally posted by Kaimetsu
G_Yoshi, your method is horrible. Better version (untested but still way better):

NPC Code:

if (playerchats) {
tokenize #c;
for (i=0;i<tokenscount;i++) {
if (strequals(#t(i),u)) setstring local.chat,#s(local.chat)you ;
else setstring local.chat,#s(local.chat)#t(i) ;
}
setplayerprop #c,#s(local.chat);
setstring local.chat,;
}



Nesting event blocks is stupidstupidstupid.
Sorry. I figured it was, but I at least gave it a shot
__________________
Reply With Quote
  #8  
Old 03-14-2003, 12:16 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
If I were to make a real version then I'd include the ability to check for words in words. It'd take a list of word replacements with a boolean parameter for each which specified whether or not to respond to it if the string is part of another word. For 'u' we wouldn't do anything, but for 'spoon' (use your imagination) we would.
__________________
Reply With Quote
  #9  
Old 03-19-2003, 10:30 PM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
Tokenize = cleaner than " u ":
u sawk - tokenizes to You suck
u sawk - " u " not found
If you wanna do the indexof( u ,#c), better to make it the indexof( u , #c ) with spaces on either end.
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #10  
Old 03-20-2003, 04:27 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by Tyhm
Tokenize = cleaner than " u ":
u sawk - tokenizes to You suck
u sawk - " u " not found
If you wanna do the indexof( u ,#c), better to make it the indexof( u , #c ) with spaces on either end.
Actually, I'd just do indexof(u,#c) and then use #e to check the characters on either side. If they're spaces, it's a separate word. If not, it isn't.
__________________
Reply With Quote
  #11  
Old 04-14-2003, 05:03 PM
magicbud3344 magicbud3344 is offline
Banned
Join Date: Mar 2002
Location: mEEP
Posts: 0
magicbud3344 is on a distinguished road
Send a message via AIM to magicbud3344
it would take forever becuase people would just make up new ones
P1Z ples plez p1ez ect.
;x
Reply With Quote
  #12  
Old 04-14-2003, 05:19 PM
Jeff Jeff is offline
Registered User
Join Date: Oct 2002
Location: Nebraska, USA
Posts: 707
Jeff is on a distinguished road
Badbadgeno.


But that aside, the tokenizing system didn't work because it removed all quotation marks. But I am able to remove things like the corruptions of "please" that look like "pulls."
__________________
Jeff, the Archduke of Dustari
Member of the LAT on Graal The Adventure
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GO d+ s++:+ !a C++ UL+(UL+++)@ P+ L+(++)>+++ E---- W++@ N- !o ?K w(w--) !O !M@ !V PS- PE+ Y PGP t+ 5 X R tv(tv+) b++(b+)>b++++ DI(DI+) D-- G e->e++++ h! !r y
------END GEEK CODE BLOCK------
Reply With Quote
  #13  
Old 04-16-2003, 05:35 PM
Xeph0ria Xeph0ria is offline
Registered User
Join Date: Oct 2002
Posts: 130
Xeph0ria is on a distinguished road
I have an easier solution.
BAN THE *****S WHO ARE TOO DAMN LAZY TO TYPE THE TWO EXTRA LETTERS.
__________________
Tari Lasaria Anthony of (Forest)
Reply With Quote
  #14  
Old 04-16-2003, 06:15 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
u suxors m@n w3 n33d to t@lk like dis. It @in't u prob.

Ok ok, just kidding.


A script to convert known "words" to the appropriate word can be made. One to keep up with new "words" on it's own... Unlikely. Since there are so many varients to each words it might not do much good to make one.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
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 01:27 PM.


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