Bem aqui vai o tutorial de uma nova estatistica para o Gesior Acc Maker a Lastest Skill Advanced.
Vamus ao que enteressa!
Adicione esse codigo SQL no seu PhpMyadmin
DROP TABLE IF EXISTS `player_advances`;
CREATE TABLE `player_advances` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`cid` int(11) DEFAULT NULL,
`skill` int(11) DEFAULT NULL,
`oldlevel` int(11) DEFAULT NULL,
`newlevel` int(11) DEFAULT NULL,
`time` int(11) DEFAULT NULL,
UNIQUE KEY `id` (`id`),
KEY `cid` (`cid`),
CONSTRAINT `player_advances_ibfk_1` FOREIGN KEY (`cid`) REFERENCES `players` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
Agora em seu OT em creaturescripts/creaturescripts.xml adicione isso
Agora em creaturescripts\scripts crie um arquivo .LUA com o nome playeradvance e dentro coloque isso!
function onAdvance(cid, skill, oldLevel, newLevel)
db.executeQuery("INSERT INTO player_advances (cid, skill, oldlevel, newlevel, time) VALUES ('" .. getPlayerGUID(cid) .. "', '" .. skill .."', '" .. oldLevel .."', '" .. newLevel .."', '" .. os.time() .. "' )")
return true
end
Dentro co creaturescript/scripts/login.lua adicione isso!
registerCreatureEvent(cid, "PlayerAdvance")
Agora em characters.php logo após de signatures adicione isso!
//BEGIN Player advances by jerryb1988 from otfans.net
if($config['site']['number_of_advances'] > 0) {
$numadvances = $config['site']['number_of_advances'];
$advances = 0;
$player_advances = $SQL->query('SELECT * FROM `player_advances` WHERE `cid` = '.$player->getId().' ORDER BY `time` DESC LIMIT '.$numadvances.';');
foreach($player_advances as $advance)
{
$skill = $advance['skill'];
if ($skill == 0){$skill_name = 'Fist';}
if ($skill == 1){$skill_name = 'Club';}
if ($skill == 2){$skill_name = 'Sword';}
if ($skill == 3){$skill_name = 'Axe';}
if ($skill == 4){$skill_name = 'Distance';}
if ($skill == 5){$skill_name = 'Shielding';}
if ($skill == 6){$skill_name = 'Fishing';}
if ($skill == 7){$skill_name = 'Magic';}
if ($skill == {$skill_name = 'Level';}
if(is_int($advances / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $advances++;
$advances_add_content .= "".date("j M Y, g:i a", $advance['time'])." ".$skill_name." ".$advance['oldlevel']." ".$advance['newlevel']." ";
}
if($advances > 0)
$main_content .= '
';
}
//END Advances by jerryb1988 from otfans.net
e pra finalizar em htdocs\config/config.php adicione isso!
$config['site']['show_health_information'] = 1; //Show health bar
$config['site']['show_mana_information'] = 1; //Show mana bar
$config['site']['show_exp_information'] = 1; //Show exp bar
$config['site']['number_of_advances'] = 5; // number of latest skill advances to show on character page
Bem o que exatamente ele faz? Ele mostra a ultima skill upada pelo player!
Não custa nada da REP+
Vamus ao que enteressa!
Adicione esse codigo SQL no seu PhpMyadmin
DROP TABLE IF EXISTS `player_advances`;
CREATE TABLE `player_advances` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`cid` int(11) DEFAULT NULL,
`skill` int(11) DEFAULT NULL,
`oldlevel` int(11) DEFAULT NULL,
`newlevel` int(11) DEFAULT NULL,
`time` int(11) DEFAULT NULL,
UNIQUE KEY `id` (`id`),
KEY `cid` (`cid`),
CONSTRAINT `player_advances_ibfk_1` FOREIGN KEY (`cid`) REFERENCES `players` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
Agora em seu OT em creaturescripts/creaturescripts.xml adicione isso
Agora em creaturescripts\scripts crie um arquivo .LUA com o nome playeradvance e dentro coloque isso!
function onAdvance(cid, skill, oldLevel, newLevel)
db.executeQuery("INSERT INTO player_advances (cid, skill, oldlevel, newlevel, time) VALUES ('" .. getPlayerGUID(cid) .. "', '" .. skill .."', '" .. oldLevel .."', '" .. newLevel .."', '" .. os.time() .. "' )")
return true
end
Dentro co creaturescript/scripts/login.lua adicione isso!
registerCreatureEvent(cid, "PlayerAdvance")
Agora em characters.php logo após de signatures adicione isso!
//BEGIN Player advances by jerryb1988 from otfans.net
if($config['site']['number_of_advances'] > 0) {
$numadvances = $config['site']['number_of_advances'];
$advances = 0;
$player_advances = $SQL->query('SELECT * FROM `player_advances` WHERE `cid` = '.$player->getId().' ORDER BY `time` DESC LIMIT '.$numadvances.';');
foreach($player_advances as $advance)
{
$skill = $advance['skill'];
if ($skill == 0){$skill_name = 'Fist';}
if ($skill == 1){$skill_name = 'Club';}
if ($skill == 2){$skill_name = 'Sword';}
if ($skill == 3){$skill_name = 'Axe';}
if ($skill == 4){$skill_name = 'Distance';}
if ($skill == 5){$skill_name = 'Shielding';}
if ($skill == 6){$skill_name = 'Fishing';}
if ($skill == 7){$skill_name = 'Magic';}
if ($skill == {$skill_name = 'Level';}
if(is_int($advances / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $advances++;
$advances_add_content .= "
}
if($advances > 0)
$main_content .= '
Lastest Skill Advances | |||
Time | Skill | Old Level | New Level |
}
//END Advances by jerryb1988 from otfans.net
e pra finalizar em htdocs\config/config.php adicione isso!
$config['site']['show_health_information'] = 1; //Show health bar
$config['site']['show_mana_information'] = 1; //Show mana bar
$config['site']['show_exp_information'] = 1; //Show exp bar
$config['site']['number_of_advances'] = 5; // number of latest skill advances to show on character page
Bem o que exatamente ele faz? Ele mostra a ultima skill upada pelo player!
Não custa nada da REP+