taultunleashed logoSWG Macros - Updated AutoIt Forage Macro, with Combat : Star Wars Galaxies Bots | Hacks tu winter contest 2012 nintendo wii
newtopic  postreply
 [ 53 posts ]  1, 2, 3, 4  Next
blue large dot

SWG Macros - Updated AutoIt Forage Macro, with Combat : Star Wars Galaxies Bots | Hacks

Posted: April 4th, 2008, 12:54 pm
 
shinobiss
shinobiss's Reps:
User avatar
This is a modification to a modification for the Auto Forager V6, created by collin8579, and includes modifications made by swg_xploiter, posted in the same thread. This script has made me over 100m in a few short hours, and for that I am eternally grateful.

A few short footnotes:

This script works on the "PixelGetColor" function. It grabs the pixel color of the specific coordinates on the Portrait (the one that shows your class icon, and level), and then in intervals, compares the pixel vs the snapshot. Naturally, if they do not match, you're in combat, and the script attempts to halt further treasuremap searching, and begins a combat routine.

Setup

First, set up a Kill macro - the macro I use below fires off the first three slots in my Toolbar window; two attacks and a heal.

Code:
/ui action toolbarSlot00;
/pause 1;
/ui action toolbarSlot01;
/pause 1;
/ui action toolbarSlot02;
/pause 1;


Second, go into your Options window, under Keymap, and select "Custom" - scroll down till you see your macro, and assign a key to it (I use , ) - while you're here, go ahead and turn off Confirm Item Delete.

Third, because each character class 'icon' is different, you will need to take a screenshot of the game window "shift-Print Screen", open Paint, and Ctrl-V. You should now see a screenshot of your character screen. Zoom into the Character portrait, and select a pixel that's either white, or grey. Note the coordinates in the bottom-right of the Paint window - you'll need to put this in the script, and will continue to work until you change your windows around.

Finally, run the script, as normal, and select the slot and bag for dumping treasure maps into!

While you're running around, the easiest method to make sure you're not targeting innocent NPCs is to angle your camera all the way down, so that you're looking at your character's baldspot. This will help prevent you from targeting mobs that aren't attacking you. Note that this wont help if you get attacked while you're knee deep in a nest, but it will prevent you from trying to target and attack mobs that are out of your Field of Vew.


Onto the script!

Code:
Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
Opt("MouseClickDragDelay", 100)
#Include <Misc>

;StarWarsGalaxies Forager Version 2 with Auto Delete
Sleep("5000")
;Created a /forage macro and mapped it to N
$i = 0
$var1 = "5"; How many times you want to forage Left/Right before going forward

SplashTextOn ( "Setup", "Leftclick on the Main Spot (where foraged item will be)", 400, 100, -1, -1, 1, "Ariel", 14 )
   While 1
      Sleep ( 100 )
      If _IsPressed ( "01" ) Then
         $pos = MouseGetPos()
      ExitLoop
      EndIf
   WEnd

   SplashOff()
   $var3 = $pos[0]
   $var4 = $pos[1]
   Sleep (1000)

SplashTextOn ( "Setup", "Leftclick on the Backpack", 400, 100, -1, -1, 1, "Ariel", 14 )
   While 1
      Sleep ( 100 )
      If _IsPressed ( "01" ) Then
         $pos = MouseGetPos()
      ExitLoop
      EndIf
   WEnd

   SplashOff()
   $var5 = $pos[0]
   $var6 = $pos[1]
   Sleep (1000)

   ;Sets our coords for PixelChecksum to use as a template - also sets us up to check it in the future
   $portraitx = 600
   $portraity = 694
 
   $CombatCheck = PixelGetColor(($portraitx), ($portraity))

   ;Start our loop
   Do

      For $x = 1 to $var1
      CheckCombatState()
         Send("{a down}")
         Sleep ("1300")
      Send("{a up}") ;
      Sleep("500")
         Send("{n down}")
         Send("{n up}")
      Sleep("100")
      MouseClick ( "right" , $var3, $var4, 1 )
      Sleep("200")
      send("{2}")
      Sleep("200")
      MouseClickDrag ( "left" , $var3, $var4, $var5, $var6, 1)
      Sleep ("1200")
      Next
      send("{d down}")
      Send("{w down}")   
      Sleep ("1200")
      Send("{w up}")
      Send("{d up}")
         Sleep ("50")
      For $x = 1 to $var1
      CheckCombatState()
       Send("{d down}")
        Sleep ("1300")
      Send("{d up}")
      Sleep("500")
        Send("{n down}")
      Send("{n up}")
      Sleep("100")
      MouseClick ( "right" , $var3, $var4, 1 )
      Sleep("200")
      send("{2}")
      Sleep("200")
      MouseClickDrag ( "left" , $var3, $var4, $var5, $var6, 1)
      Sleep ("1200")
      Next
      Send("{a down}")
      Send("{w down}")   
      Sleep ("1200")
      Send("{w up}")
      Send("{a up}")
      Sleep ("50")

