Code-Gremlins.com

Infested
 
HomeCalendarGalleryFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 Darkfall Casting Bot (no memmory read)

Go down 
AuthorMessage
Larva
Admin
avatar

Posts : 24
Join date : 2010-06-17
Age : 32
Location : San Antonio, TX

PostSubject: Darkfall Casting Bot (no memmory read)   Thu Jun 17, 2010 5:56 pm

This is the source to the old Darkfall casting bot, it requires the associated .Ini to function correctly. It was built this way to allow non-programmers to for example, manipulate the Casting times, Casting Delay Times, add Spells to the total list. This is basicly v1, development stoped when I realized how much Darkfall Suxx.



Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GUIComboBox.au3>
#Include <Misc.au3>
#Include <Array.au3>
#include <TabConstants.au3>
#include <GUIConstants.au3>
#include <ProgressConstants.au3>


Opt("SendKeyDownDelay",60)
HotKeySet("{END}", "_Exit")

Global $Key_Melee, $Key_Staff, $Angle, $Key_Rest, $IniFile = ".\DF_Lighter.ini", $MyhWnd, $GUI1
Global $ManaBar[9], $Timers_Cast[6], $Spell_List[6], $Spell_Cast[9], $Spell_Rcy[9], $spellKeys[6], $Progress_Cycle[6], $aArmed[5], $Input_Cycle[6]

_Initialize_Ini()
_RenderGUI()
_Begin2()

Func _Re_Arm()
   Tooltip('Re ARMING')
   Send($Key_Staff)
   Sleep(2000)
   Send("r")


EndFunc

Func _Check_Armed()
   $output = 'Armed'

   ;_ArrayDisplay($aArmed)
   $search = PixelSearch($aArmed[2]-1,$aArmed[3]-1,$aArmed[2]+1,$aArmed[3]+1,$aArmed[1],$aArmed[4])
   If @ERROR Then $output = "UnArmed"

   return $output
EndFunc

