|
Foam Novice
Joined: 08 Nov 2000 Posts: 44 Location: Australia
|
Posted: Sat Dec 28, 2002 12:53 pm
Slaves.... |
Hiyas
I was messing around making my mage into a bot that a friend can have log on by sending a tell to one of my alts and it would brew for him, when it struck me.... is there anyway to make a slave bot, like, if somebody on the list of approved names sends the bot a tell, it just edits out the "somebody tells you" bit and allows any commands, even creating triggers and stuff?
Tnx for your time |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sat Dec 28, 2002 1:55 pm |
Yes, it's really simple, but be careful with this, you are giving the people in the list a lot of power:
#VAR friends {Friend1|Friend2|Friend3|etc.}
#TRIGGER {^(%w) tells you '(%*)'$} {#IF (%ismember("%1", @friends)) {#EXEC {%2}}}
Kjata |
|
|
|
smog Newbie
Joined: 02 Mar 2001 Posts: 5 Location: USA
|
Posted: Thu Jan 02, 2003 9:21 pm |
I have a question about this, is there any way to make it not cap sensitive?
As of now this trigger would catch on:
Friend1 tells you anything.
but not
friend1 tells you anything.
Make a wish then dive for cover. If you survive it, make another! -TFIA |
|
|
|
IceChild Magician
Joined: 11 Oct 2000 Posts: 419 Location: Post Falls, ID, USA
|
Posted: Thu Jan 02, 2003 9:46 pm |
Simpliest way I've found to make it non-case sensitive is the following:
#TRIGGER {^(%w) tells you '(%*)'$} {#IF (%ismember(%lower(%1), %lower(@friends))) {#EXEC {%2}}}
Icechild
mv -f message.text /dev/null |
|
|
|
Rainchild Wizard
Joined: 10 Oct 2000 Posts: 1551 Location: Australia
|
Posted: Thu Jan 02, 2003 11:40 pm |
A while ago I developed a more complicated trigger-slave. It's in the
finished scripts forum.
This gives you a little more control over how your character is used by others, for example I used to allow people to move me directions and kill things, but not to remove or junk or drop any of my EQ.
-- Rainchild |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Jan 03, 2003 5:28 am |
I wouldn't recommend allowing "friend1" to tell you. If your MUD is typical, all tells will have the proper case for the name of the person telling you, so if the case doesn't match it's because someone is trying to trick you.
LightBulb
Senior Member |
|
|
|
|
|