Page 1 of 1

Confused - Gold hand in macro

Posted: Sat Jun 26, 2004 9:09 pm
by leptoid
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.

Posted: Sat Jun 26, 2004 10:39 pm
by Kambic
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.

Posted: Sat Jun 26, 2004 10:43 pm
by leptoid
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

Posted: Sun Jun 27, 2004 5:02 pm
by leptoid
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.

Posted: Sun Jun 27, 2004 6:34 pm
by ieatacid
To pick up 1 gold:

Code: Select all

/ctrl /notify InventoryWindow IW_Money1 leftmouseup

Posted: Mon Jun 28, 2004 2:19 am
by leptoid
thanks! I'll try that out )

Posted: Mon Jun 28, 2004 2:28 am
by leptoid
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

Posted: Mon Jun 28, 2004 2:48 am
by leptoid
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.