Func _Begin2()

   $Progress_Cycle[1] = GUICtrlCreateProgress(15, 174, 80, 18,$PBS_SMOOTH)
   _GuiCtrlMakeTrans(-1, 170)
   GUICtrlSetData(-1, 100)
   $Progress_Cycle[2] = GUICtrlCreateProgress(15, 194, 80, 18,$PBS_SMOOTH)
   _GuiCtrlMakeTrans(-1, 170)
   GUICtrlSetData(-1, 100)
   $Progress_Cycle[3] = GUICtrlCreateProgress(15, 214, 80, 18,$PBS_SMOOTH)
   _GuiCtrlMakeTrans(-1, 170)
   GUICtrlSetData(-1, 100)
   $Progress_Cycle[4] = GUICtrlCreateProgress(15, 234, 80, 18,$PBS_SMOOTH)
   _GuiCtrlMakeTrans(-1, 170)
   GUICtrlSetData(-1, 100)
   $Progress_Cycle[5] = GUICtrlCreateProgress(15, 254, 80, 18,$PBS_SMOOTH)
   _GuiCtrlMakeTrans(-1, 170)
   GUICtrlSetData(-1, 100)
   GUISetState(@SW_SHOW)


   $ManaBar[1] = IniRead($IniFile, "Mana", "Low_Pixel", "UnSet")
   $ManaBar[2] = IniRead($IniFile, "Mana", "Low_X", "UnSet")
   $ManaBar[3] = IniRead($IniFile, "Mana", "Low_Y", "UnSet")
   $ManaBar[4] = IniRead($IniFile, "Mana", "Low_SV", "20")
   $ManaBar[5] = IniRead($IniFile, "Mana", "Full_Pixel", "UnSet")
   $ManaBar[6] = IniRead($IniFile, "Mana", "Full_X", "UnSet")
   $ManaBar[7] = IniRead($IniFile, "Mana", "Full_Y", "UnSet")
   $ManaBar[8] = IniRead($IniFile, "Mana", "Full_SV", "20")

   $aArmed[1] = IniRead($IniFile, "Armed", "Pixel", "UnSet")
   $aArmed[2] = IniRead($IniFile, "Armed", "X", "UnSet")
   $aArmed[3] = IniRead($IniFile, "Armed", "Y", "UnSet")
   $aArmed[4] = IniRead($IniFile, "Armed", "SV", "20")

   For $i = 1 to 5
      $Timers_Cast[$i] = 999999
   Next

   Sleep(1000)
   ;WinActivate("Darkfall Online")

   ;_MouseMove2(0,$Angle)
   ;Sleep(500)
   ;Send($Key_Melee)
   ;Sleep(1000)
   ;Send($Key_Staff)
   ;Sleep(500)

   While 1
      For $i = 1 to $Spell_List[0]

         $Armed = _Check_Armed()
         If $Armed = 'UnArmed' Then _Re_Arm()

         $mana = _GetMana()
         ToolTip($mana&@CRLF&$Armed)

         GUICtrlSetData($Progress_Cycle[$i], int(TimerDiff($Timers_Cast[$i])) / $Spell_Rcy[$i] *100)

         If $mana = "Mana LOW" Then ;Rest
            Sleep(1000)
            ToolTip("Sleeping")
            Send("r")
            Sleep(2000)
            Send($Key_Melee)
            Sleep(2000)
            Send($Key_Rest)
            Sleep(2000)
            MouseClick("Left")

            Sleep(4000)
            While 1
               Sleep(1000)
               $mana = _GetMana()
               ToolTip($mana)
               if $mana = "Mana HIGH" Then Exitloop
            Wend
            Send("s");{SPACE}")
            Sleep(2000)
            Send($Key_Staff)
            Sleep(2000)
            Send("r")
            Sleep(2000)

            _MouseMove2(0,$Angle)
            Sleep(500)
         Else
            If TimerDiff($Timers_Cast[$i]) > $Spell_Rcy[$i] Then ;Local $Recycle = 13200, $Cast = 4000

               GUICtrlSetBkColor($Input_Cycle[$i], 0x00ff00) ;Green
               #CS
               ;Send($spellKeys[$i])
               ;Sleep(1000)
               ;MouseClick("Left")
               ;Sleep($Spell_Cast[$i])
               $Timers_Cast[$i] = TimerInit()
               GUICtrlSetData($Progress_Cycle[$i], 1)
               #CE

               Send($spellKeys[$i])
               Sleep(500)
               MouseClick("Left")


               $begin = TimerInit()
               While TimerDiff($begin) < $Spell_Cast[$i]
                  GUICtrlSetData($Progress_Cycle[$i], StringReplace( int(int(TimerDiff($begin)) / $Spell_Cast[$i] *100)-100 , '-', '') ) ;<--- Trick this Mofo into going Backwards
                  ToolTip($mana&@CRLF&$Armed)
                  For $k = 1 to $Spell_List[0] ;<---- Keep calculating all progress's
                     If not ($k = $i) then
                        GUICtrlSetData($Progress_Cycle[$k], int(TimerDiff($Timers_Cast[$k])) / $Spell_Rcy[$k] *100)
                        If TimerDiff($Timers_Cast[$k]) > $Spell_Rcy[$k] Then GUICtrlSetBkColor($Input_Cycle[$k], 0x00ff00) ;Green
                     EndIf
                  next
                  Sleep(10) ;Easy on the ol CPU
               Wend
               Sleep(100)
               $Timers_Cast[$i] = TimerInit()
               ;GUICtrlSetData($Progress_Cycle[$i], 1)

               GUICtrlSetBkColor($Input_Cycle[$i], 0xff0000) ;RED
            EndIf
         EndIf
      Next
      sleep(10);Save the CPU
   Wend

EndFunc

