[Release] Quest Upgrade System

02/15/2015 01:06 Aaron*#1
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
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
02/17/2015 01:46 Aaron*#2
push^^
@PortalDark you should write #Approved next time :p
02/17/2015 06:59 KingDollar#3
the idea of release is good

but the code is not good :)

as i see you are using a very basic way to code
you have a many mistakes in your code

well you have to train more and study as hard to reach a good level

but for a start - not bad
02/17/2015 07:46 bestprem#4
How many cheaters will cheat,,, :eek:
02/17/2015 17:04 Storxy_#5
Quote:
Originally Posted by Alexiuns* View Post
the idea of release is good

but the code is not good :)

as i see you are using a very basic way to code
you have a many mistakes in your code

well you have to train more and study as hard to reach a good level

but for a start - not bad
first bug with this code
(the weapons must be with the same status)
02/17/2015 17:35 ​Exo#6
Well it won't even work since you never assigned a value to @OldItemCode xD
02/17/2015 18:40 Aaron*#7
whoever is going to use it, he should fix some mistakes in it. of course im not going to release my full work that took some of my time^
02/18/2015 02:14 Crue*#8
Quote:
Originally Posted by Aeron* View Post
whoever is going to use it, he should fix some mistakes in it. of course im not going to release my full work that took some of my time^
so why you release something not even work ?
02/18/2015 15:45 Aaron*#9
Okay i have fixed the procedure now, you are able to use it without fixing it.
haters should stop hating now.
02/18/2015 16:27 bestprem#10
Quote:
Originally Posted by Aeron* View Post
Okay i have fixed the procedure now, you are able to use it without fixing it.
haters should stop hating now.
so put this sh!t at ur new server, if u did i promise i will play sro again specially for you even if
02/18/2015 17:34 ​Exo#11
PHP Code:
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 
TIP: This check is useless since @OldItemCode was not assigned.

And since the two variables Old/New has no values then the whole thing won't work.
02/18/2015 21:15 TheRunner#12
Thanks for Share it
02/18/2015 21:17 Royalblade*#13
Utter bullshit in its' purest form. Welcome to stupidity.

May I ask where you are from Aeron?

Oh and you can do this in one line. Well two lines if you put an IF statement.
02/18/2015 21:32 ILowe#14
item slot ?
02/19/2015 01:47 Bocc1337#15
Well i tried it and it works perfect for me...