Siga-nos em...
Follow us on Twitter Follow us on Facebook Watch us on YouTube
Registro


Alpha Servers
Resultados 1 a 1 de 1
  1. #1

    Avatar de Saly
    Data de Ingresso
    Feb 2011
    Localização
    Forbiden Instaland
    Idade
    22
    Posts
    141
    Agradecido
    4
    Agradeceu
    3
    Peso da Avaliação
    8

    Padrão Sistema de Resets Explicativo

    Bom galera antes de tudo olá a todos.

    Bom vamos começa primeiro vo ensinar a configurar o sistema de resetes

    Observe o codigo abaixo :

    Código:
        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
    
        --------------------------------------------------------------------------------------------------------------------------------------------
        --
        -- Sistema de Resets Phoenyx Games
        -- Edicao: Hawayano
        -- WebSite: cabal.phoenyxgames.com.br
        --
        --------------------------------------------------------------------------------------------------------------------------------------------
        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 = 185 -- Level for reset
        SET @resetlimit = 310 -- Level for reset
        SET @ResetPoint = 120 -- Point for add after reset
        SET @SPPoint = 25000 -- Point for add after reset
        SET @AlzReq = 2000000 -- 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, 8), 0)) - 1) * 8))
        -- 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_ = 300 -- STR after you reset
        SET @DEX_ = 100 -- DEX after you reset
        SET @INT_ = 100 -- 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_ = 200 -- INT after you reset
        SET @HP_ = 135647 -- HP after you reset
        SET @MP_ = 22937921 -- 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_ = 200 -- STR after you reset
        SET @DEX_ = 200 -- DEX after you reset
        SET @INT_ = 3 -- INT after you reset
        SET @HP_ = 3276851 -- HP after you reset
        SET @MP_ = 13107 -- 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_ = 200 -- 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_ = 200 -- STR after you reset
        SET @DEX_ = 9 -- DEX after you reset
        SET @INT_ = 150 -- 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_ = 120 -- STR after you reset
        SET @DEX_ = 11 -- DEX after you reset
        SET @INT_ = 120 -- 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
    Edite essa parte do sistema de reset

    -- Basic Config
    --------------------------------------------------------------------------------------------------------------------------------------------
    SET @MaxLevel = 185 -- Level para resetar
    SET @resetlimit = 310 -- Limite de Resets
    SET @ResetPoint = 120 -- Pontos por Reset
    SET @SPPoint = 25000 -- SP Apos Resetar
    SET @AlzReq = 2000000 -- Custo do Reset
    Configure como qiser.

    Após configurar como desejado abra o query e cole o codigo do sistema de resetes inteiro na database --Gamedb.
    [Obs: Após modificado ao seu gosto claro]

    Depois aperte F5, claro para o char resetar voce vai ter que mudar o lvl maximo do server para o mesmo level que o char irá resetar o lvl maximo do server fica dentro do 'common.ini' modifique os 2 common os 'COMMON.INI' é encontrado no WinSCP
    'etc/cabal/data/'
    Após configurar os common e salvalos de restart no server ou reboot pronto vocÊ tera um sistema de resetes .

    Para o char resetar você precisa sair da conta por 1 minuto.

    Bom espero que tenhao entendido certinho tudo

    Creditos: Hawayano Phoenyx Games
    Última edição por Saly; 18-04-2011 às 03:57 PM.

 

 

Informações de Tópico

Usuários Navegando neste Tópico

Há 1 usuários navegando neste tópico. (0 registrados e 1 visitantes)

Tópicos Similares

  1. |Dúvida| Mudar nome do arquivo OZJ
    Por viOleNt no fórum Skins
    Respostas: 7
    Último Post: 16-05-2014, 10:47 PM
  2. |Dúvida| Como mudar a cor do nome dos itens
    Por Rhaverst no fórum Dúvidas
    Respostas: 3
    Último Post: 09-07-2013, 01:39 PM
  3. |Resolvido| Mudar nome de items e Portas do Firewall( VPS ).
    Por danillobraz no fórum Tópicos resolvidos
    Respostas: 4
    Último Post: 03-04-2012, 05:05 PM
  4. |Vídeo-aula| Mudar nome da loja /shop
    Por Saly no fórum CA | Tutoriais
    Respostas: 0
    Último Post: 03-03-2011, 12:48 PM
  5. |Atendido| Mudar Nome
    Por Mr.TwoHam no fórum Mudança de nick
    Respostas: 2
    Último Post: 31-10-2009, 03:24 PM

Marcadores

Permissões de Postagem

  • Você não pode iniciar novos tópicos
  • Você não pode enviar respostas
  • Você não pode enviar anexos
  • Você não pode editar suas mensagens
  •