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
SolaronTFC
Newbie


Joined: 23 Jan 2003
Posts: 8

PostPosted: Tue Feb 04, 2003 5:13 pm   

Lists
 
I'd like to set up a group list of people that I group with, if they're in a list of friends, are automatically given access to group spells...

Or even if I have to type "gadd solaron", I would tell the group, "Solaron added to group-access triggers." and he could then gte "heal" "sanc" "rescue" etc.

Any ideas? :)

Mud output:

Solaron tells the group (in common), 'xxx'.

Thanks. :D

Sol
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Tue Feb 04, 2003 5:18 pm   
 
well, without a little more information about how your script currently works, i can only really tell you how to go about adding a person to the list:

#alias gadd {#additem group %1;gtell %1 added to group-access triggers.}

then before casting spellls do something like
#if (%ismember(@target, @group)) {heal them} {don't heal them}

--------

moon.icebound.net:9000
Reply with quote
SolaronTFC
Newbie


Joined: 23 Jan 2003
Posts: 8

PostPosted: Tue Feb 04, 2003 5:56 pm   
 
Sorry for lack of info. I don't currently -have- a trigger. Basically, I want to be able to add/remove from the list on the fly.

For example, Emit and Solaron wanna group. Emit isn't on Solaron's ally list, so Solaron adds him.

When Emit joins the group, ("Emit has joined the group." it will check the list. If they're a member of the list, I'll tell the group "gtell Emit added to group-access spell list." (along with a list of spells which I can handle) Then, when they gte "heal", I'll cast heal on them. If they aren't on the list, my triggers won't even fire (hopefully...)

Doable or no? :D

Thanks!

Sol

(Oh, in case I'm following THEM, so I don't group them, I'd like a way to do it manually as well, w/o relying on the "Emit has joined your group." just in case.... :D)
Reply with quote
SolaronTFC
Newbie


Joined: 23 Jan 2003
Posts: 8

PostPosted: Tue Feb 04, 2003 8:21 pm   
 
Would this work?

Variables
Friends - This variable works in conjunction with the trigger and 2 aliases.

Aliases
alias name: addfriend

command: #var friends {%additem(%proper(%1),@friends)}

alias name: delfriend

command: #var friends {%delitem(%proper(%1),@friends)}

Create the Variable "friends" and leave all the fields blank for it, the 2 aliases will add and delete people to the variable.

Created the aliases "addfriend" and "delfriend", put the command you see above for the aliases in the "command" field when editing Aliases. These aliases will add and delete group members names from the "friends" variable. The syntax for adding a friend to the variable is: addfriend groupmember and just the opposite for deleting a name from the variable: delfriend groupmember.

Triggers
pattern: (%w) tells the group ~(in %w~), 'comprehend'.

command: #if {%ismember(%1,@friends} {cast 'comprehend' %1}

Whatcha think?

Thanks!
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Tue Feb 04, 2003 9:41 pm   
 
looks like you got it, only one thing i would change:
#var friends {%delitem(%proper(%1),@friends)}

can just be made into

#delitem friends %proper(%1)
and the other into
#additem friends %proprer(%1)

the way you had it before should work too, but remember KISS

--------

moon.icebound.net:9000
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