• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 0.X SQL Query to change depot items

Lurk

Active Member
Joined
Dec 4, 2017
Messages
336
Reaction score
48
Hello, I had some depots in certain towns linked wrong and now a player has different items in different depots at the same city.
Is there a SQL Query that would allow me to send all the items my players have from one depot to another?
Example: I have 30 itens in the depot of town 1 and 50 in the depot of town 2, I'd send them all to town 1 so I'd now have 80 items on depot 1 and 0 on depot 2

I know there are querys like:
SQL:
DELETE FROM player_depotitems WHERE itemtype = 2160;

I'd need something like
SQL:
UPDATE player_depotitems SET town_id='0' WHERE player_id>0;
or something like this, the player_depotitems table only has: player_id, sid, pid, itemtype, count, attributes and serial tho, no town..
 
Set all depot items to town id 0:
SQL:
UPDATE player_depotitems SET town_id=0 WHERE town_id>0;

Set all depot items from town id X to town id Y:
SQL:
UPDATE player_depotitems SET town_id=Y WHERE town_id<>X;
 
Back
Top