To prove the point here is a simple World of Warcraft bot I created with a few lines of code to start wow , log in , walk from a merchant to a mob area, kill, loot, return and sell all your gray items.
Note to use apple's System Events program you have to enable access for assistive devices.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk-huTmdF8Lz7vXha2R5TnP0qiSJlcb112mSbntYBCkn_5jG6L4foDjuZtAn9IENHzieaojQcWugNaBFQc_0B2y7wLC2Pcgbd3GYU6QrArNv-h9qMLvUa6plu55MtAXdkt5fjlDDPTVno/s400/Picture+1.png)
You're going to need to regular wow macros for this to work.
One to simulate a shift right mouse click to autoloot corpses. Doesn't need to be placed in a slot.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmwl-M8d9CL4RRFBJVV5e5JtpGrdeNmt3Jzqr7NnDijWcwU1lrSCg8pOdBw5FG5-mZpPOZ3LBfhufjo0_L47CoBhMgxi6UeycbDswF4lnCQD99sxnONvpAFggwEJkoizbPi6z1LCOhYZQ/s400/Picture+3.png)
/script SetBinding("l", "TURNORACTION"); SaveBindings(GetCurrentBindingSet())
And the other to automatically sell your gray items to any merchant, in this example I placed this macro in slot 4.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipQ_rE3YMhoWEOdYFRjMofB8bgCGmPG5AMuRqkyQfCh6yxmylLm_0Am819lkH_-iixhkCUHA-qQHZm6lCTT3z2n3_mILxK56pkCC6yzW80Zk9hBNtgBdaIzUXmfGQ7GhH1F1hYSnkVz3Y/s400/Picture+2.png)
/script for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do local name = GetContainerItemLink(bag,slot); if name and string.find(name,"ff9d9d9d") then DEFAULT_CHAT_FRAME:AddMessage("- Selling "..name); UseContainerItem(bag,slot) end; end;end
Then just kick this script off in Script Editor and center your mouse on the screen.
1 # Eigenclass Dec 2008
2 # start the app
3 # or bring it to the front if it's already open
4 tell application "World of Warcraft"
5 activate
6 end tell
7
8 # send messages to the app using System Events.
9 tell application "System Events"
10 tell process "World of Warcraft"
11 #repeat indefinitely
12 repeat
13 # assume you are facing a merchant to begin the flow
14
15 # back up .75 units
16 key down "s"
17 delay 1.56 * 0.75
18 key up "s"
19
20 # strafe left 1 unit
21 key down "q"
22 delay 1
23 key up "q"
24
25 # move forward 3 units
26 key down "w"
27 delay 1 * 3
28 key up "w"
29
30 # target nearest enemy
31 key down tab
32 delay 1
33 key up tab
34
35 # attach it 10 times.
36 # this assumes you have a long range
37 # attack in slot 2 (key code 19).
38 repeat 10 times
39 key code 19
40 delay 2
41 end repeat
42
43 # autoloot the corpse using the macro
44 # we bound to the "l" key
45 keystroke "l" using {shift down}
46
47 # backup 3 units
48 key down "s"
49 delay 1.56 * 3
50 key up "s"
51
52 # strafe right 1 unit
53 key down "e"
54 delay 1
55 key up "e"
56
57 # move forward .75 units
58 key down "w"
59 delay 1 * 0.75
60 key up "w"
61
62 # open the merchant dialog using the macro
63 # we bound to the "l" key
64 keystroke "l" using {command down}
65 delay 2
66
67 # auto sell all gray items using the macro
68 # we bound to the number 4 (key code 21)
69 key code 21
70 delay 2
71
72 end repeat
73
74 end tell
75 end tell
76
Watch the power of GUI scripting in action!
No comments:
Post a Comment