Func _GetMana()
   $mana = "Mana OK"

   $search = PixelSearch($ManaBar[6]-1,$ManaBar[7]-1,$ManaBar[6]+1,$ManaBar[7]+1,$ManaBar[5],$ManaBar[8])
   If Not @ERROR Then $mana = "Mana HIGH"

   $search = PixelSearch($ManaBar[2]-1,$ManaBar[3]-1,$ManaBar[2]+1,$ManaBar[3]+1,$ManaBar[1],$ManaBar[4])
   If @ERROR Then $mana = "Mana LOW"

   return $mana
EndFunc

Func _SetMana()

   $MyhWnd = SplashTextOn ( "AU3MAG", "" , 100, 100 , @DesktopWidth , @DesktopHeight , 1 )
   GUISetState(@SW_HIDE,$GUI1)

   $dll = DllOpen("user32.dll")
   $ActionKey = "01" ;2D=InsertKey 01=LeftMouse
   Sleep (250)
   MsgBox(0,"DF_Lighter", "To set the Mana Bar, {after closeing this window} click at aproximatly the 10% then 98% marks on your mana bar"&@CRLF& _
            "Wait at least 1 second between clicks and make sure you click the BLUE partof the bar.")
   sleep(100)
   WinActivate("Darkfall Online")
   While 1
      $Cxy = MouseGetPos()
      $currentpixel = PixelGetColor($Cxy[0],$Cxy[1])
      _Magnify($Cxy)
         ;GUICtrlSetData($Input_ColorDisplay,$currentpixel)
         ;GUICtrlSetBkColor( $Input_ColorDisplay, $currentpixel)
      Sleep (10)

      If _IsPressed($ActionKey, $dll) Then
         $xy = MouseGetPos()
         IniWrite($IniFile, "Mana", "Low_Pixel", PixelGetColor($xy[0],$xy[1]))
         IniWrite($IniFile, "Mana", "Low_X", $xy[0])
         IniWrite($IniFile, "Mana", "Low_Y", $xy[1])
         ExitLoop
      EndIf
   Wend
   WinActivate("Darkfall Online")
   Sleep (500)
   While 1
      $Cxy = MouseGetPos()
      $currentpixel = PixelGetColor($Cxy[0],$Cxy[1])
      _Magnify($Cxy)
         ;GUICtrlSetData($Input_ColorDisplay,$currentpixel)
         ;GUICtrlSetBkColor( $Input_ColorDisplay, $currentpixel)
      Sleep (10)
      If _IsPressed($ActionKey, $dll) Then
         $xy = MouseGetPos()
         IniWrite($IniFile, "Mana", "Full_Pixel", PixelGetColor($xy[0],$xy[1]))
         IniWrite($IniFile, "Mana", "Full_X", $xy[0])
         IniWrite($IniFile, "Mana", "Full_Y", $xy[1])
         ExitLoop
      EndIf
   Wend
   MsgBox(0,"DF_Lighter", "Now set your Armed Status, {after closeing this window} click on the Green Circle While you are armed and unsheathed.")
   sleep(100)
   WinActivate("Darkfall Online")
   While 1
      $Cxy = MouseGetPos()
      $currentpixel = PixelGetColor($Cxy[0],$Cxy[1])
      _Magnify($Cxy)
         ;GUICtrlSetData($Input_ColorDisplay,$currentpixel)
         ;GUICtrlSetBkColor( $Input_ColorDisplay, $currentpixel)
      Sleep (10)

      If _IsPressed($ActionKey, $dll) Then
         $xy = MouseGetPos()
         IniWrite($IniFile, "Armed", "Pixel", PixelGetColor($xy[0],$xy[1]))
         IniWrite($IniFile, "Armed", "X", $xy[0])
         IniWrite($IniFile, "Armed", "Y", $xy[1])
         ExitLoop
      EndIf
   Wend
   DllClose($dll)
   SplashOff()
   GUISetState(@SW_SHOW,$GUI1)
   WinActivate("Darkfall Online")

EndFunc

