Log in

View Full Version : Problem with reading mana value



gadery
11-15-2013, 01:39
I have found some function in source codes on this forum



Public Function ReadMaxMana(ByVal lngTibiaPID As Long) As Long
Dim tmpLong As Long
Dim valueXOR As Long
Dim result As Long
Dim MyMaxMana As Long

result = -1

If lngTibiaPID <> 0 Then
tmpLong = Memory_ReadLong(adrConnected, lngTibiaPID)
If tmpLong = 8 Then
MyMaxMana = Memory_ReadLong(adrMyMaxMana, lngTibiaPID)
If TibiaVersionLong >= 943 Then
valueXOR = Memory_ReadLong(adrXOR, lngTibiaPID)
MyMaxMana = valueXOR Xor MyMaxMana
result = MyMaxMana
End If
End If
End If

ReadMaxMana = result

End Function


What language is this? It's similar to python but I never used it and I'm not sure. I don't understand what does "XOR" made. I want write similar code to read mp and hp value in c++ and I don't know how to convert value from adrMyMaxMana etc.

In my memory in cell witch maxHp i have now 12906 and 9 in xorValue it should get me 395 Heat Points.

Blade
11-15-2013, 19:17
All of blackd proxy is coded in Visual Basic 6 with possible a little bit or VB.NET I know for the majority of it though its VB6