Jump to content

Complete newb at scripting...


Recommended Posts

Guest ToastFu
Posted

Hello everyone of AutoIt! I am a complete newbie at compiling and running scripts and I just want to know how to do it!

I have a script of my very own that my brother configured for me. It is for an online game bot. Here is the script...

-----------------------------------------------------------------------------------------------

// WoW Melee Bot Beta 1

// This version will use ranged attack to pull mobs

// it will then look for the corpse if it is not

// in the first most likely area

SETActiveWindow World of Warcraft

delay 5 sec

//RESOLUTION: 1280x1024

// remap this script using object mapper if you need this

// to run in 1024x768 resolution

Constants

StateTarget = 1

StateKill = 2

StateLoot = 3

StateMoveForward = 4

CurrentState = 1 // defaulted to 1 so the first action is to try target a mob

Handled = 0

Skinner = 1 //change this to 0 if you are not a skinner, 1 if you are

MobBarRed = 1 // MobHP used for temporary storage of color info

MobBarGrn = 1 // MobHP used for temporary storage of color info

MobBarBlu = 1 // MobHP used for temporary storage of color info

LootBarRed = 1 //Loot window red (near X)

//Mob COLORS//

//MobAliveRed = 0

End //of constants

Processmessages // make sure we get debug info in test log tab

While 1=1

TimeStamp Debug: Resolving state - current state = $CurrentState

Set $Handled = 0

//Handle state Target

//Eventually we will want to add a State of Skinning but for time sake I am leaving it as is.

If $CurrentState = $StateTarget

Call Target1

Inc Handled

End

If $Handled = 0 And $CurrentState = $StateKill

Call Kill

Inc Handled

End

If $Handled = 0 And $CurrentState = $StateLoot

Call Loot1

End

If $Handled = 0 And $CurrentState = $StateMoveForward

Call MoveForward

Set $CurrentState = $StateTarget

End

End

/////////////////////////////////////////////////

/////////////////////////////////////////////////

Procedure Target1

//SETActiveWindow World of Warcraft

Set $MobBarRed = 1 // grab value of red in pixel to see if we have a mob hitpoint bar

Keys {TAB} //Timestamp Debug: This is the start of Target

Delay 500

Call IsMob

If $MobBarRed = 0 //Timestamp Debug: We have a mob!

Set $CurrentState = $StateKill

Else

Set $CurrentState = $StateMoveForward

End // End if statement

End // End Procedure Target1

Procedure IsMob

LoadRGB 310, 60 // grab red, green and blue color value from this pixel

Set $MobBarRed = {RGBRED} // grab value of red in pixel to see if we have a mob hitpoint bar

End

Procedure Kill

iCount = 1

While $iCount = 1

//Timestamp Debug: We have a mob, here we go!

Keys 1 // Fires ranged attack in hotkey 1

Delay 3000 // delay 3 seconds

Call MoveBack // Moves character backwards incase of misalignment with foe

Keys 2 // Fires special attack in hotkey 2

Delay 2500

Keys 2 // Fires special attack in hotkey 2 again

Delay 2500

Keys 3 // Fires finishing attack in hotkey 3

Delay 2500

Keys 3 // Fires finishing attack in hotkey 3 again

Delay 2000

Delay 500

Set $MobBarRed = 1 // MobHP used for temporary storage of color info

Delay 1500

Call IsMob

//TimeStamp Debug: Mobs bar color is $MobHP

If $MobBarRed > 0 // If Mob HP Bar no longer exists then loot

Set $iCount = 0 // Set Count to end the While

Set $CurrentState = $StateLoot

End // End If

End // End While

//Call Loot1 // loot section starts

End // End Procedure Kill

Procedure Loot1

//First corpse select

MousePos 450, 625 // move mouse over first spot for a corpse

RightClick // loot corpse

Delay 1000

LoadRGB 210, 148 // grab red, green and blue color value from this pixel

Set $LootBarRed = {RGBRED} // grab value of red in pixel to see if we have a mob hitpoint bar

