Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Escrito por: Bid Magaveta
- ;Data da criação: 03/08/2018
- ;Data da ultima atualização: 03/08/2018
- #SingleInstance, Force
- SetWorkingDir %A_ScriptDir%
- CoordMode, Mouse, Screen
- SetMouseDelay, -1
- Weapons := 0
- Weapons_Used := 0
- Stop := 0
- Target_Window:=null
- Gui, 1:+AlwaysOnTop
- Gui, Color, White, Black
- ;FileInstall, Dummy.png, %A_ScriptDir%\Dummy.png, 0
- ;FileInstall, Weapon.png, %A_ScriptDir%\Weapon.png, 0
- Gui Add, GroupBox, x18 y8 w416 h129, Janela
- Gui Add, Button, x152 y24 w148 h23 gSet_Target_Window, Selecionar Janela
- Gui Add, Edit, cWhite x188 y82 w211 h21 Center vTarget_Window
- Gui Add, Text, x52 y80 w100 h23 +0x200, Janela Selecionada
- Gui Add, GroupBox, x18 y136 w416 h231, Seleção
- ;Gui Add, Picture, x52 y152 w131 h131, %A_ScriptDir%/Dummy.png
- Gui Add, Button, x52 y318 w131 h35 vSet_Click_Target gSet_Fixed_Location, Selecionar Dummy
- Gui Add, Edit, cWhite x52 y288 w131 h21 Center vTarget_Spot
- ;Gui Add, Picture, x268 y152 w131 h131, %A_ScriptDir%/Weapon.png
- Gui Add, Button, x268 y320 w131 h35 vSet_Click_Target2 gSet_Fixed_Location2, Selecionar Arma
- Gui Add, Edit, cWhite x268 y288 w131 h21 Center vTarget_Spot2
- Gui Add, GroupBox, x18 y367 w416 h140, Opções do treino
- Gui Add, Text, x32 y409 w75 h23 +0x200, Qtd. de armas
- Gui Add, Edit, cWhite x117 y412 w120 h21 Center vWeapons gSubmit_All,% Weapons
- Gui Add, Text, x32 y465 w75 h23 +0x200, Armas Usadas
- Gui Add, Edit, cWhite x117 y467 w120 h21 Center vWeapons_Used, % Weapons_Used
- Gui Add, GroupBox, x268 y388 w148 h100, Hotkey
- Gui Add, Hotkey, x299 y412 w85 h21 vHK Center
- Gui Add, CheckBox, x315 y452 w55 h23 vCB gSet_Checkbox, Ativar
- Gui, Show,, Dynamic Hotkeys
- Gui Add, GroupBox, x18 y508 w416 h61
- Gui Add, Button, x52 y529 w132 h23 gStart_Train, Iniciar
- Gui Add, Button, x265 y529 w134 h23 gStop_Train, Parar
- Gui Show, w453 h599, Skill Trainer
- Gui, Submit, NoHide
- GuiControl, Disable, Weapons_Used
- Return
- GuiClose:
- ExitApp
- ; Do not edit above this line
- GuiControl, Disable, Weapons_Used
- Submit_All:
- Gui, Submit, NoHide
- return
- ;Pause:
- ; Pause
- Set_Target_Window:
- isPressed:=0
- i:= 0
- Loop
- {
- Left_Mouse:=GetKeyState("LButton")
- WinGetTitle,Temp_Window,A
- ToolTip, Aperte 2x o botão esquerdo do mouse na janela: %Temp_Window%
- if(Left_Mouse==False&&isPressed==0)
- isPressed:=1
- else if(Left_Mouse==True&&isPressed==1)
- {
- i++
- isPressed:=0
- if(i>=2)
- {
- WinGetTitle,Target_Window,A
- ToolTip,
- break
- }
- }
- }
- GuiControl,1:,Target_Window,% Target_Window
- return
- Set_Fixed_Location:
- ;Stop:=1
- Get_Click_Pos(Fixed_X,Fixed_Y)
- GuiControl,1:, Target_Spot, X = %Fixed_X% Y = %Fixed_Y%
- return
- Set_Fixed_Location2:
- ;Stop:=1
- Get_Click_Pos2(Fixed_X2,Fixed_Y2)
- GuiControl,1:,Target_Spot2,X = %Fixed_X2% Y = %Fixed_Y2%
- return
- Set_Checkbox:
- Gui, Submit, NoHide
- If CB
- GuiControl, Disable, Target_Spot2
- else
- GuiControl, Enable, Target_Spot2
- return
- Start_Train:
- Stop:= 0
- WinActivate, %Target_Window%
- Gui, Submit, NoHide
- if(Target_Window==null)
- {
- MsgBox, 262192, Missing Info,Selecione a Janela do Tibia!
- return
- }
- if(Fixed_X!=null&&Fixed_Y!=null&&Fixed_X2!=null&&Fixed_Y2!=null&&CB=1)
- {
- Loop
- {
- if(Stop==1||Weapons_Used==Weapons)
- {
- MsgBox, Você terminou seu treino e usou %Weapons_Used% armas.
- break
- }
- WinActivate, %Target_Window%
- Send, {%HK%}
- MouseClick, Left, %Fixed_X%, %Fixed_Y%
- Weapons_Used++
- Sleep, 300
- Send, !{Esc}
- Sleep, 1010000
- GuiControl,1:, Weapons_Used, % Weapons_Used
- }
- }
- else if (Fixed_X!=null&&Fixed_Y!=null&&Fixed_X2!=null&&Fixed_Y2!=null&&CB=0)
- {
- Loop
- {
- if(Stop==1||Weapons_Used==Weapons)
- {
- MsgBox, Você terminou seu treino e usou %Weapons_Used% armas.
- break
- }
- WinActivate, %Target_Window%
- MouseClick, Right, %Fixed_X2%, %Fixed_Y2%
- Sleep, 500
- MouseClick, Left, %Fixed_X%, %Fixed_Y%
- Weapons_Used++
- Sleep, 300
- Send, !{Esc}
- Sleep, 1010000
- GuiControl,1:, Weapons_Used, % Weapons_Used
- ;Sleep, 1010000
- }
- }
- return
- Stop_Train:
- Weapons_Used:=0
- GuiControl,1:,Weapons_Used,% Weapons_Used
- Stop:=1
- return
- Get_Click_Pos(ByRef X,ByRef Y)
- {
- isPressed:=0
- i:=0
- Loop
- {
- Left_Mouse:=GetKeyState("Alt")
- MouseGetPos,X,Y,
- ToolTip,Aperte Alt no SQM do Dummy `n`nCurrent Location: `nX = %X%`nY = %Y%
- if(Left_Mouse==False&&isPressed==0)
- isPressed:=1
- else if(Left_Mouse==True&&isPressed==1)
- {
- MouseGetPos,X,Y,
- ToolTip,
- break
- }
- }
- }
- Get_Click_Pos2(ByRef X,ByRef Y)
- {
- isPressed:=0
- i:=0
- Loop
- {
- Left_Mouse:=GetKeyState("Alt")
- MouseGetPos,X,Y,
- ToolTip,Aperte Alt no SQM da Arma `n`nCurrent Location: `nX = %X%`nY = %Y%
- if(Left_Mouse==False&&isPressed==0)
- isPressed:=1
- else if(Left_Mouse==True&&isPressed==1)
- {
- MouseGetPos,X,Y,
- ToolTip,
- break
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement