Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   Command for mass adding items (https://postpacific.loc-online.com/showthread.php?t=5053)

Sarenity 05.07.2006 00:40

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:

nnightmare 05.07.2006 05:03

no :)

FidoW 05.07.2006 10:44

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.

nnightmare 05.07.2006 16:16

i think that he meant only to users that are online

GMan 05.07.2006 17:59

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.


All times are GMT. The time now is 16:03.