It's a simple AutoIt bot without any advanced functions, but it can restore HP/MP and use as many attack skills as you set up in config file. Of course, you can set cooldown/cast time for each skill.
How to
- Check and edit config.au3
- Compile and run script in AutoIt
- As this bot is "pixel bot", you should play in windowed mode. Before running bot pause your game. Initial bot state is paused.
- Press "ESC" to quit bot.
It's really simple bot, so if you want, check and improve the source
Source
config.au3
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.6.1
Author: Public domain
Script Function:
Forsaken Worlds pixel based bot
#ce ----------------------------------------------------------------------------
;Only increase this number if you are experiencing ingame lag. Value in miliseconds
Global $lagDelay = 500
;This is the skill array declaration, CHANGE "2" for the number of attack skills you
;are going to type down here. In my case I only got two attack skills at level 5.
Global $skill[2][4]
;For each attack skill you want to set up, duplicate the last four lines incrementing
;the first dimension of the array in one. In our case, all $skill[1] will be $skill[2]
;in the duplicated text.
$skill[0][0] = 2 ;This is the hot key where the skill is located
$skill[0][1] = 1000 ;This is the casting time of the skill in miliseconds
$skill[0][2] = 4000 ;This is the cooldown of the skill in miliseconds
$skill[0][3] = 0 ;This should always be zero
$skill[1][0] = 3
$skill[1][1] = 1000
$skill[1][2] = 6000
$skill[1][3] = 0
;RESTORE STATS SKILLS
;do not edit the following line
Global $rs[2][4]
;This is the restore HP skill, in my case, located at spot 9 taking 1 second of casting
;time and 10 seconds cooldown. Edit to fit your needs.
$rs[0][0] = 9
$rs[0][1] = 1000
$rs[0][2] = 10000
$rs[0][3] = 0
;And this one is for restore MP skill, edit to fit your needs.
$rs[1][0] = 8
$rs[1][1] = 1000
$rs[1][2] = 300000 ;Yeah, its lvl 1 Pray
$rs[1][3] = 0
functions.au3
Func isMobSelected()
$var = Hex(PixelGetColor(253, 70), 6)
if $var == "D54C4C" Then return True
return False
EndFunc
Func isHPLow()
$var = Hex(PixelGetColor(120, 71), 6)
if $var == "B11837" Then return False
return True
EndFunc
Func isMPLow()
$var = Hex(PixelGetColor(120, 81), 6)
if $var == "0329A7" Then return False
return True
EndFunc
Func useStatSkill($i)
If TimerDiff($rs[$i][3]) > ($rs[$i][2] + (2 * $lagDelay)) Then
;ToolTip (TimerDiff($skill[$i][3]) & " > " & ($skill[$i][2] + (2 * $lagDelay)), 685, 806)
Send ($rs[$i][0])
$rs[$i][3] = TimerInit()
Sleep ($rs[$i][1] + $lagDelay)
EndIf
EndFunc
Func useSkill()
$totalSkills = UBound($skill)
For $i = 0 To ($totalSkills - 1)
If TimerDiff($skill[$i][3]) > ($skill[$i][2] + (2 * $lagDelay)) Then
;ToolTip (TimerDiff($skill[$i][3]) & " > " & ($skill[$i][2] + (2 * $lagDelay)), 685, 806)
Send ($skill[$i][0])
$skill[$i][3] = TimerInit()
Sleep ($skill[$i][1] + $lagDelay)
EndIf
Next
EndFunc
Func targetMob()
Send ("{TAB 2}")
Sleep (200 + $lagDelay)
EndFunc
Func rotateCameraAngle()
MouseMove(950, 500)
MouseDown("right")
MouseMove(890, 500, 30)
MouseUp("right")
Sleep(500)
EndFunc
hotkeys.au3
Global $exit
Global $paused
HotKeySet("{Esc}", "Terminate")
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{F7}", "ShowPixelColor")
;Function terminate on ESC key
Func Terminate()
$exit = True
EndFunc
;Function TogglePause on PAUSE key press
Func TogglePause()
$paused = NOT $paused
EndFunc
Func ShowPixelColor()
$var = Hex(PixelGetColor(120, 71), 6)
$var2 = Hex(PixelGetColor(120, 81), 6)
MsgBox(0, "hello", $var & ":" & $var2)
EndFunc
main.au3
#include "hotkeys.au3"
#include "config.au3"
#include "functions.au3"
$exit = False
$paused = True
;Main loop
Dim $targetMobCount = 0
While Not $exit
If NOT $paused Then
Sleep (100)
ToolTip('FW BOT RUNNING', 0, 0)
If isMobSelected() Then
$targetMobCount = 0
If isHPLow() Then useStatSkill(0)
If isMPLow() Then useStatSkill(1)
useSkill()
Else
;Do not continue until we have enuf MP
If isMPLow() Then
useStatSkill(1)
;get some MP
Else
If $targetMobCount > 1 Then
rotateCameraAngle()
$targetMobCount = 0
Else
$targetMobCount = $targetMobCount + 1
targetMob()
EndIf
EndIf
EndIf
Else
ToolTip("FW BOT PAUSED", 0, 0)
Sleep(100)
EndIf
WEnd
ToolTip('FW BOT TERMINATED', 0, 0)
Sleep (1500)
Exit
by mation
Please register or login to download attachments.