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

Reset database without deleting anything, just editing it.

bury

Active Member
Joined
Jul 27, 2008
Messages
421
Solutions
7
Reaction score
25
I couldn't find any tutorial of this.

I just want to have my database like if everybody starts from 0 but without removing anything, just editing. players will have their account already created on the database.

For example,

player that is level 338, elite knight, ml 6, skills 100/100, that has completed lot of quests, need:
>>>>> level 8 , knight , hp/mp that a knight level 8 has (knight sample), ml 0, skills 10/10 (all), remove all storages. Remove all their set and put the set of the samples too.


Also remove the house owner/tiles (I think this is just truncating the table) and set same x,y,z position for all players. I know to do this by editing handly the tables, but I dont know to do it with a sql code for ALL characters. Also removing vip days and premium points from the accounts table, and I think that's all.

I've saved my currently db if any problem appears.

I'm using 10.1.26-MariaDB- / TFS 0.4 / Tibia 8.6

Thanks you!
 
Create whatever query in the image

UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;

The condition could be vocation...


Then if you want to purge all their items simply purge all other tables except account, and players. (Note some tables may be for your website, or ban lists ~ which you may want to keep)
 
Hello.

For example if I want to set all players level 8. Inside the players column the level is the 6th column so:

UPDATE table_name
SET column1 = value1, column2 = value2, ...

to

UPDATE players
SET column6 = value8

Is this correct?

Edit:

It says to me:


Error
SQL Query:


UPDATE players
SET column6 = value1



MySQL has said:

#1054 - The column 'column6' in field list is unknown
 
Code:
update `players` set `level` = 8;

Thanks! Sorry, I've a problem with two tables.

First one: I dont know how to remove house owners and all the items in the houses. The table "tile_items" it's empty. And in the table "houses" I've set owners = 0 in all the table, but ingame there are some doors that still says "someone owns this house".

Also I've truncate the table player_items, because I want all players starts from level 8 etc, but I want them to have the first player items (items for level 8, crocodile boots, normal backpack etc).

Do you know what can I do?
 
Back
Top