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


Joined: 27 Jun 2012
Posts: 9

PostPosted: Tue Dec 15, 2015 7:02 pm   

A simple if/else trigger
 
I did a search, but I couldn't come up with anything that worked.
I'm sure it's very straightforward for those who know zmud. I want to make a simple blacklist trigger:

^(%w) tells you 'follow'

#var newleader %1
#if (@newleader==@blacklisted) {nothing} else {follow %1}

I've added certain leaders to a variable #blacklisted. But how is the if/else to be set up?

Cheers,

D.
Reply with quote
Medakan
Novice


Joined: 15 Dec 2015
Posts: 41
Location: Seattle

PostPosted: Wed Dec 16, 2015 2:11 am   
 
I think...

#IF (%ismember(@newleader,@blacklisted)) {#noop} {follow %1}

Taziar Medakan @ WoTmud
Reply with quote
Medakan
Novice


Joined: 15 Dec 2015
Posts: 41
Location: Seattle

PostPosted: Wed Dec 16, 2015 5:34 pm   
 
Or instead of the #noop you could do something like:

#ECHO {Denied! @newleader is blacklisted!}

Taziar Medakan @ WoTmud
_________________
Taziar Medakan @ WoTMUD
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