Func _Initialize_Ini()
   $val18 = IniRead($IniFile, "Mana", "Low_Pixel", -1)
   If $val18 = -1 then
      IniWrite($IniFile, "Mana", "Low_Pixel", "UnSet")
      IniWrite($IniFile, "Mana", "Low_X", "UnSet")
      IniWrite($IniFile, "Mana", "Low_Y", "UnSet")
      IniWrite($IniFile, "Mana", "Low_SV", "20")
      IniWrite($IniFile, "Mana", "Full_Pixel", "UnSet")
      IniWrite($IniFile, "Mana", "Full_X", "UnSet")
      IniWrite($IniFile, "Mana", "Full_Y", "UnSet")
      IniWrite($IniFile, "Mana", "Full_SV", "20"&@CRLF)

      IniWrite($IniFile, "Armed", "Pixel", "UnSet")
      IniWrite($IniFile, "Armed", "X", "UnSet")
      IniWrite($IniFile, "Armed", "Y", "UnSet")
      IniWrite($IniFile, "Armed", "SV", "20"&@CRLF)

      IniWrite($IniFile, "Spells", "Total", "8")
      IniWrite($IniFile, "Spells", "1", "Launch")
      IniWrite($IniFile, "Spells", "2", "ManaMissle")
      IniWrite($IniFile, "Spells", "3", "HealSelf")
      IniWrite($IniFile, "Spells", "4", "HealOther")
      IniWrite($IniFile, "Spells", "5", "UnBerden")
      IniWrite($IniFile, "Spells", "6", "Adep")
      IniWrite($IniFile, "Spells", "7", "Impetus")
      IniWrite($IniFile, "Spells", "8", "ArrowShield"&@CRLF)

      IniWrite($IniFile, "Launch", "CastTime", "6000")
      IniWrite($IniFile, "Launch", "Recycle", "18000"&@CRLF)

      IniWrite($IniFile, "HealSelf", "CastTime", "3300")
      IniWrite($IniFile, "HealSelf", "Recycle", "29400"&@CRLF)

      IniWrite($IniFile, "ManaMissle", "CastTime", "2000")
      IniWrite($IniFile, "ManaMissle", "Recycle", "100"&@CRLF)

      IniWrite($IniFile, "HealOther", "CastTime", "1200")
      IniWrite($IniFile, "HealOther", "Recycle", "3000"&@CRLF)

      IniWrite($IniFile, "UnBerden", "CastTime", "1200")
      IniWrite($IniFile, "UnBerden", "Recycle", "18000"&@CRLF)

      IniWrite($IniFile, "Adep", "CastTime", "2000")
      IniWrite($IniFile, "Adep", "Recycle", "10500"&@CRLF)

      IniWrite($IniFile, "ArrowShield", "CastTime", "4000")
      IniWrite($IniFile, "ArrowShield", "Recycle", "10000"&@CRLF)

      IniWrite($IniFile, "Impetus", "CastTime", "4000")
      IniWrite($IniFile, "Impetus", "Recycle", "10500"&@CRLF)


   EndIf
EndFunc

