[T4C] Question sur les adresse en mémoires

Ici vous pouvez parler de tous et de rien (ayant un rapport de près ou de loin avec les jeux vidéos, matos, softwares, hardwares...), donner votre avis sur les derniers jeux etc…

Moderators: Shub, Administrateurs - Adjoint, Modérateur, Administrateur, Global Moderator

Post Reply
User avatar
Kian
Caporal
Caporal
Posts: 20
Joined: 14 Oct 2002 - 02:55:39
Location: Québec

[T4C] Question sur les adresse en mémoires

Post by Kian »

Voilà... pourquoi l'adresse : 890E60 8 BYTES n'affiche jamais la bonne donné, elle est supposé donner lexp restante avant le prochain niveau.

Merci d'avance :D
User avatar
Kian
Caporal
Caporal
Posts: 20
Joined: 14 Oct 2002 - 02:55:39
Location: Québec

[T4C] Question sur les adresse en mémoires

Post by Kian »

Quelqu'un peut prendre le temps de tester 5 secondes ? :)


EDIT : Précision... c'est en vb ;)
Last edited by Kian on 12 Feb 2003 - 20:39:45, edited 1 time in total.
User avatar
Iceberg GM
Soldat
Posts: 3
Joined: 09 Dec 2002 - 17:15:16

[T4C] Question sur les adresse en mémoires

Post by Iceberg GM »

Arf ca doit etre impossible...

Pourquoi pas modifier son lvl a partir de t4c ?

OUI JE VAIS TESTER CA

A voir ;)

[EDIT : Impossible car si l'on a plusieurs persos et bien a mon avis ca se passe au niveau du serveur !]
Last edited by Iceberg GM on 13 Feb 2003 - 11:28:59, edited 1 time in total.
Chaos
Lieutenant Colonel
Lieutenant Colonel
Posts: 1110
Joined: 04 Oct 2002 - 10:34:53
Location: grenoble

[T4C] Question sur les adresse en mémoires

Post by Chaos »

Parce qu'on peux pas modifié les memoires vu que tt se passe niveau serveur et non client
User avatar
Un Type
Caporal Chef
Caporal Chef
Posts: 37
Joined: 27 Jan 2003 - 18:34:09

[T4C] Question sur les adresse en mémoires

Post by Un Type »

Iceberg, il a jamais demandé a modifier son lvl ...
Relis son post ...
Du reste, chez moi il semble me retourner la donnée puisque avec un perso lvl 1, il me retourne 1000.
Last edited by Un Type on 13 Feb 2003 - 13:40:49, edited 1 time in total.
User avatar
FreddyP
1er Class
1er Class
Posts: 8
Joined: 14 Oct 2002 - 09:45:07
Contact:

[T4C] Question sur les adresse en mémoires

Post by FreddyP »

Voilà... pourquoi l'adresse : 890E60 8 BYTES n'affiche jamais la bonne donné, elle est supposé donner lexp restante avant le prochain niveau.

Merci d'avance :D
890E60 te retourne le nb total d'xp pour le lvl suivant
aucune donnée memoire te retourne la quantité d'xp a faire pour next lvl, c un calcul:

......890E60...............-..890E58
Nb XP Total Next LVL - Nb XP Total = Nb XP Restant
User avatar
Kian
Caporal
Caporal
Posts: 20
Joined: 14 Oct 2002 - 02:55:39
Location: Québec

[T4C] Question sur les adresse en mémoires

Post by Kian »

Merci beaucoup Freddy, je vais essayer sa :D
User avatar
Simplet
Lieutenant
Lieutenant
Posts: 426
Joined: 14 Oct 2002 - 17:32:59
Location: Saint-Hubert de Riviere-Du-Loup (Québec)
Contact:

[T4C] Question sur les adresse en mémoires

Post by Simplet »

les trucs que vous parlez , faut que sa soit un plug-in TPP pour reussir a avoir ces info la ou c'est pas obligé? je voudrais me faire un hook qui une fois activé demande une info du lvl de l'utilisateur de renvoi une info en delphi et j'aimerais savoir si c'est possible et comment je fait ;) (et ptete aussi envoyer un message en voix bleu mais sa on m'a dit que sa prend absolument TPP :()
(Good Charlotte) No discrimination , I hate you all.
User avatar
FreddyP
1er Class
1er Class
Posts: 8
Joined: 14 Oct 2002 - 09:45:07
Contact:

[T4C] Question sur les adresse en mémoires

Post by FreddyP »

les trucs que vous parlez , faut que sa soit un plug-in TPP pour reussir a avoir ces info la ou c'est pas obligé? je voudrais me faire un hook qui une fois activé demande une info du lvl de l'utilisateur de renvoi une info en delphi et j'aimerais savoir si c'est possible et comment je fait ;) (et ptete aussi envoyer un message en voix bleu mais sa on m'a dit que sa prend absolument TPP :()
pour lire une info en memoire, pas besoin de tpp, juste les bonnes apis windows , ca suffira ;)
par contre les messages bleus (message systeme serveur) , la oui il faut tpp pour simuler un packet serveur au client
User avatar
Un Type
Caporal Chef
Caporal Chef
Posts: 37
Joined: 27 Jan 2003 - 18:34:09