//TimeStamp Debug: Mobs bar color is $MobHP

If $LootBarRed = 134

MousePos 50, 245 // move to and click first loot spot (top)

LeftClick

Delay 1000

MousePos 50, 290 // move to and click second loot spot (one down from top)

LeftClick

Delay 1000

MousePos 210, 155 // click on the X of loot window to close it

LeftClick // if nothing was on corpse

Delay 1000

Call Skin1

Else

Set LootBarRed = 1

Call Loot2

End // End If

End // End Procedure Loot1

Procedure Loot2

//Second corpse select

MousePos 605, 625 // move mouse over most likely spot for a corpse

RightClick // loot corpse

Delay 1000

LoadRGB 210, 148 // grab red, green and blue color value from this pixel

Set $LootBarRed = {RGBRED} // grab value of red in pixel to see if we have a mob loot bar

//TimeStamp Debug: Mobs bar color is $MobHP

If $LootBarRed = 134

MousePos 50, 245 // move to and click first loot spot (top)

LeftClick

Delay 1000

MousePos 50, 290 // move to and click second loot spot (one down from top)

LeftClick

Delay 1000

MousePos 210, 155 // click on the X of loot window to close it

LeftClick // if nothing was on corpse

Delay 1000

Call Skin2

Else

Set LootBarRed = 1

Call Loot3

End // End If

End // End Procedure Loot2

Procedure Loot3

//Second corpse select

MousePos 750, 625 // move mouse over most likely spot for a corpse

RightClick // loot corpse

Delay 1000

LoadRGB 210, 148 // grab red, green and blue color value from this pixel

Set $LootBarRed = {RGBRED} // grab value of red in pixel to see if we have a mob loot bar

If $LootBarRed = 134

MousePos 50, 245 // move to and click first loot spot (top)

LeftClick

Delay 1000

MousePos 50, 290 // move to and click second loot spot (one down from top)

LeftClick

Delay 1000

MousePos 210, 155 // click on the X of loot window to close it

LeftClick // if nothing was on corpse

Delay 1000

Call Skin3

Else

Set LootBarRed = 1

End // End If

End // End Procedure Loot3

Procedure Skin1

If $Skinner = 1

MousePos 450, 625 // move back to corpse area and right click to skin

RightClick

Delay 5000

MousePos 50, 245 // click on anything that was skinned, put into bag

LeftClick

Delay 1000

End

End

Procedure Skin2

If $Skinner = 1

MousePos 605, 625 // move back to corpse area and right click to skin

RightClick

Delay 5000

MousePos 50, 245 // click on anything that was skinned, put into bag

LeftClick

Delay 1000

End

End

Procedure Skin3

If $Skinner = 1

MousePos 750, 625 // move back to corpse area and right click to skin

RightClick

Delay 5000

MousePos 50, 245 // click on anything that was skinned, put into bag

LeftClick

Delay 1000

End // End If

End // End Procedure Skin3

Procedure MoveForward

KeyDown W 2 sec

End

Procedure MoveBack

KeyDown S 1 sec

End

Procedure StopOnSwitchedWindow On WindowChange

// without a Stop in this procedure, you will continue running after tabbing back to ACTool

Stop

End

-----------------------------------------------------------------------------------------------

It did come with a demo bot, but it only goes up to 10 kills. I need to know how to compile this so I can use it.

Your help is much appreciated!

Guest ToastFu
Posted

I don't know =X

I am a complete newb at this lol

Is there anyway I can translate it to AutoIt?

Posted

you would have to re write it, this doesn't match up to v2 or v3

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Posted

i got that feeling at first to but then i looked closer and it didn't look like it. maybe the // comments just make it seem like that

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Posted

Did you even write this?

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
Guest Ecca Ecca Ecca Ecca Ecca Ecca
Posted

Did you even write this?

<{POST_SNAPBACK}>

I think his brother made it for him :lmao:

I have a script of my very own that my brother configured for me. It is for an online game bot. Here is the script...

Posted

maybe his brother could help us?

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...