Postador por Hanzinhoww as 04:33
Em Mu Online/Stored Procedures/WZ_GuildCreate
Abra e Substitua pelo código abaixo....
Importante Fazer BackUp de suas Databases antes de modificar.
Caso não der certo não terá problema algum !


Código:
REATE procedure WZ_GuildCreate
@GuildName varchar(10),
@MasterName varchar(10)
as
BEGIN
DECLARE @ErrorCode int

SET @ErrorCode = 0
SET XACT_ABORT ON

Set nocount on
begin transaction

IF EXISTS(SELECT * FROM Character WHERE Name = @MasterName AND vip = 1)
BEGIN

INSERT INTO Guild (G_Name, G_Master) VALUES (@GuildName, @MasterName)
IF ( @@Error <> 0 )
BEGIN
SET @ErrorCode = 1
END
IF ( @ErrorCode = 0 )
BEGIN
INSERT GuildMember (Name, G_Name, G_Level) VALUES (@MasterName, @GuildName, 1)
IF ( @@Error <> 0 )
BEGIN
SET @ErrorCode = 2
END
END

IF ( @ErrorCode <> 0 )
rollback transaction
ELSE
commit transaction

select @ErrorCode

Set nocount off
SET XACT_ABORT OFF
END
ELSE
BEGIN
SET @ErrorCode = 1
END
END
GO

Obs. Aonde foi pego o codico não tinha CREDITOS do mesmo, se alguém souber comprovando eu coloco aqui os merecimentos.



Espero que gostem

Web Site Desenvolvida Por Thayna 2011 - 2012 © Fanaticos Games - All rights reserved ®