[T4C] Question sur les adresse en mémoires

Post by Un Type »

J'ai une vieille idée a mettre en application, qui me trotte dans la tete depuis un moment.
Utiliser l'api Windows Winsocks pour creer un plug in qui renvoit les pack dans une application VB ou Delphi externe, voir meme hebergé sur un Ordi distant, ca permettrait de dévelloper une nouvelle forme d'outils plus adapté a des débutants.
Last edited by Un Type on 16 Feb 2003 - 05:09:11, edited 1 time in total.
User avatar
Kian
Caporal
Caporal
Posts: 20
Joined: 14 Oct 2002 - 02:55:39
Location: Québec

[T4C] Question sur les adresse en mémoires

Post by Kian »

Bon j'ai un léger problème... disons que j'ai des milliard dexp de fait et il me sort 138 ou qqc comme sa... j'utilise le code suivant... mais je crois que sa à rapport au 8 bytes de 890E58 8 BYTES Quantite d'experience total actuel (XP TOTAL). Si qqn pourrait m'expliquer mon erreure j'apprécierais :)

Voilà le code :
Private Const PROCESS_ALL_ACCESS = &H1F0FFF
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Long
Private Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal Key As Long) As Integer
Private Declare Function ReadProcessMem Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByRef lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Sub Command1_Click()
Dim value As Byte
Dim value2 As Byte
Dim value3 As Byte
'890E60 8 BYTES Quantite de point d'experience pour atteindre le prochain LV (next Level at …)
Call ReadAByte("The 4th Coming", &H890E60, value)
'890E58 8 BYTES Quantite d'experience total actuel (XP TOTAL)
Call ReadAByte("The 4th Coming", &H890E58, value2)
value3 = value - value2
MsgBox value2
End Sub
Private Function WriteAByte(gamewindowtext As String, address As Long, value As Byte)
Dim hwnd As Long
Dim pid As Long
Dim phandle As Long
hwnd = FindWindow(vbNullString, gamewindowtext)
If (hwnd = 0) Then
MsgBox "Lancez le jeu d'abord", vbCritical, "Error"
Exit Function
End If
GetWindowThreadProcessId hwnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Impossible d'obtenir le ProcessId", vbCritical, "Error"
Exit Function
End If
WriteProcessMemory phandle, address, value, 1, 0&
CloseHandle hProcess
End Function
Private Function WriteAnInt(gamewindowtext As String, address As Long, value As Integer)
Dim hwnd As Long
Dim pid As Long
Dim phandle As Long
hwnd = FindWindow(vbNullString, gamewindowtext)
If (hwnd = 0) Then
MsgBox "Lancez le jeu d'abord", vbCritical, "Error"
Exit Function
End If
GetWindowThreadProcessId hwnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Impossible d'obtenir le ProcessId", vbCritical, "Error"
Exit Function
End If
WriteProcessMemory phandle, address, value, 2, 0&
CloseHandle hProcess
End Function
Private Function WriteALong(gamewindowtext As String, address As Long, value As Long)
Dim hwnd As Long
Dim pid As Long
Dim phandle As Long
hwnd = FindWindow(vbNullString, gamewindowtext)
If (hwnd = 0) Then
MsgBox "Lancez le jeu d'abord", vbCritical, "Error"
Exit Function
End If
GetWindowThreadProcessId hwnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Impossible d'obtenir le ProcessId", vbCritical, "Error"
Exit Function
End If
WriteProcessMemory phandle, address, value, 4, 0&
CloseHandle hProcess
End Function
Private Function ReadAByte(gamewindowtext As String, address As Long, valbuffer As Byte)
Dim hwnd As Long
Dim pid As Long
Dim phandle As Long
hwnd = FindWindow(vbNullString, gamewindowtext)
If (hwnd = 0) Then
MsgBox "Lancez le jeu d'abord", vbCritical, "Error"
Exit Function
End If
GetWindowThreadProcessId hwnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Impossible d'obtenir le ProcessId", vbCritical, "Error"
Exit Function
End If
ReadProcessMem phandle, address, valbuffer, 1, 0&
CloseHandle hProcess
End Function
Private Function ReadAnInt(gamewindowtext As String, address As Long, valbuffer As Integer)
Dim hwnd As Long
Dim pid As Long
Dim phandle As Long
hwnd = FindWindow(vbNullString, gamewindowtext)
If (hwnd = 0) Then
Exit Function
End If
GetWindowThreadProcessId hwnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
Exit Function
End If
ReadProcessMem phandle, address, valbuffer, 2, 0&
CloseHandle hProcess
End Function
Private Function ReadALong(gamewindowtext As String, address As Long, valbuffer As Long)
Dim hwnd As Long
Dim pid As Long
Dim phandle As Long
hwnd = FindWindow(vbNullString, gamewindowtext)
If (hwnd = 0) Then
MsgBox "Lancez le jeu d'abord", vbCritical, "Error"
Exit Function
End If
GetWindowThreadProcessId hwnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Impossible d'obtenir le ProcessId", vbCritical, "Error"
Exit Function
End If
ReadProcessMem phandle, address, valbuffer, 4, 0&
CloseHandle hProcess
End Function
User avatar
Un Type
Caporal Chef
Caporal Chef
Posts: 37
Joined: 27 Jan 2003 - 18:34:09

