- Joined
- Apr 27, 2008
- Messages
- 805
- Reaction score
- 152
Hello, i have a big prolbem with my muserver so when players and i Login in to server have seen above left some like "Account & Characters has moving. " some like thats.
i used season 2 server files MMT Production
2.00.05
& Global Mu Client.
Then in that files "MMT 2.00.05." i have have a file with name "SQL Fixes"
i open it and have 2 sql script files.
1. SealEffectSaving.sql
2.SiegeRequireUserFix.sql
i copy from that script files the codes and paste its to "Query Analyzer" and then i open server and after 2-3 hours the problems going on again.
Not Show the Characters from A account of player or my account.
Sql Scripts codes:
1.SealEffectSaving.sql:
i used season 2 server files MMT Production
2.00.05
& Global Mu Client.
Then in that files "MMT 2.00.05." i have have a file with name "SQL Fixes"
i open it and have 2 sql script files.
1. SealEffectSaving.sql
2.SiegeRequireUserFix.sql
i copy from that script files the codes and paste its to "Query Analyzer" and then i open server and after 2-3 hours the problems going on again.
Not Show the Characters from A account of player or my account.
Sql Scripts codes:
1.SealEffectSaving.sql:
Code:
USE [MuOnline]
GO
/****** Object: StoredProcedure [dbo].[WZ_PeriodItemSelect] Script Date: 10/31/2010 20:08:35 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
/****** Object: Stored Procedure dbo.WZ_PeriodItemSelect Script Date: 28.11.2008 19:52:26 ******/
ALTER PROCEDURE [dbo].[WZ_PeriodItemSelect]
@memb_guid int,
@CharName varchar(10)
AS
BEGIN
BEGIN TRANSACTION
SET NOCOUNT ON
DECLARE @iCount int
DECLARE @ExpireDate datetime
DECLARE @ItemCode int
DECLARE @ItemEffect1 int
DECLARE @ItemEffect2 int
DECLARE @iLeftTime int
SET @iCount = 0
SET @iLeftTime = 0
SELECT @iCount = count(*) FROM T_PeriodItem_Info WHERE memb_guid = @memb_guid AND memb__char = @CharName
IF @iCount = 0
BEGIN
SELECT 0
END
ELSE IF @iCount <> 1
BEGIN
SELECT -1
END
ELSE
BEGIN
SELECT @ItemCode = ItemCode,@ItemEffect1 = ItemEffect1,@ItemEffect2 = ItemEffect2,@ExpireDate = ExpireDate FROM T_PeriodItem_Info WHERE memb__char = @CharName
SET @iLeftTime = datediff(minute,getdate(),@ExpireDate)
IF @iLeftTime > 0
BEGIN
SELECT memb_guid,
ItemCode,
ItemEffect1,
ItemEffect2,
OptionType,
UseTime,
@iLeftTime FROM T_PeriodItem_Info where memb__char = @CharName
END
ELSE
BEGIN
UPDATE T_PeriodItem_Info SET UseTime = 0 WHERE memb__char = @CharName
SELECT -2
END
END
IF(@@Error <> 0 )
ROLLBACK TRANSACTION
ELSE
COMMIT TRANSACTION
END
SET NOCOUNT OFF
2.SiegeRequireUserFix.sql:
Code:
USE [MuOnline]
GO
/****** Object: StoredProcedure [dbo].[WZ_CS_ReqRegAttackGuild] Script Date: 10/30/2010 22:45:03 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
/****** Object: Stored Procedure dbo.WZ_CS_ReqRegAttackGuild Script Date: 28.11.2008 19:52:26 ******/
ALTER PROCEDURE [dbo].[WZ_CS_ReqRegAttackGuild]
@iMapSvrGroup SMALLINT,
@szGuildName VARCHAR(8)
As
Begin
BEGIN TRANSACTION
SET NOCOUNT ON
DECLARE @iMaxRegGuildCount INT
DECLARE @iCurRegGuildCount INT
SET @iMaxRegGuildCount = 100
SELECT @iCurRegGuildCount = COUNT(*) FROM MuCastle_REG_SIEGE WITH (READUNCOMMITTED) WHERE MAP_SVR_GROUP = @iMapSvrGroup
IF (@iCurRegGuildCount >= @iMaxRegGuildCount)
BEGIN
SELECT 6 As QueryResult
END
ELSE
BEGIN
IF EXISTS ( SELECT MAP_SVR_GROUP FROM MuCastle_REG_SIEGE WITH (READUNCOMMITTED)
WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName)
BEGIN
SELECT 2 As QueryResult
END
ELSE
BEGIN
DECLARE @szOwnGuildName VARCHAR(8)
SELECT @szOwnGuildName = OWNER_GUILD FROM MuCastle_DATA WHERE MAP_SVR_GROUP = @iMapSvrGroup
IF (@szOwnGuildName = @szGuildName)
BEGIN
SELECT 3 As QueryResult
END
ELSE
BEGIN
IF NOT EXISTS ( SELECT G_Name FROM Guild WITH (READUNCOMMITTED) WHERE G_Name = @szGuildName)
BEGIN
SELECT 4 As QueryResult
END
ELSE
BEGIN
DECLARE @szGuildMaster VARCHAR(10)
DECLARE @iGuildMasterLevel INT
DECLARE @iGuildMemberCount INT
SELECT @szGuildMaster = G_Master FROM Guild WHERE G_Name = @szGuildName
SELECT @iGuildMasterLevel = cLevel FROM Character WHERE Name = @szGuildMaster
SELECT @iGuildMemberCount = COUNT(*) FROM GuildMember WHERE G_Name = @szGuildName
IF (@iGuildMasterLevel <1)
BEGIN
SELECT 5 As QueryResult
END
ELSE
BEGIN
IF (@iGuildMemberCount <0)
BEGIN
SELECT 8 As QueryResult
END
ELSE
BEGIN
DECLARE @iMAX_SEQNUM INT
DECLARE @iNXT_SEQNUM INT
SELECT @iMAX_SEQNUM = MAX(SEQ_NUM) FROM MuCastle_REG_SIEGE WITH (READUNCOMMITTED) WHERE MAP_SVR_GROUP = @iMapSvrGroup
IF (@iMAX_SEQNUM IS NULL)
SET @iNXT_SEQNUM = 1
ELSE
SET @iNXT_SEQNUM = @iMAX_SEQNUM + 1
INSERT INTO MuCastle_REG_SIEGE
VALUES (@iMapSvrGroup, @szGuildName, 0, 0, @iNXT_SEQNUM)
SELECT 1 As QueryResult
END
END
END
END
END
END
IF(@@Error <> 0 )
ROLLBACK TRANSACTION
ELSE
COMMIT TRANSACTION
SET NOCOUNT OFF
End