Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 24.09.2006, 15:33   #1
deathor
Архивный участник
 
Join Date: Aug 2005
Posts: 53
Default [Help]Disable shout and trade from macro

People spam macros in towns a lot, so I just want to disable the usage of ! or + in front of the macro commands. Any suggestions?
deathor is offline  
Old 24.09.2006, 16:21   #2
poltomb
Архивный участник
 
Join Date: Sep 2006
Posts: 81
Default

would need research into the client...and hex, hex, hex
poltomb is offline  
Old 24.09.2006, 16:50   #3
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

-- Deleted --
FidoW is offline  
Old 24.09.2006, 19:55   #4
poltomb
Архивный участник
 
Join Date: Sep 2006
Posts: 81
Default

i didnt even think about trying it db side...that looks like what needs to be done.. nice fidow
poltomb is offline  
Old 25.09.2006, 02:19   #5
deathor
Архивный участник
 
Join Date: Aug 2005
Posts: 53
Default

very nice info! I was messing around with stored procedures but couldn't find a way to add a check. If I do it I'll post it. But if someone knows, let us know
deathor is offline  
Old 25.09.2006, 03:53   #6
top-gear
Архивный участник
 
Join Date: Aug 2005
Posts: 605
Default

procedure for macroinfo is

Code:
ALTER PROCEDURE [dbo].[lin_CreateMacroInfo]
(
@macro_id		int,
@macro_order		int,
@macro_int1		int,
@macro_int2		int,
@macro_int3		int,
@macro_str		nvarchar(255)
)
AS
SET NOCOUNT ON

if ( exists ( select * from user_macro where macro_id = @macro_id ) )
begin
	if ( exists ( select * from user_macroinfo where macro_id = @macro_id and macro_order = @macro_order ) )
	begin
		update user_macroinfo set macro_int1 = @macro_int1, macro_int2 = @macro_int2, macro_int3 = @macro_int3 where macro_id = @macro_id and macro_order = @macro_order

	end else begin
		insert into user_macroinfo ( macro_id, macro_order, macro_int1, macro_int2, macro_int3, macro_str )
		values ( @macro_id, @macro_order, @macro_int1, @macro_int2, @macro_int3, @macro_str )
	end

end
couldnt make it check for ! or + on creation either
top-gear is offline  
Old 25.09.2006, 03:58   #7
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

Im not an expert in SQL.. but.. maybe something like this..
please, someone correct me if i am wrong, i dont know if this is possible... and if this works...

IF @macro_str LIKE '!%'
BEGIN
RAISERROR ('Not allowed macro : name = [%s]', 16, 1, @macro_str)
RETURN -1
END

IF @macro_str LIKE '+%'
BEGIN
RAISERROR ('Not allowed macro : name = [%s]', 16, 1, @macro_str)
RETURN -1
END
FidoW is offline  
Old 25.09.2006, 14:04   #8
top-gear
Архивный участник
 
Join Date: Aug 2005
Posts: 605
Default

nice fidow, this is something good! ill test and tell u
top-gear is offline  
Old 30.09.2006, 12:18   #9
wton
Архивный участник
 
Join Date: May 2005
Posts: 463
Default

hi,
work o no work...?

fidow, te agradeceria si me dices si funciono o no tu explicacion, gracias
wton is offline  
Old 30.09.2006, 12:26   #10
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

I dont know, i dont test that, but i was thinking, when a macro is inserted in db first is inserted in user_macro table.. later in user_macroinfo ... with my mod maybe we can have some problems in user_macroinfo table... macros created but without data... or something like that... and.. i dont know if game reject creation of macro ... i think... if this works... macro is created at least temporaly (is cached)... when you restart server macro disaper.
FidoW is offline  
Old 30.09.2006, 12:41   #11
wton
Архивный участник
 
Join Date: May 2005
Posts: 463
Default

ok gracias por la info ^^

thanks for info...
wton is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 21:09.