Skip to content

Commit

Permalink
WatchMouse
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanhecl committed Aug 9, 2022
1 parent 2ca60d8 commit ad2ecb9
Show file tree
Hide file tree
Showing 14 changed files with 240 additions and 69 deletions.
20 changes: 12 additions & 8 deletions CODIGO/Aplicacion/ProtocolCmdParse.bas
Original file line number Diff line number Diff line change
Expand Up @@ -119,24 +119,28 @@ Public Sub ParseUserCommand(ByVal RawCommand As String)
If Left$(Comando, 1) = "/" Then
' Comando normal

If Viewing Then
If ImWatching Then
If Comando = "/VER" Then
Call WriteViewPlayer(False, "")
Call WriteWatchPlayer(False, "")

Exit Sub
End If
End If

Select Case Comando
Case "/VER"
If notNullArguments Then
Call WriteViewPlayer(True, ArgumentosRaw)
Else
'Avisar que falta el parametro
Call ShowConsoleMsg(JsonLanguage.item("MENSAJE_FALTAN_PARAMETROS").item("TEXTO") & " /VER NICKNAME.")
If Not WatchingMe Then
If notNullArguments Then
Call WriteWatchPlayer(True, ArgumentosRaw)
Else
'Avisar que falta el parametro
Call ShowConsoleMsg(JsonLanguage.item("MENSAJE_FALTAN_PARAMETROS").item("TEXTO") & " /VER NICKNAME.")
End If
End If
Case "/NOVER"
Call WriteViewPlayer(False, "")
If ImWatching Then
Call WriteWatchPlayer(False, "")
End If
Case "/ONLINE"
Call WriteOnline

Expand Down
10 changes: 10 additions & 0 deletions CODIGO/Areas/TileEngine.bas
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ Public Const YMinMapSize As Byte = 1

Private Const GrhFogata As Long = 1521

Private Const TIME_MS_MOUSE As Byte = 10
Private MouseLastUpdate As Long
Private MouseTimeAcumulated As Long

