In this tutorial I will show you some commands to edit the database. (Players, accounts.. etc)
This is only for TheForgottenServer.
Phpmyadmin commands. Login on the database and press on sql tab (not needed to select any table)
Rep++ if helped
This is only for TheForgottenServer.
Phpmyadmin commands. Login on the database and press on sql tab (not needed to select any table)
- Remove premium to every account from the database. (By Jester)
PHP:
UPDATE account SET premdays=0;
- Give 7 days more of premium to everyone. (By Jonern)
PHP:
UPDATE accounts SET premdays = premdays + 7
- Set all players one coordenate. (By Jester, Jonern)
PHP:
UPDATE players SET posx = 793, posy = 1014, posz = 7;
- Set all group ids to 1. (By Jester)
PHP:
UPDATE groups SET flags=0,name="Player" WHERE id=1;
UPDATE players SET group_id=1;
DELETE FROM groups WHERE id<>1;
- Create Account Manager. (From forgottenserver.sql)
PHP:
INSERT INTO `players` VALUES (1, 'Account Manager', 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 0, 10, 10, 10, 0, 0);
- Remove all red skulls and kills. (By Jester)
PHP:
UPDATE `players` SET `redskulltime`=0;
- Give the 5 blessings to everyone. (By Jester)
PHP:
UPDATE `players` SET `blessings`=31;
- Remove a specific item (here id 2160) completely from the game (depot, players, houses) (By Jonern, Macroman)
PHP:
DELETE FROM player_depotitems, player_items, tile_items WHERE itemtype = 2160;
- Delete inactive players, here below lvl 50, 20 days of inactivity (By Jonern)
PHP:
DELETE FROM players WHERE level < 50 AND lastlogin < UNIX_TIMESTAMP() - 20*24*60*60
- Delete player items where the player has been deleted, but his items has not. It's just to show the way it works. Means that it will delete all rows that doesn't belong to any player. Change for your own need. (By Jonern)
PHP:
DELETE FROM player_items WHERE player_id NOT IN (SELECT id FROM players);
- Delete all items from player id.
DELETE FROM `player_depotitems` , `player_items` WHERE `player_id` = '1234'
- Delete all deaths produced before the time you put, in this case 1 july.
PHP:
DELETE FROM player_deaths WHERE time<1246468428;
Rep++ if helped
Last edited: