Siege New year. Fixx

01/26/2010 08:54 Tony258#1
On the new year of 2010, server get this error.

[CRITICAL ERROR] SP_SIEGE_INFO_R CALL FAIL

I looked through forum found fix to change the functions,
that are linked to stored procedure but still gives that error.

Can someone tell me what the entire process is to fix this?
01/26/2010 08:57 janvier123#2
search !
01/26/2010 09:02 Tony258#3
I did, and i find the script, i used that nothing.
I cannot find any other steps.
Could you please either, tell me the entire step, or send me the thread link
01/26/2010 12:59 daddycool.#4
Run your siege script again.
01/26/2010 13:15 nobleman80#5
yea search. I already got it fixed sometime ago. the script is here.
01/26/2010 16:30 Tony258#6
Quote:
USE [Character]
GO

/****** Object: UserDefinedFunction [dbo].[FN_BinDateToDateTime] Script Date: 01/10/2010 19:35:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO




/************************************************** ****************************
? ? : dbo.FN_BinDateToDateTime
? ? : Binary Date? DateTime ???? ????.
??? :
????:
Ver Date Author Description
--------- ---------- --------------- ------------------------------------
1.0 2006-05-05 Han Ji Wook 1. ????
2.0 2010-01-10 ADM-Cyrax/Darth Nerd
************************************************** ****************************/
ALTER FUNCTION [dbo].[FN_BinDateToDateTime] (
@i_bin_time binary(4)
) RETURNS datetime
AS
BEGIN
DECLARE @v_datetime datetime
DECLARE @v_strAux varchar(20)
DECLARE @v_strtime varchar(20)
SET @v_strAux = CAST(CAST(@i_bin_time as int) as varchar(20))
IF len(@v_strAux) = 7
SELECT @v_strtime = '20100' + CAST(CAST(@i_bin_time as int) as varchar(20))
ELSE
IF len(@v_strAux) = 8
SELECT @v_strtime = '2010' + CAST(CAST(@i_bin_time as int) as varchar(20))
ELSE
SELECT @v_strtime = '201' + CAST(CAST(@i_bin_time as int) as varchar(20))


SELECT @v_strtime = SUBSTRING(@v_strtime,1,4)
+'-'+SUBSTRING(@v_strtime,5,2)
+'-'+SUBSTRING(@v_strtime,7,2)
+' '+SUBSTRING(@v_strtime,9,2)
+':'+SUBSTRING(@v_strtime,11,2)
SELECT @v_datetime = CAST(@v_strtime as datetime)
RETURN @v_datetime
END
I ran through sql query, and also tried editing the procedure manually.
Im still getting the error.
Is this the ONLY thing need change or more ???
01/26/2010 20:08 maleket-el-oloob#7
Quote:
Originally Posted by Darth Nerd View Post
Hello Epvpers,
to all who are having problems with the siege script and also
Deadfront not starting properly I have here a temporary fix.
Need more tests, as my time is short, i leave it here to all try
to improve it and also test it more.

Query:

Code:
USE [Character]
GO

/****** Object:  UserDefinedFunction [dbo].[FN_BinDateToDateTime]    Script Date: 01/10/2010 19:35:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO




/******************************************************************************
   The Name : dbo.FN_BinDateToDateTime
   Description : Binary Date The DateTime Returns in the form of.
   Returns : 
   History:
   Ver        Date        Author           Description
   ---------  ----------  ---------------  ------------------------------------
   1.0        2006-05-05  Han Ji Wook      1. Initial creation
   2.0        2010-01-10  ADM-Cyrax/Darth Nerd
 ******************************************************************************/