''
'Sets a Grh animation to loop indefinitely.
Private Const INFINITE_LOOPS As Integer = -1
Expand Down Expand Up @@ -1150,6 +1154,12 @@ Sub ShowNextFrame(ByVal DisplayFormTop As Integer, _

' Calculamos los FPS y los mostramos
Call Engine_Update_FPS

MouseTimeAcumulated = MouseTimeAcumulated + timerElapsedTime
If MouseLastUpdate + TIME_MS_MOUSE <= MouseTimeAcumulated Then
Call SendPositionMouse
MouseLastUpdate = MouseTimeAcumulated
End If

'Get timing info
timerElapsedTime = GetElapsedTime()
Expand Down
2 changes: 1 addition & 1 deletion CODIGO/Areas/mPooMap.bas
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Sub Map_MoveTo(ByVal Direccion As E_Heading)
'Last Modify Date: 04/07/2022
'***************************************************

If Viewing Then
If ImWatching Then
Exit Sub
End If

Expand Down
5 changes: 3 additions & 2 deletions CODIGO/Declares.bas
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ Public IntervaloDopas As Long
Public IntervaloInvi As Long
Public TiempoInvi As Long
Public TiempoDopas As Long
Public Viewing As Boolean
Public ImWatching As Boolean
Public WatchingMe As Boolean

Public Const MAX_AMIGOS As Byte = 50
Public Const MAX_CHARACTERS As Byte = 10
Expand Down Expand Up @@ -711,7 +712,7 @@ Public cPJ() As PjCuenta

Public NPCInventory(1 To MAX_NPC_INVENTORY_SLOTS) As NpCinV
Public UserMeditar As Boolean
Public UserName As String
Public username As String
Public AccountName As String
Public AccountPassword As String
Public AccountHash As String
Expand Down
103 changes: 62 additions & 41 deletions CODIGO/Formularios/frmMain.frm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Object = "{48E59290-9880-11CF-9754-00AA00C00908}#1.0#0"; "MSINET.ocx"
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "richtx32.ocx"
Object = "{48E59290-9880-11CF-9754-00AA00C00908}#1.0#0"; "msinet.ocx"
Begin VB.Form frmMain
Appearance = 0 'Flat
BackColor = &H80000005&
Expand Down Expand Up @@ -37,6 +37,18 @@ Begin VB.Form frmMain
ScaleWidth = 1022
StartUpPosition = 2 'CenterScreen
Visible = 0 'False
Begin VB.PictureBox cWatchingMouse
BackColor = &H000000FF&
BorderStyle = 0 'None
Height = 255
Left = 11040
ScaleHeight = 255
ScaleWidth = 255
TabIndex = 49
Top = 2640
Visible = 0 'False
Width = 255
End
Begin AOLibre.uAOProgress uAOProgressDownloadFfmpeg
Height = 255
Left = 2160
Expand Down Expand Up @@ -296,36 +308,6 @@ Begin VB.Form frmMain
Visible = 0 'False
Width = 2685
End
Begin VB.PictureBox MainViewPic
BackColor = &H00000000&
BorderStyle = 0 'None
Height = 9120
Left = 180
MousePointer = 99 'Custom
ScaleHeight = 608
ScaleMode = 3 'Pixel
ScaleWidth = 736
TabIndex = 30
Top = 2325
Width = 11040
Begin InetCtlsObjects.Inet InetDownloadFfmpeg
Left = 120
Top = 1560
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
End
Begin VB.Timer tmrCounters
Left = 5760
Top = 840
End
Begin VB.Timer trainingMacro
Enabled = 0 'False
Interval = 3200
Left = 10200
Top = 600
End
End
Begin AOLibre.uAOButton btnMapa
Height = 255
Left = 11880
Expand Down Expand Up @@ -664,7 +646,6 @@ Begin VB.Form frmMain
_ExtentY = 2937
_Version = 393217
BackColor = 0
Enabled = -1 'True
ReadOnly = -1 'True
ScrollBars = 2
DisableNoScroll = -1 'True
Expand Down Expand Up @@ -731,6 +712,36 @@ Begin VB.Form frmMain
Strikethrough = 0 'False
EndProperty
End
Begin VB.PictureBox MainViewPic
BackColor = &H00000000&
BorderStyle = 0 'None
Height = 9120
Left = 180
MousePointer = 99 'Custom
ScaleHeight = 608
ScaleMode = 3 'Pixel
ScaleWidth = 736
TabIndex = 30
Top = 2280
Width = 11040
Begin InetCtlsObjects.Inet InetDownloadFfmpeg
Left = 120
Top = 1560
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
End
Begin VB.Timer tmrCounters
Left = 5760
Top = 840
End
Begin VB.Timer trainingMacro
Enabled = 0 'False
Interval = 3200
Left = 10200
Top = 600
End
End
Begin VB.Label lblPorcLvl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Expand Down Expand Up @@ -1319,6 +1330,14 @@ Private Sub DownloadFfmpeg()
End If
End Sub

Private Sub Form_GotFocus()
If Not IsOnFocus Then IsOnFocus = True
End Sub

Private Sub Form_LostFocus()
If IsOnFocus Then IsOnFocus = False
End Sub

Private Sub InetDownloadFfmpeg_StateChanged(ByVal State As Integer)
Dim Percentage As Long
Select Case State
Expand Down Expand Up @@ -2710,7 +2729,7 @@ Private Sub btnInventario_Click()
Call Audio.PlayWave(SND_CLICK)

' Activo controles de inventario
picInv.Visible = True
PicInv.Visible = True

' Desactivo controles de hechizo
hlst.Visible = False
Expand Down Expand Up @@ -2738,7 +2757,7 @@ Private Sub btnHechizos_Click()
cmdMoverHechi(1).Visible = True

' Desactivo controles de inventario
picInv.Visible = False
PicInv.Visible = False

End Sub

Expand Down Expand Up @@ -2803,8 +2822,8 @@ Private Sub RecTxt_Change()
(Not frmCantidad.Visible) And _
(Not MirandoParty) Then

If picInv.Visible Then
picInv.SetFocus
If PicInv.Visible Then
PicInv.SetFocus
ElseIf hlst.Visible Then
hlst.SetFocus
End If
Expand All @@ -2818,8 +2837,8 @@ End Sub

Private Sub RecTxt_KeyDown(KeyCode As Integer, Shift As Integer)

If picInv.Visible Then
picInv.SetFocus
If PicInv.Visible Then
PicInv.SetFocus
Else
hlst.SetFocus
End If
Expand Down Expand Up @@ -2900,8 +2919,8 @@ Public Sub SendCMSTXT_SendText()
Typing = False
End If

If picInv.Visible Then
picInv.SetFocus
If PicInv.Visible Then
PicInv.SetFocus
Else
hlst.SetFocus
End If
Expand Down Expand Up @@ -3288,3 +3307,5 @@ End Sub
Private Sub btnRetos_Click()
Call FrmRetos.Show(vbModeless, frmMain)
End Sub


5 changes: 5 additions & 0 deletions CODIGO/Formularios/frmPanelAccount.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
L�nea 237: la propiedad pice de uAOSalir ten�a una referencia a archivo no v�lida.
L�nea 238: la propiedad picf de uAOSalir ten�a una referencia a archivo no v�lida.
L�nea 239: la propiedad pich de uAOSalir ten�a una referencia a archivo no v�lida.
L�nea 240: la propiedad picv de uAOSalir ten�a una referencia a archivo no v�lida.
L�nea 241: la propiedad font de uAOSalir ten�a una referencia a archivo no v�lida.
6 changes: 4 additions & 2 deletions CODIGO/General.bas
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ Sub SetConnected()
'Vaciamos la cola de movimiento
keysMovementPressedQueue.Clear

frmMain.lblName.Caption = UserName
frmMain.lblName.Caption = username

'Load main form
frmMain.Visible = True
Expand All @@ -254,7 +254,9 @@ Sub SetConnected()
Call frmMain.ControlSM(eSMType.sSafemode, False)
frmMain.SendTxt.Visible = False
Typing = False
Viewing = False

ImWatching = False
WatchingMe = False

FPSFLAG = True

Expand Down
Loading

0 comments on commit ad2ecb9

Please sign in to comment.