Siege Change date and time.

10/24/2020 20:03 [DEV]Dekaron#1
Ok lets see what we can do:

With this you no need use any scripts all what you need to do is follow this steps.

Change Siege Ritual day and time
1) go to MSSQL database character -> Programmability
__a) expand Function
__b) expand Scalar-valued Functions

Go to dbo.FN.GetDungeonRegistTime (click right mouse button and select Modify)
Here we can change when we can start Siege Ritual -8 is how many days before we can start Siege Ritual 17:00:00 its hour
[Only registered and activated users can see links. Click Here To Register...]

After change press Execute or press F5

Change Date and time for Siege Battle
2) -||-
__a) -||-
__b) Press right mouse button on dbo.GetSiegeStartBinTime and select Modify

[Only registered and activated users can see links. Click Here To Register...]

After change press Execute or press F5

Now run your server login to your account with GM character.
use command /gm siegestart now and then use command /gm siegeend now



For Sunday start:

USE [CHARACTER]
GO
/****** Object: UserDefinedFunction [dbo].[FN_GetSiegeStartBinTime] Script Date: 25.10.2020 01:31:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/************************************************** ****************************
이 름 : dbo.FN_GetSiegeStartBinTime
설 명 : 다음 공성전 시작일자를 반환한다.
예 제 : select dbo.FN_GetSiegeStartTime --//반환값 : 0x23E52D6C
수정내역:
Ver Date Author Description
--------- ---------- --------------- -----------------------------------
1.0 2006-05-05 Han Ji Wook 1. 초기생성
1.1 2006-05-11 Han Ji Wook 1. 다음공성전 시작시간 변경 >> 2주후 일요일
1.2 2009-12-22 Park Chanik 1. 공성 2010년 에러 관련 변경
************************************************** ****************************/
ALTER FUNCTION [dbo].[FN_GetSiegeStartBinTime]
(
@i_GetDate DATETIME
) RETURNS VARBINARY(4)
AS
BEGIN
DECLARE @v_siege_start_time VARBINARY(4)
DECLARE @v_siege_start_date VARCHAR(14)
--// 다음공성전 시작시간 Default Setting : 일요일 9시
SELECT @v_siege_start_date = CONVERT(VARCHAR(10), DATEADD(d, 8-DATEPART(dw, @i_GetDate), @i_GetDate), 112) + '210000'

-- 2009년 12월 22일 변경
-- CAST(SUBSTRING(@v_siege_start_date,4,1) AS INT)* 100000000 ---> CAST(SUBSTRING(@v_siege_start_date,3,2) AS INT)* 100000000
SELECT @v_siege_start_time = CAST(SUBSTRING(@v_siege_start_date,3,2) AS INT) * 100000000
+ CAST(SUBSTRING(@v_siege_start_date,5,2) AS INT) * 1000000
+ CAST(SUBSTRING(@v_siege_start_date,7,2) AS INT) * 10000
+ CAST(SUBSTRING(@v_siege_start_date,9,2) AS INT) * 100
+ CAST(SUBSTRING(@v_siege_start_date,11,2) AS INT)

IF DATALENGTH(@v_siege_start_time) <> 4
BEGIN
SELECT @v_siege_start_time = 0x00000000
END

RETURN @v_siege_start_time
END


For Saturday:

USE [CHARACTER]
GO
/****** Object: UserDefinedFunction [dbo].[FN_GetSiegeStartBinTime] Script Date: 25.10.2020 01:31:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/************************************************** ****************************
이 름 : dbo.FN_GetSiegeStartBinTime
설 명 : 다음 공성전 시작일자를 반환한다.
예 제 : select dbo.FN_GetSiegeStartTime --//반환값 : 0x23E52D6C
수정내역:
Ver Date Author Description
--------- ---------- --------------- -----------------------------------
1.0 2006-05-05 Han Ji Wook 1. 초기생성
1.1 2006-05-11 Han Ji Wook 1. 다음공성전 시작시간 변경 >> 2주후 일요일
1.2 2009-12-22 Park Chanik 1. 공성 2010년 에러 관련 변경
************************************************** ****************************/
ALTER FUNCTION [dbo].[FN_GetSiegeStartBinTime]
(
@i_GetDate DATETIME
) RETURNS VARBINARY(4)
AS
BEGIN
DECLARE @v_siege_start_time VARBINARY(4)
DECLARE @v_siege_start_date VARCHAR(14)
--// 다음공성전 시작시간 Default Setting : 일요일 9시
SELECT @v_siege_start_date = CONVERT(VARCHAR(10), DATEADD(d, 7-DATEPART(dw, @i_GetDate), @i_GetDate), 112) + '210000'

