Author |
Message |
|
|
Post subject: |
Re: Is this possible? |
|
|
Sorry it took me so long to get back, this is my macro for checking what to do in game. its simple but works well Code: begin Macro.Pause("1000") end begin Window.Set location("W.o.T. Client", "yes", "0", "0") Window.Bring to front("W.o.T. Client", "yes") end if Image.Can be located on screen near coordinate("C:\Users\ComputerAI\Desktop\exit\mal image.png", "50", "922", "688", "100") begin Keyboard.Press keys("rr") Macro.Abort() end if Image.Can be located on screen near coordinate("C:\Users\ComputerAI\Desktop\exit\ensk image.png", "50", "920", "696", "100") begin Macro.Abort() end if Image.Can be located on screen near coordinate("C:\Users\ComputerAI\Desktop\exit\erlin image.png", "50", "912", "659", "100") begin Keyboard.Hold key("w") end begin Macro.Pause("20000") end begin Keyboard.Release key("w") end begin Macro.Abort() end if Image.Can be located on screen near coordinate("C:\Users\ComputerAI\Desktop\exit\pro image.png", "50", "917", "658", "100") begin Keyboard.Press keys("rr") Macro.Abort() end if Image.Can be located on screen near coordinate("C:\Users\ComputerAI\Desktop\exit\abby image.png", "50", "590", "476", "100") begin Macro.Abort() end if Image.Can be located on screen near coordinate("C:\Users\ComputerAI\Desktop\exit\sandriver image.png", "80", "914", "663", "100") begin Keyboard.Hold key("w") end begin Macro.Pause("20000") end begin Keyboard.Release key("w") end begin Macro.Abort() end if Image.Can be located on screen near coordinate("C:\Users\ComputerAI\Desktop\exit\el sniper.png", "50", "846", "595", "100") begin Keyboard.Hold key("w") end begin Macro.Pause("20000") end begin Keyboard.Release key("w") end begin Macro.Abort() end if Image.Can be located on screen near coordinate("C:\Users\ComputerAI\Desktop\exit\mtnpass image.png", "50", "913", "671", "100") begin Keyboard.Press keys("rr") Macro.Abort() end if Image.Can be located on screen near coordinate("C:\Users\ComputerAI\Desktop\exit\karl image.png", "60", "852", "590", "100") begin Keyboard.Hold key("w") end begin Macro.Pause("20000") end begin Keyboard.Release key("w") end begin Macro.Abort() end if Image.Can be located on screen near coordinate("C:\Users\ComputerAI\Desktop\exit\new map.png", "50", "833", "760", "100") begin Keyboard.Hold key("w") end begin Macro.Pause("20000") end begin Keyboard.Release key("w") end begin Macro.Abort() end
Edited by Gigus: Added code tags.it could be shorter i bet but i was making it as different levels were loading. Attachment:
ensk image.png [ 31.09 KiB | Viewed 1517 times ]
Attachment:
pro image.png [ 44.98 KiB | Viewed 1517 times ]
it checks the middle of the map. then starts the battle macro after.
Sorry it took me so long to get back,
this is my macro for checking what to do in game. its simple but works well
[code] begin Macro.Pause("1000") end begin Window.Set location("W.o.T. Client", "yes", "0", "0") Window.Bring to front("W.o.T. Client", "yes") end if Image.Can be located on screen near coordinate("C:\Users\ComputerAI\Desktop\exit\mal image.png", "50", "922", "688", "100") begin Keyboard.Press keys("rr") Macro.Abort() end if Image.Can be located on screen near coordinate("C:\Users\ComputerAI\Desktop\exit\ensk image.png", "50", "920", "696", "100") begin Macro.Abort() end if Image.Can be located on screen near coordinate("C:\Users\ComputerAI\Desktop\exit\erlin image.png", "50", "912", "659", "100") begin Keyboard.Hold key("w") end begin Macro.Pause("20000") end begin Keyboard.Release key("w") end begin Macro.Abort() end if Image.Can be located on screen near coordinate("C:\Users\ComputerAI\Desktop\exit\pro image.png", "50", "917", "658", "100") begin Keyboard.Press keys("rr") Macro.Abort() end if Image.Can be located on screen near coordinate("C:\Users\ComputerAI\Desktop\exit\abby image.png", "50", "590", "476", "100") begin Macro.Abort() end if Image.Can be located on screen near coordinate("C:\Users\ComputerAI\Desktop\exit\sandriver image.png", "80", "914", "663", "100") begin Keyboard.Hold key("w") end begin Macro.Pause("20000") end begin Keyboard.Release key("w") end begin Macro.Abort() end if Image.Can be located on screen near coordinate("C:\Users\ComputerAI\Desktop\exit\el sniper.png", "50", "846", "595", "100") begin Keyboard.Hold key("w") end begin Macro.Pause("20000") end begin Keyboard.Release key("w") end begin Macro.Abort() end if Image.Can be located on screen near coordinate("C:\Users\ComputerAI\Desktop\exit\mtnpass image.png", "50", "913", "671", "100") begin Keyboard.Press keys("rr") Macro.Abort() end if Image.Can be located on screen near coordinate("C:\Users\ComputerAI\Desktop\exit\karl image.png", "60", "852", "590", "100") begin Keyboard.Hold key("w") end begin Macro.Pause("20000") end begin Keyboard.Release key("w") end begin Macro.Abort() end if Image.Can be located on screen near coordinate("C:\Users\ComputerAI\Desktop\exit\new map.png", "50", "833", "760", "100") begin Keyboard.Hold key("w") end begin Macro.Pause("20000") end begin Keyboard.Release key("w") end begin Macro.Abort() end [/code] [size=85][b][i]Edited by Gigus: Added code tags.[/i][/b][/size]
it could be shorter i bet but i was making it as different levels were loading. [attachment=1]ensk image.png[/attachment] [attachment=0]pro image.png[/attachment] it checks the middle of the map. then starts the battle macro after.
|
|
|
|
Posted: Sun May 29, 2011 8:38 am |
|
|
|
|
|
Post subject: |
Re: Is this possible? |
|
|
Can you post it Jogalot? It'll give me something to fiddle with
Can you post it Jogalot? It'll give me something to fiddle with
|
|
|
|
Posted: Tue May 24, 2011 10:22 pm |
|
|
|
|
|
Post subject: |
Re: Is this possible? |
|
|
I have made a macro to check the middle of the mini map.
soon as it spots the correct image it will move forward for 25 seconds. if i know the map is a city map or will have rocks in the way it does nothing.
works fine and speeds up death to get that much needed xp
I have made a macro to check the middle of the mini map.
soon as it spots the correct image it will move forward for 25 seconds. if i know the map is a city map or will have rocks in the way it does nothing.
works fine and speeds up death to get that much needed xp
|
|
|
|
Posted: Tue May 24, 2011 1:17 pm |
|
|
|
|
|
Post subject: |
Re: Is this possible? |
|
|
Argh you cany click on the minimap :/
Looks like itll be too tough!
Argh you cany click on the minimap :/
Looks like itll be too tough!
|
|
|
|
Posted: Tue May 24, 2011 1:16 am |
|
|
|
|
|
Post subject: |
Re: Is this possible? |
|
|
If you were using CheatEngine to get the memory address of your locations it would be much easier, but you can still do it only using BE.
First, I would use pixel patterns instead of colors to identify which map it is; by roads and/or unique landmarks.
If you can click on the minimap and it will move you to that location...it doesn't matter where you start from (if you don't care what's going on around you). Just determine the map and have it click from location to location - based on the minimap, with occasional stops to chat or interact.
If you can't, you'll have to a little more work to determine where you are and where you want to go. Use pixel patterns to determine where you are and what direction your facing. Then have functions, loops, or other macros that will move you appropriately based on your location.
I use a macro in another game that you can type coordinates in the large map and it will move you to that location. The macro hits "m" for map, clicks in the space for "x" coordinate, types coordinate, clicks in space for "y" coordinate, types it, hits "enter", then closes map...pauses, interacts, then repeats to new location. Hopefully you have a clickable map or can type coordinates to make it easier for you.
If you were using CheatEngine to get the memory address of your locations it would be much easier, but you can still do it only using BE.
First, I would use pixel patterns instead of colors to identify which map it is; by roads and/or unique landmarks.
If you can click on the minimap and it will move you to that location...it doesn't matter where you start from (if you don't care what's going on around you). Just determine the map and have it click from location to location - based on the minimap, with occasional stops to chat or interact.
If you can't, you'll have to a little more work to determine where you are and where you want to go. Use pixel patterns to determine where you are and what direction your facing. Then have functions, loops, or other macros that will move you appropriately based on your location.
I use a macro in another game that you can type coordinates in the large map and it will move you to that location. The macro hits "m" for map, clicks in the space for "x" coordinate, types coordinate, clicks in space for "y" coordinate, types it, hits "enter", then closes map...pauses, interacts, then repeats to new location. Hopefully you have a clickable map or can type coordinates to make it easier for you.
|
|
|
|
Posted: Tue May 24, 2011 12:18 am |
|
|
|
|
|
Post subject: |
Is this possible? |
|
|
I've made a few decent macros for this game, but they're all very generic...the tank will drive randomly for a few seconds, game restarts, etc...but I want to make a BIGGER and BETTER one... There are approx 7 different maps. I'd like for the macro to look and see what map it is, the drive the tank is a designated route based on each map. I'm thinking it can be done like this: When each new game starts the screen looks like this: Attachment:
shot_006.jpg [ 93.2 KiB | Viewed 1540 times ]
The macro could check the "mini-map" in the bottom right corner and figure out which map it is (based on colors?): Attachment:
Untitled.jpg [ 29.51 KiB | Viewed 1540 times ]
The it could drive the tank. The one problem with this is the game randomly places you in different starting locations. So "driving straight for 12 secods then turning" might not work. so 1) would it be possible for the macro to differentiate the maps? and 2)Would there be a solution to random starting position problem?
I've made a few decent macros for this game, but they're all very generic...the tank will drive randomly for a few seconds, game restarts, etc...but I want to make a BIGGER and BETTER one...
There are approx 7 different maps. I'd like for the macro to look and see what map it is, the drive the tank is a designated route based on each map. I'm thinking it can be done like this:
When each new game starts the screen looks like this:
[attachment=1]shot_006.jpg[/attachment]
The macro could check the "mini-map" in the bottom right corner and figure out which map it is (based on colors?):
[attachment=0]Untitled.jpg[/attachment]
The it could drive the tank. The one problem with this is the game randomly places you in different starting locations. So "driving straight for 12 secods then turning" might not work.
so 1) would it be possible for the macro to differentiate the maps? and 2)Would there be a solution to random starting position problem?
|
|
|
|
Posted: Mon May 23, 2011 10:15 pm |
|
|
|
|