Func _RenderGUI()


   $GUI1 = GUICreate("                DF_Lighter_V3", 155, 340, @DesktopWidth-450, 20, BitOR($WS_POPUP, $WS_BORDER))
   GuiCtrlSetState(-1,$GUI_DISABLE)
   GUIRegisterMsg($WM_NCHITTEST, "_WM_DragAndDropGUI")

   GUICtrlCreateLabel('v3.0',135,328)
   GUICtrlSetFont(-1,6,400)


   GUICtrlCreateTab(1,1,158, 340,$TCS_VERTICAL+$TCS_RIGHT+$TCS_FIXEDWIDTH+$TCS_BUTTONS )
   $tab_Mag = GUICtrlCreateTabItem("Magic")


   GUICtrlCreateLabel('"End" to Exit',3,1,110)
   GUICtrlSetFont(-1,6,400)

   GUICtrlCreateGroup("Keys",10,10,120,75,$BS_RIGHT )
   GUICtrlSetFont(-1,6,400)
   $Input1 = GUICtrlCreateInput("1", 100, 20, 21, 18)
   $Label1 = GUICtrlCreateLabel("Melee: ", 20, 20, 62, 17)
   GUICtrlSetFont(-1,10,800)
   ;$message = "This is the key combo that will be pushed {Default:Shift+0} to switch to"&@CRLF& _
   ;         " a hotbar that should have all slots filled with Staves. The hotbar it will switch "&@CRLF& _
   ;         "back to is Shift+1 this is the hotbar that will have your Spells and melee weapon. "
   $Input2 = GUICtrlCreateInput("2", 100, 40, 21, 18)
   ;GUICtrlSetTip(-1, $message)
   ;$Label2 = GUICtrlCreateLabel("Shift+ ", 72, 42, 62, 17)
   ;GUICtrlSetFont(-1,8,400)
   ;GUICtrlSetTip(-1, $message)
   $Label2 = GUICtrlCreateLabel("Staff: ", 20, 40, 62, 17)
   GUICtrlSetFont(-1,10,800)
   ;GUICtrlSetTip(-1, $message)
   $Input5 = GUICtrlCreateInput("5", 100, 60, 21, 18)
   $Label5 = GUICtrlCreateLabel("Rest:", 20, 60, 72, 17)
   GUICtrlSetFont(-1,10,800)

   GUICtrlCreateGroup("",10,85,120,60)

   $Input6 = GUICtrlCreateInput("0", 86, 100, 35, 18)
   GUICtrlSetTip(-1, "0 = No Change"&@CRLF&"600 = Strait down"&@CRLF&"-600 = Strait up")
   $Label6 = GUICtrlCreateLabel("Angle:", 20, 100, 52, 17)
   GUICtrlSetTip(-1, "0 = No Change"&@CRLF&"600 = Strait down"&@CRLF&"-600 = Strait up")

   $Button_mana = GUICtrlCreateButton("SET", 86, 120, 35, 18)
   GUICtrlSetTip(-1, "Set the mana Trigger points")
   $Label7 = GUICtrlCreateLabel("Monitor:", 20, 120, 52, 17)
   GUICtrlSetTip(-1, "Set the mana Trigger points")

   $Combo_Spell = GUICtrlCreateCombo(" <Select>", 17, 155, 80, 21)
   If FileExists($IniFile) Then
      $TotalSpells = IniRead($IniFile, "Spells", "Total", 0)
      If $TotalSpells > 0 Then
         For $i = 1 to $TotalSpells
            $tempRead = IniRead($IniFile, "Spells", $i, "")
            _GUICtrlComboBox_AddString($Combo_Spell, $tempRead)
         Next
      EndIf
   Else
      GUICtrlSetData($Combo_Spell," <Select>", "Ini Blank")
   EndIf
   $Button_Spell = GUICtrlCreateButton("+", 106, 155, 25, 18)


   ;$Input_Cycle = GUICtrlCreateInput("", 17, 185, 113, 71,$ES_MULTILINE)
   ;GUICtrlSetTip(-1, "Will add the ability to use more than 5 if that is needed.")

   GUICtrlCreateGroup("Keys",10,180,120,125,$BS_RIGHT )
   GUICtrlSetFont(-1,6,400)
   $Input_Cycle[1] = GUICtrlCreateInput("", 17, 195, 80, 18,$ES_CENTER)
   $Input_Cycle_1_Key = GUICtrlCreateInput("6", 105, 195, 21, 18)

   $Input_Cycle[2] = GUICtrlCreateInput("", 17, 215, 80, 18,$ES_CENTER)
   $Input_Cycle_2_Key = GUICtrlCreateInput("7", 105, 215, 21, 18)

   $Input_Cycle[3] = GUICtrlCreateInput("", 17, 235, 80, 18,$ES_CENTER)
   $Input_Cycle_3_Key = GUICtrlCreateInput("8", 105, 235, 21, 18)

   $Input_Cycle[4] = GUICtrlCreateInput("", 17, 255, 80, 18,$ES_CENTER)
   $Input_Cycle_4_Key = GUICtrlCreateInput("9", 105, 255, 21, 18)

   $Input_Cycle[5] = GUICtrlCreateInput("", 17, 275, 80, 18,$ES_CENTER)
   $Input_Cycle_5_Key = GUICtrlCreateInput("0", 105, 275, 21, 18)

   $Button1 = GUICtrlCreateButton("Begin", 35, 310, 75, 25, 0)

   $tab_Melee = GUICtrlCreateTabItem("Melee")
      GUICtrlCreateLabel('"End" to Exit',3,1,110)
      GUICtrlSetFont(-1,6,400)
      $Button2 = GUICtrlCreateButton("Begin", 35, 310, 75, 25, 0)
      GUICtrlSetState($Button2,$GUI_DISABLE)

   $tab_Waypoints = GUICtrlCreateTabItem("Waypoints")
      GUICtrlCreateLabel('"End" to Exit',3,1,110)
      GUICtrlSetFont(-1,6,400)
      $Button3 = GUICtrlCreateButton("Begin", 35, 310, 75, 25, 0)
      GUICtrlSetState($Button3,$GUI_DISABLE)

   GUISetState(@SW_SHOW)









   $Spell_List[0] = 0
   While 1
      $nMsg = GUIGetMsg()
      Switch $nMsg
         Case $GUI_EVENT_CLOSE
            _Exit()
         Case $Button1
            ExitLoop
         Case $Button_Spell
            ;Add to cycle list
            If GUICtrlRead($Combo_Spell) <> " <Select>" Then
               ;GUICtrlSetData($Input_Cycle,GUICtrlRead($Input_Cycle)&GUICtrlRead($Combo_Spell)&@CRLF)
               If GUICtrlRead($Input_Cycle[1]) = "" Then
                  GUICtrlSetData($Input_Cycle[1],GUICtrlRead($Combo_Spell))
                  $Spell_List[0] = $Spell_List[0]+1
                  $Spell_List[1] = GUICtrlRead($Input_Cycle[1])
               ElseIf GUICtrlRead($Input_Cycle[2]) = "" Then
                  GUICtrlSetData($Input_Cycle[2],GUICtrlRead($Combo_Spell))
                  $Spell_List[0] = $Spell_List[0]+1
                  $Spell_List[2] = GUICtrlRead($Input_Cycle[2])
               ElseIf GUICtrlRead($Input_Cycle[3]) = "" Then
                  GUICtrlSetData($Input_Cycle[3],GUICtrlRead($Combo_Spell))
                  $Spell_List[0] = $Spell_List[0]+1
                  $Spell_List[3] = GUICtrlRead($Input_Cycle[3])
               ElseIf GUICtrlRead($Input_Cycle[4]) = "" Then
                  GUICtrlSetData($Input_Cycle[4],GUICtrlRead($Combo_Spell))
                  $Spell_List[0] = $Spell_List[0]+1
                  $Spell_List[4] = GUICtrlRead($Input_Cycle[4])
               ElseIf GUICtrlRead($Input_Cycle[5]) = "" Then
                  GUICtrlSetData($Input_Cycle[5],GUICtrlRead($Combo_Spell))
                  $Spell_List[0] = $Spell_List[0]+1
                  $Spell_List[5] = GUICtrlRead($Input_Cycle[5])
               EndIf
            EndIf
         Case $Button_mana
            _SetMana()
      EndSwitch
      Sleep(10)
   WEnd

   $Key_Melee = GUICtrlRead($Input1)
   $Key_Staff = GUICtrlRead($Input2)
   $Key_Rest = GUICtrlRead($Input5)
   $Angle = GUICtrlRead($Input6)

   $spellKeys[1] = GUICtrlRead($Input_Cycle_1_Key)
   $spellKeys[2] = GUICtrlRead($Input_Cycle_2_Key)
   $spellKeys[3] = GUICtrlRead($Input_Cycle_3_Key)
   $spellKeys[4] = GUICtrlRead($Input_Cycle_4_Key)
   $spellKeys[5] = GUICtrlRead($Input_Cycle_5_Key)

   Redim $Spell_Cast[$Spell_List[0]+1], $Spell_Rcy[$Spell_List[0]+1]

   For $i = 1 to $Spell_List[0]
      $Spell_Cast[$i] = IniRead($IniFile, $Spell_List[$i], "CastTime", "UnSet")
      $Spell_Rcy[$i] = IniRead($IniFile, $Spell_List[$i], "Recycle", "UnSet")
   Next

   ;_ArrayDisplay($Spell_List)
   ;_ArrayDisplay($Spell_Cast)
   ;_ArrayDisplay($Spell_Rcy)
   ;Exit

