Newby problems with /mouseto /finditem

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

Kupper
decaying skeleton
decaying skeleton
Posts: 2
Joined: Tue Nov 04, 2003 4:13 am

Newby problems with /mouseto /finditem

Post by Kupper » Tue Nov 04, 2003 4:20 am

New user of Macroquest and am loving it.

I simply could not get /mouseto or /finditem to work.

I know its something I'm doing wrong because I've had a look at other scripts here and folks are using them.

/mouseto works for x y coords and target but not for auto or any of the inventory slots.

/finditem does not get an item on the cusor. It does however set the var $item up since I can query the $item with /echo

For the moment I've set up a macro to move around thurgardin buying ingrediants and making mino brew but I have to start with my packs at known locations so I can use /mouseto x y

I would love to use /finditem and /mouseto to make the script more generic.

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Tue Nov 04, 2003 11:41 am

Post your macro here. It would be alot easier to help you if you did that.

Also make sure you are using the default UI container xml file.

EQUI_Container.xml from the default folder.

Guest

Post by Guest » Thu Nov 06, 2003 2:15 pm

Ok not wanting to bug folks unecessarily I went and played for a few days.

As a coder for a living I am able to achieve most things and indeed I can get by the /finditem and /mouseto not working with some awefull manual set up.

I really would like to get those and /click left <mouseloc> working since they would greatly simplify my code.

To be sure they were not working I took a posted example and made sure it too did not work. I post it here

Code: Select all


| - Celestial.mac - 
| 
| makes celestial essences with whatevers in your open bags.  go figure.  how cool.  yaaaaaay. 
| get solvents and scents of mars off vendors and go at it. 

Sub Main 
   /declare combiner local 
   /call FindMortar "Mortar and Pestle" 
    
   |Since combiner is a local variable, use the value from $return 
   /if $return==99 /endmacro 
   /varset combiner $return 
   /echo found containter at slot @combiner

   :MakeEssence 
   |/if $pack(@combiner,empty)==FALSE /call CleanPack 

      /delay 0 
      /sendkey down ctrl 

      /finditem "Celestial Solvent" 
      /if $find()==FALSE /goto :Done 
      /click left pack @combiner 0 
      /delay 3 

      /finditem "The Scent of Marr" 
      /if $find()==FALSE /goto :Done 
      /click left pack @combiner 1 
      /delay 3 

      /sendkey up ctrl 
      /click left pack @combiner combine 

      | it's a no fail combine, wait for the damn thing to be combined 
      :WaitCombine        
	  /echo Waiting combine
      /if "$cursor()"!="TRUE" /goto :WaitCombine 

      | clear the cursor of smurf poo 
      :ClearCursor 
      /click left auto 
      /if "$cursor()"=="TRUE" /goto :ClearCursor 

   /goto :MakeEssence 

   :Done 
    /sendkey up ctrl 
/return 

Sub FindMortar 
   /declare temp local 
   /declare counter local 
   /varset temp 99 

   /for counter 0 to 7 
      /if "$pack(@counter,name)"=="@Param0" /varset temp @counter 
   /next counter 
/return @temp 
The code correctly identifies the slot it finds the mortar and pestal in.
It gets to streaming "Waiting combine"'s wich means it believes it successfully did a find item.

If I try to /finditem I dont have then it tells me so.

I checked my struct align was 1 not 8. (Was already correct in the project)

I used a full default UI also. By default I've only changed a few of the UI windows. Not containers,bank or inventory.

Any help would be appreciated.

Still loving the program.

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Thu Nov 06, 2003 2:45 pm

I just tested /click, works fine.

Make sure you have the latest build of MQ, with the latest offsets.
MQ2: Think of it as Evolution in action.

DekeFentle
a lesser mummy
a lesser mummy
Posts: 48
Joined: Wed Oct 22, 2003 1:41 pm

Post by DekeFentle » Thu Nov 06, 2003 3:50 pm

I'm way far away from guru status like most of these guys but have you tried changing...

Code: Select all

      /click left pack @combiner combine 
to

Code: Select all

      /click left "pack @combiner" combine 
I'm at work and cant' test but I think that might work.
Revelation 6:8

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Thu Nov 06, 2003 5:08 pm

Neither will work. /click won't understand your variables. It takes string input, not numbers, retrieved through GetArg.

You can try /click left pack "@combiner" combine but I'm not terribly sure that will work either. /click was written before the variable change, and frankly I never considered someone wanting to pass it variables as a parameter. Then again, it might =) Afraid I don't do a lot of combining macros, and I always hardcode the locations into the scripts.

Your best bet is to put your combiner in slot 7, and always use /click left pack 7 combine. I'll see what I can do about checking for @ variable input and making that work if it doesn't.
MQ2: Think of it as Evolution in action.

DekeFentle
a lesser mummy
a lesser mummy
Posts: 48
Joined: Wed Oct 22, 2003 1:41 pm

Post by DekeFentle » Thu Nov 06, 2003 6:27 pm

Code: Select all

sub DoCombine 
      /click left @CombStr combine 
This seems to work in TS.mac where CombStr is a /varset CombStr "Pack @combiner"
Revelation 6:8

Kupper
decaying skeleton
decaying skeleton
Posts: 2
Joined: Tue Nov 04, 2003 4:13 am

Post by Kupper » Fri Nov 07, 2003 4:46 am

Thanks a ton.

I'm at work right now so cant test it yet.
I really dont mind having to hard code my pack positions.

I just used that celestial.mac as a base for mine since someone posted it as working code.