Ok since I wanted to find out also for my self how to do something like that I searched and studied a little about MSSQL Queries
And I actually wrote a script that does this!
First of all you run this:
Code:
UPDATE user_item SET amount = 0 WHERE user_item.char_id = user_data.char_id AND user_item.item_type =57
To set to 0 all adena from ALL players (including builders :P)
Then you run this rather sofisticated :P SQL Query that does exactly what you need!
Finds the first character from ALL accounts and gives 5mil adena to it!
Only 1 character per account, the first one!
Code:
DECLARE @count int;
DECLARE @last int;
DECLARE @total int;
SET @total = (SELECT COUNT(DISTINCT account_name) AS ccount FROM user_data)
SET @count = 0;
SET @last = 0;
WHILE @total > @count
BEGIN
SET @last = (SELECT TOP 1 account_id FROM user_data WHERE account_id > @last);
DECLARE @charid int;
SET @charid = (SELECT TOP 1 char_id FROM user_data WHERE account_id = @last) ;
UPDATE user_item SET amount=5000000 WHERE char_id=@charid AND item_type=57 AND warehouse = 0;
SET @count = @count + 1;
END
Of course you realise that you should execute this ONLY when the server is OFFLINE!
HAVE FUN!!
EDIT: Did a small correction, added warehouse = 0 as a safety cause you dont want to set 5mil both to users inventory and warehouse (thats 10mil total)