Example: Claymore Nade
Information:
F = Fake Address
T = True Address
Player Coordinates:
F - 0x00562C20 / T - 0x08D62C20 = X Coordinate
F - 0x00562C24 / T - 0x08D62C24 = Y Coordinate
F - 0x00562C28 / T - 0x08D62C28 = Z Coordinate
Grenade Coordinates:
F - 0x00624BC0 / T - 0x08E24BC0 = X Coordinate
F - 0x00624BC4 / T - 0x08E24BC4 = Y Coordinate
F - 0x00624BC8 / T - 0x08E24BC8 = Z Coordinate
MIPS:
lui t0, $08D6
lw t0, $2C20(t0)
lui t1, $08E2
lw t1, $4BC0(t1)
slt t2, t0, t1
beq t2, zero, $0002
nop
sub t2, t1, t0
bne t2, zero, $0002
nop
sub t2, t0, t1
lui t3, $0400
slt t2, t2, t3
bne t2, zero, $(Branch to jr ra)
nop
/ / / Code Here! / / /
/ / / Example: code to explode the grenade / / /
jr ra
nop
Note: Do this in X, Y and Z Coordinates.
This just a little help for those who starting to code.
Information:
F = Fake Address
T = True Address
Player Coordinates:
F - 0x00562C20 / T - 0x08D62C20 = X Coordinate
F - 0x00562C24 / T - 0x08D62C24 = Y Coordinate
F - 0x00562C28 / T - 0x08D62C28 = Z Coordinate
Grenade Coordinates:
F - 0x00624BC0 / T - 0x08E24BC0 = X Coordinate
F - 0x00624BC4 / T - 0x08E24BC4 = Y Coordinate
F - 0x00624BC8 / T - 0x08E24BC8 = Z Coordinate
MIPS:
lui t0, $08D6
lw t0, $2C20(t0)
lui t1, $08E2
lw t1, $4BC0(t1)
slt t2, t0, t1
beq t2, zero, $0002
nop
sub t2, t1, t0
bne t2, zero, $0002
nop
sub t2, t0, t1
lui t3, $0400
slt t2, t2, t3
bne t2, zero, $(Branch to jr ra)
nop
/ / / Code Here! / / /
/ / / Example: code to explode the grenade / / /
jr ra
nop
Note: Do this in X, Y and Z Coordinates.
This just a little help for those who starting to code.