|
You last visited: Today at 17:01
Advertisement
[RELEASE] Upgrade System
Discussion on [RELEASE] Upgrade System within the SRO PServer Guides & Releases forum part of the SRO Private Server category.
03/23/2015, 10:05
|
#1
|
elite*gold: 56
Join Date: Oct 2013
Posts: 1,165
Received Thanks: 762
|
[RELEASE] Upgrade System
Procedure:
Code:
/**
version : 1
author : syloxx
created date : 2015-03-23
description : upgrade your items.
return value :
0 = There is no error.
-1 = The transaction is in an uncommittable state. Rolling back transaction.
-2 = Slot 13 is emptry.
-3 = Item in slot 13 is not in upgrade table.
**/
CREATE PROCEDURE dbo._UpgradeItem
@CharID int
, @Scroll varchar(129)
AS
SET NOCOUNT ON;
SET XACT_ABORT ON;
DECLARE @ReturnValue int
, @ItemID bigint
, @BeforeRefID int
, @BeforeOptLevel tinyint
, @UpgradeRefID int
, @UpgradeOptLevel tinyint;
IF XACT_STATE() = -1
BEGIN
SET @ReturnValue = -1;
GOTO ErrorHandler;
END
BEGIN TRY
/**_# Get ItemID of item in slot 13.*/
SELECT @ItemID = ItemID
FROM dbo._Inventory WITH (NOLOCK)
WHERE CharID = @CharID
AND Slot = 13;
/**_# Check if slot 13 is empty.*/
IF @ItemID IS NULL OR @ItemID = 0
BEGIN
SET @ReturnValue = -2;
GOTO ErrorHandler;
END
/**_# Get RefID and OptLevel of item in slot 13.*/
SELECT @BeforeRefID = RefItemID
, @BeforeOptLevel = OptLevel
FROM dbo._Items WITH (NOLOCK)
WHERE ID64 = @ItemID;
/**_# Get all required informations to upgrade the item.*/
SELECT TOP 1 @UpgradeRefID = UpgradeRefID
, @UpgradeOptLevel = UpgradeOptLevel
FROM _RefUpgradeConfig WITH (NOLOCK)
WHERE Service = 1
AND BeforeRefID = @BeforeRefID
AND BeforeOptLevel <= @BeforeOptLevel
ORDER BY BeforeOptLevel DESC;
/**_# Check if item in slot 13 exsits in upgrade table.*/
IF @UpgradeRefID IS NULL OR @UpgradeRefID = 0
BEGIN
SET @ReturnValue = -3;
GOTO ErrorHandler;
END
BEGIN TRANSACTION;
/**_# Upgrade your item.*/
UPDATE _Items
SET RefItemID = @UpgradeRefID
, OptLevel = @UpgradeOptLevel
WHERE ID64 = @ItemID;
COMMIT TRANSACTION;
END TRY
BEGIN CATCH
GOTO ErrorHandler;
END CATCH;
RETURN 0;
ErrorHandler:
IF XACT_STATE() <> 0
ROLLBACK TRANSACTION;
DECLARE @CharName varchar(16);
SELECT @CharName = CharName16
FROM _Char WITH (NOLOCK)
WHERE CharID = @CharID;
EXEC _ADD_ITEM_EXTERN @CharName, @Scroll, 1, 0;
RETURN @ReturnValue;
Table:
Code:
CREATE TABLE _RefUpgradeConfig
(
Service bit NOT NULL
, BeforeRefID int NOT NULL
, BeforeOptLevel tinyint NOT NULL
, UpgradeRefID int NOT NULL
, UpgradeOptLevel tinyint NOT NULL
);
i didn't tested this system so if something is wrong please lemme know.
TUTORIAL
you have to config the upgrade system first.
means you have to insert stuff in the _RefUpgradeConfig table in following format:
Service, BeforeRefID (olditem), BeforeOptLevel (required plus), UpgradeRefID (new item), UpgradeOptLevel (new plus)
the rest should be self explain
|
|
|
03/23/2015, 10:34
|
#2
|
elite*gold: 0
Join Date: Mar 2015
Posts: 95
Received Thanks: 59
|
tkz men pt wh pen en azs sw mne
|
|
|
03/23/2015, 10:35
|
#3
|
elite*gold: 0
Join Date: Mar 2008
Posts: 1,106
Received Thanks: 226
|
Great Job Syloxx
|
|
|
03/23/2015, 10:35
|
#4
|
elite*gold: 0
Join Date: Mar 2015
Posts: 95
Received Thanks: 59
|
Hacker
|
|
|
03/23/2015, 20:28
|
#5
|
elite*gold: 56
Join Date: Oct 2013
Posts: 1,165
Received Thanks: 762
|
Quote:
Originally Posted by Exo
Don't use Codes or ObjCommon for such stuff. Just don't!
|
why? its a one time use and only _RefObjCommon know the CodeName?
|
|
|
03/23/2015, 21:17
|
#6
|
elite*gold: 77
Join Date: Jan 2015
Posts: 1,314
Received Thanks: 856
|
Quote:
Originally Posted by Exo
dafuq, that was a query to fill yo ur table my bad then..
|
Read the query before you post..
|
|
|
03/23/2015, 23:32
|
#7
|
elite*gold: 0
Join Date: Aug 2013
Posts: 82
Received Thanks: 34
|
Quote:
Originally Posted by Exo
dafuq, that was a query to fill yo ur table my bad then..
|
hahahaha. can you tell me who explained for you that this query will fill the table and it's not a procedure for upgrade ?
don't try to lie. i knew that you don't have any idea about sql coding.
|
|
|
03/24/2015, 00:32
|
#8
|
elite*gold: 41
Join Date: Oct 2012
Posts: 2,216
Received Thanks: 1,195
|
Quote:
Originally Posted by Exo
We're talking about the procedure Aeron posted
btw, do I know you? I never saw you or heard about you before, can you stop acting like if you know me?
|
know you ? who are you i didn't hear about you also lel
|
|
|
03/24/2015, 01:01
|
#9
|
elite*gold: 85
Join Date: Aug 2010
Posts: 1,278
Received Thanks: 521
|
why every dam thread turning to a fight thread .. can you calm down ppl !! #Please !!
|
|
|
03/24/2015, 01:17
|
#10
|
elite*gold: 0
Join Date: Nov 2014
Posts: 80
Received Thanks: 19
|
one thing to say i like your work good luck in that you do and we wait for you all new..
|
|
|
03/24/2015, 13:22
|
#11
|
elite*gold: LOCKED
Join Date: Sep 2008
Posts: 323
Received Thanks: 20
|
Great Job Syloxx
|
|
|
04/01/2015, 09:00
|
#12
|
elite*gold: 0
Join Date: Jan 2015
Posts: 94
Received Thanks: 115
|
Nice
|
|
|
04/03/2015, 15:21
|
#13
|
elite*gold: 50
Join Date: Jan 2015
Posts: 813
Received Thanks: 237
|
useful thanks bro
|
|
|
04/19/2015, 00:23
|
#14
|
elite*gold: 0
Join Date: Jan 2008
Posts: 79
Received Thanks: 8
|
added procedure succ + config table and i fill it with items codes + OPT level
now could anyone tell me how to use it to upgrade my weapons anyone answer please cuze i don't know how to do it
|
|
|
04/19/2015, 10:26
|
#15
|
elite*gold: 56
Join Date: Oct 2013
Posts: 1,165
Received Thanks: 762
|
place the item you wanna uprade on slot 13 (1 in inventory).
Execute the procedure (can be executed by a scroll aswell).
Teleport!
I won't explain you how to execute this procedure by scroll.
|
|
|
|
|
Similar Threads
|
[Release] Quest Upgrade System
06/14/2016 - SRO PServer Guides & Releases - 26 Replies
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...
|
[Release] Upgrade System - 3 Lines only, Better performance
03/23/2015 - SRO PServer Guides & Releases - 5 Replies
Hey guys,
Everybody here heard of this system, most of ya guys probably know it.
But unfortunately every release related to this system doesn't work properly or has a bad performance, so i decided to code a new one and release it.
FAQ
What is this?
-This is a system that will upgrade your weapon to a newer seal/degree.
How does it work?
-Simply put a +9 item in your first slot and use upgrade scroll or whatever you'll name it and you'll get a new weapon.
How can i configure it?
|
Guards-Online | Cap 120-12D | High Rates | Old job system | Play2Win | Upgrade System
11/21/2014 - SRO PServer Advertising - 62 Replies
http://i.epvpimg.com/MVR9h.png
Hello elitepvpers,
I would like to introduce our new private server Guards..
◘Links
Website|Download|Registration|Facebook
http://i.epvpimg.com/nMCph.png|http://s14.directu pload.net/images/140122/wqc4kxi2.png|http://s14.di rectupload.net/images/140122/fnq6eumq.png|http://i .epvpimg.com/QNpqc.png|
Basic Information:
|
[Majestic Online] • Cap 110 • |New System| • |Pve| • |High Rate| • |Upgrade System|
06/27/2014 - SRO PServer Advertising - 8 Replies
http://i.imgur.com/HDqWVLp.jpg
Hello Guys ,Server Back Online With a Great System & Sorry For Late
Let's Start
http://i.imgur.com/5GTRvc6.png?1
|
All times are GMT +2. The time now is 17:01.
|
|