Hi how to setting auto add Revive new account in RaGEZONE Community Edition!
Thanks
Printable View
Hi how to setting auto add Revive new account in RaGEZONE Community Edition!
Thanks
You have to change this in doDeath @Warz_Sever.sln
Sakrom. you have script setting auto add Revive new account?
It's a function not a warz_server.sln thing ..... Go to navicat functions in your db and wz_char something I can't tell because I'm on my phone that's all I cando for you right now
OK. Thanks.
setting auto add Revive new account Free 10 time. Next pay 25 GC .
Sorry. I don't know.
----------------------------------
------ WZ_CharRevive ------
------ WZ_CharRevive ------
.
-- ----------------------------
-- Procedure structure for [WZ_CharRevive]
-- ----------------------------
ALTER PROCEDURE [dbo].[WZ_CharRevive]
@in_CustomerID int,
@in_CharID int,
@in_Health int
AS
BEGIN
SET NOCOUNT ON;
--------------------------------------------------------------------
-- validate CharID/CustomerID pair
--------------------------------------------------------------------
declare @CustomerID int = 0
select @CustomerID=CustomerID from UsersChars where CharID=@in_CharID
if(@@ROWCOUNT = 0 or @CustomerID <> @in_CustomerID) begin
select 6 as ResultCode, 'bad charid' as ResultMsg
return
end
--------------------------------------------------------------------
-- get developer flag
--------------------------------------------------------------------
declare @IsDeveloper int = 0
select @IsDeveloper=IsDeveloper from UsersData where CustomerID=@in_CustomerID
--------------------------------------------------------------------
-- note that revive timer is 1hrs, change in WZ_GetAccountInfo1 as well
--------------------------------------------------------------------
declare @sectorevive int
declare @alive int = 0
--------------------------------------------------------------------
--- Check for Premium Account
--- If Premium then SecToRevive is 15 mins.
--- If Normal then SecToRevive is 30 mins.
--------------------------------------------------------------------
DECLARE @iSPRemium int = 0
SELECT @iSPRemium=isPremium FROM UsersData WHERE CustomerID=@in_CustomerID
IF @iSPRemium = 1) BEGIN
SELECT
@sectorevive=DATEDIFF (second, GETUTCDATE (), DATEADD (second, 960, DeathUtcTime)),
@alive=Alive
FROM UsersChars WHERE CharID=@in_CharID
END
ELSE
BEGIN
SELECT
@sectorevive=DATEDIFF (second, GETUTCDATE (), DATEADD (second, 1820, DeathUtcTime)),
@alive=Alive
FROM UsersChars WHERE CharID=@in_CharID
END
--------------------------------------------------------------------
-- prevent fast teleporting if we're not dead
--------------------------------------------------------------------
IF @alive <> 0) BEGIN
select 6 as ResultCode, 'character is not dead' as ResultMsg
RETURN
END
-- do not allow early revive, give 2min grace
--if @sectorevive > 120 and @IsDeveloper = 0) begin
-- select 6 as ResultCode, 'too early' as ResultMsg
-- return
--end
--------------------------------------------------------------------
-- Revive Char Early
--------------------------------------------------------------------
IF @sectorevive > 20) BEGIN
-- Check RevivePoint
DECLARE @RevivePoint int = 0
SELECT @RevivePoint=Point FROM Application_Revive WHERE CustomerID = @in_CustomerID
if @RevivePoint > 0
begin
-- Use RevivePoint
UPDATE Application_Revive SET Point=Point-1 WHERE CustomerID = @in_CustomerID
end
-- Normal GC
else
begin
-- get points for that customer
declare @GamePoints int
declare @RevivePrice int
set @RevivePrice = 25
SELECT @GamePoints=GamePoints FROM UsersData WHERE CustomerID=@in_CustomerID
if (@@RowCount = 0) begin
select 6 as ResultCode, 'no CustomerID' as ResultMsg
return
end
-- check if enough money
if @GamePoints < @RevivePrice) begin
select 6 as ResultCode, 'Not Enough GC' as ResultMsg
return
end
-- perform actual transaction
set @GamePoints = @GamePoints @RevivePrice;
UPDATE UsersData SET GamePoints @GamePoints where CustomerID=@in_CustomerID
-- update transaction detail
declare @bl float = 0
SELECT @bl=GamePoints FROM UsersData WHERE CustomerID=@in_CustomerID
INSERT INTO FinancialTransactions
VALUES (@in_CustomerID, 'EarlyRevive', 2002, GETDATE(),
25, '1', 'APPROVED', 0,@bl)
end
END
--------------------------------------------------------------------
-- revive
--------------------------------------------------------------------
update UsersChars set
Alive=2,
Health=@in_Health, -- AomBESkillSystem : Health value from api.
Food=0,
Water=0,
Toxic=0,
GameFlags=1,
legfall=0,
bleeding=0
where CharID=@in_CharID
select 0 as ResultCode
END