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

Evolution to TFS

n3oth3on3

~ Ashandra War ~
Joined
Jul 1, 2007
Messages
52
Reaction score
0
Location
Germany
Hello,
I would use the next time TFS because Evolution sux =( has to many bugs for my new projekt =)

But I have 2000 character on mysql , Is there any Converter to Change it to TFS sql?

And what is with all my scripts < actions, movements and so on > must I change all Oo ?
 
I'll see what I can find. I think I've seen something like that.

EDIT: I'm sorry, I couldn't find anything like that, I did my best.
 
Last edited:
Code:
<?php
/*
Accounts
Evo: 
id, accno, password, type, premDays, premEnd, email, blocked, rlname, location, hide, hidemail

TFT:
id -> acc, password, type, premdays, lastday, key -> 0, email, blocked
*/

$host = "localhost"; $user = "root"; $pass = "password"; $db1 = 'server1'; $db2 = 'server1';

$evo = mysql_connect($host, $user, $pass);
mysql_select_db($db1);

$acc_query = mysql_query("SELECT * FROM accounts");

while($acc_row = mysql_fetch_object($acc_query)) {
    $acc_acc = $acc_row->accno;
    $acc_pass = $acc_row->password;
    $acc_type = $acc_row->type;
    $acc_prem = $acc_row->premDays;
    $acc_email = $acc_row->email;
    $acc_block = $acc_row->blocked;
    
    echo "INSERT INTO `accounts` VALUES ($acc_acc, $acc_pass, $acc_type, 0, 0, '0', $acc_email, $acc_block);<br />";
}

mysql_free_result($acc_query);

/* Players
Evo:
knowaddons    masterpos     pos     speed cap     maxdepotitems     food     sex     guildid     guildrank     guildnick     ownguild     lastlogin     lastip     save     redskulltime     redskull     comment     hide

Tft:
id     name     group_id     account_id     level     vocation     health     healthmax     experience     lookbody     lookfeet     lookhead     looklegs     looktype     lookaddons     maglevel     mana     manamax     manaspent     soul     town_id     posx     posy     posz     conditions     cap     sex     lastlogin     lastip     save     redskull     redskulltime     rank_id     guildnick     lastlogout     blessings     direction
*/

$player_query = mysql_query("SELECT * from players");

while($player_row = mysql_fetch_object($player_query)) {
    $player_name = $player_row->name;
    $player_access = $player_row->access;
    $player_acc = $player_row->account;
    $player_level = $player_row->level;
    $player_vocation = $player_row->vocation;
    $player_health = $player_row->health;
    $player_healthmax = $player_row->healthmax;
    $player_soul = $player_row->soul;
    $player_direction = $player_row->direction;
    $player_experience = $player_row->experience;
    $player_lookbody = $player_row->lookbody;
    $player_lookfeet = $player_row->lookfeet;
    $player_lookhead = $player_row->lookhead;
    $player_looklegs = $player_row->looklegs;
    $player_looktype = $player_row->looktype;
    $player_lookaddons = $player_row->lookaddons;
    $player_maglevel = $player_row->maglevel;
    $player_mana = $player_row->mana;
    $player_manamax = $player_row->manamax;
    $player_manaspent = $player_row->manaspent;
    $player_save = $player_row->save;
    $player_cap = $player_row->cap;
    $player_sex = $player_row->sex;
    $player_redskull = $player_row->redskull;
    $player_redskulltime = $player_row->redskulltime;
    $player_guildnick = $player_row->guildnick;
    
    $player_pos = $player_row->pos;
        $position = explode(";", $player_pos);
        $player_posx = $position[0];
        $player_posy = $position[1];
        $player_posz = $position[2];
    
    
    echo "INSERT INTO `players` VALUES (
    '', $player_name, $player_access, $player_acc, $player_level, $player_vocation, $player_health,
    $player_healthmax, $player_experience, $player_lookbody, $player_lookfeet, $player_lookhead,
    $player_looklegs, $player_looktype, $player_lookaddons, $player_maglevel, $player_mana, 
    $player_manamax, $player_manaspent, $player_soul, 1, $player_posx, $player_posy, $player_posz,
    '', $player_cap, $player_sex, 0, 0, $player_save, $player_redskull, $player_redskulltime,
    0, '', 0, 0, $player_direction);<br />";
}
mysql_free_result($player_query);

/* Players Items
Evo:
player (id)    slot    sid    pid    type    number    actionid    duration    charges     decaystate     text    specialdesc

Tft:
player_id    pid    sid    itemtype    count    attributes    writer    date

*/

$item_query = mysql_query("SELECT * from items");

while($items_row = mysql_fetch_object($item_query)) {
    $item_playerid = $items_row->player;
    $item_pid = $items_row->pid;
    $item_sid = $items_row->sid;
    $item_type = $items_row->type;
    $item_number = $item_row->number;
    // Now i will get only actionid to put on attributes, and as piterb said, i will put 0 (nil) to writer and date it isn't necessary the rest
    $item_actionid = $item_row->actionid;
    
    echo "INSERT INTO `player_items` VALUES ($item_playerid, $item_pid, $item_sid, $item_type, $item_number, $item_actionid, '0', '0')";
}

mysql_free_result($item_query);
?>

Code:
INSERT INTO `accounts` VALUES (xxxxx, xxxxx, 1, 0, 0, '0', [email protected], 0);
INSERT INTO `accounts` VALUES (xxxxx, xxxxx, 1, 0, 0, '0', [email protected], 0);
INSERT INTO `accounts` VALUES (xxxxx, xxxxx, 1, 0, 0, '0', [email protected], 0);
INSERT INTO `accounts` VALUES (xxxxx, xxxxx, 1, 0, 0, '0', [email protected], 0);
INSERT INTO `accounts` VALUES (xxxxx, xxxxx, 1, 0, 0, '0', [email protected], 0);
INSERT INTO `accounts` VALUES (xxxxx, xxxxx, 1, 0, 0, '0', [email protected], 0);
INSERT INTO `accounts` VALUES (xxxxx, xxxxx, 1, 0, 0, '0', [email protected], 0);

This made the .php but in my new tables is nothing ;P

maybe someone has a converter for me :(
 
Back
Top