Register for your free account! | Forgot your password?

Go Back   elitepvpers > Silkroad Online > SRO PServer - Discussions / Questions
You last visited: Today at 06:32

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

 

Vsro Weapon Upgrade System (query used to do )

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2010
Posts: 836
Received Thanks: 187
Vsro Weapon Upgrade System (query used to do )

Code:
Declare 
@maxserial BIgINT = (select MAX(serial64)from _Items)+1,
@RefItemID BIGINT,
@UpgradeItemCodeName VARCHAR (70),
@Data BigInt,
@maxID64 BIgINT = (select MAX(ID64)from _Items)+1,
@Optlevel INT ,
@Check_Correct VARCHAR (40)

IF NOT EXISTS (select UserJID From _Chest where UserJID IN (select UserJID from _User where CharID IN (select CharID from _Memo where Message like '%Upgrade%My%SWORD%')))
Begin
PRINT 'No one want to Upgrade a SWORD'
End
IF EXISTS (select UserJID From _Chest where UserJID IN (select UserJID from _User where CharID IN (select CharID from _Memo where Message like '%Upgrade%My%SWORD%')))
Begin
if not exists (select Message from _Memo where Message like '%Upgrade%My%SWORD%' and CharID IN(select CharID from _User where UserJID IN (select UserJID from _Chest where ItemID IN (select ID64 from _Items where RefItemID = (select ID from _RefObjCommon where CodeName128 = 'ITEM_CH_SWORD_11_SET_A_RARE')))))
begin
print 'Not working'
end
if exists (select Message from _Memo where Message like '%Upgrade%My%SWORD%' and CharID IN(select CharID from _User where UserJID IN (select UserJID from _Chest where ItemID IN (select ID64 from _Items where RefItemID = (select ID from _RefObjCommon where CodeName128 = 'ITEM_CH_SWORD_11_SET_A_RARE')))))
begin
if exists (select ItemID from _Chest where ItemID IN (select ID64 from _Items where RefItemID = (select ID from _RefObjCommon where CodeName128 = 'ITEM_CH_SWORD_11_SET_A_RARE')))
Begin
UPDATE _Chest SET Type = 'SWORD_SET_A_11' where ItemID IN (select ID64 from _Items where RefItemID = (select ID from _RefObjCommon where CodeName128 = 'ITEM_CH_SWORD_11_SET_A_RARE'))
Set @Optlevel =(select OptLevel from _Items where OptLevel > '7' and ID64 IN (select ItemID from _Chest where Type = 'SWORD_SET_A_11'))
IF @Optlevel > 7
Begin
UPDATE _Chest set ItemID = NULL where Type = 'SWORD_SET_A_11' and UserJID IN (select UserJID from _User where CharID IN (select CharID from _Memo where [Message] like '%Upgrade%My%SWORD%'))
UPdAte _Chest Set Type = 'SWORD_SET1_A_11' where type = 'SWORD_SET_A_11'
IF EXISTS (select Type from _Chest where Type = 'SWORD_SET1_A_11')
SET IDENTITY_INSERT _items ON
SET @UpgradeItemCodeName = 'ITEM_CH_SWORD_12_C_RARE'
SET @RefItemID = (select ID from _RefObjCommon where CodeName128 = @UpgradeItemCodeName)
SET @Data = (select Dur_L from _RefObjItem where ID = ( select Link from _RefObjCommon where CodeName128 [email protected] ))
INSERT INTO _Items (ID64, RefItemID, OptLevel, Variance, Data, CreaterName, MagParamNum, MagParam1, MagParam2, MagParam3, MagParam4, MagParam5, MagParam6, MagParam7, MagParam8, MagParam9, MagParam10, MagParam11, MagParam12, Serial64) VALUES (@maxID64,@RefItemID,0,0,@Data,NULL,0,0,0,0,0,0,0,0,0,0,0,0,0,@maxserial)
SET IDENTITY_INSERT _items OFF
INSERT INTO _ItemPool (ItemID,InUse)
VALUES (@maxID64,1)
END
UPDATE _Chest SET ItemID = @maxID64 where Type = 'SWORD_SET1_A_11'
UPDATE _Chest SET type = NULL where TYpe = 'SWORD_SET1_A_11'
UPDATE _Memo SET Message = 'Your SWORD has been Upgraded' where Message like '%Upgrade%My%SWORD%'
IF NOT EXISTS (select OptLevel from _Items where OptLevel > '8' and ID64 IN (select ItemID from _Chest where Type = 'SWORD_SET_A_11'))
Begin
update _Memo set Message = 'Well the process stoped for one of those reasones
this cuz he didnt respect who are older than him

all credits gos to androw3349 Cracker

and ahmed4ever2u query maker

enjoy guys



mats0o0o0 is offline  
Old   #2
 
elite*gold: 0
Join Date: Apr 2009
Posts: 2,085
Received Thanks: 2,287
Never use your statement to add items to _Items bc you may **** it up
Use:
_ADD_ITEM_EXTERN


sarkoplata is offline  
Thanks
3 Users
Closed Thread



« Previous Thread | Next Thread »

Similar Threads
Vsro Weapon Upgrade System
Well this is the 2nd version = Non Beta :) Installing Open your SHARD DB and Goto _Chest then add new column called (Type) ...
51 Replies - SRO PServer Guides & Releases
Vsro Files Query Error
Hello Guys, im looking around and trying to find help now for a long period. Here is my Problem: http://img36.imageshack.us/img36/9717/forufo.jpg...
8 Replies - SRO PServer Ask the Experts
Vsro Weapon Upgrade System !
i made a little trick which depends on the db i was able to create main tool which it allow you to upgrade your weapons inside vsro ! ofc its...
40 Replies - SRO PServer - Discussions / Questions



All times are GMT +1. The time now is 06:32.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.