ALTER  FUNCTION [dbo].[FN_BinDateToDateTime] (
	@i_bin_time	binary(4)
) RETURNS datetime
AS
BEGIN
	DECLARE @v_datetime	datetime
	DECLARE @v_strAux varchar(20)
	DECLARE @v_strtime	varchar(20)
	SET @v_strAux = CAST(CAST(@i_bin_time as int) as varchar(20))
	IF len(@v_strAux) = 7	
		SELECT	@v_strtime	= '20100' + CAST(CAST(@i_bin_time as int) as varchar(20))
	ELSE
		IF len(@v_strAux) = 8 
			SELECT	@v_strtime	= '2010' + CAST(CAST(@i_bin_time as int) as varchar(20))
		ELSE
				SELECT	@v_strtime	= '200' + CAST(CAST(@i_bin_time as int) as varchar(20))

	
	SELECT	@v_strtime	= SUBSTRING(@v_strtime,1,4)
						+'-'+SUBSTRING(@v_strtime,5,2)
						+'-'+SUBSTRING(@v_strtime,7,2)
						+' '+SUBSTRING(@v_strtime,9,2)
						+':'+SUBSTRING(@v_strtime,11,2)	
	SELECT	@v_datetime = CAST(@v_strtime as datetime)
	RETURN @v_datetime
END

[CENTER][COLOR="Red"]and[/COLOR][/CENTER]

EXEC sp_addlinkedserver 'LSV_GHBILL','','MSDASQL',NULL,NULL,'DRIVER={SQL Server};SERVER=localhost;UID=;PWD=;'
EXEC sp_addlinkedserver 'LSV_DKRACNT','','MSDASQL',NULL,NULL,'DRIVER={SQL Server};SERVER=localhost;UID=;PWD=;'
EXEC sp_addlinkedserver 'DKRCASH','','MSDASQL',NULL,NULL,'DRIVER={SQL Server};SERVER=localhost;UID=;PWD=;'
EXEC sp_addlinkedserver 'LSV_DKRHELION','','MSDASQL',NULL,NULL,'DRIVER={SQL Server};SERVER=localhost;UID=;PWD=;'
EXEC sp_addlinkedserver 'LSV_DKRNUNVICE','','MSDASQL',NULL,NULL,'DRIVER={SQL Server};SERVER=localhost;UID=;PWD=;'
EXEC sp_addlinkedserver 'LSV_DKRQUNE','','MSDASQL',NULL,NULL,'DRIVER={SQL Server};SERVER=localhost;UID=;PWD=;'
EXEC sp_addlinkedserver 'LSV_DKRRONDOW','','MSDASQL',NULL,NULL,'DRIVER={SQL Server};SERVER=localhost;UID=;PWD=;'
EXEC sp_addlinkedserver 'LSV_DKRSIZ','','MSDASQL',NULL,NULL,'DRIVER={SQL Server};SERVER=localhost;UID=;PWD=;'
EXEC sp_addlinkedserver 'LSV_DKRTEST','','MSDASQL',NULL,NULL,'DRIVER={SQL Server};SERVER=localhost;UID=;PWD=;'
EXEC sp_addlinkedserver 'LSV_DKRZUTO','','MSDASQL',NULL,NULL,'DRIVER={SQL Server};SERVER=localhost;UID=;PWD=;'
EXEC sp_addlinkedserver 'LSV_DKRSTA','','MSDASQL',NULL,NULL,'DRIVER={SQL Server};SERVER=localhost;UID=;PWD=;'
EXEC sp_addlinkedserver 'DKRACCOUNT01','','MSDASQL',NULL,NULL,'DRIVER={SQL Server};SERVER=localhost;UID=;PWD=;'

[CENTER][COLOR="Red"]and[/COLOR][/CENTER]

exec sp_serveroption 'LSV_GHBILL','rpc out','true' 
exec sp_serveroption 'LSV_GHBILL','rpc','true' 
exec sp_serveroption 'LSV_DKRACNT','rpc out','true' 
exec sp_serveroption 'LSV_DKRACNT','rpc','true' 
exec sp_serveroption 'DKRCASH','rpc out','true' 
exec sp_serveroption 'DKRCASH','rpc','true' 
exec sp_serveroption 'LSV_DKRHELION','rpc out','true' 
exec sp_serveroption 'LSV_DKRHELION','rpc','true' 
exec sp_serveroption 'LSV_DKRNUNVICE','rpc out','true' 
exec sp_serveroption 'LSV_DKRNUNVICE','rpc','true' 
exec sp_serveroption 'LSV_DKRQUNE','rpc out','true' 
exec sp_serveroption 'LSV_DKRQUNE','rpc','true' 
exec sp_serveroption 'LSV_DKRRONDOW','rpc out','true' 
exec sp_serveroption 'LSV_DKRRONDOW','rpc','true' 
exec sp_serveroption 'LSV_DKRSIZ','rpc out','true' 
exec sp_serveroption 'LSV_DKRSIZ','rpc','true' 
exec sp_serveroption 'LSV_DKRTEST','rpc out','true' 
exec sp_serveroption 'LSV_DKRTEST','rpc','true' 
exec sp_serveroption 'LSV_DKRZUTO','rpc out','true' 
exec sp_serveroption 'LSV_DKRZUTO','rpc','true' 
exec sp_serveroption 'LSV_DKRSTA','rpc out','true' 
exec sp_serveroption 'LSV_DKRSTA','rpc','true' 
exec sp_serveroption 'DKRACCOUNT01','rpc out','true' 
exec sp_serveroption 'DKRACCOUNT01','rpc','true' 

