• 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!

PHP [phpMyAdmin] Commands to edit database.

I wonder the same thing as lyczos, I want all houses to be Free (Nobody owns)when the player has been inactive for like 20 days.. And then after 30 days the he's acc also will be removed.

Is that possible to fix? Someone got script?
Please help!
 
need player template

Hey, do can you give me a chracter of each vocation , wearing a semi rare set (with bps of needed supplies).

Like for my war ot.... i have been stuck on this part for weeks :(

i dont want the chars to have rare eq , just semi rares and i need full bps of potions/runes/amulets/rings

if anyone can tell me where i can find a template, for this kind of character i would be very thankful.

I need the SQL format of a player with gear/and stuff ^^


plx help!!


thank you in advance
 
Are you using Gesiors AAC? If so, just login onto your sample characters and give them the equipment and supplies you want for them.
 
For Those who want to Clean the Houses
First Delete inactive players.
Then:
HTML:
UPDATE  `houses`  SET owner =0 WHERE owner >0 AND owner NOT  IN (
SELECT id
FROM players
);
 
i'd like some help aswell then ! :p

Can you guys tell me how to give NEW ACCOUNTS 3 or 4 premium days for free? Everything is working fine, but i dont know how to make them copy premium days from sample vocations !!

Q = How do i give ALL NEWACCOUNTS 3 premium days?

I'm in need of your help : )
 
Last edited:
Is it possible to ADD exp?
For example a lvl 8 char has 4200 exp and you put in something like

addexperience=5000

This way he would have 9200 exp later on, is this possible?
 
DELETE FROM player_depotitems, player_items, tile_items WHERE itemtype = 2352;

didnt work for me, i got this error


#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE itemtype = 2352' at line 1
 
I can make a command to delete account without players, and 30 days without account use??

and

Any command to set owner house 0, in houses that owner is without premium??


Ty
 
Last edited:
If you have this script, "delete inactive players" then this script will also remove all the sample characters:p
 
When i delete one player with "DELETE FROM players WHERE id=xxxx;", his items are still in db. Any solution for this? How delete it with player?
 
How to me fix this to remove all tag begin to 0 end 6000... see my comand

DELETE FROM `player_storage` WHERE `player_storage`.`key` = '0' TO `player_storage`.`key` = '6000'

Thx for helping
 
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)


  • 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.


Rep++ if helped :)


i reped :D but i use roxor...
can i do like
UPDATE accounts SET vipdays = vipdays + 7
so all accs on serv get 7 days of vip?
 
How to me fix this to remove all tag begin to 0 end 6000... see my comand



Thx for helping

PHP:
DELETE FROM `player_storage` WHERE `key` >= '0' AND `key` <= '6000'

Try this way.
 
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)


  • 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)

Code:
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.


Rep++ if helped :)

i want to try sth
 
Added a new command to remove the deaths produced before the time you set, the command I added will delete all deaths before july 01/2009.
 
Back
Top