Você não é registrado, por favor registre-se para ter acesso ao conteúdo completo.
Caso seja registrado, efetue login.
Esqueceu sua senha? Clique aqui
Recomendamos o uso do Mozilla Firefox para uma melhor visualização.    


Início Postados Hoje Marcar Fóruns Como Lidos Álbums Banidos SE Team Medalhas
Voltar   Secret Experience > Private Server & MMORPG - Administre Um > Lineage II - OFF > [L2OFF] Administrador > [L2OFF | Admin] Tutoriais
Registrar Loteria VIPStaff SERegras do fórum Comunidade Arcade Postados Hoje Pesquisar Experience
   

Secret Experience.NET   Secret Experience Corporation - Welcome To The Real World
     Anúncios SE

 
 
Ferramentas do Tópico Modos de Exibição
Prev Post Anterior   Próximo Post Next
Antigo 19-08-2013, 03:45 PM   #1
Modificando Level Inicial - Starting Level L2oFF
Setokaiba Setokaiba está online agora 19-08-2013, 03:45 PM

Tutorial instruindo como modificar o level que o char inicia.

Edite o lin_CreateChar stored procedure
Exemplo:
Código: [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
USE [lin2world]
GO
/****** Object:  StoredProcedure [dbo].[lin_CreateChar]    Script Date: 2013-05-30 02:04:06 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[lin_CreateChar]
(  
@char_name NVARCHAR(24),  
@account_name NVARCHAR(24),  
@account_id INT,  
@pledge_id INT,  
@builder  TINYINT,  
@gender TINYINT,  
@race  TINYINT,  
@class  TINYINT,  
@world  SMALLINT,  
@xloc  INT,  
@yloc  INT,  
@zloc  INT,  
@HP  FLOAT,  
@MP  FLOAT,  
@SP  INT,  
@Exp  INT,  
@Lev  TINYINT,  
@align  SMALLINT,  
@PK  INT,  
@Duel  INT,  
@PKPardon  INT,  
@FaceIndex   INT = 0,  
@HairShapeIndex  INT = 0,  
@HairColorIndex  INT = 0  
)  
AS  
  
SET NOCOUNT ON  
  
SET @char_name = RTRIM(@char_name)  
DECLARE @char_id int  
SET @char_id = 0  

--Definindo assim o level que queremos que inicie para 20 no exemplo.
SET @Lev = 20
SET @Exp = 835863

IF @char_name LIKE N' '   
BEGIN  
 RAISERROR ('Character name has space : name = [%s]', 16, 1, @char_name)  
 RETURN -1  
END  
  
-- check user_prohibit   
if exists(select char_name from user_prohibit (nolock) where char_name = @char_name)  
begin  
 RAISERROR ('Character name is prohibited: name = [%s]', 16, 1, @char_name)  
 RETURN -1   
end  
  
declare @user_prohibit_word nvarchar(20)  
select top 1 @user_prohibit_word = words from user_prohibit_word (nolock) where @char_name like '%' + words + '%'
if @user_prohibit_word is not null  
begin  
 RAISERROR ('Character name has prohibited word: name = [%s], word[%s]', 16, 1, @char_name, @user_prohibit_word)  
 RETURN -1   
end  
  
-- check reserved name  
declare @reserved_name nvarchar(50)  
declare @reserved_account_id int  
select top 1 @reserved_name = char_name, @reserved_account_id = account_id from user_name_reserved (nolock) where used = 0 and char_name = @char_name  
if not @reserved_name is null  
begin  
 if not @reserved_account_id = @account_id  
 begin  
  RAISERROR ('Character name is reserved by other player: name = [%s]', 16, 1, @char_name)  
  RETURN -1  
 end  
end  
  
IF @race>5
BEGIN  
 RAISERROR ('Race overflow : = [%s]', 16, 1, @char_name)  
 RETURN -1  
END  

IF @race=0 and @class!=0 and @class!=10
BEGIN  
 RAISERROR ('Class Overflow for Human: = [%s]', 16, 1, @class)  
 RETURN -1  
END  

IF @race=1 and @class!=18 and @class!=25
BEGIN  
 RAISERROR ('Class Overflow for Elf: = [%s]', 16, 1, @class)  
 RETURN -1  
END  

IF @race=2 and @class!=31 and @class!=38
BEGIN  
 RAISERROR ('Class Overflow for DE: = [%s]', 16, 1, @class)  
 RETURN -1  
END  

IF @race=3 and @class!=44 and @class!=49
BEGIN  
 RAISERROR ('Class Overflow for Orc: = [%s]', 16, 1, @class)  
 RETURN -1  
END  

IF @race=4 and @class!=53
BEGIN  
 RAISERROR ('Class Overflow for Dwarf: = [%s]', 16, 1, @class)  
 RETURN -1  
END  

-- insert user_data  
INSERT INTO user_data   
( char_name, account_name, account_id, pledge_id, builder, gender, race, class, subjob0_class, 
world, xloc, yloc, zloc, HP, MP, max_hp, max_mp, SP, Exp, Lev, align, PK, PKpardon, duel, create_date, face_index, hair_shape_index, hair_color_index )  
VALUES  
(@char_name, @account_name, @account_id, @pledge_id, @builder, @gender, @race, @class, @class, 
@world, @xloc, @yloc, @zloc, @HP, @MP, @HP, @MP, @SP, @Exp, @Lev, @align, @PK, @Duel, @PKPardon, GETDATE(), @FaceIndex, @HairShapeIndex, @HairColorIndex)  
  
IF (@@error = 0)  
BEGIN  
 SET @char_id = @@IDENTITY  
 INSERT INTO quest (char_id) VALUES (@char_id)  
END  
  
SELECT @char_id  
  
if @char_id > 0  
begin  
 -- make user_history  
 exec lin_InsertUserHistory @char_name, @char_id, 1, @account_name, NULL  
 if not @reserved_name is null  
  update user_name_reserved set used = 1 where char_name = @reserved_name  
end
Essa é a parte que nos interessa:
Citação:
--Definindo assim o level que queremos que inicie para 20 no exemplo.
SET @Lev = 20
SET @Exp = 835863
Tip By Phantasmo

 
Avatar de Setokaiba
Setokaiba
Jesus Te Ama, Mas EU Não!

Quadro de Medalhas

Registrado em: Oct 2008
Localização: 45º 33º 34º N | 122º 41º 41º W DESTINATION: ANYWHERE Adidas
Posts: 4,133
Pontos: 20,442, Nível: 90
Pontos: 20,442, Nível: 90 Pontos: 20,442, Nível: 90 Pontos: 20,442, Nível: 90
Atividade: 99%
Atividade: 99% Atividade: 99% Atividade: 99%

Nome Real: Anderson Andrade
Visitas: 820
Os Seguintes 9 Usuários disseram Obrigado(a) para Setokaiba por gostarem deste post :
350Z (17-05-2014), alessandroht (24-09-2013), daniel000 (22-10-2013), icehalls (11-01-2015), JoaoVitorl2 (19-06-2014), julianobig (12-08-2014), Myutsu (01-10-2013), Naelson (16-05-2014), romariofilho (17-04-2014)
Links Patrocinados
 

Tags
inicial, iniciando, level, nascendo, personagem, starting


Regras para Posts
Você não pode postar novos tópicos
Você não pode postar respostas
Você não pode postar anexos
Você não pode editar seus posts

Código [IMG] Sim
Código HTML Não

Ir para...


Horários baseados na GMT -3. Agora são 01:01 AM.