Trying to trade money between two bots

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

Moderator: MacroQuest Developers

Kore
orc pawn
orc pawn
Posts: 13
Joined: Fri Jun 04, 2004 4:38 am

Trying to trade money between two bots

Post by Kore » Wed Jul 14, 2004 4:58 am

I'm trying to write a macro that trades money between two bots - basically what i am doing is turning on an auto hunter macro on my warrior that basically runs around and kills stuff, and when low on health returns to my cleric bot who sits in a stationary location for heals; while at the cleric i want him to give the cleric all platinum and gold - i also need the cleric to accept the trade. Any and all help would be most appreciated - i've been racking my brain over this one, been totally humbled by it.

Terramantian
a ghoul
a ghoul
Posts: 120
Joined: Thu May 13, 2004 6:20 pm

Post by Terramantian » Wed Jul 14, 2004 11:11 am

k... eq is down atm so can't test this (actually that's why I'm writing it, bored)... but this should be close:

Code: Select all

|For warrior
|Call Give_Cleric_Money when you've run back to cleric

#event Busy "#*#tells you#*#busy right now#*#"
|Wait and try again if cleric rejects trade b/c of casting, etc
Sub Event_Busy
   /autoinv
   /delay 10s
   /call Give_Cleric_Money
/return

Sub Give_Cleric_Money
   /target CLERIC_NAME
   /shiftkey /notify Inventory IW_Money0 leftmouseup
   /delay 5
   /click left target
   /delay 5
   /doevents
   /shiftkey /notify Inventory IW_Money1 leftmouseup
   /delay 5
   /notify TradeWnd TRDW_MyMoney1 leftmouseup
   /delay 5
   /notify TradeWnd TRDW_Trade_Button leftmouseup
/return

Code: Select all

|Cleric code
#event Trade "#*#has offered you#*#"
Sub Event_Trade
   /delay 5s
   /notify TradeWnd TRDW_Trade_Button leftmouseup
/return
Tweak the delays to fit your comp. Also, this probably won't work as it is. I've never done anything with the trade window so I'm not sure of the notify names. I'm using http://macroquest2.com/phpBB2/viewtopic.php?t=6806 as a guide, but I think MQ names are not always exactly the same. One more thing, I can't remember the exact #event messages you need to use (and can't test now..) Does the "has offered you" message even show up with money? I can't remember at all but I'm thinking not... if not you might want to take the cheap/ugly way out and have the warrior send a tell to the cleric, "I'm giving you money". But whatever, this is as good as I can do without testing, it should give you a place to start.
Last edited by Terramantian on Wed Jul 14, 2004 1:24 pm, edited 1 time in total.

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Wed Jul 14, 2004 1:12 pm

Code: Select all

#event Busy '#*#tells you#*#busy right now#*#" 
The first " came out as a ' in your code. Not really nitpicky, just noticed it as I was reading it; I know it will cause it to not work even if it would have otherwise.

Terramantian
a ghoul
a ghoul
Posts: 120
Joined: Thu May 13, 2004 6:20 pm

Post by Terramantian » Wed Jul 14, 2004 1:26 pm

Thanks, lol. Changed it. I really don't think it'll work as it is anyway... if there wasn't a patch I might've had a chance to test it. But the basic idea should be workable anyway.

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Wed Jul 14, 2004 1:55 pm

no you dont get the "has offered you" message with money. you should be able to do something like this though:

Code: Select all

/if ${Window[TradeWnd].Open} {
   /delay 5s 
   /notify TradeWnd TRDW_Trade_Button leftmouseup 
}

Kore
orc pawn
orc pawn
Posts: 13
Joined: Fri Jun 04, 2004 4:38 am

Post by Kore » Wed Jul 14, 2004 9:48 pm

Wicked guys, i cant wait to try this! Thanks again!