Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server
You last visited: Today at 04:40

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

Advertisement



Inserting an item from database.

Discussion on Inserting an item from database. within the SRO Private Server forum part of the Silkroad Online category.

Reply
 
Old   #1

 
sarkoplata's Avatar
 
elite*gold: 166
Join Date: Apr 2009
Posts: 2,339
Received Thanks: 2,661
Inserting an item from database.

Hello community,

For example, I want to make a web-item-shop. How will add them to database programatically?

I know I should first add item to Item database, then get the item id and add to the inventory database. But I'm having problems with the 'Serial64' Column.
What should I do with it?

Thanks in advance.
sarkoplata is offline  
Old 05/07/2012, 04:01   #2
 
✗EpicSoul✗'s Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 1,189
Received Thanks: 531
well first you need to know a lot of php,sql

you could use some easy queries to add the items to players.
-for example

USE SRO_VT_SHARD
--Usage:
--exec _ADD_ITEM_EXTERN 'CharName','ItemsCodeName',Count,OptLvl
declare @CharName varchar(64)

set @CharName = 'YourCharName'

exec _ADD_ITEM_EXTERN @CharName,'ITEM_EU_TSTAFF_11_SET_B_RARE',1,10

this query would give the character 1 egyptian staff + 10
✗EpicSoul✗ is offline  
Thanks
1 User
Old 05/07/2012, 11:25   #3

 
sarkoplata's Avatar
 
elite*gold: 166
Join Date: Apr 2009
Posts: 2,339
Received Thanks: 2,661
Thank you, that was what i was looking for
sarkoplata is offline  
Old 05/07/2012, 13:27   #4
 
LemoniscooL's Avatar
 
elite*gold: 0
Join Date: Sep 2006
Posts: 1,100
Received Thanks: 397
yeah i knew that, but how to add magic options to the items created? like full blue and 100% on all stats?
LemoniscooL is offline  
Old 05/07/2012, 14:39   #5

 
sarkoplata's Avatar
 
elite*gold: 166
Join Date: Apr 2009
Posts: 2,339
Received Thanks: 2,661
Quote:
Originally Posted by LemoniscooL View Post
yeah i knew that, but how to add magic options to the items created? like full blue and 100% on all stats?
Take a look at _SMC_ITEM_ADD function. (or something like that)
Or, after adding item to database you can get it's id and edit params yourself. It will be pain in the ass

Here is a quick php script to add an item to every character on the database:

PHP Code:
<?php

$a 
'';
$b 'ITEM_EU_TSTAFF_01'// your item code. this is an example
$c 1;                  // amount
$d 8;                  // plusvalue +8

$connection odbc_connect("Driver={SQL Server};Server=YOURPC\SQL;Database=YOURSHARDDATABASENAME;""YOURSQLUSERNAME""YOURSQLPASS");
$query odbc_exec($connection"SELECT * FROM _Char");

while(
$extracted odbc_fetch_array($query))
{
    
$a $extracted['CharName16'];
    
$stmt    odbc_prepare($connection"{CALL _ADD_ITEM_EXTERN('$a', '$b', '$c', '$d')}");
    
$success odbc_execute($stmt, array());
    
}

?>
sarkoplata is offline  
Thanks
1 User
Old 05/07/2012, 14:41   #6
 
✗EpicSoul✗'s Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 1,189
Received Thanks: 531
Quote:
Originally Posted by sarkoplata View Post
Take a look at _SMC_ITEM_ADD function. (or something like that)
Or, after adding item to database you can get it's id and edit params yourself. It will be pain in the ass

Here is a quick php script to add an item to every character on the database:

PHP Code:
<?php

$a 
'';
$b 'ITEM_EU_TSTAFF_01'// your item code. this is an example
$c 1;                  // amount
$d 8;                  // plusvalue +8

$connection odbc_connect("Driver={SQL Server};Server=YOURPC\SQL;Database=YOURSHARDDATABASENAME;""YOURSQLUSERNAME""YOURSQLPASS");
$query odbc_exec($connection"SELECT * FROM _Char");

while(
$extracted odbc_fetch_array($query))
{
    
$a $extracted['CharName16'];
    
$stmt    odbc_prepare($connection"{CALL _ADD_ITEM_EXTERN('$a', '$b', '$c', '$d')}");
    
$success odbc_execute($stmt, array());
    
}

?>
nice !!
✗EpicSoul✗ is offline  
Old 05/07/2012, 15:12   #7
 
LemoniscooL's Avatar
 
elite*gold: 0
Join Date: Sep 2006
Posts: 1,100
Received Thanks: 397
yeah well thats an easy one .. also what use does it have to add an tem to all chars on server? Oo if you want to build an item shop online you need something that will add an item into an accounts storage (chest in smc) maybe ill write a small script for that later
LemoniscooL is offline  
Old 05/07/2012, 15:26   #8

 
sarkoplata's Avatar
 
elite*gold: 166
Join Date: Apr 2009
Posts: 2,339
Received Thanks: 2,661
Quote:
Originally Posted by LemoniscooL View Post
yeah well thats an easy one .. also what use does it have to add an tem to all chars on server? Oo if you want to build an item shop online you need something that will add an item into an accounts storage (chest in smc) maybe ill write a small script for that later
web-shop was an example to explain. The script does my job^^
sarkoplata is offline  
Reply


Similar Threads Similar Threads
SKILL, ITEM ID Database for L2 GOD
01/30/2012 - Lin2 Exploits, Hacks, Bots, Tools & Macros - 0 Replies
dos anyone know of where i can get all of rthe skill and item ID coded
PW Item Name Database
01/06/2012 - PW Hacks, Bots, Cheats, Exploits - 1 Replies
Hey guys, since I am currently completly re-writing my bot, and I wanted to add support for forgein item names, not only PWI (I was lazy the first time :)), I dumped Item Names in 8 languages. This could be useful if some of you guys want to add support for item names for your bots and dont want to read description offset in item struct :) Item names in UTF8, so chinese and other unicode stuff stays alive :) Structure : br ID int(11)
Item in database but not in game.
07/17/2011 - Shaiya - 4 Replies
At picture below it shows i have my 60+ gears in the database. but in game they come up as ???. Do i need to apply my item.sdata next for it to show up in the game?
Need latest item database
02/08/2010 - Cabal Online - 0 Replies
Does anyone have the latest item database for the reloaded patch?. I need it to find good drops for a specific level of monster.. i think it looks like.. TerrainX TerrainY WarpIdxForDead WarpIdxForRetn WarpIdxForLOut DmgMin DmgMax WarControl 0 0 0 49 49 0 0 0 0 ItemID ItemOpt DropRate MinLv MaxLv Group MaxDropCnt OptPoolIdx DurationIdx 0 Upgrade Core(High) 1 0 .05000000000000000 10 160 0 0 0 0
Item Database
11/23/2009 - Heroes of Newerth - 4 Replies
Last Update: November 21, 2009 _________________________________________________ __ Items: http://i485.photobucket.com/albums/rr212/darkmik0 7/HealthPotion.jpg Accessories Items Selling:



All times are GMT +1. The time now is 04:40.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.