Page 1 of 1
#define bug
Posted: Fri Oct 11, 2002 4:42 pm
by cyberglitch
Code: Select all
#define product "Flask of Water"
/finditem product
This does not work and returns could not find item.
Posted: Fri Oct 11, 2002 7:40 pm
by Stargazer
When you do a multi-word define like that it does not include the quote marks in the actual substitution. You will need to add the quote marks to your /finditem command otherwise it will look for something with the name "Flask" and drop the other words. Thus for your code to work you should say:
Posted: Fri Oct 11, 2002 11:02 pm
by cyberglitch
Even with ""'s it doesn't work. Trust me I tried. No newb to scripting here.
Posted: Sat Oct 12, 2002 1:51 am
by Stargazer
Well it was just a thought since I do that all the time. Here is a section of my arrows.mac code that uses it:
Code: Select all
#define ItemProduct "Wood Point Arrow"
| Sell our arrows
:SellArrow
/doevents
/varset v86 $count("ItemProduct")
/if n $v86==0 /goto :DoneSelling
/finditem similar "ItemProduct"
/if $find()==FALSE /goto :DoneSelling
/call buyitem
/goto :SellArrow
The only other thing I can think of is that maybe you are using the new UI and that it might not work correctly there.
Posted: Sat Oct 12, 2002 9:10 am
by cyberglitch
No NewUI,I do a lot of MQ scripting but for my current project I wanted to make it a generic script hence all the defines and that was the only define that did not work for me.
Ahh well, simple fix is just add the item name instead of the define. Not that big of deal just thought I would mention it.
Posted: Sun Oct 13, 2002 3:20 pm
by Plazmic
kill a fire beetle, loot an eye... run this
Code: Select all
#define FBE "Fire Beetle Eye"
Sub Main
/if $invpanel==FALSE /press i
/finditem "FBE"
/return
works for me...
Posted: Sun Oct 13, 2002 6:14 pm
by cyberglitch
hmm.. guess I'll download the latest update and try again. currently using 9/29. Will get latest when I get to work monday and retest my scripts.