[Release] Upgrade System - 3 Lines only, Better performance
Discussion on [Release] Upgrade System - 3 Lines only, Better performance within the SRO PServer Guides & Releases forum part of the SRO Private Server category.
[Release] Upgrade System - 3 Lines only, Better performance
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?
-Insert the old item id, new item id in _Upgrade table.
Let's start.
Add the following lines to your LOG_DB.._AddLogItem procedure.
Quote:
if @Operation = 41 and @ItemRefID = 'Upgrade scroll id' begin
declare @reqplus tinyint = '9' /* required plus to upgrade an item*/, @newitemopt tinyint = '0' /* NewItem Plus*/ ,@1slotitm int = (select it.refitemid from SRO_VT_SHARD.._items it inner join SRO_VT_SHARD.._Inventory inv on it.ID64 = inv.ItemID where CharID = @CharID and inv.Slot = 13 and it.optlevel >= @reqplus)
if @1slotitm in (select olditemid from _Upgrade) begin update SRO_VT_SHARD.._Items set RefItemID = (select newitemid from _upgrade where olditemid = @1slotitm),OptLevel = @newitemopt where id64 = (select itemid from sro_vt_shard.._inventory where charid = @charid and slot = 13 end end
then create _upgrade table
Quote:
USE [SRO_VT_LOG]
GO
/****** Object: Table [dbo].[_Upgrade] Script Date: 3/22/2015 4:05:26 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[_Upgrade](
[OldItemID] [int] NOT NULL,
[NewItemID] [int] NOT NULL
) ON [PRIMARY]
GO
to add upgradeable items,use this query.
Quote:
USE SRO_VT_SHARD
DECLARE @OldItem varchar(max) = 'Your old item code'
declare @Newitem varchar(max) = 'Your new item code'
declare @newitemid int
DECLARE @oLDITEMID int
set @newitemid = (select id from _refobjcommon where codename128 like @Newitem)
set @olditemid = (select id from _refobjcommon where codename128 like @olditem)
insert sro_vt_log.._upgrade (olditemid,newitemid) values (@OldItemID,@NewItemID)
- your idea about creating a table , yea its pretty smart than every time joib RefobjCommon ... but
Quote:
if @Operation = 41 and @ItemRefID = 'Upgrade scroll id' begin
declare @reqplus tinyint = '9' /* required plus to upgrade an item*/, @newitemopt tinyint = '0' /* NewItem Plus*/ ,@1slotitm int = (select it.refitemid from SRO_VT_SHARD.._items it inner join SRO_VT_SHARD.._Inventory inv on it.ID64 = inv.ItemID where CharID = @CharID and inv.Slot = 13 and it.optlevel >= @reqplus)
if @1slotitm in (select olditemid from _Upgrade) begin update SRO_VT_SHARD.._Items set RefItemID = (select newitemid from _upgrade where olditemid = @1slotitm),OptLevel = @newitemopt end end
- This is epic fail .. i was know that and i kept my words after test
you missed declare some varib. and after declare it the procedure fail with inventory space as in my case its put the staff in avatar slot. and for sure char cant loading.
DECLARE @INVSIZE TINYINT,
@Top1Wep int,
@OldItm int ,
@reqplus tinyint = '9',
@Targplus tinyint = '5'
Set @InvSize = (select InventorySize from sro_vt_shard.._char where charid = @charid)
set @Top1Wep = (select top 1 inv.itemid from sro_vt_shard.._inventory inv inner join sro_vt_shard.._items itm on inv.itemid = itm.id64
where itm.refitemid in (select olditemid from _Upgrade) and itm.serial64 > 0 and inv.itemid <> 0 and inv.slot between 13 and @InvSize and inv.charid = @charid And optlevel >= @reqplus)
Set @OldItm = (select top 1 refitemid from sro_vt_shard.._items where id64 <> 0 and id64 = @Top1Wep and serial64 > 0)
if @Top1Wep > 0
Begin
Declare @NewItm int = case
When @olditm in (select olditemid from _Upgrade)
then (select top 1 newitemid from _Upgrade where olditemid = @olditm )
Else 0 end /* will destroy any item that he tries to switch if he dont have required items */
update sro_vt_shard.._items set RefItemID = @NewItm , OptLevel = @Targplus where RefItemID = @OldItm and ID64 = @Top1Wep and Serial64 > 0
End
END
use it from text file !!
credits gose to @Aeron* i just edited his model switcher one !
Msg 137, Level 15, State 2, Procedure _AddLogItem, Line 62
Must declare the scalar variable "@reqplus".
Msg 137, Level 15, State 2, Procedure _AddLogItem, Line 63
Must declare the scalar variable "@1slotitm".
Msg 137, Level 15, State 2, Procedure _AddLogItem, Line 63
Must declare the scalar variable "@1slotitm".
Msg 156, Level 15, State 1, Procedure _AddLogItem, Line 63
Incorrect syntax near the keyword 'end'.
whats worng? (I did copy pase and change the name of shard db)
(vsro v193)
[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...
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:
VB system performance 04/26/2011 - .NET Languages - 0 Replies Hi ich habe ein Problem und zwar möchte ich Die CPU Auslastung wie beim
Windows Task Manager Darstellen
wie kann ich das machen.
Des weiteren würde ich noch die CPU Wärme anzeigen lassen wollen.
Für diese beiden Sachen bräuchte ich bitte Hilfe^^ :D