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

AAC Create season rank based on highscores

ralke

(҂ ͠❛ ෴ ͡❛)ᕤ
Joined
Dec 17, 2011
Messages
1,492
Solutions
27
Reaction score
858
Location
Santiago - Chile
GitHub
ralke23
Twitch
ralke23
Hi there! I had a little idea and wanted to know if someone can craft it. What I need to do, is to create a new table, for example, season1.
This table will hold the current highscore value of the character, for example, if the character is currently rank#1, this will show inside his characterprofile, somelike like:

  • Season 1 | #1
If the player is rank 197, place season 1 | #197. And if the player rank exceeds rank #200, get placed as "unranked". This value, season1, is going to be used to create queries with prices for them, or any change that comes to mind. A last thing would be, to have a query that resets every player level (just level, not skills, items, etc.), make them hold their season1 value, and finally create a new table for season2 that behaves the same.

I will really appreciate any contribution to this idea, thanks a lot in advance!
Regards, ralke
 
Solution
@ralke
If you got problems with preparing some table or list of columns, message me on Discord: Gesior.pl#3208
I use DBeaver for MySQL and I can get list of columns with 1 click.

EDIT: forgot to post code to reset players:
I made it 2 years ago for TFS 1.2 or 1.3. There can be some new tables on new TFS. Ex. some 'chest_rewards' for bosses, IDK.

1. Create table seasons with ID and name of season:
SQL:
CREATE TABLE IF NOT EXISTS `seasons` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8;
2. Create table...
Still need this :) if someone would like to take the challenge. I guess I confused my explaining a little bit before, what I do need is:

I wonder if there's a way that I can storage the highscores from my server. With this I mean, setting up something that stores the information of which rank (level) the character is.

Here's two ideas of how could probably work:,
a) if the character is #1 on level highscores, set the storage XXX1, then rank #2 XXX2, and so on.
b) do it via tables, creating a table named highscore, and having a value (1, 2, 3, etc) that defines which rank is the character.

Any help will be really appreciated
Thanks in advance, Regards!
Post automatically merged:

Had a little talk and was adviced to proceed doing the following:

a) create a new table that copy 'players' to have a similar structure
b) execute some query to reset player levels
c) use primary and foreign key on player id to recognize which character the information is about
d) pull data from 'order by' and keep player level stored on the 'players' copy
e) use a script similar to !deathlist to call the parameter in-game
f) reference migrations folder to call querys
 
Last edited:
@ralke
If you got problems with preparing some table or list of columns, message me on Discord: Gesior.pl#3208
I use DBeaver for MySQL and I can get list of columns with 1 click.

EDIT: forgot to post code to reset players:
I made it 2 years ago for TFS 1.2 or 1.3. There can be some new tables on new TFS. Ex. some 'chest_rewards' for bosses, IDK.

1. Create table seasons with ID and name of season:
SQL:
CREATE TABLE IF NOT EXISTS `seasons` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8;
2. Create table season_archive with data about players. Store only columns, which you plan to use for rankings.
With my example table you can make ranking by level, magic level, skills, then group them by vocation or town. You probably won't need that much.

I made it by copying players structure, removing some columns and adding:
SQL:
  `season_id` int NOT NULL,
  `player_id` int NOT NULL,
  `rank_level` int DEFAULT NULL,
and some index changes:
SQL:
  PRIMARY KEY (`id`),
  FOREIGN KEY (`season_id`) REFERENCES `seasons` (`id`) ON DELETE CASCADE,
  FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE,
  KEY `rank_level` (`rank_level`)
