How remove only '/set' on Status 32

12/05/2015 18:55 [GM]Precious#1
Hi,

I would like to remove the '/set' command only on Status 32.

Im Using [dbo].[usp_Insert_Chat_Log_E].
Replacing '/set' to 'any text' before it is processed.

Here is what I've done something wrong that is why its not working.

DECLARE @userstat smallint
DECLARE @usercmd varchar(128)

SELECT @userstat=Status FROM PS_UserData.dbo.Users_Master WHERE @UserUID=UserUID

IF (@userstat = 32)
BEGIN
SELECT @ChatData=ChatData,@CharID=CharID FROM inserted
SELECT @usercmd= SUBSTRING(@ChatData,0, CHARINDEX(' ',@ChatData))
IF (@usercmd='/set')
BEGIN
SET @ChatData = 'Not Allowed Command'
END
END

Anyone can point me to the right direction?
12/05/2015 20:07 nubness#2
EP4.5 ps_game.exe:
00471F57 - cmp byte ptr [ebx+00005768],02

EP5.4 ps_game.exe:
00480D40 - cmp byte ptr [esi+00005808],02

DB Statusps_game Status
161
322
483
644
805
011
12/05/2015 22:00 [GM]Precious#3
Quote:
Originally Posted by nubness View Post
EP4.5 ps_game.exe:
00471F57 - cmp byte ptr [ebx+00005768],02

EP5.4 ps_game.exe:
00480D40 - cmp byte ptr [esi+00005808],02

DB Statusps_game Status
161
322
483
644
805
011
Thank you Nubness!

I did on the following but can't figure it out.

[ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem:
cmp byte ptr [ebx+00005768],02
je 00471F57

originalcode:
cmp byte ptr [ebx+00005768],02

exit:
jmp returnhere

00471F57:
nop
nop
returnhere:

[DISABLE]
dealloc(newmem)
00471F57:
cmp byte ptr [ebx+00005768],02
12/05/2015 22:06 nubness#4
Code:
[ENABLE]

00471F57:
cmp byte ptr [ebx+00005768],01

[DISABLE]

00471F57:
cmp byte ptr [ebx+00005768],02
or

Code:
[ENABLE]

00471F5D:
db 01

[DISABLE]

00471F5D:
db 02
12/05/2015 23:16 [GM]Precious#5
Brilliant! Can't say anything else but thanks a LOT.