Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 05.07.2006, 00:40   #1
Sarenity
Архивный участник
 
Join Date: May 2006
Posts: 7
Default Command for mass adding items

I'm curious if there is a command where I can add an item to everyones backpack who is online?

Thanks :wink:
Sarenity is offline  
Old 05.07.2006, 05:03   #2
nnightmare
Архивный участник
 
Join Date: Jun 2006
Posts: 153
Default

no
nnightmare is offline  
Old 05.07.2006, 10:44   #3
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

I know is possible to do with SQL language but i dont know a lot about it... i can do it very easy with PHP.

When server is offline... you can execute a script to add a item to all users.

something like this...
this is very basic script... i wrote that in 1 minute right now.

[php:1:1baf63400d]
<?

$item_id = 57;
$amount = 10000;

$query = "SELECT TOP 1 char_id FROM user_data ORDER by char_id DESC";
$result = mssql_query($query);
$last_char_id = mssql_result($result, 0, 0);

for($i=0;$i<=$last_char_id;$i++)
{
$query2 = "INSERT INTO user_item (char_id,item_type,amount,enchant,eroded,bless,ide nt,wished,warehouse) VALUES ($i,$item_id,$amount,0,0,0,0,0,0)";
mssql_query($query2);
}

?>[/php:1:1baf63400d]

I dont test that but it must work i think.
FidoW is offline  
Old 05.07.2006, 16:16   #4
nnightmare
Архивный участник
 
Join Date: Jun 2006
Posts: 153
Default

i think that he meant only to users that are online
nnightmare is offline  
Old 05.07.2006, 17:59   #5
GMan
Архивный участник
 
Join Date: Sep 2005
Posts: 198
Default

Its impossible, because you cant add items to a player while they are online with the cache server and doing anything with SQL defeats the purpose because you would have to restart the server for them to take affect.
GMan is offline  
 


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 16:48.