-- 2009년 12월 22일 변경
-- CAST(SUBSTRING(@v_siege_start_date,4,1) AS INT)* 100000000 ---> CAST(SUBSTRING(@v_siege_start_date,3,2) AS INT)* 100000000
SELECT @v_siege_start_time = CAST(SUBSTRING(@v_siege_start_date,3,2) AS INT) * 100000000
+ CAST(SUBSTRING(@v_siege_start_date,5,2) AS INT) * 1000000
+ CAST(SUBSTRING(@v_siege_start_date,7,2) AS INT) * 10000
+ CAST(SUBSTRING(@v_siege_start_date,9,2) AS INT) * 100
+ CAST(SUBSTRING(@v_siege_start_date,11,2) AS INT)

IF DATALENGTH(@v_siege_start_time) <> 4
BEGIN
SELECT @v_siege_start_time = 0x00000000
END

RETURN @v_siege_start_time
END


8 - Sunday
7 - Saturday
6 - Friday
5 - Thursday
4 - Wednesday
3 - Tuesday
2 - Monday
10/25/2020 19:10 nemesidevmv#2
thanks for the post
10/25/2020 19:48 [DEV]Dekaron#3
Quote:
Originally Posted by nemesidevmv View Post
thanks for the post
no problem man.
11/07/2020 18:05 yami1203#4
Quote:
Originally Posted by [DEV]Dekaron View Post
Ok lets see what we can do:

With this you no need use any scripts all what you need to do is follow this steps.

Change Siege Ritual day and time
1) go to MSSQL database character -> Programmability
__a) expand Function
__b) expand Scalar-valued Functions

Go to dbo.FN.GetDungeonRegistTime (click right mouse button and select Modify)
Here we can change when we can start Siege Ritual -8 is how many days before we can start Siege Ritual 17:00:00 its hour
[Only registered and activated users can see links. Click Here To Register...]

After change press Execute or press F5

Change Date and time for Siege Battle
2) -||-
__a) -||-
__b) Press right mouse button on dbo.GetSiegeStartBinTime and select Modify

[Only registered and activated users can see links. Click Here To Register...]

After change press Execute or press F5

Now run your server login to your account with GM character.
use command /gm siegestart now and then use command /gm siegeend now

go to Leonhart and Check Siege Information
[Only registered and activated users can see links. Click Here To Register...]

For Sunday start:

USE [CHARACTER]
GO
/****** Object: UserDefinedFunction [dbo].[FN_GetSiegeStartBinTime] Script Date: 25.10.2020 01:31:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/************************************************** ****************************
이 름 : dbo.FN_GetSiegeStartBinTime
설 명 : 다음 공성전 시작일자를 반환한다.
예 제 : select dbo.FN_GetSiegeStartTime --//반환값 : 0x23E52D6C
수정내역:
Ver Date Author Description
--------- ---------- --------------- -----------------------------------
1.0 2006-05-05 Han Ji Wook 1. 초기생성
1.1 2006-05-11 Han Ji Wook 1. 다음공성전 시작시간 변경 >> 2주후 일요일
1.2 2009-12-22 Park Chanik 1. 공성 2010년 에러 관련 변경
************************************************** ****************************/
ALTER FUNCTION [dbo].[FN_GetSiegeStartBinTime]
(
@i_GetDate DATETIME
) RETURNS VARBINARY(4)
AS
BEGIN
DECLARE @v_siege_start_time VARBINARY(4)
DECLARE @v_siege_start_date VARCHAR(14)
--// 다음공성전 시작시간 Default Setting : 일요일 9시
SELECT @v_siege_start_date = CONVERT(VARCHAR(10), DATEADD(d, 8-DATEPART(dw, @i_GetDate), @i_GetDate), 112) + '210000'

-- 2009년 12월 22일 변경
-- CAST(SUBSTRING(@v_siege_start_date,4,1) AS INT)* 100000000 ---> CAST(SUBSTRING(@v_siege_start_date,3,2) AS INT)* 100000000
SELECT @v_siege_start_time = CAST(SUBSTRING(@v_siege_start_date,3,2) AS INT) * 100000000
+ CAST(SUBSTRING(@v_siege_start_date,5,2) AS INT) * 1000000
+ CAST(SUBSTRING(@v_siege_start_date,7,2) AS INT) * 10000
+ CAST(SUBSTRING(@v_siege_start_date,9,2) AS INT) * 100
+ CAST(SUBSTRING(@v_siege_start_date,11,2) AS INT)

IF DATALENGTH(@v_siege_start_time) <> 4
BEGIN
SELECT @v_siege_start_time = 0x00000000
END

RETURN @v_siege_start_time
END


For Saturday:

