Confused - Gold hand in macro

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

leptoid
a lesser mummy
a lesser mummy
Posts: 35
Joined: Tue May 11, 2004 4:47 pm

Confused - Gold hand in macro

Post by leptoid » Sat Jun 26, 2004 9:09 pm

Ok, I'm trying to get this macro to work, but it won't compile. It gets 1 error and says it doesn't know what #turbo is for. Take the #turbo out, and it gets 3 new errors (typical of programming). Anyhow, I'm not sure what to do. I've tried editing it some but I'm new to this and am pretty lost. I know it's simple for some of you, just know I gave it a shot before asking. Here's the code. It's not mine, it's from another section, but I know it won't compile...

Code: Select all

#turbo 
Sub Main 
   /declare l0 local 
   :Loop 
      /sendkey down ctrl 
      /for l0 1 to 2 
         /click left gold 
         /delay 5 
         /click left target 
         /delay 5 
      /next l0 
      /sendkey up ctrl 
      /delay 3 
      /click left npctrade give 
      /delay 5 
   /goto :Loop 
/return
Thanks for any/all help.

User avatar
Kambic
a lesser mummy
a lesser mummy
Posts: 74
Joined: Fri May 28, 2004 11:48 am

Post by Kambic » Sat Jun 26, 2004 10:39 pm

You don't have to compile macros.

All you need to do is save that as a .mac file, place it in your /macros folder, and in game type /mac [name of macro file without extension]

That should solve that problem :) I don't know much about handing gold in, so hopefully that will work once your macro does.

leptoid
a lesser mummy
a lesser mummy
Posts: 35
Joined: Tue May 11, 2004 4:47 pm

Post by leptoid » Sat Jun 26, 2004 10:43 pm

Oh! I thought I did! lol. Thanks. I'll try it that way. I read in some "tutorial" that I had to so that's why I was doing that. I've wasted hours on this. lol

thanks again

leptoid
a lesser mummy
a lesser mummy
Posts: 35
Joined: Tue May 11, 2004 4:47 pm

Post by leptoid » Sun Jun 27, 2004 5:02 pm

The

Code: Select all

/sendkey down cntrl
doesn't work anymore, but I found this tidbit on this site to fix it... I think. I'm only posting in case someone else needs to know.
- New command to complement the /ctrlkey /altkey /shiftkey commands:
Usage: /nomodkey <command>
This command will release all ctrl/alt/shift keys for the duration of executing the
Hope this helps someone.

User avatar
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

Post by ieatacid » Sun Jun 27, 2004 6:34 pm

To pick up 1 gold:

Code: Select all

/ctrl /notify InventoryWindow IW_Money1 leftmouseup

leptoid
a lesser mummy
a lesser mummy
Posts: 35
Joined: Tue May 11, 2004 4:47 pm

Post by leptoid » Mon Jun 28, 2004 2:19 am

thanks! I'll try that out )

leptoid
a lesser mummy
a lesser mummy
Posts: 35
Joined: Tue May 11, 2004 4:47 pm

Post by leptoid » Mon Jun 28, 2004 2:28 am

apparently my clicking "give" to the nps is messed up as well. lol.. I'll post once I find the answer in someone else's macro. after that, this should work great

leptoid
a lesser mummy
a lesser mummy
Posts: 35
Joined: Tue May 11, 2004 4:47 pm

Post by leptoid » Mon Jun 28, 2004 2:48 am

Ok, I've finally got it, thanks to looking through other people's macros and everyone's help. Here's the working code to turn in 2gp...

Code: Select all

#turbo 20
Sub Main 
   /declare l0 int local 
   :Loop 
      /for l0 1 to 2 
         /ctrl /notify InventoryWindow IW_Money1 leftmouseup
         /delay 5 
         /click left target 
         /delay 5 
      /next l0 
      /delay 3 
      /notify GiveWnd GVW_Give_Button leftmouseup 

      /delay 5 
   /goto :Loop 
/return
You have to stop the macro on your own as it has no idea when you're out of gold. My only reason for making this was just so I wouldn't have to do the clicking though, so please dont' abuse it too much. =) This could be edited for other money turn ins pretty easily btw.