[Function] PlayerID "Load"

01/16/2016 13:30 RingleRangleRob#1
Load Function :
Code:
s4client.exe+9CCEFD - jmp s4client.exe+9CCF08 // Jump over the Increase of 1
s4client.exe+9CCEFF - mov edx,[ebp-08]
s4client.exe+9CCF02 - add edx,01
s4client.exe+9CCF05 - mov [ebp-08],edx // ^ this increase the counter
s4client.exe+9CCF08 - mov ecx,[ebp-0C] // instance
s4client.exe+9CCF0B - call s4client.exe+C92190 // player counter
s4client.exe+9CCF10 - cmp [ebp-08],eax // compare ( nothing to say ) | eax = player number
s4client.exe+9CCF13 - jae s4client.exe+9CCF70 // Break the while if all player are loaded
s4client.exe+9CCF15 - mov eax,[ebp-08] // ebp -08 = counter
s4client.exe+9CCF18 - push eax // ..
s4client.exe+9CCF19 - mov ecx,[ebp-0C] // instance
s4client.exe+9CCF1C - call s4client.exe+C923F0 // call to get the player id
s4client.exe+9CCF21 - mov [ebp-30],eax // eax = player id
[...]
For people who dont understand it ->
i created a pseudo code in autoit ( BUT NO NO NO DONT CALL IT IN AUTOIT PLS )
Just for understanding.

Code:
Dim $var = 0 ; declare of variable
Dim $PlayerID = 0 ; declare of variable

While(GetPlayerNumber(GetInstance()) <= $var) ; While $var is above or equal to the player number
	$PlayerID = GetPlayerID(GetInstance(),$var) ; get the playerid and saving in $PlayerID
        $var += 1 ; Increase $var at 1
        Msgbox(0,"",$PlayerID) ; output msgbox
WEnd
^hope this will help you to understand ( yes i did it with a normal while cause the most here don't understand for while )

You' ll find more if you search in this function..

Instance :
Code:
s4client.exe+9CCED3 - mov eax,[s4client.exe+126C1BC]
s4client.exe+9CCED8 - mov [ebp-24],eax
s4client.exe+9CCEDB - mov ecx,[ebp-24]
s4client.exe+9CCEDE - mov edx,[ecx+0000012C]
s4client.exe+9CCEE4 - mov [ebp-28],edx
s4client.exe+9CCEE7 - mov eax,[ebp-28]
s4client.exe+9CCEEA - mov ecx,[eax+10]
s4client.exe+9CCEED - mov [ebp-0C],ecx
Pointer ->
s4client.exe+126C1BC
+0x12C
+0x10

= Instance

Have Fun with it.

Note : I use this function long time ago and this part in the memory get loaded if you join a room. ~ You can call it by yourself :pimp:
01/16/2016 13:54 Terrat#2
Quote:
Originally Posted by Shinzuya View Post
Thanks, I understand everything.
Why do you comment this with "I understand everything" ?
Edit: Why do you remove your comment ^^


SHHHEEEESH Autoit :D
Quote:
Code:
Dim $var = 0 ; declare of variable
Dim $PlayerID = 0 ; declare of variable

While(GetPlayerNumber(GetInstance()) <= $var) ; While $var is above or equal to the player number
	$var += 1 ; Increase $var at 1
	$PlayerID = GetPlayerID(GetInstance(),$var) ; get the playerid and saving in $PlayerID
        Msgbox(0,"",$PlayerID) ; output msgbox
WEnd
01/16/2016 17:26 RingleRangleRob#3
#note

My bad the increase of $Var need under the GetPlayerID Function.
01/16/2016 17:53 Shinzuya#4
Quote:
Originally Posted by Terrat View Post
Why do you comment this with "I understand everything" ?
Edit: Why do you remove your comment ^^


SHHHEEEESH Autoit :D
I didn't deleted it.
A Mod did it, dunno why. :^)
01/16/2016 18:54 정강이#5
This will come in handy, thanks.