![]() |
|
|
#1 |
|
Архивный участник
Join Date: Sep 2006
Posts: 882
|
Every time the clan leader (owner of the castle) puts some seeds to sell. He gets an answer that the seeds will be on sell next day, but nothing happens! Where could be the problem?
|
|
|
|
|
#2 |
|
Архивный участник
Join Date: Sep 2005
Posts: 1,014
|
Your server is restarted each day after that ?
Have you SQL Store Procs with datetime vars corrected ? |
|
|
|
|
#3 |
|
Архивный участник
Join Date: Sep 2006
Posts: 882
|
No, server doesn't restart every day and yes, I have the procedure fix.
And here some of my procedures: Code:
/********************************************
lin_LoadLastTaxUpdate
INPUT
OUTPUT
made by
carrot
date
2004-02-29
********************************************/
create PROCEDURE [DBO].[lin_LoadLastTaxUpdate]
AS
SET NOCOUNT ON
SELECT TOP 1
YEAR(income_update), MONTH(income_update), DAY(income_update),
DATEPART ( hh , income_update ), DATEPART ( mi , income_update ), DATEPART ( ss , income_update ),
YEAR(tax_change), MONTH(tax_change), DAY(tax_change),
DATEPART ( hh , tax_change ), DATEPART ( mi , tax_change), DATEPART ( ss , tax_change),
YEAR(manor_reset), MONTH(manor_reset), DAY(manor_reset),
DATEPART ( hh , manor_reset ), DATEPART ( mi , manor_reset), DATEPART ( ss , manor_reset)
FROM
castle_tax
Code:
/********************************************
lin_LoadManorInfo
load manor seed next
INPUT
@manor_id
OUTPUT
return
made by
carrot
date
2004-07-4
change
********************************************/
CREATE PROCEDURE [DBO].[lin_LoadManorInfo]
(
@manor_id INT
)
AS
SET NOCOUNT ON
IF EXISTS(SELECT * FROM manor_info WHERE manor_id = @manor_id)
BEGIN
SELECT
residence_id, adena_vault, crop_buy_vault, change_state, convert(nvarchar(19), last_changed, 121)
FROM
manor_info
WHERE
manor_id = @manor_id
END
ELSE
BEGIN
SELECT 0, 0, 0, 0, '0000-00-00 00:00:00'
END
GO
Code:
/********************************************
lin_LoadManorSeed
load manor seed
INPUT
@manor_id
OUTPUT
return
made by
carrot
date
2004-07-4
change
********************************************/
CREATE PROCEDURE [DBO].[lin_LoadManorSeed]
(
@manor_id INT
)
AS
SET NOCOUNT ON
SELECT
data_index, seed_id, seed_price, seed_sell_count, seed_remain_count,
crop_id, crop_price, crop_buy_count, crop_remain_count, crop_type, crop_deposit
FROM
manor_data
WHERE
manor_id = @manor_id
ORDER BY data_index
GO
Code:
/********************************************
lin_LoadManorSeed_N
load manor seed next
INPUT
@manor_id
OUTPUT
return
made by
carrot
date
2004-07-4
change
********************************************/
CREATE PROCEDURE [DBO].[lin_LoadManorSeed_N]
(
@manor_id INT
)
AS
SET NOCOUNT ON
SELECT
data_index, seed_id_n, seed_price_n, seed_sell_count_n,
crop_id_n, crop_buy_count_n, crop_price_n, crop_type_n
FROM
manor_data_n
WHERE
manor_id = @manor_id
ORDER BY
data_index
GO
Code:
/********************************************
lin_SaveCastleIncome
INPUT
@crop_income int,
@shop_income int,
@castle_id int
OUTPUT
return
made by
carrot
date
2002-06-16
change 2003-12-22 carrot
add about agit income
change 2004-03-02 carrot
add taxincomeTemp
********************************************/
create PROCEDURE [DBO].[lin_SaveCastleIncome]
(
@crop_income int,
@shop_income int,
@castle_id int ,
@crop_income_temp int,
@is_castle int
)
AS
SET NOCOUNT ON
if (@is_castle = 1) -- castle
UPDATE castle SET crop_income = @crop_income, shop_income = @shop_income, shop_income_temp = @crop_income_temp WHERE id = @castle_id
else -- agit
UPDATE agit SET shop_income = @shop_income, shop_income_temp = @crop_income_temp WHERE id = @castle_id
GO
Code:
/********************************************
lin_SaveManorInfo
INPUT
@manor_id
OUTPUT
return
made by
carrot
date
2004-07-4
change
********************************************/
CREATE PROCEDURE [DBO].[lin_SaveManorInfo]
(
@manor_id INT,
@residence_id INT,
@AdenaSeedSell INT,
@AdenaCropBuy INT,
@change_state TINYINT,
@last_changed DATETIME
)
AS
SET NOCOUNT ON
IF EXISTS(SELECT * FROM manor_info WHERE manor_id = @manor_id)
BEGIN
UPDATE
manor_info
SET
residence_id = @residence_id,
adena_vault = @AdenaSeedSell,
crop_buy_vault = @AdenaCropBuy,
change_state = @change_state,
last_changed = @last_changed
WHERE
manor_id = @manor_id
END
ELSE
BEGIN
INSERT INTO manor_info (manor_id, residence_id, adena_vault, crop_buy_vault, change_state, last_changed)
VALUES (@manor_id, @residence_id,@AdenaSeedSell,@AdenaCropBuy, @change_state, @last_changed)
END
GO
Code:
/********************************************
lin_SaveManorSeed
save manor seed crop data
INPUT
OUTPUT
return
made by
carrot
date
2004-06-21
change
********************************************/
CREATE PROCEDURE [DBO].[lin_SaveManorSeed]
(
@manor_id INT,
@data_index INT,
@seed_id INT,
@seed_price INT,
@seed_sell_count INT,
@seed_remain_count INT,
@crop_id INT,
@crop_buy_count INT,
@crop_remain_count INT,
@crop_price INT,
@crop_type INT,
@crop_deposit INT
)
AS
SET NOCOUNT ON
IF EXISTS(SELECT * FROM manor_data WHERE manor_id = @manor_id AND data_index =@data_index)
BEGIN
UPDATE
manor_data
SET
seed_id = @seed_id,
seed_price = @seed_price,
seed_sell_count = @seed_sell_count,
seed_remain_count = @seed_remain_count,
crop_id = @crop_id,
crop_buy_count = @crop_buy_count,
crop_price = @crop_price,
crop_type = @crop_type,
crop_remain_count = @crop_remain_count,
crop_deposit = @crop_deposit
WHERE
manor_id = @manor_id AND data_index = @data_index
END
ELSE
BEGIN
INSERT INTO
manor_data
(manor_id, data_index, seed_id, seed_price, seed_sell_count, seed_remain_count, crop_id, crop_buy_count, crop_price, crop_type, crop_remain_count, crop_deposit)
VALUES
(@manor_id, @data_index, @seed_id, @seed_price, @seed_sell_count, @seed_remain_count, @crop_id, @crop_buy_count, @crop_price, @crop_type, @crop_remain_count, @crop_deposit)
END
GO
Code:
/********************************************
lin_SaveManorSeed_N
save manor seed crop data next
INPUT
OUTPUT
return
made by
carrot
date
2004-07-4
change
********************************************/
CREATE PROCEDURE [DBO].[lin_SaveManorSeed_N]
(
@manor_id INT,
@data_index INT,
@seed_id_n INT,
@seed_price_n INT,
@seed_sell_count_n INT,
@crop_id_n INT,
@crop_buy_count_n INT,
@crop_price_n INT,
@crop_type_n INT
)
AS
SET NOCOUNT ON
IF EXISTS(SELECT * FROM manor_data_n WHERE manor_id = @manor_id AND data_index =@data_index)
BEGIN
UPDATE
manor_data_n
SET
seed_id_n = @seed_id_n,
seed_price_n = @seed_price_n,
seed_sell_count_n = @seed_sell_count_n,
crop_id_n = @crop_id_n,
crop_buy_count_n = @crop_buy_count_n,
crop_price_n = @crop_price_n,
crop_type_n = @crop_type_n
WHERE
manor_id = @manor_id AND data_index = @data_index
END
ELSE
BEGIN
INSERT INTO
manor_data_n
(manor_id, data_index, seed_id_n, seed_price_n, seed_sell_count_n, crop_id_n, crop_buy_count_n, crop_price_n, crop_type_n)
VALUES
(@manor_id, @data_index, @seed_id_n, @seed_price_n, @seed_sell_count_n, @crop_id_n, @crop_buy_count_n, @crop_price_n, @crop_type_n)
END
GO
|
|
|
|
|
#4 |
|
Архивный участник
Join Date: Apr 2005
Posts: 306
|
check your manor htmls
|
|
|
|
|
#5 |
|
Архивный участник
Join Date: Feb 2007
Posts: 202
|
I guess his problem is solved coz in same topic in Russian Section it is solved. The problem was in owners of castle, players need to learn how to play...
|
|
|
|
|
#6 |
|
Архивный участник
Join Date: Sep 2006
Posts: 882
|
COULD be an answer, but I double check before I say that everything is Ok.
|
|
|
|
|
#7 |
|
Архивный участник
Join Date: Mar 2006
Posts: 104
|
So what was the issue?
|
|
|
|
|
#8 |
|
Архивный участник
Join Date: Jan 2007
Posts: 4
|
I have the some problem, what is it pls|?
|
|
|
|
|
#9 |
|
Архивный участник
Join Date: Mar 2006
Posts: 104
|
My users were just retarded.
Check for seeds in your world, someone bought them all and is hording them. |
|
|
|
|
#10 |
|
Архивный участник
Join Date: Jan 2007
Posts: 4
|
but my users have revenou for seeds sale 0 adena in castle vault report. It is refreshing after 24h or no?
|
|
|
|
|
#11 |
|
Архивный участник
Join Date: May 2005
Posts: 979
|
I have problem my manor reset every 24h so castle owner must set it again and again every day.. i cant find fix.. can I fix it using these procedures?
|
|
|
|
|
#12 |
|
Архивный участник
Join Date: Dec 2005
Posts: 156
|
Code:
ALTER PROCEDURE dbo.lin_SetLastTaxUpdate
(
@income varchar(100),
@tax varchar(100),
@manor varchar(100)
)
AS
declare @income_ datetime
declare @tax_ datetime
declare @manor_ datetime
set @income =left(@income,5) + cast((cast(replace(substring(@income,6,2),'-','') as int) + 1) as varchar) + substring(@income, charindex ('-', @income, 6),100)
set @tax =left(@tax,5) + cast((cast(replace(substring(@tax,6,2),'-','') as int) + 1) as varchar) + substring(@tax, charindex ('-', @tax, 6),100)
set @manor =left(@manor,5) + cast((cast(replace(substring(@manor,6,2),'-','') as int) + 1) as varchar) + substring(@tax, charindex ('-', @tax, 6),100)
set @income_ = convert(datetime, @income)
set @tax_ = convert(datetime, @tax)
set @manor_ = convert(datetime, @manor)
SET NOCOUNT ON
IF EXISTS(SELECT * FROM castle_tax)
BEGIN
UPDATE castle_tax SET income_update = @income_, tax_change = @tax_, manor_reset = @manor_
END
ELSE
BEGIN
INSERT INTO castle_tax VALUES
( @income_, @tax_, @manor_)
END
|
|
|
|
|
#13 |
|
Архивный участник
Join Date: May 2005
Posts: 979
|
thanks a lot/. i dont have that procedure :-D so I must created it..
|
|
|
|
|
#14 |
|
Архивный участник
Join Date: Dec 2005
Posts: 156
|
credits goes to someone else but np
|
|
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|