Alguem poderia me dizer onde eu consigo alterar o hp inicial das classes, e o hp obtido por level.
+ 1 rep para quem puder me ajudar.
+ 1 rep para quem puder me ajudar.
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 15 + 100
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 5 + 25
' ################################
' ## Basic Calculations ##
' ################################
Function GetPlayerMaxVital(ByVal index As Long, ByVal Vital As Vitals) As Long
If index > MAX_PLAYERS Then Exit Function
Select Case Vital
Case HP
'GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 30 + 10
Select Case GetPlayerClass(index)
Case 1 ' corpo a corpo
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 15 + 100
Case 2 ' longa distancia
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 15 + 55
Case 3 ' elemnetal
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 10 + 50
Case Else ' Anything else - Warrior by default
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 15 + 100
End Select
Case MP
'GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 30 + 10
Select Case GetPlayerClass(index)
Case 1 ' corpo a corpo
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 5 + 25
Case 2 ' longa distancia
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 30 + 30
Case 3 ' elemental
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 30 + 60
Case Else ' Anything else - Warrior by default
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 5 + 25
End Select
End Select
End Function
Obrigado Amigo + 1 pra vocêGallighanMaker escreveu:Server Side em ModCombat,
Function GetPlayerMaxVital:
- Código:
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 15 + 100
Essa é a formula que eu utilizo para o gurreiro (exemplo) voce pode modificar ao seu gosto.
Ou seja, no meu caso conforme o level do jogador a formula irá aumentar os valores de HP e conforme a resistencia (endurance) que o jogador destribuir.
Por exemplo para o MP:
- Código:
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 5 + 25
Função completa com exemplo de 3 classes:
- Código:
' ################################
' ## Basic Calculations ##
' ################################
Function GetPlayerMaxVital(ByVal index As Long, ByVal Vital As Vitals) As Long
If index > MAX_PLAYERS Then Exit Function
Select Case Vital
Case HP
'GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 30 + 10
Select Case GetPlayerClass(index)
Case 1 ' corpo a corpo
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 15 + 100
Case 2 ' longa distancia
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 15 + 55
Case 3 ' elemnetal
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 10 + 50
Case Else ' Anything else - Warrior by default
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 15 + 100
End Select
Case MP
'GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 30 + 10
Select Case GetPlayerClass(index)
Case 1 ' corpo a corpo
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 5 + 25
Case 2 ' longa distancia
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 30 + 30
Case 3 ' elemental
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 30 + 60
Case Else ' Anything else - Warrior by default
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 5 + 25
End Select
End Select
End Function
Lembrando que eu uso uma engine derivada da crystalshire.
With GuiWindow(GUI_MENU)
.Width = largura da image, Exemplo 200
.Heigth = Altura da image, exemplo 40
.X = Posicao X do botao (Largura)
.Y = posicao Y do botao (Altura)
End with
With button(numero do botao)
.Width = largura da image, Exemplo 32
.Heigth = Altura da image, exemplo 32
.X = Posicao X do botao (Largura)
.Y = posicao Y do botao (Altura)
End with