PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: gpl_racer on 23 January, 2004, 20:31:48

Title: word/character replacement script
Post by: gpl_racer on 23 January, 2004, 20:31:48
Is it possible to make a script that scans all the text users write in main chat and changes every (for example) a into i ? The script should also have a on-off switch type of command.
(for example) +replace would start it and +noreplace would stop it. (those commands should only be available to the operators of the hub)

If the above is possible could someone please post it here or give an url to a website with the script.

Thank you in advance.
Title:
Post by: plop on 24 January, 2004, 02:54:17
QuoteOriginally posted by gpl_racer
Is it possible to make a script that scans all the text users write in main chat and changes every (for example) a into i ? The script should also have a on-off switch type of command.
(for example) +replace would start it and +noreplace would stop it. (those commands should only be available to the operators of the hub)

If the above is possible could someone please post it here or give an url to a website with the script.

Thank you in advance.
a word replacer is in ptokax itself.
i'm thinking of adding some more modes 2 crazy bot but time is holding me back.
the modes i'm thinking about would be a real lot of work but if you only wanne replace the a for an i it's np.
that can be done easely.

plop
Title:
Post by: gpl_racer on 24 January, 2004, 10:52:10
What I meant was that if a user writes a word into main chat for example if user writes:
   What are you doing?
it would show as:
   Whit ire you doing?

Is this kind of thing possible? That ptokax word-replament system only replaces whole words not part of them.
For example if user writes:
Am I a bot?
it would show as:
Am I i bot?

And I want that first "A" to become "I" too.

plop: if you know how to do this could you implement it to your crazy bot too? or just post the code that does the thing above.
Title:
Post by: plop on 24 January, 2004, 19:57:58
QuoteOriginally posted by gpl_racer
What I meant was that if a user writes a word into main chat for example if user writes:
   What are you doing?
it would show as:
   Whit ire you doing?

Is this kind of thing possible? That ptokax word-replament system only replaces whole words not part of them.
For example if user writes:
Am I a bot?
it would show as:
Am I i bot?

And I want that first "A" to become "I" too.

plop: if you know how to do this could you implement it to your crazy bot too? or just post the code that does the thing above.
ow wait a min you mean like the police man from allo allo.
i'll add it as mode 2 crazy bot as soon as i have time.
just changing the a to an i is a piece of cake.

plop