EndFUnc

Func _MouseMove2($X,$Y)

   Local Const $MOUSEEVENTF_MOVE = 0x01
   DllCall ("user32.dll", "int", "mouse_event", "int", $MOUSEEVENTF_MOVE, "int", $X, "int", $Y, "int", 0, "int", 0)

EndFunc

Func _WM_DragAndDropGUI($hWnd, $Msg, $wParam, $lParam)
    Local $iProc

    $iProc = DllCall("user32.dll", "int", "DefWindowProc", "hwnd", $hWnd, "int", $Msg, "wparam", $wParam, "lparam", $lParam)
    $iProc = $iProc[0]

    If $iProc = $HTCLIENT Then Return $HTCAPTION

    Return $GUI_RUNDEFMSG
EndFunc

Func _Magnify($Cxy)
     $size = WinGetPos($GUI1)

   Opt("PixelCoordMode", 1)
   Opt("MouseCoordMode", 1)

   Local $x_pixel = 74 ;width of display area (Magnify)
   Local $y_pixel = 74

  $MyHDC = DLLCall("user32.dll","int","GetDC","hwnd",$MyhWnd)
  If @error Then Return
  $DeskHDC = DLLCall("user32.dll","int","GetDC","hwnd",0)
  If Not @error Then
     $xy = MouseGetPos()
      If Not @error Then
        $l = $xy[0]-20/2
        $t = $xy[1]-20/2
        DLLCall("gdi32.dll","int","StretchBlt","int",$MyHDC[0],"int", _
                  0,"int",0,"int",$x_pixel,"int",$y_pixel,"int",$DeskHDC[0],"int", _
                  $l,"int",$t,"int",20,"int",20,"long",0x00CC0020)
        $x_winpos=$xy[0] + 40
        $y_winpos=$xy[1] + 40
        If ($x_winpos+$x_pixel)>@DesktopWidth Then $x_winpos=@DesktopWidth-$x_pixel-40
        If ($y_winpos+$y_pixel)>@DesktopHeight Then $y_winpos=$xy[1]-$y_pixel-40
        WinMove($myhwnd,"",$size[0] +18,$size[1] +185,$x_pixel,$y_pixel)
         ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Crosshair in Magnify window  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
         DLLCall ("gdi32.dll", "int", "TextOut", "int", $MyHDC[0], "int", 33, "int", 33, "string", "+", "int", StringLen(4))
         ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Crosshair in Magnify window  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
         Opt("PixelCoordMode", 0)
         Opt("MouseCoordMode", 0)
         ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Mouse Location X & Y Display >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
            $str = " " & $Cxy[0] & ", " & $Cxy[1] & " "
            $str = StringFormat("%." & StringLen($str)+1 & "s",$str)
         DLLCall ("gdi32.dll", "int", "SetBkMode", "int", $MyHDC[0], "int", 3)
            DLLCall ("gdi32.dll", "int", "TextOut", "int", $MyHDC[0], "int", 1, "int", 58, "string", $str, "int", StringLen($str))
         ;DLLCall ("gdi32.dll", "int", "SetBkMode", "int", $MyHDC[0], "int", 3)
            ;DLLCall ("gdi32.dll", "int", "TextOut", "int", $MyHDC[0], "int", 1, "int", 58, "string", $str, "int", StringLen($str))
         ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Mouse Location X & Y Display >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
       WinSetOnTop ($myhwnd, "", 1)
      EndIf
      DLLCall("user32.dll","int","ReleaseDC","int",$DeskHDC[0],"hwnd",0)
  EndIf
  DLLCall("user32.dll","int","ReleaseDC","int",$MyHDC[0],"hwnd",$MyhWnd)

