##### Junior Spellweaver

- Joined
- Dec 16, 2012

- Messages
- 187

- Reaction score
- 29

could someone tell me what do I have to hex to get the DBSvr to call buffmagic once I use a specific refresh item for upgrading skills?

Thanks =)

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!You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter Chale001
- Start date

- Joined
- Aug 21, 2012

- Messages
- 243

- Reaction score
- 27

PHP:

```
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[buffmagic]
@PID int,
@Type tinyint,
@Remain int
AS
declare @class int
declare @grade int
DECLARE @animal int
DECLARE @agrade int
SET @class = (select [Class] from Player WHERE [PID] = @PID)
--Guild Time Reset
IF (@Type = 58 AND @Remain = 16)
begin
UPDATE [GuildMember] SET Date = 0 WHERE PID = @pid
end
--animal food
ELSE IF (@Type = 58 AND @Remain = 17)
begin
IF ((select max([IID]) from Item WHERE [Index] = 337 AND [PID] = @PID) <> 0) --Tiger
begin
SET @animal = (select max([IID]) from Item WHERE [Index] = 337 AND [PID] = @PID)
end
ELSE IF ((select max([IID]) from Item WHERE [Index] = 338 AND [PID] = @PID) <> 0) --Bird
begin
SET @animal = (select max([IID]) from Item WHERE [Index] = 338 AND [PID] = @PID)
end
ELSE IF ((select max([IID]) from Item WHERE [Index] = 339 AND [PID] = @PID) <> 0) --Phanter
begin
SET @animal = (select max([IID]) from Item WHERE [Index] = 339 AND [PID] = @PID)
end
ELSE IF ((select max([IID]) from Item WHERE [Index] = 340 AND [PID] = @PID) <> 0) --Eagle
begin
SET @animal = (select max([IID]) from Item WHERE [Index] = 340 AND [PID] = @PID)
end
DECLARE @spieler int
SET @Spieler = (select [PID] from Item WHERE [IID] = @animal)
IF (@Spieler = @PID)
begin
SET @agrade = (select [MaxEnd] from Item WHERE [IID] = @animal)
IF (@agrade <= 28)
begin
SET @agrade = @agrade + 3
end
ELSE IF (@agrade >= 29)
begin
SET @agrade = 31
end
UPDATE Item SET [MaxEnd] = @agrade WHERE [IID] = @animal
UPDATE Item SET [CurEnd] = @agrade WHERE [IID] = @animal
end
end
--===============TRANXONLINEINFO==============================
-- Knight Skill's indexen
--Weapon Mastery = 2
--Defense = 6
--Increasing Concentration = 10
--Critical Hit = 12
--============================================================
-- Archer Skill's indexen
--Bows Mastery = 2
-- Concentratiion = 5
-- Fatal Blow = 12
-- Perfect Evasion = 8
--============================================================
-- Mage Skill's Indexen
--Light Mastery = 12
-- Ice Mastery = 13
--============================================================
--Knight International Skillbook Upgrade
--Weapon Mastery
ELSE IF (@Type = 58 AND @Remain = 20)
begin
IF (@Class = 0)
begin
SET @grade = (select [Level] from Skill WHERE [PID] = @PID AND [Index] = 2) +1
UPDATE Skill SET [Level] = @grade WHERE [PID] = @PID AND [Index] = 2
end
end
--High Weapon Mastery
ELSE IF (@Type = 58 AND @Remain = 12)
begin
IF (@Class = 0)
begin
SET @grade = (select [Level] from Skill WHERE [PID] = @PID AND [Index] = 2) +10
UPDATE Skill SET [Level] = @grade WHERE [PID] = @PID AND [Index] = 2
end
end
--Critical Hit
ELSE IF (@Type = 58 AND @Remain = 13)
begin
IF (@Class = 0)
begin
SET @grade = (select [Level] from Skill WHERE [PID] = @PID AND [Index] = 12) +1
UPDATE Skill SET [Level] = @grade WHERE [PID] = @PID AND [Index] = 12
end
end
--High Critical Hit
ELSE IF (@Type = 58 AND @Remain = 14)
begin
IF (@Class = 0)
begin
SET @grade = (select [Level] from Skill WHERE [PID] = @PID AND [Index] = 12) +1
UPDATE Skill SET [Level] = @grade WHERE [PID] = @PID AND [Index] = 12
end
end
--Concentration
ELSE IF (@Type = 58 AND @Remain = 15)
begin
IF (@Class = 0)
begin
SET @grade = (select [Level] from Skill WHERE [PID] = @PID AND [Index] = 10) +1
UPDATE Skill SET [Level] = @grade WHERE [PID] = @PID AND [Index] = 10
end
end
--Defense
ELSE IF (@Type = 107 AND @Remain = 16)
begin
IF (@Class = 0)
begin
SET @grade = (select [Level] from Skill WHERE [PID] = @PID AND [Index] = 6) +1
UPDATE Skill SET [Level] = @grade WHERE [PID] = @PID AND [Index] = 6
end
end
--High Defense
ELSE IF (@Type = 107 AND @Remain = 17)
begin
IF (@Class = 0)
begin
SET @grade = (select [Level] from Skill WHERE [PID] = @PID AND [Index] = 6) +10
UPDATE Skill SET [Level] = @grade WHERE [PID] = @PID AND [Index] = 6
end
end
--============================================================
--============================================================
--============================================================
--============================================================
--============================================================
--============================================================
--Archer International Skillbook Upgrade
--Bow Mastery
ELSE IF (@Type = 107 AND @Remain = 11)
begin
IF (@Class = 2) --archer
begin
SET @grade = (select [Level] from Skill WHERE [PID] = @PID AND [Index] = 2) +1
UPDATE Skill SET [Level] = @grade WHERE [PID] = @PID AND [Index] = 2
end
end
--High Bow Mastery
ELSE IF (@Type = 107 AND @Remain = 12)
begin
IF (@Class = 2) --archer
begin
SET @grade = (select [Level] from Skill WHERE [PID] = @PID AND [Index] = 2) +10
UPDATE Skill SET [Level] = @grade WHERE [PID] = @PID AND [Index] = 2
end
end
--Fatal Blow
ELSE IF (@Type = 58 AND @Remain = 18)
begin
IF (@Class = 2) --archer
begin
SET @grade = (select [Level] from Skill WHERE [PID] = @PID AND [Index] = 12) +1
UPDATE Skill SET [Level] = @grade WHERE [PID] = @PID AND [Index] = 12
end
end
--High Fatal Blow
ELSE IF (@Type = 58 AND @Remain = 19)
begin
IF (@Class = 2) --archer
begin
SET @grade = (select [Level] from Skill WHERE [PID] = @PID AND [Index] = 12) +1
UPDATE Skill SET [Level] = @grade WHERE [PID] = @PID AND [Index] = 12
end
end
--Concentration
ELSE IF (@Type = 58 AND @Remain = 20)
begin
IF (@Class = 2) --archer
begin
SET @grade = (select [Level] from Skill WHERE [PID] = @PID AND [Index] = 5) +1
UPDATE Skill SET [Level] = @grade WHERE [PID] = @PID AND [Index] = 5
end
end
--High Concentration
ELSE IF (@Type = 58 AND @Remain = 21)
begin
IF (@Class = 2) --archer
begin
SET @grade = (select [Level] from Skill WHERE [PID] = @PID AND [Index] = 5) +10
UPDATE Skill SET [Level] = @grade WHERE [PID] = @PID AND [Index] = 5
end
end
--Perfect Evasion
ELSE IF (@Type = 58 AND @Remain = 22)
begin
IF (@Class = 2) --archer
begin
SET @grade = (select [Level] from Skill WHERE [PID] = @PID AND [Index] = 8) +1
UPDATE Skill SET [Level] = @grade WHERE [PID] = @PID AND [Index] = 8
end
end
--High Perfect Evasion
ELSE IF (@Type = 58 AND @Remain = 23)
begin
IF (@Class = 2) --archer
begin
SET @grade = (select [Level] from Skill WHERE [PID] = @PID AND [Index] = 8) +1
UPDATE Skill SET [Level] = @grade WHERE [PID] = @PID AND [Index] = 8
end
end
--============================================================
--============================================================
--============================================================
--============================================================
--============================================================
--============================================================
--Mage International Skillbook Upgrade
--Magic Mastery : Lightning
ELSE IF (@Type = 108 AND @Remain = 11)
begin
IF (@Class = 1) --mage
begin
SET @grade = (select [Level] from Skill WHERE [PID] = @PID AND [Index] = 12) +1
UPDATE Skill SET [Level] = @grade WHERE [PID] = @PID AND [Index] = 12
end
end
--High Magic Mastery : Lightning
ELSE IF (@Type = 108 AND @Remain = 12)
begin
IF (@Class = 1) --mage
begin
SET @grade = (select [Level] from Skill WHERE [PID] = @PID AND [Index] = 12) +10
UPDATE Skill SET [Level] = @grade WHERE [PID] = @PID AND [Index] = 12
end
end
--Magic Mastery : Ice
ELSE IF (@Type = 107 AND @Remain = 13)
begin
IF (@Class = 1) --mage
begin
SET @grade = (select [Level] from Skill WHERE [PID] = @PID AND [Index] = 13) +1
UPDATE Skill SET [Level] = @grade WHERE [PID] = @PID AND [Index] = 13
end
end
--High Magic Mastery : Ice
ELSE IF (@Type = 107 AND @Remain = 14)
begin
IF (@Class = 1) --mage
begin
SET @grade = (select [Level] from Skill WHERE [PID] = @PID AND [Index] = 13) +10
UPDATE Skill SET [Level] = @grade WHERE [PID] = @PID AND [Index] = 13
end
end
--============================================================
--============================================================
--============================================================
--============================================================
--============================================================
--============================================================
ELSE
INSERT INTO BuffRemain ( [PID], [Type], [Remain] ) VALUES ( @PID, @Type, @Remain )
```

HeX:

PHP:

```
INSERT INTO BuffRemain VALUES( %d, %d, %d)..
change to
EXEC BuffMagic %d, %d, %d...................
```

Enjoy!

Upvote
0

RaGEZONE® is a website dedicated to the development of massively multiplayer online role-playing games (MMORPGs).

- Members online
- 221

- Guests online
- 914

- Total visitors
- 1,135

Totals may include hidden visitors.

Most visitors online was 8830 , on 6 Feb 2024