Today I'd like to share a query with you. This query will quickly add an item to an NPC - test it and rate it.
PHP Code:
USE [SRO_VT_SHARD]
----------By Nefetis--------------
DECLARE @PRICETYPE VARCHAR (70)
DECLARE @PRICE VARCHAR (70)
DECLARE @TAB VARCHAR (70)
DECLARE @CODENAME128 VARCHAR (70)
DECLARE @OPTLEVEL VARCHAR (70)
SET @PRICETYPE = 'GOLD'
SET @OPTLEVEL = '5'
SET @CODENAME128 = 'ITEM_EU_STAFF_10_A_RARE'
SET @PRICE = '1'
SET @TAB = 'STORE_LEVELING_TAB2'
DECLARE @DATA VARCHAR (30) = (Select DUR_L FROM _RefObjItem WHERE ID IN(SELECT Link from _RefObjCommon where CodeName128 = @CODENAME128))
DECLARE @MAXLINK VARCHAR (30) = (SELECT MAX ([Index]) FROM _RefScrapOfPackageItem)+1
SET IDENTITY_INSERT _RefScrapOfPackageItem ON
INSERT INTO _RefScrapOfPackageItem (Service,Country,RefPackageItemCodeName,RefItemCodeName,OptLevel,Variance,Data,MagParamNum,MagParam1,MagParam2,MagParam3,MagParam4,MagParam5,MagParam6,MagParam7
,MagParam8,MagParam9,MagParam10,MagParam11,MagParam12,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128,[Index]) VALUES
(1,15,'PACKAGE_'+@CODENAME128,@CODENAME128,@OPTLEVEL,0,@DATA,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx',@MAXLINK)
SET IDENTITY_INSERT _RefScrapOfPackageItem OFF
SET IDENTITY_INSERT _RefPackageItem ON
DECLARE @ICON VARCHAR (70) = (SELECT AssocFileIcon128 FROM _RefObjCommon Where CodeName128 = @CODENAME128)
DECLARE @MAXID VARCHAR (30) = (SELECT MAX (ID) FROM _RefPackageItem)+1
INSERT INTO _RefPackageItem (Service,Country,ID,Codename128,SaleTag,ExpandTerm,NameStrID,DescStrID,AssocFileIcon,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128) VALUES
(1,15,@MAXID,'PACKAGE_'+@CODENAME128,0,'EXPAND_TERM_ALL','SN_'+@CODENAME128,'SN_'+@CODENAME128+'_TT_DESC',@ICON,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx')
SET IDENTITY_INSERT _RefPackageItem OFF
IF @PRICETYPE = 'GOLD' BEGIN
INSERT INTO _RefPricepolicyofitem (Service,Country,RefPackageItemCodeName,PaymentDevice,PreviousCost,Cost,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128) VALUES
(1,15,'PACKAGE_'+@CODENAME128,1,0,@PRICE,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx')
END
IF @PRICETYPE = 'SILK' BEGIN
INSERT INTO _RefPricepolicyofitem (Service,Country,RefPackageItemCodeName,PaymentDevice,PreviousCost,Cost,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128) VALUES
(1,15,'PACKAGE_'+@CODENAME128,2,0,@PRICE,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx')
INSERT INTO _RefPricepolicyofitem (Service,Country,RefPackageItemCodeName,PaymentDevice,PreviousCost,Cost,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128) VALUES
(1,15,'PACKAGE_'+@CODENAME128,4,0,0,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx')
INSERT INTO _RefPricepolicyofitem (Service,Country,RefPackageItemCodeName,PaymentDevice,PreviousCost,Cost,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128) VALUES
(1,15,'PACKAGE_'+@CODENAME128,16,0,0,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx')
END
DECLARE @MAXSLOT VARCHAR (30) = (SELECT MAX (SlotIndex) from _RefShopGoods Where Reftabcodename = @TAB and Service = 1)+1
INSERT INTO _RefShopGoods (Service,Country,RefTabCodeName,RefPackageItemCodeName,SlotIndex,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128) VALUES
(1,15,@TAB,'PACKAGE_'+@CODENAME128,@MAXSLOT,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx')
SET @PRICETYPE = 'GOLD'(GOLD OR SILK)
SET @OPTLEVEL = '5'(how much Plus)
SET @CODENAME128 = 'ITEM_EU_STAFF_10_A_RARE'(CodeName of item)
SET @PRICE = '1' (Price Of item)
SET @TAB = 'STORE_LEVELING_TAB2'( Tab where u want to add it)
I think it will work only on SQLSERVER 2008
If u have some problem with query pm me
Sorry, didn't see that before. However, you've got the the option here to set up what kind of a plus the item will have, you can also setup the silk price for it. I might soon add an "add blue" option for the items.
Query for adding silk for new accounts 04/27/2012 - SRO PServer Guides & Releases - 1 Replies Hi Guy's :mofo:
$ jidque = @ mssql_fetch_array (@ mssql_query ("SELECT * FROM WHERE dbo.TB_User StrUserID = '$ user'"));
jidque realjid = $ $ ;
$ silkver = mssql_query ("INSERT INTO SK_Silk (JID, Silk_own) values ('$ realjid', '1000000 ')");
yourself who is the name of the variable $ user to record, edit account id. '1000000 'Is the amount of silk box unchecked in the record section of your website, add and change.
Item icon gone when adding new item (ItemMinIcon Problem) 04/13/2012 - EO PServer Hosting - 0 Replies When i adding new casual for my new quest,and try to login to my Test server for checking it all item icon are gone.I really confident this problem was cause by ItemMinIcon.ani,why im saying that? cause when i move the item from ItemMinIcon.ani the problem solve...but the casual dont have icon...i bet some of ElitePvpers member know especially TheFlames ;) (Im Using Client Flames LOL)
Screenshot:
Item that i add (Casual) :
Requesting a query for adding new columns in db 01/28/2012 - SRO Private Server - 3 Replies Hi i'm requesting a query to add more columns into a table, i need 3 more columns at shardservice since cleaned the db it only appears one column atm.
So if anyone got one feel free to post it.
Thanks in advance!
Adding Pets Query 05/03/2010 - EO PServer Hosting - 0 Replies Ok So I Know This Is Me Being Lazy In A Way And Maybe Asking A Bit Much But What I Got To Lose Lol?
Can Some 1 Make A Guide Of Just The Db Query And Actions And With What Needs To Be Put In And Changed EveryTime You Wanna Add A Pet?
Cq_Action Is Whats Really Gettin Me COnfused I have Tried
[Release]adding npc giving +12 item 08/09/2009 - CO2 PServer Guides & Releases - 19 Replies hi guys i will tell you how to add npc in CoEmu v2.0
first source side
go to handlers then npctalk.cs
search for
case 390:
before add