[CENTER][COLOR="Red"]and[/COLOR][/CENTER]

/GM DISTRIBUTE
/GM PLAYERCOUNT
/GM SUMMON [PC ID]
/GM RETURN [PC ID]
/GM ITEMDROPRATIO [ItemDropRatio(1.0)]
/GM MONEYDROPRATIO [MoneyDropRatio(1.0)]
/GM MOVEMAP [MAPINDEX] [X] [Y]
/GM RESET_ALLMONSTER
/GM RESETMONSTER [MONSTERINDEX]
/GM ghostmode [on/off]
/GM observermode [on/off]
/GM callmonster [MonsterIndex]
/GM callmonsters [index] [count]
/GM kick [PC ID]
/GM revive [PC ID]
/GM heal [PC ID]
/GM find [PC ID]
/GM chase [PC ID]
/GM dummycount
/GM damage [on/off]
/GM createbrick [BrickID]
/GM destroybrick [BrickID]
/GM guildheal [pc name]
/GM fieldheal [map index]
/GM guildreturn [pc name]
/GM fieldreturn [map index]
/GM siegereset
/GM siegestop
/GM siegestart [time]
/GM siegeend [time]
/GM guildwarstart [time]
/GM guildwarend [time]
/GM open_teleport
/GM close_teleport
/GM resetcooltime
/GM resetcooltime_map
/GM partywarstart [time]
/GM partywarend
/GM observermode [on/off]
/GM call [PC ID]
/GM callmonster [MonsterIndex]
/GM callmonsters [index] [count]
/GM chase [PC ID]
/GM close_teleport
/GM createbrick [BrickID]
/GM damage [on/off]
/GM destroybrick [BrickID]
/GM DISTRIBUTE
/GM dummycount
/GM EXPRATIO [percentage]
/GM fieldheal [map index]
/GM fieldreturn [map index]
/GM find [PC ID]
/GM FINISH [Kick Time] ([end time])
/GM ghostmode [on/off]
/GM guildheal [pc name]
/GM guildreturn [pc name]
/GM guildwarend [time]
/GM guildwarstart [time]
/GM heal [PC ID]
/GM ITEMDROPRATIO [ItemDropRatio(1.0)]
/GM kick [PC ID]
/GM MAXPC [Max Player number on the map]
/GM MAXPLAYER [Max Player Figures (including the standby)]
/GM MONEYDROPRATIO [MoneyDropRatio(1.0)]
/GM MOVEMAP [MAPINDEX] [X] [Y]
/GM NOTICE \[Notice Content]\
/GM observermode [on/off]
/GM open_teleport
/GM partywarend
/GM partywarstart [time]
/GM PLAYERCOUNT
/GM REGEN [Monster resurrection speed (percentage)]
/GM RESET_ALLMONSTER
/GM resetcooltime
/GM RESETMONSTER [MONSTERINDEX]
/GM RETURN [PC ID]
/GM revive [PC ID]
/GM siegeend [time]
/GM siegereset
/GM siegestart [time]
/GM siegestop
/GM SUMMON [PC ID]
Don't forgot to leave "THANKS" To [Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
01/27/2010 02:11 Tony258#8
and what am i supposed to do with those?
I know add the first one in sql query or manually change it.
But why are you posting gm commands :/ and the second part, put in sql query again?
01/27/2010 04:16 Tony258#9
Darth Nerd can you help plz I did all steps.
Is it my db with the guild and siege info?

