Copie o codigo abaixo todo e Execulta no "Query Analyzer"
ALTER TABLE [dbo].[cabal_character_table]
ADD
[Reset] [int] NULL DEFAULT (0)
GO
/****** Object: Stored Procedure dbo.cabal_sp_newchar Script Date: 2008-4-14 5:52:37 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[get_cabal_character_ex]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[get_cabal_character_ex]
GO
/****** Object: Stored Procedure dbo.get_cabal_character_ex Script Date: 2008-4-14 5:52:47 ******/
CREATE PROCEDURE [dbo].[get_cabal_character_ex](@CHARACTERIDX int, @CHANNELIDX int, @USERIP char(16)) AS
BEGIN
SET NOCOUNT ON
BEGIN TRAN
-- CHARACTER
DECLARE @logout_time datetime, @login_time datetime, @OldRestTime AS int, @RestTime AS int
DECLARE
@CH_WORLDIDX INT,
@CH_POSITION INT,
@CH_LEV INT,
@CH_EXP BIGINT,
@CH_STR INT,
@CH_DEX INT,
@CH_INT INT,
@CH_PNT INT,
@CH_RANK INT,
@CH_ALZ BIGINT,
--@CH_ALZ_XORED BIGINT,
@CH_STYLE INT,
@CH_FLAGS INT,
@CH_HP INT,
@CH_MP INT,
@CH_SP INT,
@CH_SWDPNT INT,
@CH_MAGPNT INT,
@CH_RANKEXP INT,
@CH_PENALTYEXP INT,
@CH_WARPBFIELD INT,
@CH_MAPSBFIELD INT,
@CH_NAME VARCHAR(50),
@CH_RP INT,
@CH_REPUTATION INT,
@CH_PKPENALTY INT,
@CH_NATION TINYINT,
@CRAFTLEVEL0 INT,
@CRAFTLEVEL1 INT,
@CRAFTLEVEL2 INT,
@CRAFTLEVEL3 INT,
@CRAFTLEVEL4 INT,
@CRAFTEXP0 INT,
@CRAFTEXP1 INT,
@CRAFTEXP2 INT,
@CRAFTEXP3 INT,
@CRAFTEXP4 INT,
@CRAFTFLAGS VARBINARY(16),
@RESERVED1 BIGINT
SELECT
@CH_WORLDIDX = WORLDIDX,
@CH_POSITION = POSITION,
@CH_LEV = LEV,
@CH_EXP = EXP,
@CH_STR = STR,
@CH_DEX = DEX,
@CH_INT = INT,
@CH_PNT = PNT,
@CH_RANK = RANK,
@CH_ALZ = ALZ,
--@CH_ALZ_XORED = RESERVED1,
@CH_STYLE = STYLE,
@CH_FLAGS = FLAGS,
@CH_HP = HP,
@CH_MP = MP,
@CH_SP = SP,
@CH_SWDPNT = SWDPNT,
@CH_MAGPNT = MAGPNT,
@CH_RANKEXP = RANKEXP,
@CH_PENALTYEXP = PENALTYEXP,
@CH_WARPBFIELD = WARPBFIELD,
@CH_MAPSBFIELD = MAPSBFIELD,
@CH_NAME = NAME,
@CH_RP = isnull(RP, 0),
@CH_REPUTATION = REPUTATION,
@CH_PKPENALTY = PKPENALTY,
@CH_NATION = NATION,
@logout_time = LOGOUTTIME,
@RESERVED1 = RESERVED1
FROM CABAL_CHARACTER_TABLE with(nolock)
WHERE CHARACTERIDX = @CHARACTERIDX
--------------------------------------------------------------------------------------------------------------------------------------------
--
-- Reset System
-- Author: SigMetal
--
--------------------------------------------------------------------------------------------------------------------------------------------
DECLARE
@MaxLevel int,
@ResetPoint int,
@AlzReq bigint,
@STR_ int,
@DEX_ int,
@INT_ int,
@HP_ int,
@MP_ int,
@WorldIdx_ int,
@Position_ int,
@ClassReset_ int,
@SPPoint int,
@resetlimit int,
@reset int
-- Basic Config
--------------------------------------------------------------------------------------------------------------------------------------------
SET @MaxLevel = 170 -- Level for reset
SET @resetlimit = 50 -- Level for reset
SET @ResetPoint = 400 -- Point for add after reset
SET @SPPoint = 25000 -- Point for add after reset
SET @AlzReq = 150000000 -- Alz required for reset
-- this jedi trick get the class from the colum. Based on
SET @ClassReset_ = (select ((((@CH_STYLE % 67108864) % 131072) % 8192) % 256) - (( convert(int, round(convert(float, ((((@CH_STYLE % 67108864) % 131072) % 8192) % 256)) / convert(float,
, 0)) - 1) *
)
-- getting the reset number
set @reset= (select reset from cabal_character_table where CharacterIdx=@CHARACTERIDX)
IF(@reset<=@resetlimit)
BEGIN
-- Class Config
--------------------------------------------------------------------------------------------------------------------------------------------
--Warrior
IF(@ClassReset_=9)
BEGIN
SET @STR_ = 24 -- STR after you reset
SET @DEX_ = 8 -- DEX after you reset
SET @INT_ = 3 -- INT after you reset
SET @HP_ = 3276850 -- HP after you reset
SET @MP_ = 1310740 -- MP after you reset
SET @WorldIdx_ = 1 -- You will born in this world
SET @Position_ = 1376293 -- Coordenate
END
--wizard
ELSE IF(@ClassReset_=11)
BEGIN
SET @STR_ = 3 -- STR after you reset
SET @DEX_ = 6 -- DEX after you reset
SET @INT_ = 26 -- INT after you reset
SET @HP_ = 2621480 -- HP after you reset
SET @MP_ = 2293795 -- MP after you reset
SET @WorldIdx_ = 2 -- You will born in this world
SET @Position_ = 4915405 -- Coordenate
END
--blader
ELSE IF(@ClassReset_=10)
BEGIN
SET @STR_ = 16 -- STR after you reset
SET @DEX_ = 16 -- DEX after you reset
SET @INT_ = 3 -- INT after you reset
SET @HP_ = 3276850 -- HP after you reset
SET @MP_ = 1310740 -- MP after you reset
SET @WorldIdx_ = 2 -- You will born in this world
SET @Position_ = 4915405 -- Coordenate
END
--forcer archer
ELSE IF(@ClassReset_=4 OR @ClassReset_=12)
BEGIN
SET @STR_ = 6 -- STR after you reset
SET @DEX_ = 12 -- DEX after you reset
SET @INT_ = 17 -- INT after you reset
SET @HP_ = 2621480 -- HP after you reset
SET @MP_ = 2293795 -- MP after you reset
SET @WorldIdx_ = 3 -- You will born in this world
SET @Position_ = 10485821 -- Coordenate
END
--forcer shielder
ELSE IF(@ClassReset_=5 OR @ClassReset_=13)
BEGIN
SET @STR_ = 15 -- STR after you reset
SET @DEX_ = 9 -- DEX after you reset
SET @INT_ = 11 -- INT after you reset
SET @HP_ = 2949165 -- HP after you reset
SET @MP_ = 1966110 -- MP after you reset
SET @WorldIdx_ = 1 -- You will born in this world
SET @Position_ = 1376293 -- Coordenate
END
--forcer blader
ELSE IF(@ClassReset_=6 OR @ClassReset_=14)
BEGIN
SET @STR_ = 12 -- STR after you reset
SET @DEX_ = 11 -- DEX after you reset
SET @INT_ = 12 -- INT after you reset
SET @HP_ = 2949165 -- HP after you reset
SET @MP_ = 1966110 -- MP after you reset
SET @WorldIdx_ = 3 -- You will born in this world
SET @Position_ = 10485821 -- Coordenate
END
IF (@CH_LEV = @MaxLevel)
BEGIN
UPDATE cabal_character_table
SET LEV = 1, EXP = 0, STR = @STR_, DEX = @DEX_, INT = @INT_, SP= @SPPoint * (@reset + 1), PNT = @ResetPoint * (@reset + 1),
HP = @HP_, MP = @MP_, Alz = Alz - @AlzReq, WorldIdx = @WorldIdx_,
Position = @Position_, Reset = @reset + 1
WHERE LEV = @MaxLevel AND Alz >= @AlzReq AND Login = 0 AND CharacterIdx=@CHARACTERIDX
END
END
---------------------------------------------------------------------------------------------------------
-- End reset system
---------------------------------------------------------------------------------------------------------
SELECT
@CH_WORLDIDX = WORLDIDX,
@CH_POSITION = POSITION,
@CH_LEV = LEV,
@CH_EXP = EXP,
@CH_STR = STR,
@CH_DEX = DEX,
@CH_INT = INT,
@CH_PNT = PNT,
@CH_RANK = RANK,
@CH_ALZ = ALZ,
--@CH_ALZ_XORED = RESERVED1,
@CH_STYLE = STYLE,
@CH_FLAGS = FLAGS,
@CH_HP = HP,
@CH_MP = MP,
@CH_SP = SP,
@CH_SWDPNT = SWDPNT,
@CH_MAGPNT = MAGPNT,
@CH_RANKEXP = RANKEXP,
@CH_PENALTYEXP = PENALTYEXP,
@CH_WARPBFIELD = WARPBFIELD,
@CH_MAPSBFIELD = MAPSBFIELD,
@CH_NAME = NAME,
@CH_RP = isnull(RP, 0),
@CH_REPUTATION = REPUTATION,
@CH_PKPENALTY = PKPENALTY,
@CH_NATION = NATION,
@logout_time = LOGOUTTIME,
@RESERVED1 = RESERVED1
FROM CABAL_CHARACTER_TABLE with(nolock)
WHERE CHARACTERIDX = @CHARACTERIDX
IF @@ROWCOUNT = 0
BEGIN
SELECT -1
COMMIT TRAN
RETURN
END
IF @logout_time is NULL
BEGIN
SET @logout_time = getdate()
END
SET @login_time = getdate()
SET @RestTime = DATEDIFF( minute, @logout_time, @login_time)
SET @CH_RP = @CH_RP + @RestTime
IF(@CH_RP > 10080)
BEGIN
SET @CH_RP = 10080
END
UPDATE CABAL_CHARACTER_TABLE SET
RP =@CH_RP,
LOGINTIME=@login_time,
LOGOUTTIME=@login_time,
CHANNELIDX=@CHANNELIDX
WHERE CHARACTERIDX = @CHARACTERIDX
-- EQUIPMENT
DECLARE
@EQ_DATA VARBINARY(512)
SELECT
@EQ_DATA = DATA
FROM CABAL_EQUIPMENT_TABLE
WHERE CHARACTERIDX = @CHARACTERIDX
IF @@ROWCOUNT = 0
BEGIN
INSERT INTO CABAL_EQUIPMENT_TABLE
VALUES(@CHARACTERIDX, 0X)
SET @EQ_DATA = 0X
END
-- INVENTORY
DECLARE
@IV_DATA VARBINARY(4096)
SELECT
@IV_DATA = DATA
FROM CABAL_INVENTORY_TABLE
WHERE CHARACTERIDX = @CHARACTERIDX
IF @@ROWCOUNT = 0
BEGIN
INSERT INTO CABAL_INVENTORY_TABLE
VALUES(@CHARACTERIDX, 0X)
SET @IV_DATA = 0X
END
-- SKILLLIST
DECLARE
@SK_DATA VARBINARY(512)
SELECT
@SK_DATA = DATA
FROM CABAL_SKILLLIST_TABLE
WHERE CHARACTERIDX = @CHARACTERIDX
IF @@ROWCOUNT = 0
BEGIN
INSERT INTO CABAL_SKILLLIST_TABLE
VALUES(@CHARACTERIDX, 0X)
SET @SK_DATA = 0X
END
-- QUICKSLOT
DECLARE
@QK_DATA VARBINARY(256)
SELECT
@QK_DATA = DATA
FROM CABAL_QUICKSLOT_TABLE
WHERE CHARACTERIDX = @CHARACTERIDX
IF @@ROWCOUNT = 0
BEGIN
INSERT INTO CABAL_QUICKSLOT_TABLE
VALUES(@CHARACTERIDX, 0X)
SET @QK_DATA = 0X
END
-- Blessing Bead
DECLARE
@BBEAD_DATA VARBINARY(512)
SELECT
@BBEAD_DATA = DATA
FROM CABAL_BBEAD_TABLE
WHERE CHARACTERIDX = @CHARACTERIDX
IF @@ROWCOUNT = 0
BEGIN
INSERT INTO CABAL_BBEAD_TABLE
VALUES(@CHARACTERIDX, 0X)
SET @BBEAD_DATA = 0X
END
-- QUESTDATA
DECLARE
@QE_DATA VARBINARY(128),
@QE_FLAGS VARBINARY(128)
SELECT
@QE_DATA = DATA,
@QE_FLAGS = FLAGS
FROM CABAL_QUESTDATA_TABLE
WHERE CHARACTERIDX = @CHARACTERIDX
IF @@ROWCOUNT = 0
BEGIN
INSERT INTO CABAL_QUESTDATA_TABLE
VALUES(@CHARACTERIDX, 0X, CONVERT(BINARY(64), 0))
SET @QE_DATA = 0X
SET @QE_FLAGS = CONVERT(BINARY(64),0)
END
-- QDDATA
DECLARE
@QD_FLAGS VARBINARY(128)
SELECT
@QD_FLAGS = FLAGS
FROM CABAL_QDDATA_TABLE
WHERE CHARACTERIDX = @CHARACTERIDX
IF @@ROWCOUNT = 0
BEGIN
INSERT INTO CABAL_QDDATA_TABLE
VALUES(@CHARACTERIDX,CONVERT(BINARY(32),0))
SET @QD_FLAGS = CONVERT(BINARY(32),0)
END
SELECT @CRAFTLEVEL0 = LEVEL0,
@CRAFTLEVEL1 = LEVEL1,
@CRAFTLEVEL2 = LEVEL2,
@CRAFTLEVEL3 = LEVEL3,
@CRAFTLEVEL4 = LEVEL4,
@CRAFTEXP0 = EXP0,
@CRAFTEXP1 = EXP1,
@CRAFTEXP2 = EXP2,
@CRAFTEXP3 = EXP3,
@CRAFTEXP4 = EXP4,
@CRAFTFLAGS = FLAGS
FROM CABAL_CRAFT_TABLE
WHERE CHARACTERIDX = @CHARACTERIDX
IF @@ROWCOUNT = 0
BEGIN
INSERT INTO CABAL_CRAFT_TABLE ( CHARACTERIDX ) VALUES ( @CHARACTERIDX )
SELECT @CRAFTLEVEL0 = LEVEL0,
@CRAFTLEVEL1 = LEVEL1,
@CRAFTLEVEL2 = LEVEL2,
@CRAFTLEVEL3 = LEVEL3,
@CRAFTLEVEL4 = LEVEL4,
@CRAFTEXP0 = EXP0,
@CRAFTEXP1 = EXP1,
@CRAFTEXP2 = EXP2,
@CRAFTEXP3 = EXP3,
@CRAFTEXP4 = EXP4,
@CRAFTFLAGS = FLAGS
FROM CABAL_CRAFT_TABLE
WHERE CHARACTERIDX = @CHARACTERIDX
END
SELECT
@CH_WORLDIDX,
@CH_POSITION,
@CH_LEV ,
@CH_EXP,
@CH_STR,
@CH_DEX,
@CH_INT,
@CH_PNT,
@CH_RANK,
@CH_ALZ,
--@CH_ALZ_XORED,
@CH_STYLE,
@CH_FLAGS,
@CH_HP,
@CH_MP,
@CH_SP,
@CH_SWDPNT,
@CH_MAGPNT,
@CH_RANKEXP,
@CH_PENALTYEXP,
@CH_WARPBFIELD,
@CH_MAPSBFIELD,
@CH_NAME,
@CH_RP,
@CH_REPUTATION,
@CH_PKPENALTY,
@CH_NATION,
@EQ_DATA,
@IV_DATA,
@SK_DATA,
@QK_DATA,
@BBEAD_DATA,
@QE_DATA,
@QE_FLAGS,
@QD_FLAGS,
@CRAFTLEVEL0,
@CRAFTLEVEL1,
@CRAFTLEVEL2,
@CRAFTLEVEL3,
@CRAFTLEVEL4,
@CRAFTEXP0,
@CRAFTEXP1,
@CRAFTEXP2,
@CRAFTEXP3,
@CRAFTEXP4,
@CRAFTFLAGS,
@RESERVED1
COMMIT TRAN
SET NOCOUNT OFF
END
GO
Aqui Vai uma Boa Dica para TODOS
Onde ta em Azul vc pode muda o valores ao seu gosto. Lembrando.
OBS: Se vc colocar Level para Resetar 180. Vc tem que coloca o no seu Server LEval Maximo de 180.
porque se o char tiver Level 181 ele nao reseta
Onde ta em Vermelho vc muda o Status apos Reset do char
Creditos: [ADM]SigMetal
ALTER TABLE [dbo].[cabal_character_table]
ADD
[Reset] [int] NULL DEFAULT (0)
GO
/****** Object: Stored Procedure dbo.cabal_sp_newchar Script Date: 2008-4-14 5:52:37 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[get_cabal_character_ex]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[get_cabal_character_ex]
GO
/****** Object: Stored Procedure dbo.get_cabal_character_ex Script Date: 2008-4-14 5:52:47 ******/
CREATE PROCEDURE [dbo].[get_cabal_character_ex](@CHARACTERIDX int, @CHANNELIDX int, @USERIP char(16)) AS
BEGIN
SET NOCOUNT ON
BEGIN TRAN
-- CHARACTER
DECLARE @logout_time datetime, @login_time datetime, @OldRestTime AS int, @RestTime AS int
DECLARE
@CH_WORLDIDX INT,
@CH_POSITION INT,
@CH_LEV INT,
@CH_EXP BIGINT,
@CH_STR INT,
@CH_DEX INT,
@CH_INT INT,
@CH_PNT INT,
@CH_RANK INT,
@CH_ALZ BIGINT,
--@CH_ALZ_XORED BIGINT,
@CH_STYLE INT,
@CH_FLAGS INT,
@CH_HP INT,
@CH_MP INT,
@CH_SP INT,
@CH_SWDPNT INT,
@CH_MAGPNT INT,
@CH_RANKEXP INT,
@CH_PENALTYEXP INT,
@CH_WARPBFIELD INT,
@CH_MAPSBFIELD INT,
@CH_NAME VARCHAR(50),
@CH_RP INT,
@CH_REPUTATION INT,
@CH_PKPENALTY INT,
@CH_NATION TINYINT,
@CRAFTLEVEL0 INT,
@CRAFTLEVEL1 INT,
@CRAFTLEVEL2 INT,
@CRAFTLEVEL3 INT,
@CRAFTLEVEL4 INT,
@CRAFTEXP0 INT,
@CRAFTEXP1 INT,
@CRAFTEXP2 INT,
@CRAFTEXP3 INT,
@CRAFTEXP4 INT,
@CRAFTFLAGS VARBINARY(16),
@RESERVED1 BIGINT
SELECT
@CH_WORLDIDX = WORLDIDX,
@CH_POSITION = POSITION,
@CH_LEV = LEV,
@CH_EXP = EXP,
@CH_STR = STR,
@CH_DEX = DEX,
@CH_INT = INT,
@CH_PNT = PNT,
@CH_RANK = RANK,
@CH_ALZ = ALZ,
--@CH_ALZ_XORED = RESERVED1,
@CH_STYLE = STYLE,
@CH_FLAGS = FLAGS,
@CH_HP = HP,
@CH_MP = MP,
@CH_SP = SP,
@CH_SWDPNT = SWDPNT,
@CH_MAGPNT = MAGPNT,
@CH_RANKEXP = RANKEXP,
@CH_PENALTYEXP = PENALTYEXP,
@CH_WARPBFIELD = WARPBFIELD,
@CH_MAPSBFIELD = MAPSBFIELD,
@CH_NAME = NAME,
@CH_RP = isnull(RP, 0),
@CH_REPUTATION = REPUTATION,
@CH_PKPENALTY = PKPENALTY,
@CH_NATION = NATION,
@logout_time = LOGOUTTIME,
@RESERVED1 = RESERVED1
FROM CABAL_CHARACTER_TABLE with(nolock)
WHERE CHARACTERIDX = @CHARACTERIDX
--------------------------------------------------------------------------------------------------------------------------------------------
--
-- Reset System
-- Author: SigMetal
--
--------------------------------------------------------------------------------------------------------------------------------------------
DECLARE
@MaxLevel int,
@ResetPoint int,
@AlzReq bigint,
@STR_ int,
@DEX_ int,
@INT_ int,
@HP_ int,
@MP_ int,
@WorldIdx_ int,
@Position_ int,
@ClassReset_ int,
@SPPoint int,
@resetlimit int,
@reset int
-- Basic Config
--------------------------------------------------------------------------------------------------------------------------------------------
SET @MaxLevel = 170 -- Level for reset
SET @resetlimit = 50 -- Level for reset
SET @ResetPoint = 400 -- Point for add after reset
SET @SPPoint = 25000 -- Point for add after reset
SET @AlzReq = 150000000 -- Alz required for reset
-- this jedi trick get the class from the colum. Based on
SET @ClassReset_ = (select ((((@CH_STYLE % 67108864) % 131072) % 8192) % 256) - (( convert(int, round(convert(float, ((((@CH_STYLE % 67108864) % 131072) % 8192) % 256)) / convert(float,
-- getting the reset number
set @reset= (select reset from cabal_character_table where CharacterIdx=@CHARACTERIDX)
IF(@reset<=@resetlimit)
BEGIN
-- Class Config
--------------------------------------------------------------------------------------------------------------------------------------------
--Warrior
IF(@ClassReset_=9)
BEGIN
SET @STR_ = 24 -- STR after you reset
SET @DEX_ = 8 -- DEX after you reset
SET @INT_ = 3 -- INT after you reset
SET @HP_ = 3276850 -- HP after you reset
SET @MP_ = 1310740 -- MP after you reset
SET @WorldIdx_ = 1 -- You will born in this world
SET @Position_ = 1376293 -- Coordenate
END
--wizard
ELSE IF(@ClassReset_=11)
BEGIN
SET @STR_ = 3 -- STR after you reset
SET @DEX_ = 6 -- DEX after you reset
SET @INT_ = 26 -- INT after you reset
SET @HP_ = 2621480 -- HP after you reset
SET @MP_ = 2293795 -- MP after you reset
SET @WorldIdx_ = 2 -- You will born in this world
SET @Position_ = 4915405 -- Coordenate
END
--blader
ELSE IF(@ClassReset_=10)
BEGIN
SET @STR_ = 16 -- STR after you reset
SET @DEX_ = 16 -- DEX after you reset
SET @INT_ = 3 -- INT after you reset
SET @HP_ = 3276850 -- HP after you reset
SET @MP_ = 1310740 -- MP after you reset
SET @WorldIdx_ = 2 -- You will born in this world
SET @Position_ = 4915405 -- Coordenate
END
--forcer archer
ELSE IF(@ClassReset_=4 OR @ClassReset_=12)
BEGIN
SET @STR_ = 6 -- STR after you reset
SET @DEX_ = 12 -- DEX after you reset
SET @INT_ = 17 -- INT after you reset
SET @HP_ = 2621480 -- HP after you reset
SET @MP_ = 2293795 -- MP after you reset
SET @WorldIdx_ = 3 -- You will born in this world
SET @Position_ = 10485821 -- Coordenate
END
--forcer shielder
ELSE IF(@ClassReset_=5 OR @ClassReset_=13)
BEGIN
SET @STR_ = 15 -- STR after you reset
SET @DEX_ = 9 -- DEX after you reset
SET @INT_ = 11 -- INT after you reset
SET @HP_ = 2949165 -- HP after you reset
SET @MP_ = 1966110 -- MP after you reset
SET @WorldIdx_ = 1 -- You will born in this world
SET @Position_ = 1376293 -- Coordenate
END
--forcer blader
ELSE IF(@ClassReset_=6 OR @ClassReset_=14)
BEGIN
SET @STR_ = 12 -- STR after you reset
SET @DEX_ = 11 -- DEX after you reset
SET @INT_ = 12 -- INT after you reset
SET @HP_ = 2949165 -- HP after you reset
SET @MP_ = 1966110 -- MP after you reset
SET @WorldIdx_ = 3 -- You will born in this world
SET @Position_ = 10485821 -- Coordenate
END
IF (@CH_LEV = @MaxLevel)
BEGIN
UPDATE cabal_character_table
SET LEV = 1, EXP = 0, STR = @STR_, DEX = @DEX_, INT = @INT_, SP= @SPPoint * (@reset + 1), PNT = @ResetPoint * (@reset + 1),
HP = @HP_, MP = @MP_, Alz = Alz - @AlzReq, WorldIdx = @WorldIdx_,
Position = @Position_, Reset = @reset + 1
WHERE LEV = @MaxLevel AND Alz >= @AlzReq AND Login = 0 AND CharacterIdx=@CHARACTERIDX
END
END
---------------------------------------------------------------------------------------------------------
-- End reset system
---------------------------------------------------------------------------------------------------------
SELECT
@CH_WORLDIDX = WORLDIDX,
@CH_POSITION = POSITION,
@CH_LEV = LEV,
@CH_EXP = EXP,
@CH_STR = STR,
@CH_DEX = DEX,
@CH_INT = INT,
@CH_PNT = PNT,
@CH_RANK = RANK,
@CH_ALZ = ALZ,
--@CH_ALZ_XORED = RESERVED1,
@CH_STYLE = STYLE,
@CH_FLAGS = FLAGS,
@CH_HP = HP,
@CH_MP = MP,
@CH_SP = SP,
@CH_SWDPNT = SWDPNT,
@CH_MAGPNT = MAGPNT,
@CH_RANKEXP = RANKEXP,
@CH_PENALTYEXP = PENALTYEXP,
@CH_WARPBFIELD = WARPBFIELD,
@CH_MAPSBFIELD = MAPSBFIELD,
@CH_NAME = NAME,
@CH_RP = isnull(RP, 0),
@CH_REPUTATION = REPUTATION,
@CH_PKPENALTY = PKPENALTY,
@CH_NATION = NATION,
@logout_time = LOGOUTTIME,
@RESERVED1 = RESERVED1
FROM CABAL_CHARACTER_TABLE with(nolock)
WHERE CHARACTERIDX = @CHARACTERIDX
IF @@ROWCOUNT = 0
BEGIN
SELECT -1
COMMIT TRAN
RETURN
END
IF @logout_time is NULL
BEGIN
SET @logout_time = getdate()
END
SET @login_time = getdate()
SET @RestTime = DATEDIFF( minute, @logout_time, @login_time)
SET @CH_RP = @CH_RP + @RestTime
IF(@CH_RP > 10080)
BEGIN
SET @CH_RP = 10080
END
UPDATE CABAL_CHARACTER_TABLE SET
RP =@CH_RP,
LOGINTIME=@login_time,
LOGOUTTIME=@login_time,
CHANNELIDX=@CHANNELIDX
WHERE CHARACTERIDX = @CHARACTERIDX
-- EQUIPMENT
DECLARE
@EQ_DATA VARBINARY(512)
SELECT
@EQ_DATA = DATA
FROM CABAL_EQUIPMENT_TABLE
WHERE CHARACTERIDX = @CHARACTERIDX
IF @@ROWCOUNT = 0
BEGIN
INSERT INTO CABAL_EQUIPMENT_TABLE
VALUES(@CHARACTERIDX, 0X)
SET @EQ_DATA = 0X
END
-- INVENTORY
DECLARE
@IV_DATA VARBINARY(4096)
SELECT
@IV_DATA = DATA
FROM CABAL_INVENTORY_TABLE
WHERE CHARACTERIDX = @CHARACTERIDX
IF @@ROWCOUNT = 0
BEGIN
INSERT INTO CABAL_INVENTORY_TABLE
VALUES(@CHARACTERIDX, 0X)
SET @IV_DATA = 0X
END
-- SKILLLIST
DECLARE
@SK_DATA VARBINARY(512)
SELECT
@SK_DATA = DATA
FROM CABAL_SKILLLIST_TABLE
WHERE CHARACTERIDX = @CHARACTERIDX
IF @@ROWCOUNT = 0
BEGIN
INSERT INTO CABAL_SKILLLIST_TABLE
VALUES(@CHARACTERIDX, 0X)
SET @SK_DATA = 0X
END
-- QUICKSLOT
DECLARE
@QK_DATA VARBINARY(256)
SELECT
@QK_DATA = DATA
FROM CABAL_QUICKSLOT_TABLE
WHERE CHARACTERIDX = @CHARACTERIDX
IF @@ROWCOUNT = 0
BEGIN
INSERT INTO CABAL_QUICKSLOT_TABLE
VALUES(@CHARACTERIDX, 0X)
SET @QK_DATA = 0X
END
-- Blessing Bead
DECLARE
@BBEAD_DATA VARBINARY(512)
SELECT
@BBEAD_DATA = DATA
FROM CABAL_BBEAD_TABLE
WHERE CHARACTERIDX = @CHARACTERIDX
IF @@ROWCOUNT = 0
BEGIN
INSERT INTO CABAL_BBEAD_TABLE
VALUES(@CHARACTERIDX, 0X)
SET @BBEAD_DATA = 0X
END
-- QUESTDATA
DECLARE
@QE_DATA VARBINARY(128),
@QE_FLAGS VARBINARY(128)
SELECT
@QE_DATA = DATA,
@QE_FLAGS = FLAGS
FROM CABAL_QUESTDATA_TABLE
WHERE CHARACTERIDX = @CHARACTERIDX
IF @@ROWCOUNT = 0
BEGIN
INSERT INTO CABAL_QUESTDATA_TABLE
VALUES(@CHARACTERIDX, 0X, CONVERT(BINARY(64), 0))
SET @QE_DATA = 0X
SET @QE_FLAGS = CONVERT(BINARY(64),0)
END
-- QDDATA
DECLARE
@QD_FLAGS VARBINARY(128)
SELECT
@QD_FLAGS = FLAGS
FROM CABAL_QDDATA_TABLE
WHERE CHARACTERIDX = @CHARACTERIDX
IF @@ROWCOUNT = 0
BEGIN
INSERT INTO CABAL_QDDATA_TABLE
VALUES(@CHARACTERIDX,CONVERT(BINARY(32),0))
SET @QD_FLAGS = CONVERT(BINARY(32),0)
END
SELECT @CRAFTLEVEL0 = LEVEL0,
@CRAFTLEVEL1 = LEVEL1,
@CRAFTLEVEL2 = LEVEL2,
@CRAFTLEVEL3 = LEVEL3,
@CRAFTLEVEL4 = LEVEL4,
@CRAFTEXP0 = EXP0,
@CRAFTEXP1 = EXP1,
@CRAFTEXP2 = EXP2,
@CRAFTEXP3 = EXP3,
@CRAFTEXP4 = EXP4,
@CRAFTFLAGS = FLAGS
FROM CABAL_CRAFT_TABLE
WHERE CHARACTERIDX = @CHARACTERIDX
IF @@ROWCOUNT = 0
BEGIN
INSERT INTO CABAL_CRAFT_TABLE ( CHARACTERIDX ) VALUES ( @CHARACTERIDX )
SELECT @CRAFTLEVEL0 = LEVEL0,
@CRAFTLEVEL1 = LEVEL1,
@CRAFTLEVEL2 = LEVEL2,
@CRAFTLEVEL3 = LEVEL3,
@CRAFTLEVEL4 = LEVEL4,
@CRAFTEXP0 = EXP0,
@CRAFTEXP1 = EXP1,
@CRAFTEXP2 = EXP2,
@CRAFTEXP3 = EXP3,
@CRAFTEXP4 = EXP4,
@CRAFTFLAGS = FLAGS
FROM CABAL_CRAFT_TABLE
WHERE CHARACTERIDX = @CHARACTERIDX
END
SELECT
@CH_WORLDIDX,
@CH_POSITION,
@CH_LEV ,
@CH_EXP,
@CH_STR,
@CH_DEX,
@CH_INT,
@CH_PNT,
@CH_RANK,
@CH_ALZ,
--@CH_ALZ_XORED,
@CH_STYLE,
@CH_FLAGS,
@CH_HP,
@CH_MP,
@CH_SP,
@CH_SWDPNT,
@CH_MAGPNT,
@CH_RANKEXP,
@CH_PENALTYEXP,
@CH_WARPBFIELD,
@CH_MAPSBFIELD,
@CH_NAME,
@CH_RP,
@CH_REPUTATION,
@CH_PKPENALTY,
@CH_NATION,
@EQ_DATA,
@IV_DATA,
@SK_DATA,
@QK_DATA,
@BBEAD_DATA,
@QE_DATA,
@QE_FLAGS,
@QD_FLAGS,
@CRAFTLEVEL0,
@CRAFTLEVEL1,
@CRAFTLEVEL2,
@CRAFTLEVEL3,
@CRAFTLEVEL4,
@CRAFTEXP0,
@CRAFTEXP1,
@CRAFTEXP2,
@CRAFTEXP3,
@CRAFTEXP4,
@CRAFTFLAGS,
@RESERVED1
COMMIT TRAN
SET NOCOUNT OFF
END
GO
Aqui Vai uma Boa Dica para TODOS
Onde ta em Azul vc pode muda o valores ao seu gosto. Lembrando.
OBS: Se vc colocar Level para Resetar 180. Vc tem que coloca o no seu Server LEval Maximo de 180.
porque se o char tiver Level 181 ele nao reseta
Onde ta em Vermelho vc muda o Status apos Reset do char
Creditos: [ADM]SigMetal
Editado por um moderador: