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

Problems with player skills

Ziti

New Member
Joined
Jan 15, 2009
Messages
20
Reaction score
0
:confused:Help me if Someone relog on me serv are his skills been reset.

if u knows the problem than tell me i would like to fix this fast.
:confused::confused:
 
Try making this:

Thanks SeoxTard and TheGig from otfansns.net and Pitufo.

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:
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 ;

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?
 
Otherwise you can just update your database and the reset problem will be fixed.

Update your phpmyadmin to the latest version (3.0).

And now you probably wonder this, how??!?!?!


Download the file, and extract it to your Phpmyadmin folder (usally in computer/c/xampp). Notice that you need to delete everything else in the phpmyadmin folder before extracting the new files. Then just go back to the xampp folder, and on the icon "Xampp_Restart". Whollah, your problem is solved.

Link to phpmyadmin 3.0: http://www.phpmyadmin.net/home_page/downloads.php

(Just noticed its "3.1.2 version". It's the same, so you dont need to be confused.

Yours,
Nikkster
 
Back
Top