Maybe we can connect team viewer so you can see

EDIT: I think i fixed it with help from maleket-el-oloob.
I get the 408: NOT SIEGE INFO CHANNEL INDEX = [ 1 ]

I go to npc for siege, says no siege info.
So im playing with database hope i find somethin :) thanks


EDIT:

3520: NOT SIEGE INFO CHANNEL INDEX = [ 1 ]
3300: OnSuit : Item Open Fail
3300: FAIL - Not War Time ......
3300: FAIL - Not War Time ......
3300: [ STARTSIEGE ] NAME[ [GM]Test ] TIME[ 1 ]
3520: [FAIL ERROR] SP_SIEGE_DEFENDER_U [ RESULT : -2 ]
3520: >> [ 10B42B08 ][ 216.245.195.234 ]--- Server DisConnected ---
3520: >> [ 10B42B08 ][ 216.245.195.234 ] [ 1 ]--- Server DisConnected ---
2392: >> [ 10B41B48 ][ 216.245.195.234 ]--- Server DisConnected ---
2392: BroadCast : all game server is shutdown.

Ummm?
I get that when i go /gm siegestart 1

When i go to the Siege npc and click on siege info it says, no siege info exist.
01/27/2010 09:51 mcsamuraicz#10
I have same problem
[Only registered and activated users can see links. Click Here To Register...]
Please help :(
01/27/2010 15:04 daddycool.#11
Quote:
Originally Posted by Tony258 View Post
Darth Nerd can you help plz I did all steps.
Is it my db with the guild and siege info?

Maybe we can connect team viewer so you can see

EDIT: I think i fixed it with help from maleket-el-oloob.
I get the 408: NOT SIEGE INFO CHANNEL INDEX = [ 1 ]

I go to npc for siege, says no siege info.
So im playing with database hope i find somethin :) thanks


EDIT:

3520: NOT SIEGE INFO CHANNEL INDEX = [ 1 ]
3300: OnSuit : Item Open Fail
3300: FAIL - Not War Time ......
3300: FAIL - Not War Time ......
3300: [ STARTSIEGE ] NAME[ [GM]Test ] TIME[ 1 ]
3520: [FAIL ERROR] SP_SIEGE_DEFENDER_U [ RESULT : -2 ]
3520: >> [ 10B42B08 ][ 216.245.195.234 ]--- Server DisConnected ---
3520: >> [ 10B42B08 ][ 216.245.195.234 ] [ 1 ]--- Server DisConnected ---
2392: >> [ 10B41B48 ][ 216.245.195.234 ]--- Server DisConnected ---
2392: BroadCast : all game server is shutdown.

Ummm?
I get that when i go /gm siegestart 1

When i go to the Siege npc and click on siege info it says, no siege info exist.
You don't have registered the siege info in your database... run the siege script and start your server again, maybe it helps.

Code:
USE [Character];
GO

DECLARE @v_siege_no char(10)
DECLARE @guild_code varchar(10)
DECLARE @guild_name varchar(30)
DECLARE @v_strDate varchar(10)
DECLARE @v_regdate varchar(10)
DECLARE @v_strChannel varchar(2)
DECLARE @i_bychannel tinyint
DECLARE @o_dwDungeonRegistTime varbinary(4)
DECLARE @o_DeadFrontTimeInfo varbinary(1000)
DECLARE @o_sp_rtn int
DECLARE @o_dwRegistTimeStart varbinary(4)
DECLARE @o_dwRegistTimeEnd varbinary(4)
DECLARE @o_dwTaxRegistTime varbinary(4)
DECLARE @o_dwStartTime varbinary(4)
DECLARE @o_dwRegistTime varbinary(4)
DECLARE @v_strDate1 varchar(10)
DECLARE @i_GetDate datetime
DECLARE @v_siege_start_date varchar(14)
DECLARE @v_siege_start_time varbinary(4)

SET @i_GetDate=getdate()

-- Siege War Every Saturday:

SELECT @v_siege_start_date = CONVERT(VARCHAR(10), DATEADD(d, 7-DATEPART(dw, @i_GetDate), @i_GetDate), 112) + '210000'

