Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spells list #920

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 28 additions & 7 deletions CODIGO/Aplicacion/ProtocolCmdParse.bas
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@ Public Enum eNumber_Types
ent_Trigger
End Enum

Public Sub AuxWriteWhisper(ByVal UserName As String, ByVal Mensaje As String)
Public Sub AuxWriteWhisper(ByVal username As String, ByVal Mensaje As String)
'***************************************************
'Author: Unknown
'Last Modification: 03/12/2010
'03/12/2010: Enanoh - Ahora se envia el nick en vez del index del usuario.
'***************************************************
If LenB(UserName) = 0 Then Exit Sub
If LenB(username) = 0 Then Exit Sub


If (InStrB(UserName, "+") <> 0) Then
UserName = Replace$(UserName, "+", " ")
If (InStrB(username, "+") <> 0) Then
username = Replace$(username, "+", " ")
End If

UserName = UCase$(UserName)
username = UCase$(username)

Call WriteWhisper(UserName, Mensaje)
Call WriteWhisper(username, Mensaje)

End Sub

Expand Down Expand Up @@ -119,7 +119,28 @@ Public Sub ParseUserCommand(ByVal RawCommand As String)
If Left$(Comando, 1) = "/" Then
' Comando normal

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

Exit Sub
End If
End If

Select Case Comando
Case "/VER"
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"
If ImWatching Then
Call WriteWatchPlayer(False, "")
End If
Case "/ONLINE"
Call WriteOnline

Expand Down Expand Up @@ -1764,7 +1785,7 @@ Public Sub ParseUserCommand(ByVal RawCommand As String)

