Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Foam
Novice


Joined: 08 Nov 2000
Posts: 44
Location: Australia

PostPosted: 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
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: 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
Reply with quote
smog
Newbie


Joined: 02 Mar 2001
Posts: 5
Location: USA

PostPosted: 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
Reply with quote
IceChild
Magician


Joined: 11 Oct 2000
Posts: 419
Location: Post Falls, ID, USA

PostPosted: 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
Reply with quote
Rainchild
Wizard


Joined: 10 Oct 2000
Posts: 1551
Location: Australia

PostPosted: 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
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: 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
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net