Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO XMAS] /info problems


erkro1
 Share

Recommended Posts

Hey,

Im trying to implent the /info command, but now I have a problem :
He says 0 by HP and SP, i know the problem is in Sub HandlePlayerInfoRequest, but i can't fix it.

My Sub HandlePlayerInfoRequest

>! ```
Sub HandlePlayerInfoRequest(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
    Dim Name As String
    Dim I As Long
    Dim n As Long
    Dim Buffer As clsBuffer
    Set Buffer = New clsBuffer
    Buffer.WriteBytes Data()
    Name = Buffer.ReadString 'Parse(1)
    Set Buffer = Nothing
    I = FindPlayer(Name)
>!     If I > 0 Then
        Call PlayerMsg(Index, "Account: " & Trim$(Player(I).Login) & ", Character: " & GetPlayerName(I), BrightGreen)
>!         If GetPlayerAccess(Index) > ADMIN_MONITOR Then
            Call PlayerMsg(Index, "-=- Stats for " & GetPlayerName(I) & " -=-", BrightGreen)
            Call PlayerMsg(Index, "Level: " & GetPlayerLevel(I) & "  Exp: " & GetPlayerExp(I) & "/" & GetPlayerNextLevel(I), BrightGreen)
            Call PlayerMsg(Index, "HP: " & GetPlayerVital(I, Vitals.HP) & "/" & GetPlayerMaxVital(I, Vitals.HP) & "  MP: " & GetPlayerVital(I, Vitals.MP) & "/" & GetPlayerMaxVital(I, Vitals.MP), BrightGreen)
            Call PlayerMsg(Index, "Strength: " & GetPlayerStat(I, Stats.Strength) & "  Endurance: " & GetPlayerStat(I, Stats.Endurance) & "  Intelligence: " & GetPlayerStat(I, Stats.Intelligence) & "  Agility: " & GetPlayerStat(I, Stats.Agility) & "  Willpower: " & GetPlayerStat(I, Stats.Willpower), BrightGreen)

            I = (GetPlayerStat(Index, Stats.Strength) \ 2) + (GetPlayerLevel(Index) \ 2)
            n = Int(Rnd * 100) + 1
>!             If n > 100 Then n = 100
            If I > 100 Then I = 100
            Call PlayerMsg(Index, "Critical Hit Chance: " & n & "%, Block Chance: " & I & "%", BrightGreen)
        End If
>!     Else
        Call PlayerMsg(Index, "Player is not online.", White)
    End If
End Sub
```

Thanks for your time.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...