I am trying long time to get a auto ban system working for me game, but I fail with it.
me database looks like this
What he must do=
he must look in the "user_bag" under "character"
where wIndex='(some value)'
if he find one, he must look to he's character_no (its a colomn in user_bag)
and remember that character_no
when he got the character_no
he must find that character_no in the "user_character" under "character".
and add [GM] on the front of the character_name (colomn in user_character)
what I made self (not working ) is this
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
/*
Name: Anti-GM-ITEMS
Version: Beta V1.0
*/
AS
DECLARE @character_name varchar(40);
DECLARE @character_no varchar(50);
SELECT
@character_name = character_name,
@character_no = character_no
FROM character.dbo.user_bag
WHERE
wIndex='64988'
;
if (@character_name IS NOT NULL)
BEGIN
SELECT FROM character.dbo.user_bag
WHERE character_no = @character_no;
SELECT @character_name = character_name
FROM account.dbo.user_character
WHERE
character_no = @character_no;
END;