Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server > SRO PServer Guides & Releases
You last visited: Today at 02:32

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[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.

Reply
 
Old   #1

 
elite*gold: 27
Join Date: Jan 2015
Posts: 1,339
Received Thanks: 885
[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)
You can always press thanks if i helped.
Aaron* is offline  
Thanks
5 Users
Old 03/22/2015, 16:40   #2
 
!Ego's Avatar
 
elite*gold: 70
Join Date: May 2014
Posts: 206
Received Thanks: 20
Good job , bro
!Ego is offline  
Thanks
2 Users
Old 03/23/2015, 04:55   #3
 
Eslam Galull's Avatar
 
elite*gold: 85
Join Date: Aug 2010
Posts: 1,278
Received Thanks: 524
Quote:
Better performance
Yea i see broooh !!

- 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.
Eslam Galull is offline  
Old 03/23/2015, 04:55   #4
 
Eslam Galull's Avatar
 
elite*gold: 85
Join Date: Aug 2010
Posts: 1,278
Received Thanks: 524
after remove the item from inventoryforavatar !!




anyways :

Fixed one

Quote:
IF (@ItemRefID = 42940) -- Upgrade
BEGIN

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 !
Attached Files
File Type: txt fixed one.txt (1.1 KB, 121 views)
Eslam Galull is offline  
Thanks
4 Users
Old 03/23/2015, 06:44   #5

 
elite*gold: 27
Join Date: Jan 2015
Posts: 1,339
Received Thanks: 885
Quote:
Originally Posted by its.soul View Post
after remove the item from inventoryforavatar !!




anyways :

Fixed one



use it from text file !!

credits gose to @Aeron* i just edited his model switcher one !
Thanks for credits.. i'm aeron xD

Edit: sorry there was a little mistake in it, i have fixed it now.
Aaron* is offline  
Old 03/23/2015, 07:01   #6
 
Eslam Galull's Avatar
 
elite*gold: 85
Join Date: Aug 2010
Posts: 1,278
Received Thanks: 524
Never mind Dude,
just edit the main thread for ppl
Eslam Galull is offline  
Thanks
1 User
Old 07/21/2015, 04:48   #7
 
elite*gold: 0
Join Date: Nov 2013
Posts: 166
Received Thanks: 14
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)
ofek40032 is offline  
Reply


Similar Threads 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...
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:
Massive Network [PVP] D11 - New System - Play 2 Win - Upgrade System - New Uniques
08/17/2014 - SRO PServer Advertising - 5 Replies
Deleted ##
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



All times are GMT +1. The time now is 02:34.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.