EndFunc

Func _GuiCtrlMakeTrans($iCtrlID,$iTrans=255)

    Local $pHwnd, $nHwnd, $aPos, $a

    $hWnd = GUICtrlGetHandle($iCtrlID);Get the control handle
    If $hWnd = 0 then Return SetError(1,1,0)
    $pHwnd = DllCall("User32.dll", "hwnd", "GetParent", "hwnd", $hWnd);Get the parent Gui Handle
    If $pHwnd[0] = 0 then Return SetError(1,2,0)
    $aPos = ControlGetPos($pHwnd[0],"",$hWnd);Get the current pos of the control
    If @error then Return SetError(1,3,0)
    $nHwnd = GUICreate("", $aPos[2], $aPos[3], $aPos[0], $aPos[1], 0x80000000, 0x00080000 + 0x00000040, $pHwnd[0]);greate a gui in the position of the control
    If $nHwnd = 0 then Return SetError(1,4,0)
    $a = DllCall("User32.dll", "hwnd", "SetParent", "hwnd", $hWnd, "hwnd", $nHwnd);change the parent of the control to the new gui
    If $a[0] = 0 then Return SetError(1,5,0)
    If NOT ControlMove($nHwnd,'',$hWnd,0,0) then Return SetError(1,6,-1);Move the control to 0,0 of the newly created child gui
    GUISetState(@SW_Show,$nHwnd);show the new child gui
    WinSetTrans($nHwnd,"",$iTrans);set the transparency
    If @error then Return SetError(1,7,0)
    GUISwitch($pHwnd[0]);switch back to the parent Gui

    Return $nHwnd;Return the handle for the new Child gui