Case "/VERPROCESOS"
If notNullArguments Then
Call writeLookProcess(ArgumentosRaw)
Call WriteLookProcess(ArgumentosRaw)
Else
'Avisar que falta el parametro
Call ShowConsoleMsg(JsonLanguage.item("MENSAJE_FALTAN_PARAMETROS").item("TEXTO") & " /VERPROCESOS NICKNAME.")
Expand Down
30 changes: 20 additions & 10 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 @@ -230,7 +234,7 @@ End Type
'Info de cada mapa
Public Type mapInfo
Music As String
Name As String
name As String
Zona As String
StartPos As WorldPos
MapVersion As Integer
Expand Down Expand Up @@ -1086,7 +1090,7 @@ Sub ShowNextFrame(ByVal DisplayFormTop As Integer, _
Call DesvanecimientoTechos
Call DesvanecimientoMsg

If UserMoving Then
If UserMoving = 1 Then

'****** Move screen Left and Right if needed ******
If AddtoUserPos.X <> 0 Then
Expand All @@ -1095,7 +1099,7 @@ Sub ShowNextFrame(ByVal DisplayFormTop As Integer, _
If Abs(OffsetCounterX) >= Abs(TilePixelWidth * AddtoUserPos.X) Then
OffsetCounterX = 0
AddtoUserPos.X = 0
UserMoving = False
UserMoving = 0

End If

Expand All @@ -1108,7 +1112,7 @@ Sub ShowNextFrame(ByVal DisplayFormTop As Integer, _
If Abs(OffsetCounterY) >= Abs(TilePixelHeight * AddtoUserPos.Y) Then
OffsetCounterY = 0
AddtoUserPos.Y = 0
UserMoving = False
UserMoving = 0

End If

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 Expand Up @@ -1521,18 +1531,18 @@ Private Sub RenderSombras(ByVal CharIndex As Integer, ByVal PixelOffsetX As Inte

If (.iHead > 0) And (.iBody = 617 Or .iBody = 612 Or .iBody = 614 Or .iBody = 616) Then

'Si está montando se dibuja de esta manera
'Si está montando se dibuja de esta manera
Call Draw_Grh(.Body.Walk(.Heading), PixelOffsetX + 8, PixelOffsetY - 14, 1, Color_Shadow(), 0, False, 187, 1, 1.2) ' Shadow Body
Call Draw_Grh(.Head.Head(.Heading), PixelOffsetX + .Body.HeadOffset.X + 12, PixelOffsetY + .Body.HeadOffset.Y - 13, 1, Color_Shadow(), 0, False, 187, 1, 1.2) ' Shadow Head
Call Draw_Grh(.Casco.Head(.Heading), PixelOffsetX + .Body.HeadOffset.X + 15, PixelOffsetY + .Body.HeadOffset.Y - 49, 1, Color_Shadow(), 0, False, 195, 1, 1.2) ' Shadow Helmet

'Si está navegando se dibuja de esta manera
'Si está navegando se dibuja de esta manera
ElseIf ((.iHead = 0) And (HayAgua(.Pos.X, .Pos.Y + 1) Or HayAgua(.Pos.X + 1, .Pos.Y) Or HayAgua(.Pos.X, .Pos.Y - 1) Or HayAgua(.Pos.X - 1, .Pos.Y))) Then
Call Draw_Grh(.Body.Walk(.Heading), PixelOffsetX + 5, PixelOffsetY - 26, 1, Color_Shadow(), 0, False, 186, 1, 1.33) ' Shadow Body

Else

'Si NO está montando ni navegando se dibuja de esta manera
'Si NO está montando ni navegando se dibuja de esta manera
Call Draw_Grh(.Body.Walk(.Heading), PixelOffsetX + 8, PixelOffsetY - 11, 1, Color_Shadow(), 0, False, 195, 1, 1.2) ' Shadow Body
Call Draw_Grh(.Head.Head(.Heading), PixelOffsetX + .Body.HeadOffset.X + 12, PixelOffsetY + .Body.HeadOffset.Y - 10, 1, Color_Shadow(), 0, False, 195, 1, 1.2) ' Shadow Head
Call Draw_Grh(.Casco.Head(.Heading), PixelOffsetX + .Body.HeadOffset.X + 18, PixelOffsetY + .Body.HeadOffset.Y - 45, 1, Color_Shadow(), 0, False, 195, 1, 1.2) ' Shadow Helmet
Expand Down Expand Up @@ -1644,13 +1654,13 @@ Private Sub RenderReflejos(ByVal CharIndex As Integer, ByVal PixelOffsetX As Int

ElseIf .iBody = 604 Or .iBody = 617 Or .iBody = 612 Or .iBody = 614 Or .iBody = 616 Then 'Define Body Montado

'Si además de estar montado está mirando para arriba o abajo
'Si además de estar montado está mirando para arriba o abajo
If .Heading = E_Heading.SOUTH Or .Heading = E_Heading.NORTH Then
Call Draw_Grh(.Body.Walk(GetInverseHeading), PixelOffsetX, PixelOffsetY + 80, 1, ColorFinal(), 1, False, 360)
Call Draw_Grh(.Head.Head(GetInverseHeading), PixelOffsetX + .Body.HeadOffset.X, PixelOffsetY + 76, 1, ColorFinal(), 0, False, 360)
Call Draw_Grh(.Casco.Head(GetInverseHeading), PixelOffsetX + .Body.HeadOffset.X - 1, PixelOffsetY + .Body.HeadOffset.Y + 116, 1, ColorFinal(), 0, False, 360)

Else 'Si está mirando para izquierda o derecha entonces:
Else 'Si está mirando para izquierda o derecha entonces:
Call Draw_Grh(.Body.Walk(GetInverseHeading), PixelOffsetX, PixelOffsetY + 70, 1, ColorFinal(), 1, False, 360)
Call Draw_Grh(.Head.Head(GetInverseHeading), PixelOffsetX + .Body.HeadOffset.X, PixelOffsetY + 76, 1, ColorFinal(), 0, False, 360)
Call Draw_Grh(.Casco.Head(GetInverseHeading), PixelOffsetX + .Body.HeadOffset.X - 1, PixelOffsetY + .Body.HeadOffset.Y + 116, 1, ColorFinal(), 0, False, 360)
Expand All @@ -1659,7 +1669,7 @@ Private Sub RenderReflejos(ByVal CharIndex As Integer, ByVal PixelOffsetX As Int

Else

'Reflejo completo si no está ni montado ni navegando
'Reflejo completo si no está ni montado ni navegando
Call Draw_Grh(.Body.Walk(GetInverseHeading), PixelOffsetX, PixelOffsetY + 44, 1, ColorFinal(), 1, False, 360)
Call Draw_Grh(.Head.Head(GetInverseHeading), PixelOffsetX + .Body.HeadOffset.X, PixelOffsetY + 51, 1, ColorFinal(), 1, False, 360)
Call Draw_Grh(.Casco.Head(GetInverseHeading), PixelOffsetX + .Body.HeadOffset.X - 1, PixelOffsetY + .Body.HeadOffset.Y + 55, 1, ColorFinal(), 1, False, 360)
Expand Down
11 changes: 2 additions & 9 deletions CODIGO/Areas/mPooChar.bas
Original file line number Diff line number Diff line change
Expand Up @@ -172,22 +172,15 @@ Public Sub Char_UserPos()
'// Actualizamo el lbl de la posicion del usuario

Dim X As Byte

Dim Y As Byte

If Char_Check(UserCharIndex) Then
' Damos valor a las variables asi sacamos la pos del usuario.

'// Damos valor a las variables asi sacamos la pos del usuario.
Call Char_MapPosGet(UserCharIndex, X, Y)

bTecho = Char_Techo '// Pos : Techo :P

frmMain.Coord.Caption = "Map:" & UserMap & " X:" & X & " Y:" & Y

Call frmMain.ActualizarMiniMapa

Exit Sub

End If

End Sub
Expand Down
106 changes: 53 additions & 53 deletions CODIGO/Areas/mPooMap.bas
Original file line number Diff line number Diff line change
Expand Up @@ -99,69 +99,69 @@ Public Sub Map_SetBlocked(ByVal X As Byte, ByVal Y As Byte, ByVal block As Byte)
End Sub

Sub Map_MoveTo(ByVal Direccion As E_Heading)
'***************************************************
'Author: Alejandro Santos (AlejoLp)
'Last Modify Date: 06/28/2008
'Last Modified By: Lucas Tavolaro Ortiz (Tavo)
' 06/03/2006: AlejoLp - Elimine las funciones Move[NSWE] y las converti a esta
' 12/08/2007: Tavo - Si el usuario esta paralizado no se puede mover.
' 06/28/2008: NicoNZ - Saque lo que impedia que si el usuario estaba paralizado se ejecute el sub.
'***************************************************

Dim LegalOk As Boolean
Static lastmovement As Long

If Cartel Then Cartel = False
'***************************************************
'Author: Alejandro Santos (AlejoLp)
'Last Modify Date: 04/07/2022
'***************************************************

If ImWatching Then
Exit Sub
End If

Dim LegalOk As Boolean
Static lastmovement As Long

Select Case Direccion
If Cartel Then Cartel = False

Select Case Direccion

Case E_Heading.NORTH
LegalOk = Map_LegalPos(UserPos.X, UserPos.Y - 1)
Case E_Heading.NORTH
LegalOk = Map_LegalPos(UserPos.X, UserPos.Y - 1)

Case E_Heading.EAST
LegalOk = Map_LegalPos(UserPos.X + 1, UserPos.Y)
Case E_Heading.EAST
LegalOk = Map_LegalPos(UserPos.X + 1, UserPos.Y)

Case E_Heading.SOUTH
LegalOk = Map_LegalPos(UserPos.X, UserPos.Y + 1)
Case E_Heading.SOUTH
LegalOk = Map_LegalPos(UserPos.X, UserPos.Y + 1)

Case E_Heading.WEST
LegalOk = Map_LegalPos(UserPos.X - 1, UserPos.Y)
End Select
Case E_Heading.WEST
LegalOk = Map_LegalPos(UserPos.X - 1, UserPos.Y)

End Select

If LegalOk And Not UserParalizado And Not UserDescansar And Not UserMeditar Then
Call WriteWalk(Direccion)
Call frmMain.ActualizarMiniMapa 'integrado por ReyarB
If LegalOk And Not UserParalizado And Not UserDescansar And Not UserMeditar Then
Call WriteWalk(Direccion)
Call frmMain.ActualizarMiniMapa 'integrado por ReyarB

Call Char_MovebyHead(UserCharIndex, Direccion)
Call Char_MoveScreen(Direccion)

Else

If (charlist(UserCharIndex).Heading <> Direccion) Then
If MainTimer.Check(TimersIndex.ChangeHeading) Then
Call WriteChangeHeading(Direccion)
Call Char_SetHeading(UserCharIndex, Direccion)
End If
End If

End If
Call Char_MovebyHead(UserCharIndex, Direccion)
Call Char_MoveScreen(Direccion)

If frmMain.macrotrabajo.Enabled Then Call frmMain.DesactivarMacroTrabajo
If frmMain.trainingMacro.Enabled Then Call frmMain.DesactivarMacroHechizos

' Update 3D sounds!
Call Audio.MoveListener(UserPos.X, UserPos.Y)

' Esto es un parche por que por alguna razon si el pj esta meditando y nos movemos el juego explota por eso cambie
' Las validaciones en la linea 131 y agregue esto para arreglarlo (Recox)
If UserMeditar Then
UserMeditar = Not UserMeditar
Else

If (charlist(UserCharIndex).Heading <> Direccion) Then
If MainTimer.Check(TimersIndex.ChangeHeading) Then
Call WriteChangeHeading(Direccion)
Call Char_SetHeading(UserCharIndex, Direccion)
End If
End If

End If

If frmMain.macrotrabajo.Enabled Then Call frmMain.DesactivarMacroTrabajo
If frmMain.trainingMacro.Enabled Then Call frmMain.DesactivarMacroHechizos

If UserDescansar Then
UserDescansar = Not UserDescansar
End If
' Update 3D sounds!
Call Audio.MoveListener(UserPos.X, UserPos.Y)

' Esto es un parche por que por alguna razon si el pj esta meditando y nos movemos el juego explota por eso cambie
' Las validaciones en la linea 131 y agregue esto para arreglarlo (Recox)
If UserMeditar Then
UserMeditar = Not UserMeditar
End If

If UserDescansar Then
UserDescansar = Not UserDescansar
End If

End Sub

Expand Down
4 changes: 3 additions & 1 deletion CODIGO/Declares.bas
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Public IntervaloDopas As Long
Public IntervaloInvi As Long
Public TiempoInvi As Long
Public TiempoDopas As Long
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 @@ -710,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
Loading