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

Skills reseted when dying

exique

Natala-ot.com
Joined
Sep 28, 2008
Messages
1,673
Reaction score
25
Location
Sweden
Hey! I got a problem with my server! Every one some one dies
they lose their skills (Not magic level)

I use tfs 2!

I dont know how to change it! Cuz it rlly SUX :(

HELP ME PLEASE!
 
Download XAMPP 1.6.6a, and re-import the SQL database file after installing it. I think that your current database will be deleted, but doesn't matter, as XAMPP 1.6.6a is most stable and compatible for SQL OT Servers.
 
Try making this:

Thanks SeoxTard and TheGig from ot***ns.net

First, go to: http://localhost/phpmyadmin/

Log in as root with whatever password you picked

Click on your servers database on the left side

Click the SQL button above the database selection

phpmyadmintue18nov0708nn8.png


Where it says Run SQL query/queries on database enter this in the text box below:

SQL:

DELIMITER |

CREATE TRIGGER `oncreate_players`
AFTER INSERT
ON `players`
FOR EACH ROW
BEGIN
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 0, 10);
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 1, 10);
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 2, 10);
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 3, 10);
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 4, 10);
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 5, 10);
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 6, 10);
END|

DELIMITER ;



Then click go.
Apparantely, sometimes it shows an error anyway but just disregard that. It should still work.
READ THIS:
Every new player that is created now will have savable stats.

REP?
 
Hey I'm TheGig @ otfans.net, lol

You could execute this, but you'll still have problems.

Here's the entire query, note that, without this query here, guilds won't work on your server:
PHP:
DELIMITER |

CREATE TRIGGER `ondelete_accounts`
BEFORE DELETE
ON `accounts`
FOR EACH ROW
BEGIN
    DELETE FROM `bans` WHERE `account` = OLD.`id`;
END|

CREATE TRIGGER `ondelete_guilds`
BEFORE DELETE
ON `guilds`
FOR EACH ROW
BEGIN
    UPDATE `players` SET `guildnick` = '', `rank_id` = 0 WHERE `rank_id` IN (SELECT `id` FROM `guild_ranks` WHERE `guild_id` = OLD.`id`);
END|

CREATE TRIGGER `ondelete_players`
BEFORE DELETE
ON `players`
FOR EACH ROW
BEGIN
    DELETE FROM `bans` WHERE `type` = 2 AND `player` = OLD.`id`;
    UPDATE `houses` SET `owner` = 0 WHERE `owner` = OLD.`id`;
END|

CREATE TRIGGER `oncreate_guilds`
AFTER INSERT
ON `guilds`
FOR EACH ROW
BEGIN
    INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('the Leader', 3, NEW.`id`);
    INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('a Vice-Leader', 2, NEW.`id`);
    INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('a Member', 1, NEW.`id`);
END|

CREATE TRIGGER `oncreate_players`
AFTER INSERT
ON `players`
FOR EACH ROW
BEGIN
    INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 0, 10);
    INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 1, 10);
    INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 2, 10);
    INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 3, 10);
    INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 4, 10);
    INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 5, 10);
    INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 6, 10);
END|

DELIMITER ;
 
Omg :) Thanks guys! I will repopulate both of you :D!!!!!!
Thanks for helping with the guild problem to! :p!

You should try the ot some time: oternia.servegame.com
It isen't online 24/7 but.. its online between 7:00 - 22:00 ~ !
 
Another solution would be for you to update your phpmyadmin to the latest version, 3.0.

When you've got the files for 3.0, do the following:

Go to your computer, c: Xampp (Usually there, atleast if you use XP). Open the folder and go to your "Phpmyadmin folder". Extract all files from the file you downloaded to your phpmyadmin folder. Notice that I recommend you to remove all other files in the folder before extracting the new files.

Yours,
Nikkster
 
Another solution would be for you to update your phpmyadmin to the latest version, 3.0.

When you've got the files for 3.0, do the following:

Go to your computer, c: Xampp (Usually there, atleast if you use XP). Open the folder and go to your "Phpmyadmin folder". Extract all files from the file you downloaded to your phpmyadmin folder. Notice that I recommend you to remove all other files in the folder before extracting the new files.

Yours,
Nikkster

Newest is 3.1.2... :mad:
http://www.phpmyadmin.net/
 
Back
Top