EndFunc

Func _Exit()
   Exit
EndFunc






DF_Lighter.ini

[Mana]
Low_Pixel=UnSet
Low_X=UnSet
Low_Y=UnSet
Low_SV=20
Full_Pixel=UnSet
Full_X=UnSet
Full_Y=UnSet
Full_SV=20

[Armed]
Pixel=UnSet
X=UnSet
Y=UnSet
SV=20

[Spells]
Total=8
1=Launch
2=ManaMissle
3=HealSelf
4=HealOther
5=UnBerden
6=Adep
7=Impetus
8=ArrowShield

[Launch]
CastTime=6000
Recycle=18000

[HealSelf]
CastTime=3300
Recycle=29400

[ManaMissle]
CastTime=2000
Recycle=100

[HealOther]
CastTime=1200
Recycle=3000

[UnBerden]
CastTime=1200
Recycle=18000

[Adep]
CastTime=2000
Recycle=10500

[ArrowShield]
CastTime=4000
Recycle=10000

[Impetus]
CastTime=4000
Recycle=10500
Back to top Go down
View user profile http://www.code-gremlins.com
 
Darkfall Casting Bot (no memmory read)
Back to top 
Page 1 of 1
 Similar topics
-
» How to read mails in inbox using Selenium IDE?
» Validating data displayed in a read-only textfield
» Read the Value from the console in selenium using java-junit4
» how to select text from a disabled field?
» image edit request please read

Permissions in this forum:You cannot reply to topics in this forum
Code-Gremlins.com :: Dont get them WET! :: AutoIt3-
Jump to: