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


Joined: 14 Feb 2006
Posts: 2

PostPosted: Tue Feb 14, 2006 8:50 am   

Help with #IF?
 
TRIGGER {You are carrying (%d) items, of a possible ( 311)} {Items=%1}

I have a variable Items set up.
Every attempt to make an #IF keeps failing to work.

I'm trying to set it up so that

#IF (@Items < 250) {recall; #T- "Chesting"; #T+ "Picking"} {say not quite yet}


This would recall me, toggle my chesting triggers off, and then trigger my lockpicking triggers on.

How do I get #IF to work. Is it a trigger? does it go in as a trigger, does it go in the variable set trigger? I need all the help I can get
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Tue Feb 14, 2006 1:35 pm   
 
no spaces after ;
Try this
TRIGGER {You are carrying (%d) items, of a possible ( 311)} {#var Items {%1};#IF (@Items < 250) {recall;#T- "Chesting";#T+ "Picking"} {say not quite yet}}
_________________
http://www.Aardwolf.com
Reply with quote
playrgm
Newbie


Joined: 14 Feb 2006
Posts: 2

PostPosted: Tue Feb 14, 2006 3:23 pm   
 
Thanks for the idea, but when I tried it, it still did not cause the IF commands to trigger. They aren't even showing up when the text that triggers them does. The variable gets assigned, but the trigger doesn't fire.

still, at least it stopped entering {recall;#T- "Chesting";#T+ "Picking"} {say not quite yet} as a command and confusing the mud

sigh. Anyone else have any ideas?
Reply with quote
Insomniac
Wanderer


Joined: 25 Mar 2004
Posts: 78
Location: United Kingdom

PostPosted: Tue Feb 14, 2006 4:20 pm   
 
#TRIGGER {You are carrying (%d) items, of a possible ( 311)} {#var Items {%1};#IF (@Items < 250) {recall;#T- "Chesting";#T+ "Picking"} {say not quite yet}}

Should work, assuming the trigger line is correct.
_________________

No-one ever gets flamed for posting too much information. Conform to the PPP (Preferred Posting Protocol) and give as much information as possible, including MUD output where needed.
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Tue Feb 14, 2006 6:19 pm   
 
oh wait..forgot to use ~ on the ()'s
#TRIGGER {You are carrying (%d) items, of a possible ~( 311~)} {#var Items {%1};#IF (@Items < 250) {recall;#T- "Chesting";#T+ "Picking"} {say not quite yet}}

now one question is: is it ALWAYS 311? cause if not then youd need
#TRIGGER {You are carrying (%d) items, of a possible ~( (%d)~)} {#var Items {%1};#IF (@Items < 250) {recall;#T- "Chesting";#T+ "Picking"} {say not quite yet}}

Another question is that since there is a space before 311 and if it changes does it ever have NO space there due to it reaching thousands.
inother words does it ever look like (1000)
if it does then ya have to add in a space checker in there as well.
#TRIGGER {You are carrying (%d) items, of a possible ~({(%d)| (%d)}~)} {#var Items {%1};#IF (@Items < 250) {recall;#T- "Chesting";#T+ "Picking"} {say not quite yet}}
I think that should work
_________________
http://www.Aardwolf.com
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