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
Jezuit
Beginner


Joined: 02 Nov 2002
Posts: 27
Location: USA

PostPosted: Wed Feb 04, 2004 2:41 am   

Prevent %1 from expanding
 
I'm trying to create a trigger IN an alias, and the alias has 4 parameters (%1 - %4)

The trigger I'm using starts off with an if statement:
#IF ((~%1) = "empty") {
//Do stuff here
}

The %1 in this trigger has given me all sorts of problems.
I've tried putting it like "%%1", but that gives me:
#IF (() = "empty").

I tried setting it the way it is now, but the trigger comes up with:
#IF ((~) = "empty")

I don't know any other combinations to try. The only thing I want to do is put %1, the actual text, not the parameter, inside of the created trigger.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Feb 04, 2004 3:05 am   
 
#IF ((%%1) = "empty") {#NOOP Do stuff here}
Works for me.
Reply with quote
Jezuit
Beginner


Joined: 02 Nov 2002
Posts: 27
Location: USA

PostPosted: Wed Feb 04, 2004 3:19 am   
 
When I try to do that, it simply comes up empty... I'll give you what I have.

First argument is vial number, second argument is vial type, third argument is either "empty" or "full", and fourth argument is how it's seen in the mud(alias name vs).
Here is the value of the alias:
Code:
#TRIGGER {%4%s({a salve of restoration|empty})%s(%d)%s(%d)} {
    #IF ((%%1) = "empty") {
      #ADDITEM v%2empty {%1}
      #DELITEM v%2 {%1}
      } {
      #ADDITEM v%2 {%1}
      #DELITEM v%2empty {%1}
      }
    #CW high,red
    } "Elixlist|Restoration"
  }
If I type: vs 8953 restoration full Vial8953

The trigger comes out looking like this:

Code:
#IF (() = "empty") {
      #ADDITEM vrestorationempty {8953}
      #DELITEM vrestoration {8953}
      } {
      #ADDITEM vrestoration {8953}
      #DELITEM vrestorationempty {8953}
      }
    #CW high,red
    } "Elixlist|Restoration"
  }
Reply with quote
Jezuit
Beginner


Joined: 02 Nov 2002
Posts: 27
Location: USA

PostPosted: Wed Feb 04, 2004 3:49 am   
 
I just figured it out, thanks for all the help. All I did, was instead of putting "%%1", I put "%%%1" and for some reason it liked that.

Thanks!
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