Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: alguien me ayuda Adaptar Query a IGCN  (Visto 1207 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline izgamez Posteado: June 03, 2018, 12:13:37 AM | Modificado: June 03, 2018, 07:55:04 AM by izgamez

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 48
  • Gracias recibida: 6
  • ve
quiero dar seals al inicio quiero adaptar esta query a los files igcn para que cuando los usuarios creen un nuevo personaje tengan el seals
ESTA ES LA QUERY SOLO HAY QUE CAMBIAR LAS TABLAS PERO ESO LO QUE NOSE

Code: [Select]
/****** Object: Stored Procedure dbo.WZ_CreateCharacter Script Date: 28.11.2008 19:52:26 ******/

CREATE Procedure WZ_CreateCharacter   @accountID    varchar(10),  @name    varchar(10),  @class    tinyint
AS
Begin

SET NOCOUNT ON
SET    XACT_ABORT ON
DECLARE  @result    tinyint

SET  @result = 0x00   

If EXISTS ( SELECT Name FROM Character WHERE Name =  @name )
begin
SET  @result    = 0x01   
GOTO ProcEnd   
end

BEGIN TRAN

If NOT EXISTS ( SELECT Id FROM AccountCharacter WHERE Id =  @accountID )
begin
INSERT INTO dbo.AccountCharacter(Id, GameID1, GameID2, GameID3, GameID4, GameID5, GameIDC)
VALUES  @accountID,  @name, NULL, NULL, NULL, NULL, NULL)

SET  @result = @@Error
end
else
begin
Declare @g1 varchar(10), @g2 varchar(10), @g3 varchar(10), @g4 varchar(10), @g5 varchar(10)   
SELECT @g1=GameID1, @g2=GameID2, @g3=GameID3, @g4=GameID4, @g5=GameID5 FROM dbo.AccountCharacter Where Id =  @accountID
if( ( @g1 Is NULL) OR (Len(@g1) = 0))

begin
UPDATE AccountCharacter SET GameID1 =  @name
WHERE Id =  @accountID

SET  @result = @@Error
end
else    if( @g2 Is NULL OR Len(@g2) = 0)
begin
UPDATE AccountCharacter SET GameID2 =  @name
WHERE Id =  @accountID

SET  @result = @@Error
end
else    if( @g3 Is NULL OR Len(@g3) = 0)
begin   
UPDATE AccountCharacter SET GameID3 =  @name
WHERE Id =  @accountID

SET  @result = @@Error
end
else    if( @g4 Is NULL OR Len(@g4) = 0)
begin
UPDATE AccountCharacter SET GameID4 =  @name
WHERE Id =  @accountID

SET  @result = @@Error
end
else    if( @g5 Is NULL OR Len(@g5) = 0)
begin
UPDATE AccountCharacter SET GameID5 =  @name
WHERE Id =  @accountID

SET  @result = @@Error
end
else
begin   
SET  @result    = 0x03   
GOTO TranProcEnd   
end
end

if(  @result <> 0 )
begin
GOTO TranProcEnd   
end
else
begin
INSERT INTO dbo.Character(AccountID, Name, cLevel, LevelUpPoint, Class, Strength, Dexterity, Vitality, Energy, Inventory,MagicList,
Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY, MDate, LDate, Quest, DbVersion, Leadership,money )
SELECT  @accountID As AccountID,  @name As Name, Level, 0,  @class As Class,
Strength, Dexterity, Vitality, Energy, Inventory,MagicList, Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY,
getdate() As MDate, getdate() As LDate, Quest, DbVersion, Leadership,0
FROM DefaultClassType WHERE Class =  @class   

DECLARE @memb_guid int
SELECT @memb_guid = memb_guid FROM MEMB_INFO WHERE memb___id =  @accountID
INSERT INTO dbo.T_periodItem_info(memb_guid,char,itemcode,optiontype,item_effect1,item_effect2,UseTime,ExpireDate)
VALUES(@memb_guid,  @name,6700,0,6,7,10080,getdate()+7)

SET  @result = @@Error
end

TranProcEnd:
IF (  @result <> 0 )
ROLLBACK TRAN
ELSE
COMMIT    TRAN

ProcEnd:

SET NOCOUNT OFF
SET    XACT_ABORT OFF

SELECT
CASE  @result
WHEN 0x00 THEN 0x01
WHEN 0x01 THEN 0x00
WHEN 0x03 THEN 0x03
ELSE 0x02
END AS Result
End


GO

Code: [Select]
*/********* CODE ******************

DECLARE @memb_guid int
SELECT @memb_guid = memb_guid FROM MEMB_INFO WHERE memb___id = @accountID
INSERT INTO dbo.T_periodItem_info(memb_guid,char,itemcode,optiontype,item_effect1,item_effect2,UseTime,ExpireDate)
VALUES(@memb_guid, @name,6700,0,6,7,10080,getdate()+7)


Offline izgamez #1 Posteado: June 03, 2018, 12:03:41 PM

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 48
  • Gracias recibida: 6
  • ve

Offline jesusthomx #2 Posteado: June 03, 2018, 02:21:38 PM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 23
  • Gracias recibida: 9
  • mx
Seria ver la base de datos de la igcn y cambiarlas.


Offline izgamez #3 Posteado: June 03, 2018, 06:19:19 PM

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 48
  • Gracias recibida: 6
  • ve
Seria ver la base de datos de la igcn y cambiarlas.

 cuales para para pasarte  los codigo de las tablas que pides


Offline izgamez #4 Posteado: June 04, 2018, 05:45:03 PM

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 48
  • Gracias recibida: 6
  • ve

Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
0 Replies
661 Views
Last post January 23, 2017, 03:43:07 AM
by argen258
0 Replies
875 Views
Last post October 15, 2017, 12:11:24 AM
by Tauro14
2 Replies
916 Views
Last post January 13, 2018, 10:36:40 AM
by jigokush
0 Replies
699 Views
Last post February 16, 2018, 05:43:25 PM
by manu
0 Replies
425 Views
Last post March 25, 2020, 01:25:26 PM
by kraD25