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


Joined: 17 Jul 2002
Posts: 11
Location: USA

PostPosted: Sun Mar 23, 2003 11:15 am   

My own Auction Script.. need help pls
 
Hello
I'm on a mud, I have to do my own auctioning
I have variables of all the equip I currently have for sale
@dam has all the dam equip
@svs has all the svs equip
and so on
I Have a @currentlist variable that has the full list of dam|Svs|Dex etc.. that I can post and have people give me tells with the equip types they want to look at
The problem I am having
Is when the person gives me a tell, I cant find a way to convert that dam or dex they give me in their tells to the @dam or @dex variable for me to tell them
this is what I have.. though all it produces is a @

^(%aucperson) tells you, '(%aucgoods)'.
thats the pattern
tell @aucperson {@{@aucgoods}}
is what I have so far

but..that doesnt work
the @aucgoods variable should be "dam" or "dex",, so if I make it a variable @dam or @dex it would display the items I have in said variables on the tell line
but I cant figure it out
and I dont know how to use nested ifs
since the types of equip I have change often I dont want to change the code that often....

Thanks!
Collin
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Mar 23, 2003 11:49 am   
 
You are confusing two different syntax in your pattern. If you want to save what the triggger matches to variable, then you can use this syntax (this is just a shorthand, there is also a more clearer way fo doing it):

Pattern:
^&{aucperson} tells you, '&{aucgoods}'.

Then you can use the trigger's commands like you have them. If you don't need to save what was matched to variables because you are only going to use it in the trigger, then you can do it like this:

Pattern:
^(%w) tells you, '(%w)'.

And now the commands of the trigger would have to be:
tell %1 {@{%2}}


Kjata
Reply with quote
only85
Beginner


Joined: 17 Jul 2002
Posts: 11
Location: USA

PostPosted: Sun Mar 23, 2003 6:20 pm   
 
This works well so far
I am using the second instance

but... is there a way to keep it from replying to one word phrases people talk to me about that I dont have?
someone said Hi earlier and I replied
You tell Shaido, '{}'

because there is nothing in the @hi variable
I dont want to reply if there isnt a variable........

Thanks for your help
Collin
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sun Mar 23, 2003 7:48 pm   
 
Do a check to see if there is a value for the @{%2}

#IF (!%null(@{%2})) {tell %1 {@{%2}}}


Ton Diening
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