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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
Rainchild
Wizard


Joined: 10 Oct 2000
Posts: 1551
Location: Australia

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


Joined: 17 Jul 2001
Posts: 9
Location: USA

PostPosted: Tue Jul 17, 2001 8:45 am   
 
i know slim to nothing when it comes to making anything work for zmud.... i was wondering if anyone could help me come up with a healing bot that would work for Crimson Mud 2... please contact me on this board any information you need to know to help me with my problem... thanks

crimson
Reply with quote
Darker
GURU


Joined: 24 Sep 2000
Posts: 1237
Location: USA

PostPosted: Tue Jul 17, 2001 1:44 pm   
 
This board is for finished scripts only. Please post on the General Discussion board for help.



zMUD 6 Online Help: All the power you'll ever need.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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