Until $i = 1

;Pause Script
Func CheckCombatState()
   If PixelGetColor(($portraitx), ($portraity)) = $CombatCheck Then
   return
   Else
   Do
   ;Combat Routine
      send("{TAB}") ;Change this to your hotkey to cycle target outward
      send("~") ;Change this to your hotkey to Autoattack
      send(",") ;Change this to your Kill macro
      Sleep ("1000") ;Change this accordingly to make sure your abilities cycle
   Until PixelGetColor(($portraitx), ($portraity)) = $CombatCheck
    EndIf
    return
EndFunc

;Pause Script
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script Paused',0,0)
WEnd
ToolTip("")
EndFunc

;Terminate Script
Func Terminate()
Exit 0
EndFunc   


Last edited by Guest on May 1st, 2008, 8:05 am, edited 4 times in total.

Reply with quote
Posted: April 4th, 2008, 3:58 pm
 
shinobiss
shinobiss's Reps:
User avatar
I'm still hacking away at this. I've found that PixelChecksum doesnt work well, because the Portrait area is semi-transparent, and "bleeds through" - every time you move, it'll flag you as in combat.

I've switched to PixelGetColor, and successfully had a transition between foraging and combat, however I'm not able to do a 5x5 move per the previous script. I'm trying to find a way to do that, as well as doing periodic checks for combat.


Reply with quote
Posted: April 4th, 2008, 4:04 pm
 
shinobiss
shinobiss's Reps:
User avatar
Woot! Progress! See the first post~

Issues at this time:

The ElseIf is erroring out, and I'm not quite sure why - but, the script will handle the same 5x5 pattern, check combat each cycle, and react accordingly.

Edit: Script is working, rudimentarily - I'm still finishing the rough edges, but it should work out fine. I'll go into more detail once I'm satisfied.


Reply with quote
Posted: April 5th, 2008, 2:56 pm
 
Tault_admin

Total Posts: 30153
Joined: November 9th, 2002, 9:57 am
Tault_admin's Reps: 1440
User avatar
administrator
Mod in Training
Can members say yay or nay to this being moved to a confirmed section.


Reply with quote
Posted: April 9th, 2008, 7:11 am
 
wafflesmcduff

Total Posts: 12
Joined: June 28th, 2007, 2:51 pm
wafflesmcduff's Reps: 0
User avatar
I don't want to respond either way. It's clearly not finished so he needs to be able to edit it. But its not working yet.

3 nays would lock the post and keep him from finishing his work
3 yays would be premature.

I vote to postpone the vote.


Reply with quote
Posted: April 10th, 2008, 5:23 pm
 
shinobiss
shinobiss's Reps:
User avatar
Alright - the script is working, and it's doing exactly what I need it to do - I'm cleaning it up, and doing a writeup, and should have this up shortly.


Reply with quote
Posted: April 11th, 2008, 8:17 am
 
wafflesmcduff

Total Posts: 12
Joined: June 28th, 2007, 2:51 pm
wafflesmcduff's Reps: 0
User avatar
That's great news :)


Reply with quote
Posted: April 12th, 2008, 10:53 pm
 
extract0rs

Total Posts: 139
Joined: August 4th, 2007, 7:20 pm
extract0rs's Reps: 1
User avatar
Active User > 50 Posts
premium
Another way to handle the combat is to forage with a beast master. Set your pet to defensive mode, and he should be able to handle anything that attacks.


Reply with quote
Posted: April 14th, 2008, 3:32 pm
 
Tault_admin

Total Posts: 30153
Joined: November 9th, 2002, 9:57 am
Tault_admin's Reps: 1440
User avatar
administrator
Mod in Training
Can we get some yays now :)


Reply with quote
Posted: April 15th, 2008, 1:21 am
 
cuervogold

Total Posts: 1086
Location: 127.0.0.1
Joined: September 25th, 2007, 3:39 pm
cuervogold's Reps: 727
User avatar
Active User > 50 Posts
premium
I think we should wait until he post again. He said he was going to do a write up on the set up and such.

I'd also suggest that he add a getmousepos for this part:

Quote:
;Sets our coords for PixelChecksum to use as a template - also sets us up to check it in the future
$portraitx = 612
$portraity = 730


It wouldn't be that difficult to add.


Reply with quote
Posted: April 15th, 2008, 5:41 pm
 
