|
You last visited: Today at 07:32
Advertisement
[Release]Query fast adding item to npc.
Discussion on [Release]Query fast adding item to npc. within the SRO PServer Guides & Releases forum part of the SRO Private Server category.
10/06/2012, 22:51
|
#1
|
elite*gold: 0
Join Date: May 2012
Posts: 64
Received Thanks: 65
|
[Release]Query fast adding item to npc.
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
|
|
|
10/06/2012, 23:47
|
#2
|
elite*gold: 0
Join Date: Sep 2012
Posts: 274
Received Thanks: 85
|
|
|
|
10/06/2012, 23:59
|
#3
|
elite*gold: 0
Join Date: May 2012
Posts: 64
Received Thanks: 65
|
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.
|
|
|
10/07/2012, 15:54
|
#4
|
elite*gold: 0
Join Date: Jun 2009
Posts: 3,448
Received Thanks: 2,330
|
Can you add quantity? For example if I want to add 20 unit of items straight to NPC?
|
|
|
10/07/2012, 16:09
|
#5
|
elite*gold: 0
Join Date: May 2012
Posts: 64
Received Thanks: 65
|
U mean MultiAdding?
U write 40 codenames and it add it with one click?
|
|
|
01/17/2013, 07:52
|
#6
|
elite*gold: 0
Join Date: Jan 2008
Posts: 40
Received Thanks: 4
|
if you could make this query after insert to database and show txt file will be great
|
|
|
01/17/2013, 09:58
|
#7
|
elite*gold: 0
Join Date: Dec 2011
Posts: 651
Received Thanks: 266
|
to make a server only way to do is buying a root
|
|
|
01/19/2013, 15:36
|
#8
|
elite*gold: 130
Join Date: Mar 2008
Posts: 2,485
Received Thanks: 934
|
Quote:
Originally Posted by eminem5
to make a server only way to do is buying a root
|
Ummm yea, and this is related to..... to what, exactly?
|
|
|
01/21/2013, 13:44
|
#9
|
elite*gold: 41
Join Date: Oct 2012
Posts: 2,216
Received Thanks: 1,195
|
thanks !
|
|
|
06/25/2014, 03:39
|
#10
|
elite*gold: 0
Join Date: Mar 2010
Posts: 177
Received Thanks: 11
|
doesn't work on SQL 2008 R2 right ?
|
|
|
06/27/2014, 00:39
|
#11
|
elite*gold: 0
Join Date: Jun 2014
Posts: 2
Received Thanks: 0
|
Work on SQL Server 2012
|
|
|
06/27/2014, 13:23
|
#12
|
elite*gold: 0
Join Date: May 2012
Posts: 64
Received Thanks: 65
|
Quote:
Originally Posted by Little Messi
doesn't work on SQL 2008 R2 right ?
|
It works. If you have some errors PM Me and i will try to help ya
|
|
|
05/21/2016, 12:48
|
#13
|
elite*gold: 0
Join Date: Aug 2012
Posts: 43
Received Thanks: 1
|
dont work sql 2014 , plz help me
|
|
|
|
Similar Threads
|
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
|
All times are GMT +1. The time now is 07:32.
|
|