|
You last visited: Today at 14:17
Advertisement
[RELEASE] Siege Script for every 3day,1week and twice a month
Discussion on [RELEASE] Siege Script for every 3day,1week and twice a month within the Dekaron Private Server forum part of the Dekaron category.
07/14/2009, 03:25
|
#1
|
elite*gold: 0
Join Date: Nov 2008
Posts: 784
Received Thanks: 339
|
[RELEASE] Siege Script for every 3day,1week and twice a month
Hit thanks if you like
Quote:
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()
-DEFAULT-//SELECT @v_siege_start_date = CONVERT(VARCHAR(10), DATEADD(d, 15-DATEPART(dw, @i_GetDate), @i_GetDate), 112) + '210000'
-Once week every Saturday-//SELECT @v_siege_start_date = CONVERT(VARCHAR(10), DATEADD(d, 7-DATEPART(dw, @i_GetDate), @i_GetDate), 112) + '210000'
-Once Week every Sunday-//SELECT @v_siege_start_date = CONVERT(VARCHAR(10), DATEADD(d, 8-DATEPART(dw, @i_GetDate), @i_GetDate), 112) + '210000'
-Every 3 Days-//SELECT @v_siege_start_date= CONVERT(VARCHAR(10),GetDate()+3,112)+'210000'
--//Set the line below with which one you want above after you do, delete above lines and query it
SELECT @v_siege_start_date = CONVERT(VARCHAR(10), DATEADD(d, 15-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 = 'ϵͳĬÈÏ'
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_star t_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
|
|
|
|
07/14/2009, 06:42
|
#2
|
elite*gold: 0
Join Date: May 2008
Posts: 863
Received Thanks: 197
|
Maybe you know how to change time? Cause mine is starting at 01:00 am
|
|
|
07/14/2009, 13:20
|
#3
|
elite*gold: 20
Join Date: Mar 2008
Posts: 964
Received Thanks: 232
|
well once 3 guilds register seal you can just start with gm command.
|
|
|
07/14/2009, 13:25
|
#4
|
elite*gold: 20
Join Date: Nov 2007
Posts: 2,853
Received Thanks: 1,876
|
Hmm 1ste part went ok, but 2nd
Quote:
Msg 137, Level 15, State 2, Line 1
Must declare the variable '@i_GetDate'.
Msg 137, Level 15, State 2, Line 2
Must declare the variable '@v_siege_start_date'.
Msg 137, Level 15, State 1, Line 9
Must declare the variable '@guild_code'.
Msg 137, Level 15, State 1, Line 10
Must declare the variable '@guild_name'.
Msg 137, Level 15, State 1, Line 11
Must declare the variable '@v_siege_no'.
Msg 137, Level 15, State 2, Line 13
Must declare the variable '@guild_code'.
Msg 137, Level 15, State 2, Line 17
Must declare the variable '@v_siege_no'.
Msg 137, Level 15, State 2, Line 19
Must declare the variable '@guild_code'.
Msg 137, Level 15, State 2, Line 21
Must declare the variable '@v_siege_star'.
Msg 137, Level 15, State 2, Line 64
Must declare the variable '@v_strDate1'.
|
|
|
|
07/14/2009, 16:51
|
#5
|
elite*gold: 0
Join Date: May 2008
Posts: 863
Received Thanks: 197
|
Quote:
Originally Posted by janvier123
Hmm 1ste part went ok, but 2nd
|
What 2nd part? execute whole code at once, don't make it in parts
|
|
|
07/14/2009, 19:35
|
#6
|
elite*gold: 0
Join Date: May 2008
Posts: 238
Received Thanks: 8
|
not working . just give the orginal one .
and what's that red lines ? should i delete them ? or what to edit them ?
explane more . plz
|
|
|
07/14/2009, 22:15
|
#7
|
elite*gold: 0
Join Date: May 2008
Posts: 863
Received Thanks: 197
|
Ok I have executed the line with every 3 days but after winning siege it is automatically start next time after 9 days. Why?
|
|
|
07/14/2009, 23:37
|
#8
|
elite*gold: 0
Join Date: Nov 2008
Posts: 784
Received Thanks: 339
|
The original one has the same layout but is chinese...but the siege script isnt showing chinese even in Ms Word. so to save the confusion i trans it. but here is orig
QQ消息管理器 body { font-size:8.5pt; margin:2px; } td{ font-size:8.5pt;border:1px solid;} Deka DEV
6:51:01 AM
I have gave you a txt file about seige SQL set,and find this:set @i_GetDate=getdate()--//默认SELECT @v_siege_start_date = CONVERT(VARCHAR(10), DATEADD(d, 15-DATEPART(dw, @i_GetDate), @i_GetDate), 112) + '210000'--//每周六SELECT @v_siege_start_date = CONVERT(VARCHAR(10), DATEADD(d, 7-DATEPART(dw, @i_GetDate), @i_GetDate), 112) + '210000'--//每周星期天SELECT @v_siege_start_date = CONVERT(VARCHAR(10), DATEADD(d, 8-DATEPART(dw, @i_GetDate), @i_GetDate), 112) + '210000'--//三天一次SELECT @v_siege_start_date= CONVERT(VARCHAR(10),GetDate()+3,112)+'210000'--//攻城时间SELECT @v_siege_start_date = CONVERT(VARCHAR(10), DATEADD(d, 15-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)
Deka DEV
6:59:11 AM
--//默认SELECT default time,once half a month--//每周六SELECT once a week,ervry Saturday--//每周星期天SELECT once a week,ervry Sunday--//三天一次SELECT once three days--//攻城时间 seige time
Deka DEV
7:02:37 AM
if you want to set seige time on every Sunday,you should run codes like"set @i_GetDate=getdate()SELECT @v_siege_start_date @v_siege_start_date = CONVERT(VARCHAR(10), DATEADD(d, 8-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)
Deka DEV
7:04:33 AM
if you ran all the codes,the last will go into effect,it's "--//三天一次SELECT @v_siege_start_date= CONVERT(VARCHAR(10),GetDate()+3,112)+'210000'"once three days"
|
|
|
07/15/2009, 06:03
|
#9
|
elite*gold: 20
Join Date: Nov 2007
Posts: 2,853
Received Thanks: 1,876
|
there is a typo on line 47
set @v_strDate1=dbo.FN_BinDateToDateTime(@v_siege_star t_time)
there is a space between star and t
once i fix that:
Quote:
Msg 208, Level 16, State 1, Line 36
Invalid object name 'dbo.FN_DateToShortStrDate'.
|
create that table ? or ..... ?
|
|
|
07/16/2009, 00:14
|
#10
|
elite*gold: 0
Join Date: Jul 2009
Posts: 51
Received Thanks: 1
|
which folder this file for Siege (amending this) and change?
so when I talk to in Bastian loa all options Siege of info does not exist, as this concert and sign up at least one Guild? or libero for 3 Siege ritual do?
I explain better please
|
|
|
07/18/2009, 17:09
|
#11
|
elite*gold: 0
Join Date: Feb 2009
Posts: 37
Received Thanks: 3
|
Quote:
Originally Posted by janvier123
there is a typo on line 47
set @v_strDate1=dbo.FN_BinDateToDateTime(@v_siege_star t_time)
there is a space between star and t
once i fix that:
create that table ? or ..... ?
|
Seams lot ppl dont know sql here...well FN_BinDateToDateTime is function inside of character db.
you might type character.dbo.FN_BinDateToDateTime.... and it will work ...
|
|
|
07/18/2009, 19:22
|
#12
|
elite*gold: 0
Join Date: May 2008
Posts: 238
Received Thanks: 8
|
the red lines and red fonts u put the time u want ??
or only need to copy and what that line to delete it ??
can u explene more plz ?
|
|
|
07/25/2009, 11:07
|
#13
|
elite*gold: 0
Join Date: Mar 2008
Posts: 195
Received Thanks: 6
|
Sooo, i fixed the lines where was some mistakes and this is what i receive.
Server: Msg 256, Level 16, State 1, Line 33
The data type datetime is invalid for the substring function. Allowed types are: char/varchar, nchar/nvarchar, and binary/varbinary.
Server: Msg 257, Level 16, State 1, Line 33
Implicit conversion from data type datetime to binary is not allowed. Use the CONVERT function to run this query.
What should i do ?
|
|
|
07/27/2009, 00:31
|
#14
|
elite*gold: 0
Join Date: Apr 2008
Posts: 414
Received Thanks: 125
|
Quote:
Originally Posted by Petar86
Seams lot ppl dont know sql here...well FN_BinDateToDateTime is function inside of character db.
you might type character.dbo.FN_BinDateToDateTime.... and it will work ...
|
came back with another error, seems u dont know sql either
Quote:
error:
Server: Msg 446, Level 16, State 8, Line 30
Cannot resolve collation conflict for substring operation.
|
|
|
|
07/27/2009, 01:08
|
#15
|
elite*gold: 0
Join Date: Jul 2009
Posts: 10
Received Thanks: 0
|
SET @v_siege_no = SUBSTRING(dbo.FN_DateToShortStrDate(GetDate()), 3, 4) + '0001'
Individual name 'dbo.FN_DateToShortStrDate' error
|
|
|
Similar Threads
|
Please help siege script
08/31/2010 - Dekaron Private Server - 27 Replies
when i run siege script i got this error msg.
Msg 241, Level 16, State 1, Procedure SP_SIEGE_START_TIME_U, Line 52
Conversion failed when converting date and/or time from character string.
Why i try to run siege srcipt again ? !!!
cuz i got this error.
http://upic.me/i/gb/siegeerror.jpg
|
Help Change Siege Time ( Full Script )
07/20/2010 - Dekaron Private Server - 2 Replies
hello , i got my siege time on my test server start on sunday 21:00 server time ,
can someone please tell me how to change it to saturday 21:00 ? with the full script replacement.
Thanks, Zakurin
|
script to siege!
01/07/2010 - Dekaron Private Server - 41 Replies
this is the full script to siege enjoy!
DECLARE @v_siege_no char(10)
DECLARE @guild_code varchar(10)
DECLARE @v_strDate varchar(10)
DECLARE @v_regdate varchar(10)
DECLARE @v_strChannel varchar(2)
DECLARE @i_bychannel tinyint
DECLARE @o_dwDungeonRegistTime varbinary(4)
|
All times are GMT +2. The time now is 14:17.
|
|