Ir para conteúdo
  • Cadastre-se

[Gesior Acc] Pagina character.php estilizada com HP, MANA e etc


Posts Recomendados

~~ Eai galera do TK ~~

Hoje venho aqui ensinar como por um pagina character.php HP, MANA e etc

Veja uma imagem:

merged.jpg

Como podem ver é bem maneira né ??

Sim vamos começar ....

1° Execute este codigo no seu SQL

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;

2° Adicione essa tag em data/creaturescripts/creatures.xml

<event type="advance" name="PlayerAdvance" event="script" value="playeradvance.lua"/>

3° Vá na pasta data/creaturescripts/scripts | e copie um arquivo qualquer .lua e renomeie para "playeradvance.lua"

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

4° Na mesma pasta dos scripts procure por login.lua e adicione isso

registerCreatureEvent(cid, "PlayerAdvance")

5° Nas pasta do xampp/htdocs procure por character.php e substitua por isso

<?PHP

$name = stripslashes(ucwords(strtolower(trim($_REQUEST['name']))));

if(empty($name)) {

$main_content .= 'Here you can get detailed information about a certain player on '.$config['server']['serverName'].'.<BR> <FORM ACTION=?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site]['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR='.$config['site]['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>';

}

else

{

if(check_name($name)) {

$player = $ots->createObject('Player');

$player->find($name);

if($player->isLoaded()) {

$account = $player->getAccount();

$main_content .= '<TABLE border=0 cellpadding=0 width=100%><td VALIGN=top><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Character Information</B></TD></TR>';

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD width=1><nobr>Name:</TD><TD><font color="';

$main_content .= ($player->isOnline()) ? 'green' : 'red';

$main_content .= '"><b>'.$player->getName().'</b></font>';

if($player->isDeleted())

$main_content .= '<font color="red"> [DELETED]</font>';

if($player->isNameLocked())

$main_content .= '<font color="red"> [NAMELOCK]</font>';

$main_content .= '</TD></TR>';

if($player->getOldName())

{

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

if($player->isNameLocked())

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Proposition:</TD><TD>'.$player->getOldName().'</TD></TR>';

else

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Old name:</TD><TD>'.$player->getOldName().'</TD></TR>';

}

// BEGIN Position Showing *** Fixed by jerryb1988 from otfans.net

$group = $player->getGroup();

if ($group == 2){$group_name = 'Tutor';}

if ($group == 3){$group_name = 'Senior Tutor';}

if ($group == 4){$group_name = 'Gamemaster';}

if ($group == 5){$group_name = 'Community Manager';}

if ($group == 6){$group_name = 'GOD';}

if($group != 1)

{

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Position:</TD><TD>'.$group_name.'</TD></TR>';

}

// END Position Showing

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Sex:</TD><TD>';

$main_content .= ($player->getSex() == 0) ? 'female' : 'male';

$main_content .= '</TD></TR>';

if($config['site']['show_marriage_info'])

{

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Marital status:</TD><TD>';

$marriage = new OTS_Player();

$marriage->load($player->getMarriage());

if($marriage->isLoaded())

$main_content .= 'married to <a href="?subtopic=characters&name='.urlencode($marriage->getName()).'"><b>'.$marriage->getName().'</b></a></TD></TR>';

else

$main_content .= 'single</TD></TR>';

}

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Profession:</TD><TD>'.$vocation_name[$player->getWorld()][$player->getPromotion()][$player->getVocation()].'</TD></TR>';

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Level:</TD><TD>'.$player->getLevel().'</TD></TR>';

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>World:</TD><TD>'.$config['site']['worlds'][$player->getWorld()].'</TD></TR>';

if(!empty($towns_list[$player->getWorld()][$player->getTownId()]))

{

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Residence:</TD><TD>'.$towns_list[$player->getWorld()][$player->getTownId()].'</TD></TR>';

}

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Balance:</TD><TD>'.$player->getBalance().' Gold Coins.</TD></TR>';

$rank_of_player = $player->getRank();

if(!empty($rank_of_player))

{

$guild_id = $rank_of_player->getGuild()->getId();

$guild_name = $rank_of_player->getGuild()->getName();

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD><NOBR>Guild Membership:</TD><TD>'.$rank_of_player->getName().' of the <a href="?subtopic=guilds&action=show&guild='.$guild_id.'">'.$guild_name.'</a></TD></TR>';

}

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$lastlogin = $player->getLastLogin();

if(empty($lastlogin))

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD><NOBR>Char Last login:</TD><TD>Never logged in.</TD></TR>';

else

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD><NOBR>Char Last login:</TD><TD>'.date("j F Y, g:i a", $lastlogin).'</TD></TR>';

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

if($config['site']['show_creationdate'] && $player->getCreated())

{

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD><NOBR>Char Created:</TD><TD>'.date("j F Y, g:i a", $player->getCreated()).'</TD></TR>';

}

if($config['site']['show_vip_status'])

{

$id = $player->getCustomField("id");

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Vip Status:</TD>';

$vip = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$config['site']['show_vip_storage'].';')->fetch();

if($vip == false) {

$main_content .= '<TD><span class="red"><B>NOT VIP</B></TD></TR>';

}

else

{

$main_content .= '<TD><span class="green"><B>VIP</B></TD></TR>';

}

}

if($config['site']['show_health_information']) // Modified by Jerryb1988 from otfans.net

{

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$playerhp = $player->getHealth();

$playermaxhp = $player->getHealthMax();

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><td>Health:</td><td>' .number_format($playerhp). '/' .number_format($playermaxhp). '<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: red; width: '.(($playerhp / $playermaxhp) * 100).'%; height: 3px;"></td></tr>';

}

if($config['site']['show_mana_information']) // Modified by Jerryb1988 from otfans.net

{

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$playermana = $player->getMana();

$playermaxmana = $player->getManaMax();

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><td>Mana:</td><td>' .number_format($playermana). '/' .number_format($playermaxmana). '<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: blue; width: '.(($playermana / $playermaxmana) * 100).'%; height: 3px;"></td></tr>';

}

if($config['site']['show_exp_information']) // Modified by Jerryb1988 from otfans.net

{

// BEGIN *** Fixed EXP bar by Jerryb1988 from otfans.net

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$currentlevel = $player->getLevel();

$currentexp = $player->getExperience();

$currentlevelexp = (50 * ($currentlevel - 1) * ($currentlevel - 1) * ($currentlevel - 1) - 150 * ($currentlevel - 1) * ($currentlevel - 1) + 400 * ($currentlevel - 1)) / 3;

$nextlevel = ($currentlevel + 1);

$nextlevelexp = (50 * ($currentlevel) * ($currentlevel) * ($currentlevel) - 150 * ($currentlevel) * ($currentlevel) + 400 * ($currentlevel)) / 3;

$leveldifference = ($nextlevelexp - $currentlevelexp);

$expremaining = ($nextlevelexp - $currentexp);

$partofcurrentexp = ($currentexp-$currentlevelexp);

$expbarpercentage = (($partofcurrentexp / $leveldifference)*100);

$togopercentage = (100 - $expbarpercentage);

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>EXP:</td><td> ' .number_format($currentexp).'/' .number_format($nextlevelexp).' ('.number_format($expbarpercentage,2).'%) *** '.number_format($expremaining).' EXP (' .number_format($togopercentage,2). '%) Remaining.<div title="'.number_format($expbarpercentage,2).'%" style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: red; width: '.number_format($expbarpercentage,2).'%; height: 3px;"></td></tr>';

// END *** Fixed EXP bar by Jerryb1988 from otfans.net

}

//Outfit shower by Pening edited by loleslav

// ** ADDED GM/CM/GOD outfits by Jerryb1988 from otfans.net

if($config['site']['show_outfit']) {

$id = $player->getCustomField("id");

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$main_content .= '<TD BGCOLOR="'.$bgcolor.'">Outfit:';

$listaddon = array('75','128','129','130','131','132','133','134','135','136','137','138','139','140','141','142','143','144','145','146','147','148','149','150','151','152','153','154','155','158','159','251','252','266','268','269','270','273','278','279','288','289','302','324','325');

$lookadd = array('0','1','2','3');

foreach ($listaddon as $pid => $name)

foreach ($lookadd as $addo => $name) {

$addon1 = $SQL->query('SELECT * FROM players WHERE id = '.$id.' AND looktype = '.$listaddon[$pid].' AND lookaddons = '.$lookadd[$addo].';')->fetch();

if($addon1[looktype] == true ) {

$finaddon = $addon1[looktype] + $addon1[lookaddons] * 300;

$main_content .= '<TD style="background-color: '.$bgcolor.'"><img src="images/addons/'.$finaddon.'.gif"/></center></TD></TD>';

}

}

}

//end Outfit shower by Pening edited by loleslav

// Char Comment

$comment = parseubb($player->getComment());

$newlines = array("\r\n", "\n", "\r");

$comment_with_lines = str_replace($newlines, '<br />', $comment, $count);

if($count < 50)

$comment = $comment_with_lines;

if(!empty($comment))

{

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD VALIGN=top>Comment:</TD><TD>'.$comment.'</TD></TR>';

}

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

// END Char Comment

//modified status scripts by ballack13

//equipment shower by ballack13

$id = $player->getCustomField("id");

$number_of_items = 1;

$main_content .= '<td width=135 align=left valign=top><table with=100% style="border: solid 1px #888888;" CELLSPACING="1"><TR>';

$list = array('2','1','3','6','4','5','9','7','10','8');

foreach ($list as $pid => $name) {

$top = $SQL->query('SELECT * FROM player_items WHERE player_id = '.$id.' AND pid = '.$list[$pid].';')->fetch();

if($top[itemtype] == false) {

if($list[$pid] == '8') {

$main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Soul:<br/>'.$player->getSoul().'</td>';

}

if(is_int($number_of_items / 3)){

$main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$list[$pid].'.gif"/></TD></tr><tr>';

} else {

$main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$list[$pid].'.gif"/></TD>';

}

$number_of_items++;

}

else

{

if($list[$pid] == '8') {

$main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Soul:<br/>'.$player->getSoul().'</td>';

}

if(is_int($number_of_items / 3))

$main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$top[itemtype].'.gif" width="45"/></TD></tr><tr>';

else

$main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$top[itemtype].'.gif" width="45"/></TD>';

$number_of_items++;

}

if($list[$pid] == '8') {

$main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Cap:<br/>'.$player->getCap().'</td>';

}

}

if($config['site']['show_skills_info']) {

$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1 WIDTH=100%>';

$main_content .= '<TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Skills</B></TD></TR>';

$main_content .= '<TR BGCOLOR="'.$config['site']['darkborder'].'"><TD width=75%>Magic:</TD><TD>'.$player->getMagLevel().'</TD></TR>';

$main_content .= '<TR BGCOLOR="'.$config['site']['lightborder'].'"><TD>Fisting:</TD><TD>'.$player->getSkill(0).'</TD></TR>';

$main_content .= '<TR BGCOLOR="'.$config['site']['darkborder'].'"><TD>Club:</TD><TD>'.$player->getSkill(1).'</TD></TR>';

$main_content .= '<TR BGCOLOR="'.$config['site']['lightborder'].'"><TD>Sword:</TD><TD>'.$player->getSkill(2).'</TD></TR>';

$main_content .= '<TR BGCOLOR="'.$config['site']['darkborder'].'"><TD>Axe:</TD><TD>'.$player->getSkill(3).'</TD></TR>';

$main_content .= '<TR BGCOLOR="'.$config['site']['lightborder'].'"><TD>Distance:</TD><TD>'.$player->getSkill(4).'</TD></TR>';

$main_content .= '<TR BGCOLOR="'.$config['site']['darkborder'].'"><TD>Shielding:</TD><TD>'.$player->getSkill(5).'</TD></TR>';

$main_content .= '<TR BGCOLOR="'.$config['site']['lightborder'].'"><TD>Fishing:</TD><TD>'.$player->getSkill(6).'</TD></TR>';

$main_content .= '</TABLE>';

}

//quest status by ballack13

$id = $player->getCustomField("id");

$number_of_quests = 0;

$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD align="left" COLSPAN=2 CLASS=white><B>Quests</B></TD></TD align="right"></TD></TR>';

$quests = $config['site']['quests'];

foreach ($quests as $storage => $name) {

if(is_int($number_of_quests / 2))

$bgcolor = $config['site']['darkborder'];

else

$bgcolor = $config['site']['lightborder'];

$number_of_quests++;

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=95%>'.$storage.'</TD>';

$quest = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$quests[$storage].';')->fetch();

if($quest == false) {

$main_content .= '<TD><img src="images/false.png"/></TD></TR>';

}

else

{

$main_content .= '<TD><img src="images/true.png"/></TD></TR>';

}

}

$main_content .= '</TABLE></td></tr></table><br />';

// end quest status

// Signature by makr0mango.

if($config['site']['show_signature']) {

function randomSignature( $folder ) {

$files = scandir ( "./$folder/" );

$signature = array();

foreach ( $files as $file ):

if ( substr ( strtolower ( $file ) , -4 ) == ".png" )

$signature[] = $file;

endforeach;

return rand(0,count($signature)-1);

}

$random = randomSignature("signatures");

$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Signature</B></TD></TR>';

$main_content .= "<TR BGCOLOR=".$config['site']['darkborder']."><TD WIDTH=20%>Forum Link:</TD><TD><input type=text' size='75' onclick='this.select();' value=' . "\]http://' /></TD></TR>";

$main_content .= "<TR BGCOLOR=".$config['site']['lightborder']."><TD WIDTH=20%>Direct Link:</TD><TD><input type=text' size='75' onclick='this.select();' value='http://" . $_SERVER['HTTP_HOST] . "/signature.php?character=" .$player->getName(). "&image=" . $random . "' /></TD></TR>";

$main_content .= "<TR BGCOLOR=".$config['site']['darkborder']."><TD COLSPAN='2' style='text-align: center;'><img src='signature.php?character=" .$player->getName(). "&image=" . $random . "' /></TD></TR>";

$main_content .= '</TD></TR></TABLE>';

}

// Signature by makr0mango.

//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 = '<font color=purple><B>Fist</B></font>';}

if ($skill == 1){$skill_name = '<font color=purple><B>Club</B></font>';}

if ($skill == 2){$skill_name = '<font color=purple><B>Sword</B></font>';}

if ($skill == 3){$skill_name = '<font color=purple><B>Axe</B></font>';}

if ($skill == 4){$skill_name = '<font color=purple><B>Distance</B></font>';}

if ($skill == 5){$skill_name = '<font color=purple><B>Shielding</B></font>';}

if ($skill == 6){$skill_name = '<font color=purple><B>Fishing</B></font>';}

if ($skill == 7){$skill_name = '<font color=blue><B>Magic</B></font>';}

if ($skill == 8){$skill_name = '<font color=red><B>Level</B></font>';}

if(is_int($advances / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $advances++;

$advances_add_content .= "<tr bgcolor=\"".$bgcolor."\"><td width=\"20%\" align=\"center\"><nobr>".date("j M Y, g:i a", $advance['time'])."</td><td>".$skill_name."</td><td width=75><font color=red><B>".$advance['oldlevel']."</B></font></td><td width=75><font color=green><B>".$advance['newlevel']."</B></font></tr>";

}

if($advances > 0)

$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=4 CLASS=white><B>Lastest Skill Advances</B></TD></TR><tr bgcolor=.$config['site]['darkborder'].'><td><b>Time</b></td><td><b>Skill</b></td><td><b>Old Level</b></td><td><b>New Level</b></td></tr>' . $advances_add_content . '</TABLE><br />';

}

//END Advances by jerryb1988 from otfans.net

//deaths list

$deads = 0;

$player_deaths = $SQL->query('SELECT `id`, `date`, `level` FROM `player_deaths` WHERE `player_id` = '.$player->getId().' ORDER BY `date` DESC LIMIT 0,10;');

foreach($player_deaths as $death)

{

if(is_int($number_of_rows / 2))

$bgcolor = $config['site']['darkborder']; else $bgcolor = $config['site']['lightborder'];

$number_of_rows++; $deads++;

$dead_add_content .= "<tr bgcolor=\"".$bgcolor."\"><td width=\"20%\" align=\"center\"><nobr>".date("j M Y, g:i a", $death['date'])."</td><td>";

$killers = $SQL->query("SELECT environment_killers.name AS monster_name, players.name AS player_name, players.deleted AS player_exists FROM killers LEFT JOIN environment_killers ON killers.id = environment_killers.kill_id LEFT JOIN player_killers ON killers.id = player_killers.kill_id LEFT JOIN players ON players.id = player_killers.player_id WHERE killers.death_id = ".$SQL->quote($death['id'])." ORDER BY killers.final_hit DESC, killers.id ASC")->fetchAll();

$i = 0;

$count = count($killers);

foreach($killers as $killer)

{

$i++;

if(in_array($i, array(1, $count)))

$killer['monster_name'] = str_replace(array("an ", "a "), array("", ""), $killer['monster_name']);

if($killer['player_name'] != "")

{

if($i == 1)

$dead_add_content .= "Killed at level <b>".$death['level']."</b> by ";

else if($i == $count)

$dead_add_content .= " and by ";

else

$dead_add_content .= ", ";

if($killer['monster_name'] != "")

$dead_add_content .= $killer['monster_name']." summoned by ";

if($killer['player_exists'] == 0)

$dead_add_content .= "<a href=\"index.php?subtopic=characters&name=".urlencode($killer['player_name'])."\">";

$dead_add_content .= $killer['player_name'];

if($killer['player_exists'] == 0)

$dead_add_content .= "</a>";

}

else

{

if($i == 1)

$dead_add_content .= "Died at level <b>".$death['level']."</b> by ";

else if($i == $count)

$dead_add_content .= " and by ";

else

$dead_add_content .= ", ";

$dead_add_content .= $killer['monster_name'];

}

if($i == $count)

$dead_add_content .= ".";

}

$dead_add_content .= "</td></tr>";

}

if($deads > 0)

$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Deaths</B></TD></TR>' . $dead_add_content . '</TABLE><br />';

//end DEATHS

if(!$player->getHideChar()) {

$main_content .= '<TABLE BORDER=0><TR><TD></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Account Information</B></TD></TR>';

if($account->getRLName())

{

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Real Name:</TD><TD>'.$account->getRLName().'</TD></TR>';

}

if($account->getLocation())

{

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$main_content .= '<TR BGCOLOR='.$config['site']['darkborder'].'><TD WIDTH=20%>Real Location:</TD><TD>'.$account->getLocation().'</TD></TR>';

}

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

if($account->getLastLogin())

$main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Account Last login:</TD><TD>'.date("j F Y, g:i a", $account->getLastLogin()).'</TD></TR>';

else

$main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Account Last login:</TD><TD>Never logged in.</TD></TR>';

if($account->getCreated())

{

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$main_content .= '<TR BGCOLOR='.$config['site']['darkborder'].'><TD WIDTH=20%>Account Created:</TD><TD>'.date("j F Y, g:i a", $account->getCreated()).'</TD></TR>';

}

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Account*Status:</TD><TD>';

$main_content .= ($account->isPremium()) ? '<b><font color="green">Premium Account</font></b>' : '<b><font color="red">Free Account</font></b>';

if($account->isBanned())

if($account->getBanTime() > 0)

$main_content .= '<font color="red"> [banished until '.date("j F Y, G:i", $account->getBanTime()).']</font>';

else

$main_content .= '<font color="red"> [banished FOREVER]</font>';

$main_content .= '</TD></TR></TABLE>';

$main_content .= '<br><TABLE BORDER=0><TR><TD></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=5 CLASS=white><B>Characters</B></TD></TR>

<TR BGCOLOR='.$config['site']['darkborder'].'><TD><B>Name</B></TD><TD><B>World</B></TD><TD><B>Level</B></TD><TD><b>Status</b></TD><TD><B>*</B></TD></TR>';

$account_players = $account->getPlayersList();

$account_players->orderBy('name');

$player_number = 0;

foreach($account_players as $player_list)

{

if(!$player_list->getHideChar())

{

$player_number++;

if(is_int($player_number / 2))

$bgcolor = $config['site']['darkborder'];

else

$bgcolor = $config['site']['lightborder'];

if(!$player_list->isOnline())

$player_list_status = '<font color="red">Offline</font>';

else

$player_list_status = '<font color="green">Online</font>';

$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=52%><NOBR>'.$player_number.'.*<a href="?subtopic=characters&name='.urlencode($player_list->getName()).'">'.$player_list->getName();

$main_content .= ($player_list->isDeleted()) ? '<font color="red"> [DELETED]</font>' : '';

$main_content .= '</NOBR></TD><TD WIDTH=15%>'.$config['site']['worlds'][$player_list->getWorld()].'</TD><TD WIDTH=25%>'.$player_list->getLevel().' '.$vocation_name[$player_list->getWorld()][$player_list->getPromotion()][$player_list->getVocation()].'</TD><TD WIDTH="8%"><b>'.$player_list_status.'</b></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION="?subtopic=characters" METHOD=post><TR><TD><INPUT TYPE=hidden NAME=name VALUE="'.$player_list->getName().'"><INPUT TYPE=image NAME="View '.$player_list->getName().'" ALT="View '.$player_list->getName().'" SRC="'.$layout_name.'/images/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></FORM></TABLE></TD></TR>';

}

}

$main_content .= '</TABLE></TD><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD></TR></TABLE>';

}

$main_content .= '<BR><BR><FORM ACTION="?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR='.$config['site]['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>';

$main_content .= '</TABLE>';

}

else

$search_errors[] = 'Character <b>'.$name.'</b> does not exist.';

}

else

$search_errors[] = 'This name contains invalid letters. Please use only A-Z, a-z and space.';

if(!empty($search_errors))

{

$main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>';

foreach($search_errors as $search_error)

$main_content .= '<li>'.$search_error;

$main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>';

$main_content .= '<BR><FORM ACTION="?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR='.$config['site]['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>';

}

}

?>

6° Vá em xampp/htdocs/config/config.php e adicione isto antes do "?>"

$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

Vllw galera, Gostou ?!? Comenta xD ---- Pra vocês que postam as coisas em troca de REP e não da atenção, aprenda a postar e ficar sempre atento para a duvidas que sujem em seus topicos xD

Creditos:

Paulinho Araújo e Thiaguinho Sul -> "Otland"

Editado por PaulinhoAraujo (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Segue o erro.


Warning: Unexpected character in input: '\' (ASCII=92) state=1 in C:\xampp\htdocs\characters.php on line 268

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\xampp\htdocs\characters.php on line 268

Linha 268 que consta no notepad++

$main_content .= "<TR BGCOLOR=".$config['site']['darkborder']."><TD WIDTH=20%>Forum Link:</TD><TD><input type='text' size='75' onclick='this.select();' value=' . "\"]http://' /></TD></TR>";

Fico no aguardo, executei tudo direitinho, esse erro acontece quando eu clico no site em character, nao chega nem colocar o nome de ninguem nao!

Editado por markim1986 (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Executou as query ?

Usa TFS 4 ?

Se executou a query e usa TFS 4 peço para que leia mais atentamente xD

Link para o post
Compartilhar em outros sites

xD

Cuidado com esse tipo de post que e considerado flood

na proxima e rep -

Att,

Skyligh

Entrada Como Membro 14 / 08 / 2012

Entrada Como Suporte 05 / 12 / 2012

Saída Como Suporte 06 / 01 / 2013

sem_ta28.png

Contato : [email protected] / [email protected]

Link para o post
Compartilhar em outros sites
  • 3 weeks later...

Segue o erro.


Warning: Unexpected character in input: '\' (ASCII=92) state=1 in C:\xampp\htdocs\characters.php on line 268

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\xampp\htdocs\characters.php on line 268

Linha 268 que consta no notepad++

$main_content .= "<TR BGCOLOR=".$config['site']['darkborder']."><TD WIDTH=20%>Forum Link:</TD><TD><input type='text' size='75' onclick='this.select();' value=' . "\"]http://' /></TD></TR>";

Fico no aguardo, executei tudo direitinho, esse erro acontece quando eu clico no site em character, nao chega nem colocar o nome de ninguem nao!

o seguinte caro amigo!

troque a linha 268 que ocorreu o erro por está:

$main_content .= "<TR BGCOLOR=".$config['site']['darkborder']."><TD WIDTH=20%>Forum Link:</TD><TD><input type='text' size='75' onclick='this.select();' value='http://' /></TD></TR>";

espero que te ajude!

Atenciosamente, Avuenja.

 

 

OTAAC | TIBIA CLIENTS

Link para o post
Compartilhar em outros sites
  • 1 year later...
  • 5 months later...
  • 1 month later...
  • 2 weeks later...

cara testei em tfs 0.4 e quando fui executar o codigo deu isso:

 

bug.png

 

e quando eu vou na pagina characteres do meu servidor da isso:

 

bug2.png

Editado por hempz (veja o histórico de edições)

Se Ajudei Clique no rep_up.png ao Lado, Não Custa nada :D!!

Link para o post
Compartilhar em outros sites

cara testei em tfs 0.4 e quando fui executar o codigo deu isso:

 

bug.png

 

e quando eu vou na pagina characteres do meu servidor da isso:

 

bug2.png

Para executar o comando, vá ate a sua database primeiro, pois o código, ele não está selecionando uma database automaticamente. Quanto ao erro da outra imagem, não sei o que é.

Link para o post
Compartilhar em outros sites

Para executar o comando, vá ate a sua database primeiro, pois o código, ele não está selecionando uma database automaticamente. Quanto ao erro da outra imagem, não sei o que é.

manim desculpa o modo que falarei mais você acha que eu não sei adicionar 1 código na DB? aonde vc acha que eu executei o código parçeiro, claro que foi na minha database né! só que não está reconheçendo como um código válido!

Se Ajudei Clique no rep_up.png ao Lado, Não Custa nada :D!!

Link para o post
Compartilhar em outros sites

manim desculpa o modo que falarei mais você acha que eu não sei adicionar 1 código na DB? aonde vc acha que eu executei o código parçeiro, claro que foi na minha database né! só que não está reconheçendo como um código válido!

De boa, cara, não sei o que pode ser então...

Link para o post
Compartilhar em outros sites

De boa, cara, não sei o que pode ser então...

consegui resolvi de outra forma esse tutorial não deu em nada pra mim, tai uma print da minha página characteres.php ja editada

 

hihi.png

 

hihihi booa sorte aos que ficam!!

Se Ajudei Clique no rep_up.png ao Lado, Não Custa nada :D!!

Link para o post
Compartilhar em outros sites
Link para o post
Compartilhar em outros sites
  • 3 months later...

Alguém poderia ajudar em ensinar como colocar uma pagina nesse estilo que o hempz postou ?

consegui resolvi de outra forma esse tutorial não deu em nada pra mim, tai uma print da minha página characteres.php ja editada

 

hihi.png

 

hihihi booa sorte aos que ficam!!

Alguém ajuda a fazer dessa forma ? Não achei no forum aqui.

 
Link para o post
Compartilhar em outros sites
  • 2 years later...
Em 06/02/2015 em 16:01, hempz disse:

consegui resolvi de outra forma esse tutorial não deu em nada pra mim, tai uma print da minha página characteres.php ja editada

 

hihi.png

 

hihihi booa sorte aos que ficam!!

ensina como faz igual essa ae 

Link para o post
Compartilhar em outros sites
  • 10 months later...

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por Tomaxx
      Olá Pessoal Eu aqui de novo Estou precisando de ajuda
       
       
      Adiciono Normal A Pagina De Cast System Lembrando Que O Meu é o gesior 2012 que não precisa adicionar a pagina no Index.php
       
      ai tento entrar na pagina segue código de erro
       
       
       
       
      Fatal error: Call to a member function fetchAll() on a non-object in C:\xampp\htdocs\pages\cast.php on line 158
       
       
       
      Segue minha pagina de cast Clique Aqui
       
       
       
      Lembrando que não é necessária mente esta pagina se alguém tiver uma que esta funcionando ok p:
       
       
      Valendo REP ><
    • Por Tomaxx
      Olá Gostaria de fazer um pedido
       
      Meu Gesior é esse dos novo da mesma plataforma do GESIOR VICTORWEBMASTER 1.0 V2
      tenho uma pagina de cast system aqui mas é do gesior antigo e não consigo adicionar neste novo gesior e gostaria de estar pedindo uma pagina de cast compatível com o novo gesior 
       
      Valendo REP ><
    • Por Tomaxx
      Olá eu aqui novamente rs bom amigos estou com o seguinte problema posso tentar por diversos nomes emails e etc... mas não fica verdinho segue imagens ressaltando que uso Gesior 2012 TFS 1.0
       
       
       
      Account
       
       

       
      Character
       

       
       
      Valendo REP
       
      ><
    • Por Helliab
      Compra e venda de personagens por pontos para Gesior ACC.
      Vamos lá..
       
      FOTOS:
       
      Venda:

       
       
      Compra:

       

       
       
      Crie um arquivo dentro do htdocs, chamado buychar.php e dentro dele coloque:
       
      <?PHP if($logged) { if ($action == '') { $main_content .= '<center>Here is the list of the current characters that are in the shop!</center>'; $main_content .= '<BR>'; $main_content .= '<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD CLASS=white width="64px"><CENTER><B>Name</B></CENTER></TD><TD CLASS=white width="64px"><CENTER><B>Vocation</B></CENTER></TD><TD CLASS=white width="64px"><CENTER><B>Level</B></CENTER></TD><TD CLASS=white width="64px"><CENTER><B>Price</B></CENTER></TD><TD CLASS=white width="64px"><CENTER><B>Buy it</B></CENTER></TD></TR>'; $getall = $SQL->query('SELECT `id`, `name`, `price`, `status` FROM `sellchar` ORDER BY `id`')or die(mysql_error()); foreach ($getall as $tt) { $namer = $tt['name']; $queryt = $SQL->query("SELECT `name`, `vocation`, `level` FROM `players` WHERE `name` = '$namer'"); foreach ($queryt as $ty) { if ($ty['vocation'] == 1) { $tu = 'Sorcerer'; } else if ($ty['vocation'] == 2) { $tu = 'Druid'; } else if ($ty['vocation'] == 3) { $tu = 'Paladin'; } else if ($ty['vocation'] == 4) { $tu = 'Knight'; } else if ($ty['vocation'] == 5) { $tu = 'Sorcerer'; } else if ($ty['vocation'] == 6) { $tu = 'Druid'; } else if ($ty['vocation'] == 7) { $tu = 'Paladin'; } else if ($ty['vocation'] == 8) { $tu = 'Knight'; } $ee = $tt['name']; $ii = $tt['price']; $main_content .= '<TR BGCOLOR='.$config['site']['darkborder'].'><TD CLASS=black width="64px"><CENTER><B><a href="index.php?subtopic=characters&name='.$tt['name'].'">'.$tt['name'].'</a></B></CENTER></TD><TD CLASS=black width="64px"><CENTER><B>'.$tu.'</B></CENTER></TD><TD CLASS=black width="64px"><CENTER><B>'.$ty['level'].'</B></CENTER></TD><TD CLASS=black width="64px"><CENTER><B>'.$tt['price'].'</B></CENTER></TD><TD CLASS=black width="64px"><CENTER><B> <form action="?subtopic=buychar&action=buy" method="POST"> <input type="hidden" name="char" value="'.$ee.'"> <input type="hidden" name="price" value="'.$ii.'"> <input type="submit" name="submit" value="Buy it"></B></CENTER></TD></TR></form>'; } } $main_content .= '</TABLE>'; } if ($action == 'buy') { $name = $_POST['char']; $price = $_POST['price']; $ceh = $SQL->query("SELECT `name` FROM `sellchar` WHERE `name` = '$name'"); if ($ceh) { if ($name == '') { $main_content .= '<b><center>Select a character to buy first/b>'; } else { $user_premium_points = $account_logged->getCustomField('premium_points'); $user_id = $account_logged->getCustomField('id'); if ($user_premium_points >= $price) { $check = $SQL->query("SELECT * FROM `sellchar` WHERE `name` = '$name'") or die(mysql_error()); $check1 = $SQL->query("SELECT * FROM `players` WHERE `name` = '$name'") or die(mysql_error()); $check2 = $SQL->query("SELECT `oldid` FROM `sellchar` WHERE `name` = '$name'"); foreach ($check as $result) { foreach($check1 as $res) { foreach($check2 as $ress) { $oid = $ress['oldid']; $main_content .= '<center>You bought<b> '.$name.' ( '.$res['level'].' ) </b>for <b>'.$result['price'].' points.</b><br></center>'; $main_content .= '<br>'; $main_content .= '<center><b>The character is in your account, have fun!</b></center>'; $execute1 = $SQL->query("UPDATE `accounts` SET `premium_points` = `premium_points` - '$price' WHERE `id` = '$user_id'"); $execute2 = $SQL->query("UPDATE `players` SET `account_id` = '$user_id' WHERE `name` = '$name'"); $execute2 = $SQL->query("UPDATE `accounts` SET `premium_points` = `premium_points` + '$price' WHERE `id` = '$oid'"); $execute3 = $SQL->query("DELETE FROM `sellchar` WHERE `name` = '$name'"); } } } } else { $main_content .= '<center><b>You dont have enought premium points</b></center>'; } } } else { $main_content .= '<center><b>Character cannot be buyed</b></center>'; } } } else { $main_content .= '<center>Please log in first!</center>'; } ?>  
      depois crie um chamado sellchar.php e coloque isso:
      <?PHP if($logged) { $main_content .= '<center><b>Here you can put your character on sale!</center></b><br>'; $main_content .= 'If you put your character on sale anyone can buy it, you will lose acces to that character and you wont be able to log in with that character until someone buys it, you can also delete your offer by talking to an admin!<br><b>when someone buys your character you will get the price in points!</b>'; $main_content .= '<br>'; $main_content .= '<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD CLASS=white width="64px"><CENTER><B>Sell your characters</B></CENTER></TD></TR>'; $main_content .= '<TR BGCOLOR='.$config['site']['darkborder'].'><TD CLASS=black width="64px"><B></B>'; $players_from_logged_acc = $account_logged->getPlayersList(); $players_from_logged_acc->orderBy('name'); $main_content .= '<form action="" method="post"><select name="char">'; foreach($players_from_logged_acc as $player) { $main_content .= '<option>'.$player->getName().'</option>'; } $main_content .= '</select>Select a character to sell<br>'; $main_content .= '<input type="text" name="price" maxlength="10" size="4" >Select the price of the character<br>'; $main_content .= '<input type="submit" name="submit" value="Sell character"></TD></TR>'; $main_content .= '</form></table>'; if (isset($_POST['submit'])) { $char = stripslashes($_POST['char']); $price = stripslashes($_POST['price']); if ($char && $price) { if(is_numeric(trim($_POST['price']))) { $check2 = $SQL->query("SELECT * FROM `players` WHERE `name` = '$char'") or die(mysql_error()); foreach ($check2 as $re) { $voc = $re['vocation']; $oid = $re['account_id']; } $check1 = $SQL->query("UPDATE `players` SET `account_id` = 1 WHERE `name` = '$char'") or die(mysql_error()); $check3 = $SQL->query("INSERT INTO `sellchar` VALUES ('','$char','$voc','$price','1','$oid')"); $main_content .= '<b><center>You added your character correctly, thanks!</b></center>'; header("Location: index.php?subtopic=buychar"); } else { $main_content .= '<b><center>Set a numeric price!!</b></center>'; } } else { $main_content .= '<b><center>Fill out all fields!</b></center>'; } } } else { $main_content .= '<b><center>Please log in first!</b></center>'; } ?>  
      depois disso vá em htdocs/layouts/layout que você usa/layouts e insira as duas páginas aonde você bem querer(sugiro que seja na aba shop, pois é venda e compra).. caso alguém não saiba posta aqui no tópico que eu ensino.
       
      Agora adicione isso no index.php
      case "sellchar";                 $topic = "Sell Char";                 $subtopic = "sellchar";                 include("sellchar.php");     break;          case "buychar";                 $topic = "Buy Char";                 $subtopic = "buychar";                 include("buychar.php");     break;  
      Agora acesse a database do OT e insira este comando SQL
      CREATE TABLE IF NOT EXISTS `sellchar` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(40) NOT NULL, `vocation` int(11) NOT NULL, `price` int(11) NOT NULL, `status` varchar(40) NOT NULL, `oldid` varchar(40) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; Pronto para ser usado!!
       
       
       
       
      obs1: Caso você não adicionou a página no layouts acesse assim:
       
      127.0.0.1/?subtopic=sellchar
      127.0.0.1/?subtopic=buychar
       
      obs2: não tem como a pessoa que colocou a venda tirá-lo depois, se algum programador se habilitar a fazer o esquema aí para nós, fico grato.
       
       
       
       
      --- Créditos ---
      Raggaer
      Helliab por trazer ao TK.
       
      REP++
       
      @helliabsantana
    • Por Swiruseq69
      Preview

       
      ___________________________________________________
       
      Créditos
      Azuu
      TenTypSwir
      ___________________________________________________
       
      Scan
      https://www.virustotal.com/#/file/580c501a5e3b2aa8f29888873a92660d7b6bdb94f99893cbf1eb73e17b9ade52/detection
       
      Download
      nrtn_layout.tgz
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo