 |
Yamabushi Apprentice
Joined: 29 Jul 2003 Posts: 101 Location: USA
|
Posted: 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 |
|
|
 |
Yamabushi Apprentice
Joined: 29 Jul 2003 Posts: 101 Location: USA
|
Posted: Wed Sep 22, 2004 3:25 pm |
Any ideas?
|
|
_________________ Yama |
|
|
 |
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: 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} |
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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. |
|
|
 |
|
|