I had some free time and i was thinking to write a procedure that upgrades your items by quests instead of using scrolls, and i have made it and tested it. it worked so i decided to release it since i don't need it.
FAQ
How does this system work?
You have to collect a certain number of a weapon, and once gained you can upgrade that count of that weapon to a newer seal of that weapon from a quest.
But i don't have upgrade quest,how to make it?
MaDenGo released it before , it is not too hard to make .
I don't like that system
gtfo without posting a stupid post.
Here is the procedure
add this to your shard.dbo._quest_manage procedure
FAQ
How does this system work?
You have to collect a certain number of a weapon, and once gained you can upgrade that count of that weapon to a newer seal of that weapon from a quest.
But i don't have upgrade quest,how to make it?
MaDenGo released it before , it is not too hard to make .
I don't like that system
gtfo without posting a stupid post.
Here is the procedure
Quote:
CREATE PROC [_AeronQuestUpgrade]
@CharID int,
@QuestID int
as
DECLARE @CharName Varchar(MAX) = (select CharName16 from SHARD.dbo._Char Where CharID = @CharID)
if(@QuestID='Your quest id')
begin
Declare @OldItemCode varchar(128)
Declare @NewItemCode varchar(128)
Declare @ItemID INT
Select @ItemID = (Select ID From SHARD.dbo._RefObjCommon Where CodeName128=@OldItemCode)
select @OldItemCode = (select codename128 from SHARD.._refobjcommon where id = @itemID)
If @OldItemCode = 'ITEM_EU_TSTAFF_10_B_RARE'
begin
set @NewItemCode = 'ITEM_EU_TSTAFF_10_C_RARE'
end
else if @OldItemCode = 'ITEM_EU_TSWORD_10_B_RARE'
begin
set @NewItemCode = 'ITEM_EU_TSWORD_10_C_RARE'
end
Declare @OldItemCount int
Select @OldItemCount = (select COUNT(Item.refitemid) from SHARD.dbo._Items as Item inner Join SHARD.dbo._Inventory as inv on item.ID64 = inv.ItemID where inv.CharID = @CharID and item.RefItemID = @ItemID and item.Serial64 >0)
if(@OldItemCount >= 5)
begin
update SHARD.dbo._Inventory set ItemID = 0
where ItemID in (SELECT TOP 5 Item.ID64 from SHARD.dbo._Items as Item
inner Join SHARD.dbo._Inventory as inv on item.ID64 = inv.ItemID
where inv.CharID = @CharID and item.RefItemID = @ItemID and item.Serial64 >0)
update SHARD.dbo._Items set Serial64 = 0 where ID64 in (SELECT TOP 5 Item.ID64 from SHARD.dbo._Items as Item
inner Join SHARD.dbo._Inventory as inv
on item.ID64 = inv.ItemID
where inv.CharID = @CharID and item.RefItemID = @ItemID and item.Serial64 >0)
exec SHARD.dbo._ADD_ITEM_EXTERN @Charname,@NewItemCode,1,0
end
end
add this to your shard.dbo._quest_manage procedure
Quote:
If @QuestID = 'Your quest id'
begin
exec _AeronQuestUpgrade @CharID , @QuestID
end