Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

g1 start weapon

Newbie Spellweaver
Joined
Mar 17, 2007
Messages
74
Reaction score
0
hey guys,

sometimes when I create a new char I´m getting two g1 weapon and sometimes I dont.
I am using released revolution files.

I added a stored procedure:
Code:
USE [kal_db]
GO
/****** Object:  StoredProcedure [dbo].[CreatePlayer]    Script Date: 04/17/2018 23:18:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[CreatePlayer]
    @UID int,
    [USER=1333344765]name[/USER] varchar(14),
    [USER=437263]clas[/USER]s tinyint,
    [USER=1333337944]Strength[/USER] tinyint,
    [USER=1333358440]Health[/USER] tinyint,
    [USER=1333377165]Intelligence[/USER] tinyint,
    [USER=775152]Wisdom[/USER] tinyint,
    [USER=372998]dexterity[/USER] tinyint,
    @CurHP smallint,
    @CurMP smallint,
    @Map tinyint,
    @X int,
    @Y int,
    @Z int,
    [USER=12229]face[/USER] tinyint,
    [USER=2000204264]Hair[/USER] tinyint
AS    

DECLARE @PID int
DECLARE @IID int


--INSERT INTO Player ( [UID], [Admin], [Name], [Class], [Specialty], [Level], [Contribute], [Exp], [Strength], [Health], [Intelligence], [Wisdom], [Dexterity], [CurHP], [CurMP], [PUPoint], [SUPoint], [Killed], [Map], [X], [Y], [Z], [Face], [Hair], [RevivalId]) VALUES ( @uid, 11, [USER=1333344765]name[/USER], [USER=437263]clas[/USER]s, 1, 0, 0, 0, [USER=1333337944]Strength[/USER], [USER=1333358440]Health[/USER], [USER=1333377165]Intelligence[/USER], [USER=775152]Wisdom[/USER], [USER=372998]dexterity[/USER], @curhp, @curmp, 0, 0, 0, 0, 225195, 248877, 16986, [USER=12229]face[/USER], [USER=2000204264]Hair[/USER], 1)
INSERT INTO Player ( [UID], [Admin], [Name], [Class], [Strength], [Health], [Intelligence], [Wisdom], [Dexterity], [CurHP], [CurMP], [Map], [X], [Y], [Z], [Face], [Hair]) VALUES ( @UID, 0, [USER=1333344765]name[/USER], [USER=437263]clas[/USER]s, [USER=1333337944]Strength[/USER], [USER=1333358440]Health[/USER], [USER=1333377165]Intelligence[/USER], [USER=775152]Wisdom[/USER], [USER=372998]dexterity[/USER], @CurHP, @CurMP, 0, 257362, 259044, 16080, [USER=12229]face[/USER], [USER=2000204264]Hair[/USER])

SET @PID = (SELECT TOP 1 PID FROM Player WHERE UID = @UID ORDER BY PID DESC)
SET @IID = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1

--knight
IF  [USER=437263]clas[/USER]s = 0)
begin
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 48, 0, 128, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 1318, 0, 128, 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 447, 0, 128, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 6, 0, 128, 1, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 7, 0, 128, 1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 8, 0, 128, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 9, 0, 128, 1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 10, 0, 128, 1, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 206, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 207, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
-- sword g1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 1, 0, 128, 1, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
end

--mage
else IF  [USER=437263]clas[/USER]s = 1)
begin
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 48, 0, 128, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 1318, 0, 128, 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 447, 0, 128, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 70, 0, 128, 1, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 71, 0, 128, 1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 72, 0, 128, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 73, 0, 128, 1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 74, 0, 128, 1, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 206, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 207, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
-- stick g1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 90, 0, 128, 1, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
end

-- archer
else IF  [USER=437263]clas[/USER]s = 2)
begin
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 48, 0, 128, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 1318, 0, 128, 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 447, 0, 128, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 32, 0, 128, 1, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 33, 0, 128, 1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 34, 0, 128, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 35, 0, 128, 1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 36, 0, 128, 1, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 206, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 207, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
-- bow g1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 22, 0, 128, 1, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
end

--thief
else IF  [USER=437263]clas[/USER]s = 3)
begin
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 48, 0, 128, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 1318, 0, 128, 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 447, 0, 128, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 1550, 0, 128, 1, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 1551, 0, 128, 1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 1552, 0, 128, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 1553, 0, 128, 1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 1554, 0, 128, 1, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 206, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 207, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
-- dagger g1
Insert into Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [UpgrLevel], [UpgrRate], [Protect], [PetTime], [ItemStat], [Lock]) VALUES ( @PID, @IID, 1404, 0, 128, 1, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'nopwd')
SET @iid = (SELECT TOP 1 IID FROM Item WHERE IID < 1500000000 ORDER BY IID DESC) + 1
end

Can anyone tell me where I can disable the normal g1 weapon from character creation?
Am I doing anything wrong?

Thanks!
 
Skilled Illusionist
Joined
Mar 20, 2009
Messages
374
Reaction score
378
Thoes 3 starter items are stored inside an array.
int g_nItemIndex[3] = { 1, 90, 22 };

Memory offset >>> 4D6AC4,
You could simply edit them with an hex editor and change em to one of the start items you hand out anyway.

Hex offset >> D6AC4
0D 00 00 00 01 00 00 00 5A 00 00 00 16 00 00 00
01 (1) = Sword
5A (90) = Stick
16 (22) = Bow


Another far superior method would be to hook the function that uses this array to create the items.
However, this requires a DLL injection on the main server.

The function looks like this:
Code:
void __thiscall CSocket::OnNewPlayer(CSocket *this, int LoginAnswer, char *packet)
{
  int nIID;
  CItem *pItem;
  unsigned __int8 byJob;
  int nPID;

  if ( LoginAnswer == LA_OK )
  {
    ReadPacket(packet, "db", &nPID, &byJob);
    if ( nPID )
    {
      pItem = CItem::CreateItem(g_nItemIndex[byJob], 0, 1, -1);
      if ( pItem )
      {
        nIID = CItem::NewIID();
        pItem->VFunction->_Insert(nPID, nIID);
      }
    }
    CDBSocket::Write(S2D_LOGIN, "dd", this->m_nId, this->m_nUID);
  }
  else
  {
    CSocket::Write(this, S2C_ANS_NEWPLAYER, "b", LoginAnswer);
  }
}

Either way it is pretty easy to change the items.
 
Upvote 0
Back
Top