shinobiss
shinobiss's Reps:
User avatar
Alright - I know I suck at doing writeups, but I've updated the tested and working script I'm currently using to Treasuremap hunt.

Please post if you have any questions or improvements!


Reply with quote
Posted: April 17th, 2008, 12:07 am
 
cuervogold

Total Posts: 1086
Location: 127.0.0.1
Joined: September 25th, 2007, 3:39 pm
cuervogold's Reps: 727
User avatar
Active User > 50 Posts
premium
shinobiss wrote:
Alright - I know I suck at doing writeups, but I've updated the tested and working script I'm currently using to Treasuremap hunt.

Please post if you have any questions or improvements!


What are you refering to when you say "Character portrait" can you add a screen shot of this location and why not do a get mousepos for that var?

SplashTextOn ( "Setup", "Leftclick on the Character portrait combat pixel)", 400, 100, -1, -1, 1, "Ariel", 14 )
While 1
Sleep ( 100 )
If _IsPressed ( "01" ) Then
$pos = MouseGetPos()
ExitLoop
EndIf
WEnd

SplashOff()
$portraitx = $pos[0]
$portraity = $pos[1]
Sleep (1000)


Reply with quote
Posted: April 17th, 2008, 5:37 am
 
shinobiss
shinobiss's Reps:
User avatar
cuervogold wrote:
shinobiss wrote:
Alright - I know I suck at doing writeups, but I've updated the tested and working script I'm currently using to Treasuremap hunt.

Please post if you have any questions or improvements!


What are you refering to when you say "Character portrait" can you add a screen shot of this location and why not do a get mousepos for that var?

SplashTextOn ( "Setup", "Leftclick on the Character portrait combat pixel)", 400, 100, -1, -1, 1, "Ariel", 14 )
While 1
Sleep ( 100 )
If _IsPressed ( "01" ) Then
$pos = MouseGetPos()
ExitLoop
EndIf
WEnd

SplashOff()
$portraitx = $pos[0]
$portraity = $pos[1]
Sleep (1000)


I believe that in SWG of old, it's called a HAM - I'll post a screenshot when I get a moment =)

Unfortunately, at least for me as a BH, I cannot click with any accuracy on the white/grey area of the class icon. Coupled with the fact that I dont move my UI around at all, it makes it very much simpler to hard-code the coordinates in.


Reply with quote
Posted: April 19th, 2008, 3:13 am
 
cuervogold

Total Posts: 1086
Location: 127.0.0.1
Joined: September 25th, 2007, 3:39 pm
cuervogold's Reps: 727
User avatar
Active User > 50 Posts
premium
I posted a screen shot of where I think you are refering to on the pixel check for combat.

There is also an issue with the forums stripping out the .au3 extension from the Misc inlcude statement.

it should read Misc.au3

So, you might want to attach the script as a txt file as well.

BTW: I must agree with you. When doing a pixel check MousePos is not the way to go. I tried it servral times and always got a different pixel. Using paint to zoom in and find the exact pixel seems the best way. A little more testing and I can see a lot of yays coming your way on this one.

/tiphat and a big fat YAY!


You do not have the required permissions to view the files attached to this post.


Reply with quote
Posted: April 19th, 2008, 9:45 am
 
penjoroo
penjoroo's Reps:
User avatar
Why do you not use the PixelSearch option instead? Here is how it could work.

Have NPC names turned on with very large text.

Set the camera out as far as you can go looking straight down.

Do a PixelSearch on the visible area around the player for RED, get as much of the screen as you can open so you can search a bigger area.

If the PixelSearch finds RED start combat and loop until RED is out of the area for at least 5 seconds, since when in combat NPC colors change from RED to Yellow.

After combat is over restart the walking/foraging


Reply with quote
Want Advertisements After The Last Post Removed? Create A Free Account!

blue large dot Who is online
Users browsing this forum: No registered users and 6 guests

Popular Sections
SWTOR Cheats
Guild Wars 2 Cheats
Guild Wars 2 Hacks
Guild Wars 2 Bots
Diablo 3 Cheats
Guild Wars 2 Mods

Popular Sections
WoW Cataclysm Cheats & Exploits
WoW Cataclysm Hacks & Bots
Star Wars The Old Republic Cheats
SWTOR Mods
Torchlight 2 Cheats
SWTOR Space Mission Bots
Site Nav and RSS
RSS Feed of Star Wars Galaxies Bots | Hacks RSS Feed 
Sitemap of Star Wars Galaxies Bots | Hacks Sitemap 
SitemapIndex SitemapIndex
RSS Feed RSS Feed
Channel list Channel list
left bottom corner Site and Contents Copyright 2001-2012 All Rights Reserved TaultUnleashed.com bottom corner
top left
top right
createaccount
Username:   Password:   Remember Me?