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


Joined: 25 Mar 2003
Posts: 18

PostPosted: Mon May 03, 2004 9:39 am   

Trigger Problem/Question
 
I'm creating a database, i have it to where it will auto-populate w/o a problem but i want to limit the items it will add, on my mud every item has a chance to be unique which is always in this format:
( uniquness ) item name, i've tried serveral things and spent a few hrs testing it and had other friends who use zmud and were at a loss, the trigg i'm currently using is this
#IF (@id_item_name = ~( %1 ~) %2) {#AB 1}
I know the %1 and %2 need to be replaced but i have no idea what with, i've searched through the help files and site and haven't found anything, i have tried the wildcard * but i always recieve a syntax error.

Any help will be GREATLY appreciated,

Thank You

Loderdek of Divine
nodeka.com port 23
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon May 03, 2004 5:00 pm   
 
Since you are looking for something at the beginning of a string, use the %begins function. I corrected the spelling of 'uniquness'. You shouldn't have any need to use #ABORT, just put your commands in the appropriate section of the #IF actions.
#IF (%begins( @id_item_name, "( uniqueness )")) {#NOOP This is the action(s) to take if the condition is true. If you don't want to do anything when the condition is true, then you can just leave this section blank. There's no need to use #ABORT} {#NOOP This is the action to take if the condition is false. If you don't want to do anything when the condition is false, then you can leave this section blank or even leave it out completely. There's still no need to use #ABORT}
Reply with quote
Indica
Beginner


Joined: 25 Mar 2003
Posts: 18

PostPosted: Mon May 03, 2004 7:07 pm   
 
well, first of all thank you lightbulb i can now get it work, although the uniqueness was just an example we have roughly 10 different types of uniques and no two are the same, for example some unique names are burnished, flickering, glossy, sparkling, etc, the %begins will work if i just have it use (, although this is a lil general my triggers and such are not enabled unless i identify the item and are immediately turned off, but i would still like to know if it is possible to accomplish the if function and have it do something of like this

#IF (@id_item_name = ~( %1~) %2) {blah blah}

some how make %1 and %2 true wildcards so that if i did

#IF (@id_item_name = %1) {blah blah}
it would always be true,

Thanks for any help
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