Be Notified When Certain Player is in your Room/WW
#1
Be Notified When Certain Player is in your Room/WW

This code will notify you when a certain player joins your room/WW, or if you join a room/WW and that certain player is in it.

How it works in open rooms:
If said certain player joins the open room that your are in, the HUD will instantly fade and remain faded

If you join a room that said certain player is in, the HUD will instantly fade and remain faded.

How it works in WW's:
If said certain player joins the WW you are in, you won't get noitified until the next race starts. The HUD will fade and remain faded.

If you join a WW that said certain player is in, you won't get notified until the next race starts. The HUD will fade and remain faded.

XXXXYYYYWWWWZZZZ = The targeted player's FC in Hex.

How to take an FC and make it HEX:
Let's say the Target FC is 2705-8294-0189. Use any online converter to change it from Decimal to Hex.

The Hex value for that FC is 0000003F0000021D.

Note: There are two XYWZ fields. The FC goes in both fields. Obviously, they must be equal.

NTSC-U
C25C5EB4 0000000B
7C9D002E 9421FFB0
BDC10008 83C30008
83E3000C 3DE0XXXX
61EFYYYY 3E00WWWW
6210ZZZZ 7C1E7800
40A20020 7C1F8000
40A20018 3E208060
6231C748 3E403800
6252007F 92510000
B9C10008 38210050
60000000 00000000
C25C5EF8 0000000B
81280168 9421FFB0
BDC10008 83C80170
83E80174 3DE0XXXX
61EFYYYY 3E00WWWW
6210ZZZZ 7C1E7800
40A20020 7C1F8000
40A20018 3E208060
6231C748 3E403800
6252007F 92510000
B9C10008 38210050
60000000 00000000

PAL
C25D2FD0 0000000B
7C9D002E 9421FFB0
BDC10008 83C30008
83E3000C 3DE0XXXX
61EFYYYY 3E00WWWW
6210ZZZZ 7C1E7800
40A20020 7C1F8000
40A20018 3E208063
6231DB68 3E403800
6252007F 92510000
B9C10008 38210050
60000000 00000000
C25D3014 0000000B
81280168 9421FFB0
BDC10008 83C80170
83E80174 3DE0XXXX
61EFYYYY 3E00WWWW
6210ZZZZ 7C1E7800
40A20020 7C1F8000
40A20018 3E208063
6231DB68 3E403800
6252007F 92510000
B9C10008 38210050
60000000 00000000

NTSC-J
C25D28AC 0000000B
7C9D002E 9421FFB0
BDC10008 83C30008
83E3000C 3DE0XXXX
61EFYYYY 3E00WWWW
6210ZZZZ 7C1E7800
40A20020 7C1F8000
40A20018 3E208063
6231D1D4 3E403800
6252007F 92510000
B9C10008 38210050
60000000 00000000
C25D28F0 0000000B
81280168 9421FFB0
BDC10008 83C80170
83E80174 3DE0XXXX
61EFYYYY 3E00WWWW
6210ZZZZ 7C1E7800
40A20020 7C1F8000
40A20018 3E208063
6231D1D4 3E403800
6252007F 92510000
B9C10008 38210050
60000000 00000000

NTSC-K
C25C116C 0000000B
7C9D002E 9421FFB0
BDC10008 83C30008
83E3000C 3DE0XXXX
61EFYYYY 3E00WWWW
6210ZZZZ 7C1E7800
40A20020 7C1F8000
40A20018 3E208062
6231BE80 3E403800
6252007F 92510000
B9C10008 38210050
60000000 00000000
C25C11B0 0000000B
81280168 9421FFB0
BDC10008 83C80170
83E80174 3DE0XXXX
61EFYYYY 3E00WWWW
6210ZZZZ 7C1E7800
40A20020 7C1F8000
40A20018 3E208062
6231BE80 3E403800
6252007F 92510000
B9C10008 38210050
60000000 00000000

Source (for NTSC-K):
lwzx r4, r29, r0 #Default ASM

stwu r1, -80 (r1) #Register Safety
stmw r14, 8 (r1) #Register Safety

lwz r30, 0x0008 (r3)
lwz r31, 0x000C (r3)

lis r15, 0xXXXX
ori r15, r15, 0xYYYY
lis r16, 0xWWWW
ori r16, r16, 0xZZZZ

cmpw r30, r15
bne+ no_find

cmpw r31, r16
bne+ no_find

lis r17, 0x8062
ori r17, r17, 0xBE80

lis r18, 0x3800
ori r18, r18, 0x007F

stw r18, 0 (r17)

no_find:
lmw r14, 8(r1) # Pop r14-r31 off the stack
addi r1, r1, 80 # Release the space

###############

lwz r9, 0x0168 (r8) #Default ASM

stwu r1, -80 (r1) #Register Safety
stmw r14, 8 (r1) #Register Safety

lwz r30, 0x0170 (r8)
lwz r31, 0x0174 (r8)

lis r15, 0xXXXX
ori r15, r15, 0xYYYY
lis r16, 0xWWWW
ori r16, r16, 0xZZZZ

cmpw r30, r15
bne+ no_find

cmpw r31, r16
bne+ no_find

lis r17, 0x8062
ori r17, r17, 0xBE80

lis r18, 0x3800
ori r18, r18, 0x007F

stw r18, 0 (r17)

no_find:
lmw r14, 8(r1) # Pop r14-r31 off the stack
addi r1, r1, 80 # Release the space

##

Code creator: zak
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)