Rainchild Wizard

Joined: 10 Oct 2000 Posts: 1551 Location: Australia
|
Posted: Thu Jun 21, 2001 5:15 am
Rainchild's TriggerSlave (TM) |
It's been a while since I've actually played a MUD... since before Zmud 6.xx came out (now I just develop them) so I'm not sure if these triggers will work unmodified in the new version... here's hoping
Functions:
Obeys a list of orders given by a list of masters, prevents abuse (eg: order <x> french <y>, order <x> quit, order <x> drop all -- unless you give the okay for them to do that)
Syntax:
"masters" - display a list of people you are obeying
"masters <master>" - add or remove a master from the list
"orders" - display a list of allowable order keywords
"orders <keyword>" - add or remove a keyword from your ok orders list
Example:
"masters Rainchild"
"orders heal"
Then when "Rainchild orders you to 'heal me'." you will automatically type 'heal Rainchild'.
#ALIAS orders {#IF {!(%1={})} {#IF %ismember(%1,@ok_orders) {#VAR ok_orders %delitem(%1,@ok_orders);#EC %1 removed from your Order List;#EC Orders are: @ok_orders} {#VAR ok_orders %additem(%1,@ok_orders);#EC %1 added to Order List;#EC Orders are: @ok_orders}} {#EC Orders are: @ok_orders}}
This first alias handles the addition/removal of orders on the OK list. Lists them if you don't type anything, otherwise toggles them on/off.
#ALIAS masters {#IF !(%1={}) {#IF %ismember(%1,@masters) {#VAR masters %delitem(%1,@masters);#EC %1 removed from your Master List;#EC You are slave to: @masters} {#VAR masters %additem(%1,@masters);#EC %1 added to Master List;#EC You are slave to: @masters}} {#EC You are slave to: @masters}}
The second alias handles the addition/removal of masters on the OK list. Lists them if you don't type anything, otherwise toggles them on/off.
#FUNC ok_orders {sit|stand|smile|group|follow|self}
A variable (#FUNC?? maybe that should be #VAR) containing all the orders that you're allowed to do. Note that 'self' is in there so you can accept orders to do stuff on yourself (eg: 'heal self').
#FUNC masters {Rainchild}
A variable (#FUNC?? maybe that should be #VAR) containing all of your masters... these are the people you obey commands from and no-one else.
#TRIGGER {^({@masters}) now follows you.} {group all} {Obey} 519
This trigger automatically groups your master (and anyone else who follows you)... handy if you're the one tanking the mobs while AFK (not that I recommend that kinda thing, though ). Note that the pattern/commands may have to be changed for your specific MUD.
#TRIGGER {^({@masters}) orders you to '({@ok_orders}) ({@ok_orders}) ({@ok_orders})'.} {%2 %3 %4} {Obey} 519
Trigger to obey triple parameter commands, like: Rainchild orders you to 'cast heal self'.
#TRIGGER {^({@masters}) orders you to '({@ok_orders}) ({@ok_orders})'.} {%2 %3} {Obey} 519
Trigger to obey dual parameter commands, like: Rainchild orders you to 'follow self'.
#TRIGGER {^({@masters}) orders you to '({@ok_orders}) me'.} {%2 %1} {Obey} 519
Trigger to do something to the master, like: Rainchild orders you to 'follow me'.
#TRIGGER {^({@masters}) orders you to '({@ok_orders})'.} {%2} {Obey} 519
Trigger to follow a single order, like: Rainchild orders you to 'sit'.
-----------------------------------
And that's about it.
You might want to create a trigger to handle situations like: Rainchild orders you to 'cast heal me'. But I found it easier just to make an alias which did 'heal' -> 'cast heal' so all they had to do was 'heal me'
Change the patterns to the way your MUD outputs, and enjoy.
Oh, if your MUD doesn't support the 'self' variable to do something to yourself, just alias 'self' -> '<yourname>' and you should be right.
I'll stress once more, that to be able to follow an order it has to be on the list. So, you can't have a master doing something like "give all newbie", unless newbie's name is on the ok-orders list. So you can prevent a fair bit of abuse too, no more orders to "gossip This MUD Sucks BAN ME!"
Take care with the commands you add to the list is all I can say.
-- Rainchild
PS: No support will be given by e-mail, if you have a question post it here. |
|