Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 24.12.2006, 13:42   #1
kin
Архивный участник
 
Join Date: Sep 2006
Posts: 882
Default Mass adding to SQL

Is there any way to add some item to all players at ones? Not one by one.
kin is offline  
Old 24.12.2006, 13:47   #2
TuMBLer
Архивный участник
 
Join Date: Apr 2005
Posts: 127
Default

see chrono_darbuka sql sript in db_scripts
TuMBLer is offline  
Old 24.12.2006, 13:47   #3
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

yes.... for example... look at the SQL scripts to convert C1 DB to C4... there are a script that create the Chrono Cithara.. Unitus etc... the script basicly create a temporary table and select the most level player of each account and insert items into warehouse.
FidoW is offline  
Old 24.12.2006, 13:50   #4
kin
Архивный участник
 
Join Date: Sep 2006
Posts: 882
Default

Gents, I do not have that script. Could you please give me the link if possible.
kin is offline  
Old 24.12.2006, 15:47   #5
nish
Архивный участник
 
Join Date: May 2006
Posts: 237
Default

lol they came in the PP pack everyone who has the files has them
nish is offline  
Old 24.12.2006, 15:51   #6
kin
Архивный участник
 
Join Date: Sep 2006
Posts: 882
Default

Newer used PP pack
All links are died already.
kin is offline  
Old 24.12.2006, 19:12   #7
m4rk
Архивный участник
 
Join Date: Jan 2006
Posts: 607
Default

maybe try in irc
m4rk is offline  
Old 28.12.2006, 13:13   #8
kin
Архивный участник
 
Join Date: Sep 2006
Posts: 882
Default

Still can't get it. Need your help gents!
kin is offline  
Old 28.12.2006, 14:12   #9
m4rk
Архивный участник
 
Join Date: Jan 2006
Posts: 607
Default

http://www.thugz-board.com/PP-IRC-C4Retail.7z
next time search in google T_T
m4rk is offline  
Old 29.12.2006, 11:42   #10
Gaikotsu
Архивный участник
 
Join Date: Apr 2006
Posts: 74
Default

in PHP:
Code:
<?
$mssql_server = "127.0.0.1";
$mssql_user = "";
$mssql_pass = "";
$add_item_id = 3434; // item id
$add_item_count = 5; // item count

set_time_limit(0);

mssql_connect($mssql_server, $mssql_user, $mssql_pass);
mssql_select_db("lin2world");

$result = mssql_query("SELECT char_id FROM user_data WHERE char_id > 0");

$chars=array();

for($x=0; $chars[$x]=mssql_fetch_assoc($result); $x++);
unset($chars[count($chars)-1]);

for ($x=0; $x<count($chars); $x++)
 {
  $fields = "char_id, item_type, amount, enchant, eroded, bless, ident, wished, warehouse";
  $values = $chars[$x][char_id].", ".$add_item_id.", ".$add_item_count.", 0, 0, 0, 0, 0, 0";
  $result = mssql_query("INSERT INTO user_item($fields) VALUES($values)");
  if (!$result) 
   echo "Item $add_item_id not added to ".$chars[$x][char_id]."\n";
 }
?>
Gaikotsu is offline  
Old 29.12.2006, 12:42   #11
kin
Архивный участник
 
Join Date: Sep 2006
Posts: 882
Default

Thanks Gaikotsu! Will try it.

m4rk
I can use search and of course I found it. The problem was I couldn't find the script for Chrono Darbuka inside the pack.
kin is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 20:49.