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
Yamabushi
Apprentice


Joined: 29 Jul 2003
Posts: 101
Location: USA

PostPosted: Wed Sep 22, 2004 4:00 am   

Matching a list and variable
 
Ok. Here is the brain teaser of the day.

I have a list called loot which looks like this.

loot
silver flask
crimson longsword
dwarven hauberk
fang of sauron

I also have a varible that keeps track of my gold.

So when these cases occur i want to bid on these items
loot gold
silver flask 200
crimson longsword 500
dwarven hauberk 500
fang of sauron 1000

how can i match a variable list to another variable?

Thanks.
_________________
Yama
Reply with quote
Yamabushi
Apprentice


Joined: 29 Jul 2003
Posts: 101
Location: USA

PostPosted: Wed Sep 22, 2004 3:25 pm   
 
Any ideas?
_________________
Yama
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Wed Sep 22, 2004 3:40 pm   
 
I'd be willing to try to help, but I'm not really clear on what you're trying to accomplish.

As a guess,
#IF %ismember( @auction_item, @loot) {bid @loot.value}
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Sep 22, 2004 6:40 pm   
 
The reason this is a brain teaser is because you really haven't said what you are trying to do. You told us the name and contents of the list, but not of the other variable. You didn't really explain what you expect to see as a trigger or what you want to do with that trigger. You apparently would like to make random bids whenever one of the items on the list comes up for auction?

Best guess:
#TR {Auction: ({@loot})} {bid %1 %eval( %random(1,9) * 100)}
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
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