USE [CHARACTER]
GO
/****** Object: UserDefinedFunction [dbo].[FN_GetSiegeStartBinTime] Script Date: 25.10.2020 01:31:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/************************************************** ****************************
이 름 : dbo.FN_GetSiegeStartBinTime
설 명 : 다음 공성전 시작일자를 반환한다.
예 제 : select dbo.FN_GetSiegeStartTime --//반환값 : 0x23E52D6C
수정내역:
Ver Date Author Description
--------- ---------- --------------- -----------------------------------
1.0 2006-05-05 Han Ji Wook 1. 초기생성
1.1 2006-05-11 Han Ji Wook 1. 다음공성전 시작시간 변경 >> 2주후 일요일
1.2 2009-12-22 Park Chanik 1. 공성 2010년 에러 관련 변경
************************************************** ****************************/
ALTER FUNCTION [dbo].[FN_GetSiegeStartBinTime]
(
@i_GetDate DATETIME
) RETURNS VARBINARY(4)
AS
BEGIN
DECLARE @v_siege_start_time VARBINARY(4)
DECLARE @v_siege_start_date VARCHAR(14)
--// 다음공성전 시작시간 Default Setting : 일요일 9시
SELECT @v_siege_start_date = CONVERT(VARCHAR(10), DATEADD(d, 7-DATEPART(dw, @i_GetDate), @i_GetDate), 112) + '210000'

-- 2009년 12월 22일 변경
-- CAST(SUBSTRING(@v_siege_start_date,4,1) AS INT)* 100000000 ---> CAST(SUBSTRING(@v_siege_start_date,3,2) AS INT)* 100000000
SELECT @v_siege_start_time = CAST(SUBSTRING(@v_siege_start_date,3,2) AS INT) * 100000000
+ CAST(SUBSTRING(@v_siege_start_date,5,2) AS INT) * 1000000
+ CAST(SUBSTRING(@v_siege_start_date,7,2) AS INT) * 10000
+ CAST(SUBSTRING(@v_siege_start_date,9,2) AS INT) * 100
+ CAST(SUBSTRING(@v_siege_start_date,11,2) AS INT)

IF DATALENGTH(@v_siege_start_time) <> 4
BEGIN
SELECT @v_siege_start_time = 0x00000000
END

RETURN @v_siege_start_time
END


8 - Sunday
7 - Saturday
6 - Friday
5 - Thursday
4 - Wednesday
3 - Tuesday
2 - Monday
I followed all what you did but when i end the siege, dekaronserver will crash :(
11/07/2020 18:52 [DEV]Dekaron#5
then probably you fucked up something show us what you did what you change.

like for me all works OK.
11/09/2020 07:40 yami1203#6
Quote:
Originally Posted by [DEV]Dekaron View Post
then probably you fucked up something show us what you did what you change.

like for me all works OK.
Is it possible to reset the siege query that was registered in the db? Because I think the query that Farius used on this db is different from yours.
11/09/2020 08:27 [DEV]Dekaron#7
Because my scripts are original. ppl make to much mess in some script
Yes you can.
11/09/2020 08:57 yami1203#8
Quote:
Originally Posted by [DEV]Dekaron View Post
Because my scripts are original. ppl make to much mess in some script
Yes you can.
Just delete the getsiegetime something then requery???
11/09/2020 09:18 [DEV]Dekaron#9
when you run your server do you get info about siege?
11/09/2020 14:44 yami1203#10
Quote:
Originally Posted by [DEV]Dekaron View Post
when you run your server do you get info about siege?
What do you mean? Siege in this db was already set by Farius but only once every two weeks.
11/09/2020 14:48 [DEV]Dekaron#11
Then all what you need is change 15 to 8

Once per two weeks at sunday
SELECT @v_siege_start_date = CONVERT(VARCHAR(10), DATEADD(d, 15-DATEPART(dw, @i_GetDate), @i_GetDate), 112) + '210000'

Every week at sunday
SELECT @v_siege_start_date = CONVERT(VARCHAR(10), DATEADD(d, 8-DATEPART(dw, @i_GetDate), @i_GetDate), 112) + '210000'
11/09/2020 17:34 yami1203#12
Quote:
Originally Posted by [DEV]Dekaron View Post
Then all what you need is change 15 to 8

Once per two weeks at sunday
SELECT @v_siege_start_date = CONVERT(VARCHAR(10), DATEADD(d, 15-DATEPART(dw, @i_GetDate), @i_GetDate), 112) + '210000'

Every week at sunday
SELECT @v_siege_start_date = CONVERT(VARCHAR(10), DATEADD(d, 8-DATEPART(dw, @i_GetDate), @i_GetDate), 112) + '210000'
yep, already done that. Instead of showing the next siege date, the siege info says the next siege is "2014 9/7" then if i start then end the siege, dekaronserver would crash.
11/09/2020 20:23 [DEV]Dekaron#13
did you try?

when you start your server do you getting info about siege (at the end of start server)

if you getting info at the end like NOT SIEGE ON CHANNEL that mean you don't have working SIEGE that's why your server crashing after using command siege stop now
12/14/2020 17:48 yami1203#14
it says "[SIEGE INFO] WARTIME ALARM TIME[0]
12/14/2020 23:24 [DEV]Dekaron#15
Quote:
Originally Posted by yami1203 View Post
it says "[SIEGE INFO] WARTIME ALARM TIME[0]
all is fine with that. this only mean that siege is load and works

[Only registered and activated users can see links. Click Here To Register...]

just login to your account, use command siege_start now, and wait 5~10 second and use command siege_end now

[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]