Sign in to follow this  
Followers 0
Harpydog

Bot problemsssss

4 posts in this topic

Hey guys well i have been working on this bot on and off for a few weeks now and i jstu cant get it... the potions work.. but well.. my targeting is where it messes up... It targets the bear right.. it sends my guy to attack.. but where it goes wrong.. is like it repetedly tpyes /target grizzly bear... any help is MUCH appreciated...

; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.0
; Author:        A.N.Other <myemail@nowhere.com>
;
; Script Function:
;   Template AutoIt script.
;
; ----------------------------------------------------------------------------

; Script Start - Add your code below here

;===========================
; INitializing...
HotKeySet("{ESC}", "CaptureESC")
$Primary = "Left"
Dim $Primary
$secondary = "Right"
Dim $secondary
;=============================
;   Misc Func's...
Func CaptureESC()
    Exit 0
EndFunc


;============================
;   Log In....
Run("C:\Program Files\Lineage II\system\l2.exe")
WinWaitActive("Lineage II")
sleep("10000")
MouseClick($primary, 481, 331)
Sleep("100")
Send("Scyfer")
Sleep("100")
MouseClick($primary, 490, 355)
Send("happy")
sleep("100")
MouseClick($primary, 461, 388)
sleep("250")
Mouseclick($primary, 505, 420)
Sleep("1000")
MouseClick($primary, 237, 493)
sleep("200")
MouseClick($primary, 512, 679)
sleep("15000")

;================================
;       Initializing set up
Mouseclick($secondary)
MouseWheel("up", 75)
;========================
;       checker
AdlibEnable("Checker")
While 1
    sleep("20")
WEnd

;======================

Func Checker()
    CheckHealth()
    CheckMana()
    TargetGriz()
    
EndFunc


;===============================
;       Health Checking...
Func CheckHealth()
$Color = Pixelgetcolor(130, 38)
    If $Color = 5379096 Then
        Send("{F8}")
        sleep("15000")
    EndIf
EndFunc

;==================================
;       Mana Check...
Func CheckMana()
$MColor = PixelGetcolor(58, 51)
$Combat = PixelGetColor(7, 100)
  
   If $MColor = 1057866  AND $combatt <> 3221788 Then
    Send("{F12}")
    sleep("10000")
    Send("{F12}")
    sleep("100")
   EndIf
EndFunc

;================================
;       Target



Func TargetGriz()
$targetloop = 0
If $targetloop = 0 Then
Do
  Send("{ENTER}")
  Send("/target Grizzly Bear")
  sleep("150")
  Send("{ENTER}")
  $CombatIn = PixelGetColor(7, 100)
Until $CombatIn = 3221788
    If $combatIn = 3221788 Then
        $Targetloop = 1
    Do
    Send("{f4}")
    sleep("4000")
    Send("{F4}")
    $Combatfinished = Pixelgetcolor(17, 100)
    Until $combatfinished = 6697224
    EndIf   
        If $combatfinished = 6697224 Then
        Send("{F5}")
        sleep("500")
        send("{F2}")
        sleep("500")
        send("{F2}")
        sleep("500")
        Send("{F2}")
        $targetloop = 0
        EndIf
EndIf
EndFunc

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

u check your color to make sure Until $CombatIn = 3221788 --> this # is correct? if it isn't then it will repeate

and check 6697224 becuase if that is always correct it would check healt, mana, and target, continualy...

Edited by lopolop

Share this post


Link to post
Share on other sites

Take the part of the code that sends the "/target grizzley bear" out of the Do/Until loop

then it won't repeat it

Share this post


Link to post
Share on other sites

But i want it to repeat.. well i want it to type it.. once the target box appears ($combatin) then to stop.. and send my char to attack.. then once $combatin does not equal the color.. to target a mob again

--Harpy

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0