[T4C] Question sur les adresse en mémoires

Post by Un Type »

Tu utilise la fonction ReadAByte qui te revoit une chaine de 1 seul Byte, or la valeure de l'experiance tient sur 8 bytes
Essaye donc ReadAnInt
Last edited by Un Type on 16 Feb 2003 - 04:06:57, edited 1 time in total.
User avatar
Kian
Caporal
Caporal
Posts: 20
Joined: 14 Oct 2002 - 02:55:39
Location: Québec

[T4C] Question sur les adresse en mémoires

Post by Kian »

D'accord j'essaye sa et je t'en donne des nouvelles :)
Au fait mci pour l'aide fred et un type :chinois:
User avatar
Kian
Caporal
Caporal
Posts: 20
Joined: 14 Oct 2002 - 02:55:39
Location: Québec

[T4C] Question sur les adresse en mémoires

Post by Kian »

Ca fonctionne, merci beaucoup :)
User avatar
Simplet
Lieutenant
Lieutenant
Posts: 426
Joined: 14 Oct 2002 - 17:32:59
Location: Saint-Hubert de Riviere-Du-Loup (Québec)
Contact:

[T4C] Question sur les adresse en mémoires

Post by Simplet »

*se demande a quoi sa sert de mettre autant de ligne de code seulement pour savoir cb il reste d'xp pour le prochain lvl* lol par chez moi on fait CTRL S et sa prend 1 mili seconde :lol:
(Good Charlotte) No discrimination , I hate you all.
Post Reply