|
Shadow-Cat Newbie
Joined: 27 Feb 2006 Posts: 7
|
Posted: Mon Jun 19, 2006 2:27 pm
Trigger help |
I haven't a clue on triggers, but I need to make a trigger that takes what a person says, scans it for specific words (namely swear words) then executes a series of commands...
tell person Watch out, swearing isn't allowed here. If you aren't careful and imm will mute you.
who
holler it wasn't me.
get the idea?
Please let me know if someone can do this for me
Thanks |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Mon Jun 19, 2006 6:42 pm |
#TR {(%w) {says|asks|exclaims}, "(*)"} {name=%1}
#COND {{@swearwords}} {tell @name Watch out, swearing isn't allowed here. If you aren't careful and imm will mute you.;who;holer it wasn't me} {reparse}
This should work, but im not at home to test. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Shadow-Cat Newbie
Joined: 27 Feb 2006 Posts: 7
|
Posted: Sat Jun 24, 2006 11:37 pm umm |
How do I tell zmud what the swear words are[/quote]
|
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Sun Jun 25, 2006 3:17 pm |
#var swearwords {SWEAR|WORDS|GO|HERE}
|
|
|
|
Shadow-Cat Newbie
Joined: 27 Feb 2006 Posts: 7
|
Posted: Fri Jun 30, 2006 9:14 pm |
I tested it, and it didn't work, is there something I did wrong?
#TR {(%w) {says|asks|exclaims|hollers}, '(*)'} {name=%1}
#COND {{@swearwords}} {tell @name Watch out, swearing isn't allowed here. If you aren't careful and imm will mute you.;who;holer it wasn't me} {reparse}
#VAR swearwords {SWEAR|WORDS|ARE|HERE}
This is what I copy and pasted (except I added in about 10 swear words).
Did I mess something up? |
|
|
|
Reygar Novice
Joined: 22 Aug 2004 Posts: 32
|
Posted: Sat Jul 01, 2006 2:13 am |
Can you paste some lines directly from the mud? The pattern might be off for the trigger.
|
|
|
|
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Sat Jul 01, 2006 6:54 am |
Depending on how exact(how many words you want to list) you want your trigger to be, one of these should work.
This one will fire on every instance of the word even if it is embedded in or a valid portion of another word. ie. ASSassin. But, it will catch compound-word f-bombs for instance.
Code: |
#TRIGGER "SwearCatcher" {(%w) {says|asks|thinks|exclaims|hollers}*{@swearwords}*} {tell %1 Watch out, swearing isn't allowed here. If you aren't careful an Imm will mute you.;who;holler It wasn't me!} "" {prompt|notrig} |
This second one will only fire on exact matches of the words you have listed, so compound words would need to be added explicitly.
Code: |
#TRIGGER "SwearCatcher" {(%w) {says|asks|thinks|exclaims|hollers}*%q{@swearwords}%q*} {tell %1 Watch out, swearing isn't allowed here. If you aren't careful an Imm will mute you.;who;holler It wasn't me!} "" {prompt|notrig} |
Here is an alias to add new words to the swearwords variable. For some reason, adding words to the stringlist variable in the settings editor doesn't work for triggering immediately. Using #ADDITEM seems to work fine.
Code: |
#ALIAS addnewswearword {#ADDITEM swearwords %1} |
If you use the alias, the alias name should really be changed to something shorter but easy to remember. It's much too long to type everytime, but written as for clarification.
Edit: Added hollers to communication list. Fixed grammatical errors. Added note about alias name. |
|
Last edited by mr_kent on Sun Jul 02, 2006 6:31 pm; edited 1 time in total |
|
|
|
Shadow-Cat Newbie
Joined: 27 Feb 2006 Posts: 7
|
Posted: Sat Jul 01, 2006 9:37 pm |
Mordiara hollers, 'Interesting'
Mordiara hollers, 'testing'
Mordiara hollers, 'testing this is a test line'
Shar hollers, '-= yeah, but the xp is in direct relation to how much damage you do. =-' [IC-RP]
There's a couple of lines... any ideas? |
|
|
|
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Sun Jul 02, 2006 6:34 pm |
I edited my previous post to trigger on the examples given.
|
|
|
|
|
|