A forum for feature requests/discussions and user submitted patches that improve MQ2
Moderator: MacroQuest Developers
-
cyberglitch
- a lesser mummy

- Posts: 42
- Joined: Wed Jun 26, 2002 4:40 pm
Post
by cyberglitch » Fri Oct 11, 2002 4:42 pm
Code: Select all
#define product "Flask of Water"
/finditem product
This does not work and returns could not find item.
-
Stargazer
- a lesser mummy

- Posts: 32
- Joined: Mon Sep 30, 2002 3:30 pm
Post
by Stargazer » Fri Oct 11, 2002 7:40 pm
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:
-
cyberglitch
- a lesser mummy

- Posts: 42
- Joined: Wed Jun 26, 2002 4:40 pm
Post
by cyberglitch » Fri Oct 11, 2002 11:02 pm
Even with ""'s it doesn't work. Trust me I tried. No newb to scripting here.
-
Stargazer
- a lesser mummy

- Posts: 32
- Joined: Mon Sep 30, 2002 3:30 pm
Post
by Stargazer » Sat Oct 12, 2002 1:51 am
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.
-
cyberglitch
- a lesser mummy

- Posts: 42
- Joined: Wed Jun 26, 2002 4:40 pm
Post
by cyberglitch » Sat Oct 12, 2002 9:10 am
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.
-
Plazmic
- The One

- Posts: 800
- Joined: Fri Jun 14, 2002 12:31 am
-
Contact:
Post
by Plazmic » Sun Oct 13, 2002 3:20 pm
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...
-
cyberglitch
- a lesser mummy

- Posts: 42
- Joined: Wed Jun 26, 2002 4:40 pm
Post
by cyberglitch » Sun Oct 13, 2002 6:14 pm
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.