Full query:
SQL:
CREATE TABLE IF NOT EXISTS `season_archive` (
  `id` int NOT NULL AUTO_INCREMENT,
  `season_id` int NOT NULL,
  `player_id` int NOT NULL,
  `rank_level` int DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `group_id` int NOT NULL DEFAULT '1',
  `account_id` int NOT NULL DEFAULT '0',
  `level` int NOT NULL DEFAULT '1',
  `vocation` int NOT NULL DEFAULT '0',
  `healthmax` int NOT NULL DEFAULT '150',
  `experience` bigint unsigned NOT NULL DEFAULT '0',
  `maglevel` int NOT NULL DEFAULT '0',
  `manamax` int NOT NULL DEFAULT '0',
  `manaspent` bigint unsigned NOT NULL DEFAULT '0',
  `town_id` int NOT NULL DEFAULT '1',
  `cap` int NOT NULL DEFAULT '400',
  `skull` tinyint NOT NULL DEFAULT '0',
  `skulltime` bigint NOT NULL DEFAULT '0',
  `onlinetime` bigint NOT NULL DEFAULT '0',
  `balance` bigint unsigned NOT NULL DEFAULT '0',
  `skill_fist` int unsigned NOT NULL DEFAULT 10,
  `skill_club` int unsigned NOT NULL DEFAULT 10,
  `skill_sword` int unsigned NOT NULL DEFAULT 10,
  `skill_axe` int unsigned NOT NULL DEFAULT 10,
  `skill_dist` int unsigned NOT NULL DEFAULT 10,
  `skill_shielding` int unsigned NOT NULL DEFAULT 10,
  `skill_fishing` int unsigned NOT NULL DEFAULT 10,
  PRIMARY KEY (`id`),
  FOREIGN KEY (`season_id`) REFERENCES `seasons` (`id`) ON DELETE CASCADE,
  FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE,
  KEY `rank_level` (`rank_level`)
) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8;