--

SELECT @v_siege_start_time = SUBSTRING(@v_siege_start_date,4,1) * 100000000
+ SUBSTRING(@v_siege_start_date,5,2) * 1000000
+ SUBSTRING(@v_siege_start_date,7,2) * 10000
+ SUBSTRING(@v_siege_start_date,9,2) * 100
+ SUBSTRING(@v_siege_start_date,11,2)

SET @guild_code = '001'
SET @guild_name = 'FIRSTGUILD'
SET @v_siege_no = SUBSTRING(dbo.FN_DateToShortStrDate(GetDate()), 3, 4) + '0001'
INSERT
INTO GUILD_INFO(guild_code, guild_name, guild_Level, bystate, bychannel)
VALUES (@guild_code, @guild_name, 3, 1, 1)
INSERT
INTO SIEGE_INFO(SIEGE_NO, CHANNEL_NO, GUILD_CODE, GUILD_NAME, DWSTARTTIME, BYREGISTTIMEFLAG, DEFENDER_INFO, SIEGE_TAG)
VALUES (@v_siege_no, 1, @guild_code, @guild_name,@v_siege_start_time, 1, 0X0000, 'Y')

EXEC SP_SIEGE_START_TIME_U @guild_code,1,0x01,@v_siege_start_time output,@o_dwRegistTime output,@o_sp_rtn output

SET @v_strDate1=dbo.FN_BinDateToDateTime(@v_siege_start_time)

DECLARE @P1 varchar(13)
SET @P1=NULL
DECLARE @P2 varchar(33)
SET @P2=NULL
DECLARE @P3 varchar(25)
SET @P3=NULL
DECLARE @P4 varbinary(4)
SET @P4=NULL
DECLARE @P5 varbinary(4)
SET @P5=NULL
DECLARE @P6 varbinary(4)
SET @P6=NULL
DECLARE @P7 varbinary(4)
SET @P7=NULL
DECLARE @P8 varbinary(4)
SET @P8=NULL
DECLARE @P9 varbinary(4)
SET @P9=NULL
DECLARE @P10 varbinary(4)
SET @P10=NULL
DECLARE @P11 varbinary(2)
SET @P11=NULL
DECLARE @P12 varbinary(2)
SET @P12=NULL
DECLARE @P13 varbinary(2)
SET @P13=NULL
DECLARE @P14 int
SET @P14=NULL
DECLARE @P15 int
SET @P15=NULL
DECLARE @P16 varbinary(4)
SET @P16=NULL
DECLARE @P17 varbinary(996)
SET @P17=NULL
DECLARE @P18 varbinary(996)
SET @P18=NULL
DECLARE @P19 varbinary(1000)
SET @P19=NULL
DECLARE @P20 int
SET @P20=NULL
EXEC SP_SIEGE_INFO_R 1, @P1 output, @P2 output, @P3 output, @P4 output, @P5 output, @P6 output, @P7 output, @P8 output, @P9 output, @P10 output, @P11 output, @P12 output, @P13 output, @P14 output, @P15 output, @P16 output, @P17 output, @P18 output, @P19 output, @P20 output
SELECT @P1, @P2, @P3, @P4, @P5, @P6,@v_strDate1
01/27/2010 16:58 maleket-el-oloob#12
Quote:
Originally Posted by mcsamuraicz View Post
I have same problem
[Only registered and activated users can see links. Click Here To Register...]
Please help :(


i help u By TeamViewer
just Don't forgot to leave "THANKS" To [Only registered and activated users can see links. Click Here To Register...]

Don't forgot
01/27/2010 18:01 janvier123#13
Quote:
Originally Posted by maleket-el-oloob View Post
hi
Reported: Spam
01/27/2010 20:25 ~Twister~#14
I guess maleket-el-oloob fixed it.
01/28/2010 02:51 Tony258#15
Server: Msg 2627, Level 14, State 1, Line 39
Violation of PRIMARY KEY constraint 'PK_GUILD_INFO'. Cannot insert duplicate key in object 'GUILD_INFO'.
The statement has been terminated.

(1 row(s) affected)


(1 row(s) affected)


Is this right?