3. Insert first season to seasons table:
SQL:
INSERT INTO seasons (`name`) VALUES ('Season #1');
4. Copy all players into season_archive using single query.
I took list of all columns - except id - from season_archive and copied them twice. Then replaced 3 first columns with:
SQL:
(SELECT MAX(id) FROM seasons), id, NULL
It will set season_id to current max ID of season, set player_id to id from table players and set rank_level to NULL.
Full query (it's one query that selects data from one table and inserts it into another):
SQL:
INSERT INTO `season_archive` (season_id, player_id, rank_level, name, group_id, account_id, level, vocation, healthmax, experience, maglevel, manamax, manaspent, town_id, cap, skull, skulltime, onlinetime, balance, skill_fist, skill_club, skill_sword, skill_axe, skill_dist, skill_shielding, skill_fishing)
SELECT (SELECT MAX(id) FROM seasons), id, NULL, name, group_id, account_id, level, vocation, healthmax, experience, maglevel, manamax, manaspent, town_id, cap, skull, skulltime, onlinetime, balance, skill_fist, skill_club, skill_sword, skill_axe, skill_dist, skill_shielding, skill_fishing FROM `players`

5. Finally, rank players by their experience. It's level rank, but with experience you will get better precision:
SQL:
UPDATE season_archive
INNER JOIN
(SELECT
    id,
    player_id,
    RANK() OVER (
ORDER BY
    experience DESC
    ) player_rank
FROM
    season_archive
    WHERE season_id = (SELECT MAX(id) FROM seasons)
    ) t ON t.id = season_archive.id
SET rank_level = t.player_rank;
It will update only last season ranks. Old seasons won't be affected.

To refresh score, you got to remove rows about last season from season_archive and execute steps 4 and 5 again, to load fresh data from players and rank them.
Query to delete last season data:
SQL:
DELETE FROM `season_archive` WHERE season_id = (SELECT MAX(id) FROM seasons);

-------------
Load season #1 highscore query:
SQL:
SELECT id, player_id, name, rank_level, level, experience
FROM season_archive
WHERE `season_id` = 1
ORDER BY rank_level
As you can see, rank is not 1,2,3,4,5.. it's just 1 and 2, as 6 players have same exp (4200) and they get 2nd place:
1662107117571.png

If there are some players with same exp and then other players with different, it will return ex: 1,2,3,7 as there are 4 players with rank 3, which are counted as 3,4,5,6, but all displayed as 3:
1662107240452.png


----------------------
You can add more columns with ranks to that table ex. rank_magic_level. Then after loading data from players, you will have to run second 'update rank query'. Example with magic level (sorted by magic level and mana spent for better precision):
SQL:
UPDATE season_archive
INNER JOIN
(SELECT
    id,
    player_id,
    RANK() OVER (
ORDER BY
    maglevel DESC, manaspent DESC
    ) player_rank
FROM
    season_archive
    WHERE season_id = (SELECT MAX(id) FROM seasons)
    ) t ON t.id = season_archive.id
SET rank_magic_level = t.player_rank;
Just replace ORDER BY columns abd SET xxxx column to new name.


------------
If your GM/GOD has high level/skills, you may need to make some changes to query that copy players into season_archive to skip players with high group_id.
 
Last edited:
Solution
@Gesior.pl Thank you so much! This looks great. I'll do the test as soon I can, been looking at this piece of code for a few days but couldn't implement it yet, since im lacking of time and need to do some backups before. I will answer back with the results, regards! :D
 
@Gesior.pl it worked perfectly! I only need a last thing, how can I call it inside characterprofile.php? I saw that $profile_data loads the tables inside player, but i'm not sure of how I should call the season_achieve :p

By the way, thanks a lot!!!

Just a little reminder for me, here's reset account query for TFS 1.5 downgrades 8.60. This will set everyone to level 8, 4200 experience, and also added magic level 30 to mages, magic level 5 and distance 30 to paladin, magic level 2 and sword/axe/club 30 to knights.

SQL:
UPDATE `players`
SET
`health` = 185,
`healthmax` = 185,
`mana` =  90,
`manamax` = 90,
`cap` = 470,
`level` = 8,
`experience` = 4200,
`maglevel` = 30,
`soul` = 100,
`manaspent` = 0,
`lookaddons` = 0,
`posx` = 0,
`posy` = 0,
`posz` = 0,
`conditions` = '',
`skull` = 0,
`skulltime` = 0,
`blessings` = 0,
`stamina` = 2520,
`skill_fist` = 10,
`skill_club` = 10,
`skill_sword` = 10,
`skill_axe` = 10,
`skill_dist` = 10,
`skill_shielding` = 10,
`skill_fishing` = 10,
`skill_fist_tries` = 0,
`skill_club_tries` = 0,
`skill_sword_tries` = 0,
`skill_axe_tries` = 0,
`skill_dist_tries` = 0,
`skill_shielding_tries` = 0,
`skill_fishing_tries` = 0
WHERE `vocation` =  1 OR `vocation`= 5  OR `vocation`= 2 OR `vocation`= 6;
UPDATE `players`
SET
`health` = 185,
`healthmax` = 185,
`mana` =  35,
`manamax` = 35,
`cap` = 470,
`level` = 8,
`experience` = 4200,
`maglevel` = 5,
`soul` = 100,
`manaspent` = 0,
`lookaddons` = 0,
`posx` = 0,
`posy` = 0,
`posz` = 0,
`conditions` = '',
`skull` = 0,
`skulltime` = 0,
`blessings` = 0,
`stamina` = 2520,
`skill_fist` = 10,
`skill_club` = 10,
`skill_sword` = 10,
`skill_axe` = 10,
`skill_dist` = 30,
`skill_shielding` = 10,
`skill_fishing` = 10,
`skill_fist_tries` = 0,
`skill_club_tries` = 0,
`skill_sword_tries` = 0,
`skill_axe_tries` = 0,
`skill_dist_tries` = 0,
`skill_shielding_tries` = 0,
`skill_fishing_tries` = 0
WHERE `vocation` =  3 OR `vocation`= 7;
UPDATE `players`
SET
`health` = 185,
`healthmax` = 185,
`mana` =  35,
`manamax` = 35,
`cap` = 470,
`level` = 8,
`experience` = 4200,
`maglevel` = 2,
`soul` = 100,
`manaspent` = 0,
`lookaddons` = 0,
`posx` = 0,
`posy` = 0,
`posz` = 0,
`conditions` = '',
`skull` = 0,
`skulltime` = 0,
`blessings` = 0,
`stamina` = 2520,
`skill_fist` = 10,
`skill_club` = 30,
`skill_sword` = 30,
`skill_axe` = 30,
`skill_dist` = 10,
`skill_shielding` = 10,
`skill_fishing` = 10,
`skill_fist_tries` = 0,
`skill_club_tries` = 0,
`skill_sword_tries` = 0,
`skill_axe_tries` = 0,
`skill_dist_tries` = 0,
`skill_shielding_tries` = 0,
`skill_fishing_tries` = 0
WHERE `vocation` =  4 OR `vocation`= 8;
DELETE FROM `account_ban_history`;
DELETE FROM `account_bans`;
DELETE FROM `house_lists`;
DELETE FROM `houses`;
DELETE FROM `market_history`;
DELETE FROM `market_offers`;
DELETE FROM `player_deaths`;
DELETE FROM `player_depotitems`;
DELETE FROM `player_inboxitems`;
DELETE FROM `player_items`;
DELETE FROM `player_spells`;
DELETE FROM `player_storage`;
DELETE FROM `players_online`;
DELETE FROM `tile_store`;
 
how can I call it inside characterprofile.php?
Code for Znote, shows list of seasons and rank in each for given player (not tested).

On that line:
Add:
PHP:
<table>
    <thead>
        <tr>
            <td><font class="profile_font">Seasons ranking:</font></td>
        </tr>
    </thead>
    <tbody>
<?php
$seasons = mysql_select_multi("SELECT id, name FROM seasons ORDER BY id");

foreach($seasons as $season) {
    $seasonData = mysql_select_single("SELECT rank_level, level, experience FROM season_archive WHERE `season_id` =" . (int)$season['id'] . " AND `player_id` =" . (int)$user_id);
    echo '<tr>';
    echo '<td>' . $season['name'] . '</td>';
    if ($seasonData) {
        echo '<td>#' . $seasonData['rank_level'] . ' (level ' . $seasonData['level'] . ', exp ' . $seasonData['experience'] . '</td>';
    } else {
        // player has no rank for season = was created after season finished
        echo '<td>Not participated in competition</td>';
    }
    echo '</tr>';
}
?>
    </tbody>
</table>
If it does not work, message me on Discord: Gesior.pl#3208
We will fix it on private - it may take multiple iterations of fixes - and I will post working version.
 
Code for Znote, shows list of seasons and rank in each for given player (not tested).

On that line:
Add:
PHP:
<table>
    <thead>
        <tr>
            <td><font class="profile_font">Seasons ranking:</font></td>
        </tr>
    </thead>
    <tbody>
<?php
$seasons = mysql_select_multi("SELECT id, name FROM seasons ORDER BY id");

foreach($seasons as $season) {
    $seasonData = mysql_select_single("SELECT rank_level, level, experience FROM season_archive WHERE `season_id` =" . (int)$season['id'] . " AND `player_id` =" . (int)$user_id);
    echo '<tr>';
    echo '<td>' . $season['name'] . '</td>';
    if ($seasonData) {
        echo '<td>#' . $seasonData['rank_level'] . ' (level ' . $seasonData['level'] . ', exp ' . $seasonData['experience'] . '</td>';
    } else {
        // player has no rank for season = was created after season finished
        echo '<td>Not participated in competition</td>';
    }
    echo '</tr>';
}
?>
    </tbody>
</table>
If it does not work, message me on Discord: Gesior.pl#3208
We will fix it on private - it may take multiple iterations of fixes - and I will post working version.

Works so good!! :D

1662778149735.png

Some details I saw:
Gesior.pl said:
If your GM/GOD has high level/skills, you may need to make some changes to query that copy players into season_archive to skip players with high group_id.

Indeed they're ranked too. Haven't raised any skill on access account, and they got ranked #204, same as any other level 8 character. This made me think, that we could actually limit the shown ranks to #200 and this way we won't mess with access players...

Anyways, the system is perfect.
Thanks a lot!!!!!! :D
 
Code for Znote, shows list of seasons and rank in each for given player (not tested).

On that line:
Add:
PHP:
<table>
    <thead>
        <tr>
            <td><font class="profile_font">Seasons ranking:</font></td>
        </tr>
    </thead>
    <tbody>
<?php
$seasons = mysql_select_multi("SELECT id, name FROM seasons ORDER BY id");

foreach($seasons as $season) {
    $seasonData = mysql_select_single("SELECT rank_level, level, experience FROM season_archive WHERE `season_id` =" . (int)$season['id'] . " AND `player_id` =" . (int)$user_id);
    echo '<tr>';
    echo '<td>' . $season['name'] . '</td>';
    if ($seasonData) {
        echo '<td>#' . $seasonData['rank_level'] . ' (level ' . $seasonData['level'] . ', exp ' . $seasonData['experience'] . '</td>';
    } else {
        // player has no rank for season = was created after season finished
        echo '<td>Not participated in competition</td>';
    }
    echo '</tr>';
}
?>
    </tbody>
</table>
If it does not work, message me on Discord: Gesior.pl#3208
We will fix it on private - it may take multiple iterations of fixes - and I will post working version.

Hey there @Gesior.pl - This is an absolutely awesome system - great work!
I see you did a zNote version; could you please provide a version for Gesior characters.php as well?

----------------------------------------------------------

Also here is a modified SQL Code for season archive including rank columns for magic level, axe/sword/club/dist/shield, fishing, online time and balance as I figure these would be the ones I would use.

SQL:
CREATE TABLE IF NOT EXISTS `season_archive` (
  `id` int NOT NULL AUTO_INCREMENT,
  `season_id` int NOT NULL,
  `player_id` int NOT NULL,
  `rank_level` int DEFAULT NULL,
  `rank_magic_level` int DEFAULT NULL,
  `rank_sword` int DEFAULT NULL,
  `rank_axe` int DEFAULT NULL,
  `rank_club` int DEFAULT NULL,
  `rank_distance` int DEFAULT NULL,
  `rank_shielding` int DEFAULT NULL,
  `rank_fishing` int DEFAULT NULL,
  `rank_online` int DEFAULT NULL,
  `rank_balance` int DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `group_id` int NOT NULL DEFAULT '1',
  `account_id` int NOT NULL DEFAULT '0',
  `level` int NOT NULL DEFAULT '1',
  `vocation` int NOT NULL DEFAULT '0',
  `healthmax` int NOT NULL DEFAULT '150',
  `experience` bigint unsigned NOT NULL DEFAULT '0',
  `maglevel` int NOT NULL DEFAULT '0',
  `manamax` int NOT NULL DEFAULT '0',
  `manaspent` bigint unsigned NOT NULL DEFAULT '0',
  `town_id` int NOT NULL DEFAULT '1',
  `cap` int NOT NULL DEFAULT '400',
  `skull` tinyint NOT NULL DEFAULT '0',
  `skulltime` bigint NOT NULL DEFAULT '0',
  `onlinetime` bigint NOT NULL DEFAULT '0',
  `balance` bigint unsigned NOT NULL DEFAULT '0',
  `skill_fist` int unsigned NOT NULL DEFAULT 10,
  `skill_club` int unsigned NOT NULL DEFAULT 10,
  `skill_sword` int unsigned NOT NULL DEFAULT 10,
  `skill_axe` int unsigned NOT NULL DEFAULT 10,
  `skill_dist` int unsigned NOT NULL DEFAULT 10,
  `skill_shielding` int unsigned NOT NULL DEFAULT 10,
  `skill_fishing` int unsigned NOT NULL DEFAULT 10,
  PRIMARY KEY (`id`),
  FOREIGN KEY (`season_id`) REFERENCES `seasons` (`id`) ON DELETE CASCADE,
  FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE,
  KEY `rank_level` (`rank_level`)
) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8;

1662784649088.png

[All SQL Commands available in zip file attached below]
 

Attachments

Last edited:
@Extrodus
Gesior2012 version:
In line:
Add:
PHP:
$main_content .= '<table>
    <thead>
        <tr>
            <td>Seasons ranking:</td>
        </tr>
    </thead>
    <tbody>';

$seasons = $SQL->query("SELECT id, name FROM seasons ORDER BY id")->fetchAll();

foreach($seasons as $season) {
    $seasonData = $SQL->query("SELECT rank_level, level, experience FROM season_archive WHERE `season_id` =" . (int)$season['id'] . " AND `player_id` =" . (int)$player->getId())->fetch();
    $main_content .=  '<tr>';
    $main_content .=  '<td>' . $season['name'] . '</td>';
    if ($seasonData) {
        $main_content .=  '<td>#' . $seasonData['rank_level'] . ' (level ' . $seasonData['level'] . ', exp ' . $seasonData['experience'] . '</td>';
    } else {
        // player has no rank for season = was created after season finished
        $main_content .=  '<td>Not participated in competition</td>';
    }
    $main_content .=  '</tr>';
}

$main_content .= '</tbody></table>';

You can also use this system as level/magic level/skill tracker. If you add new 'season' every day by some CRON, with season name as current date, you can print seasons as daily exp/magic level/skill progress.
 
@Extrodus
Gesior2012 version:
In line:
Add:
PHP:
$main_content .= '<table>
    <thead>
        <tr>
            <td>Season Rankings:</td>
        </tr>
    </thead>
    <tbody>';

$seasons = $SQL->query("SELECT id, name FROM seasons ORDER BY id")->fetchAll();

foreach($seasons as $season) {
    $seasonData = $SQL->query("SELECT rank_level, level, experience FROM season_archive WHERE `season_id` =" . (int)$season['id'] . " AND `player_id` =" . (int)$player->getId())->fetch();
    $main_content .=  '<tr>';
    $main_content .=  '<td>' . $season['name'] . '</td>';
    if ($seasonData) {
        $main_content .=  '<td>#' . $seasonData['rank_level'] . ' (level ' . $seasonData['level'] . ', exp ' . $seasonData['experience'] . ')</td>';
    } else {
        // player has no rank for season = was created after season finished
        $main_content .=  '<td>Not participated in competition</td>';
    }
    $main_content .=  '</tr>';
}

$main_content .= '</tbody></table><br>';

You can also use this system as level/magic level/skill tracker. If you add new 'season' every day by some CRON, with season name as current date, you can print seasons as daily exp/magic level/skill progress.

Unfortunately the borders/table is not the same that fits in your template for Gesior.

1662838057402.png


With my edit; it fixes the style.

Code:
        //Season Rankings
        $main_content .= '<table border="0" cellpadding="4" cellspacing="1" width="100%">
        <TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD COLSPAN=10 WIDTH=90% CLASS=white><B>Season Rankings:</td></tr>
        <tbody>';

        $seasons = $SQL->query("SELECT id, name FROM seasons ORDER BY id")->fetchAll();

        foreach($seasons as $season) {
            $seasonData = $SQL->query("SELECT rank_level, level, experience FROM season_archive WHERE `season_id` =" . (int)$season['id'] . " AND `player_id` =" . (int)$player->getId())->fetch();
            $main_content .=  '
            <tr BGCOLOR="'.$config['site']['lightborder'].'">';
            $main_content .=  '<td>' . $season['name'] . '</td>';
            if ($seasonData) {
                $main_content .=  '<td>#' . $seasonData['rank_level'] . ' (level ' . $seasonData['level'] . ', exp ' . $seasonData['experience'] . ')</td>';
            } else {
                // player has no rank for season = was created after season finished
                $main_content .=  '<td>Not participated in competition</td>';
            }
            $main_content .=  '</tr>';
        }

        $main_content .= '</tbody></table></br>';

1662839673650.png
 

Attachments

Last edited:
I always come to this thread to use the reset query, going to place this as it miss lastlogin and other tables...
SQL:
UPDATE `players`
SET
`health` = 185,
`healthmax` = 185,
`mana` =  90,
`manamax` = 90,
`cap` = 470,
`level` = 8,
`experience` = 4200,
`maglevel` = 30,
`soul` = 100,
`manaspent` = 0,
`lookaddons` = 0,
`posx` = 0,
`posy` = 0,
`posz` = 0,
`conditions` = '',
`skull` = 0,
`skulltime` = 0,
`blessings` = 0,
`stamina` = 2520,
`skill_fist` = 10,
`skill_club` = 10,
`skill_sword` = 10,
`skill_axe` = 10,
`skill_dist` = 10,
`skill_shielding` = 10,
`skill_fishing` = 10,
`skill_fist_tries` = 0,
`skill_club_tries` = 0,
`skill_sword_tries` = 0,
`skill_axe_tries` = 0,
`skill_dist_tries` = 0,
`skill_shielding_tries` = 0,
`skill_fishing_tries` = 0,
`lastlogin` = 0
WHERE `vocation` =  1 OR `vocation`= 5  OR `vocation`= 2 OR `vocation`= 6;
UPDATE `players`
SET
`health` = 185,
`healthmax` = 185,
`mana` =  35,
`manamax` = 35,
`cap` = 470,
`level` = 8,
`experience` = 4200,
`maglevel` = 5,
`soul` = 100,
`manaspent` = 0,
`lookaddons` = 0,
`posx` = 0,
`posy` = 0,
`posz` = 0,
`conditions` = '',
`skull` = 0,
`skulltime` = 0,
`blessings` = 0,
`stamina` = 2520,
`skill_fist` = 10,
`skill_club` = 10,
`skill_sword` = 10,
`skill_axe` = 10,
`skill_dist` = 30,
`skill_shielding` = 10,
`skill_fishing` = 10,
`skill_fist_tries` = 0,
`skill_club_tries` = 0,
`skill_sword_tries` = 0,
`skill_axe_tries` = 0,
`skill_dist_tries` = 0,
`skill_shielding_tries` = 0,
`skill_fishing_tries` = 0,
`lastlogin` = 0
WHERE `vocation` =  3 OR `vocation`= 7;
UPDATE `players`
SET
`health` = 185,
`healthmax` = 185,
`mana` =  35,
`manamax` = 35,
`cap` = 470,
`level` = 8,
`experience` = 4200,
`maglevel` = 2,
`soul` = 100,
`manaspent` = 0,
`lookaddons` = 0,
`posx` = 0,
`posy` = 0,
`posz` = 0,
`conditions` = '',
`skull` = 0,
`skulltime` = 0,
`blessings` = 0,
`stamina` = 2520,
`skill_fist` = 10,
`skill_club` = 30,
`skill_sword` = 30,
`skill_axe` = 30,
`skill_dist` = 10,
`skill_shielding` = 10,
`skill_fishing` = 10,
`skill_fist_tries` = 0,
`skill_club_tries` = 0,
`skill_sword_tries` = 0,
`skill_axe_tries` = 0,
`skill_dist_tries` = 0,
`skill_shielding_tries` = 0,
`skill_fishing_tries` = 0,
`lastlogin` = 0
WHERE `vocation` =  4 OR `vocation`= 8;
DELETE FROM `account_ban_history`;
DELETE FROM `account_bans`;
DELETE FROM `house_lists`;
DELETE FROM `houses`;
DELETE FROM `market_history`;
DELETE FROM `market_offers`;
DELETE FROM `player_deaths`;
DELETE FROM `player_depotitems`;
DELETE FROM `player_inboxitems`;
DELETE FROM `player_items`;
DELETE FROM `player_spells`;
DELETE FROM `player_storage`;
DELETE FROM `players_online`;
DELETE FROM `tile_store`;
 
Back
Top