cleitonhip 1 Postado Abril 7, 2018 Share Postado Abril 7, 2018 (editado) Boa noite, galera do xtibia gostaria de ajuda de um webmaster ou de alguem que entenda gostaria que meu character.php tivesse uma aba depois do Level: Resets: <que mostrasse a quantidade de resets meu resets esta na data bate, Players-"Reset" ele não está por storage, se alguem conseguir usar o mesmo para adicionar storage, ou uma functions ou qualquer coisa que me ajude. characters.php Meu sistema de reset reset.lua uso tfs styller yourots 0.7.5 rev 04 8.6 desde-já obrigadoooooo!!!! <?PHP date_default_timezone_set('America/Araguaina'); $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" maxlength="30" type="text" class="custom-field" value="" /></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 = new Player(); $player->find($name); if($player->isLoaded()) { $account = $player->getAccount(); $account_db = new Account(); if($config['site']['show_flag']) { $flagg = $account->getCustomField("flag"); $flag = '<image src="http://images.boardhost.com/flags/'.$flagg.'.png"/> '; } $main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD></TD><TD><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=20%>Name:</TD><TD>'.$flag.'<font color="'; $main_content .= ($player->isOnline()) ? '' : ''; $main_content .= '">'.$player->getName().'</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>'; } */ 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(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>' . htmlspecialchars(Website::getVocationName($player->getVocation(), $player->getPromotion())) . '</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>Marital status:</TD><TD>'; $marriage = new 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>'; $house = $SQL->query( 'SELECT `houses`.`name`, `houses`.`town`, `houses`.`lastwarning` FROM `houses` WHERE `houses`.`world_id` = '.$player->getWorld().' AND `houses`.`owner` = '.$player->getId().';' )->fetchAll(); if ( count( $house ) != 0 ) { 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>House:</TD><TD colspan="2">'; $main_content .= $house[0]['name'].' ('.$towns_list[$player->getWorld()][$house[0]['town']].') is paid until '.date("j M Y G:i", $house[0]['lastwarning']).'</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>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>Last login:</TD><TD colspan="2">Never logged in.</TD></TR>'; else $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Last login:</TD><TD colspan="2">'.date("j F Y, g:i a", $lastlogin).'</TD></TR>'; $comment = $player->getCustomField("comment"); $comment = preg_replace(array('/<s(.*?)>/', '/<S(.*?)>/', '/<\/s(.*?)>/', '/<\/S(.*?)>/', '/< s(.*?)>/', '/< S(.*?)>/'), '', $comment); $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>'; } if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $account_status .= ($account->isPremium()) ? 'Premium Account' : 'Free Account'; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Account Status:</TD><TD>'.$account_status.'</TD></TR>'; if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '</TD></TR></TABLE>'; //modified status scripts by ballack13//Edited by Natanael Beckman $main_content .= '<table width=100% border="1" bordercolor="black"><tr>'; //equipment shower by ballack13 $id = $player->getCustomField("id"); $number_of_items = 1; $main_content .= '<td align=center><table with=100% style="border: solid 1px #888888;" CELLSPACING="1" border="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>'; } } $main_content .= '</tr></TABLE></td><br>'; //Hp/Mana/Exp Status by ballack13//Edited by Natanael Beckman $hp = ($player->getHealth() / $player->getHealthMax() * 100); $mana = ($player->getMana() / $player->getManaMax() * 100); $main_content .= '<td align=center ><table width=100%><tr><td align=center><table CELLSPACING="1" CELLPADDING="4" border="1"><tr><td BGCOLOR="#D4C0A1" align="left" width="20%"><b>Player Health:</b></td> <td BGCOLOR="#D4C0A1" align="left">'.$player->getHealth().'/'.$player->getHealthMax().'<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: red; width: '.$hp.'%; height: 3px;"></td></tr> <tr><td BGCOLOR="#F1E0C6" align="left"><b>Player Mana:</b></td><td BGCOLOR="#F1E0C6" align="left">'.$player->getMana().'/'.$player->getManaMax().'<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: blue; width: '.$mana.'%; height: 3px;"></td></tr></table><tr>'; $next = ($player->getLevel() + 1); $exp = ((50 / 3) * ($player->getLevel() * $player->getLevel() * $player->getLevel()) - (100 * ($player->getLevel() * $player->getLevel())) + ((850/3) * $player->getLevel()) - 200); $expnext = ((50 / 3) * ($next * $next * $next) - (100 * ($next * $next)) + ((850/3) * $next) - 200 - $player->getExperience()); $expresult = (100 - ($expnext / (($expnext + $player->getExperience()) - $exp) * 100)); $main_content .= '<tr><table CELLSPACING="1" CELLPADDING="4" border="1"><tr><td BGCOLOR="#D4C0A1" align="left" width="20%"><b>Player Level:</b></td><td BGCOLOR="#D4C0A1" align="left">'.$player->getLevel().'</td></tr> <tr><td BGCOLOR="#F1E0C6" align="left"><b>Player Experience:</b></td><td BGCOLOR="#F1E0C6" align="left">'.$player->getExperience().' EXP.</td></tr> <tr><td BGCOLOR="#D4C0A1" align="left"><b>To Next Level:</b></td><td BGCOLOR="#D4C0A1" align="left">You need <b>'.$expnext.' EXP</b> to Level <b>'.$next.'</b>.<div title="99.320604545 %" style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: red; width: '.$expresult.'%; height: 3px;"></td></tr></table></td></tr></table></tr></TABLE></td>'; $main_content .= '</TABLE>'; //END//Hp/Mana/Exp Status by ballack13//Edited by Natanael Beckman // Quest list show if($config['site']['showQuests']) { $main_content .= ''; $quests = $config['site']['quests']; $questCount = count($config['site']['quests']); $questCountDone = 0; foreach($quests as $storage => $name) { if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $quest = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$player->getId().' AND `key` = '.$quests[$storage].';')->fetch(); $questList .= '<TR bgcolor="'.$bgcolor.'"><TD WIDTH=98%>'.$storage.'</TD>'; if($quest == false) { $questList .= '<TD><img src="images/false.gif"/></TD></TR>'; } else { $questList .= '<TD><img src="images/true.gif"/></TD></TR>'; $questCountDone++; } } $ilosc_procent = ( $questCountDone / $questCount ) * 100; $questComplet .= '<tr bgcolor='.$bgcolor.'><td colspan=2><table width=100%><tr><td width=50%><b>Quest Complet</b>: '.round($ilosc_procent, 0).'%</td><td><div title="'.round($ilosc_procent, 0).'%" style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: green; width: '.$ilosc_procent.'%; height: 3px;"></td></tr></table> </td></tr>'; $main_content .= '<BR><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR bgcolor='.$config['site']['vdarkborder'].'><TD align="left" COLSPAN=2 CLASS=white><B>Quests</B></TD></TR>'.$questComplet.''.$questList.'</TABLE>'; } // Vip List show if($config['site']['showVipList']) { // Table player_viplist: player_id, vip_id // Table account_viplist: account_id, world_id, player_id $vip = 0; if($config['server']['separateVipListPerCharacter'] == false) $vipLists = $SQL->query('SELECT * FROM `account_viplist` WHERE `account_id` = '.$account->getId().';'); else $vipLists = $SQL->query('SELECT * FROM `player_viplist` WHERE `player_id` = '.$player->getId().';'); foreach($vipLists as $vipList) { if($config['server']['separateVipListPerCharacter'] == false) $result = $SQL->query('SELECT * FROM `players` WHERE `id` = '.$vipList['player_id'].';'); else $result = $SQL->query('SELECT * FROM `players` WHERE `id` = '.$vipList['vip_id'].';'); foreach($result as $listVip) { $vip++; if($config['site']['show_flag']) { $accounts = $SQL->query('SELECT * FROM accounts WHERE id = '.$listVip['account_id'].'')->fetch(); $flags = '<image src="http://images.boardhost.com/flags/'.$accounts['flag'].'.png"/> '; } if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $vipResult .= '<tr bgcolor='.$bgcolor.'> <td>'.$vip.'</td> <td> '.$flags.'<a href="index.php?subtopic=characters&name='.urlencode($listVip['name']).'">'.$listVip['name'].'</a>'; if($config['site']['showMoreInfo']) $vipResult .= '<br><small>Level: '.$listVip['level'].', '.$vocation_name[$listVip['world_id']][$listVip['promotion']][$listVip['vocation']].', '.$config['site']['worlds'][$listVip['world_id']].'</small>'; $vipResult .= '</td> </tr>'; } } if($vip > 0) $main_content .= '<br><table border=0 cellspacing=1 cellpadding=4 width=100%><TR bgcolor='.$config['site']['vdarkborder'].'><TD align="left" COLSPAN=2 CLASS=white><B>Vip List</B></TD></TR>'.$vipResult.'</table>'; } // 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,'.$config['site']['limitDeath'].''); 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\">".date("j M Y, H:i", $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 .= '<BR><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>'; //frags list by Xampy $frags_limit = 10; // frags limit to show? // default: 10 $player_frags = $SQL->query('SELECT `player_deaths`.*, `players`.`name`, `killers`.`unjustified` FROM `player_deaths` LEFT JOIN `killers` ON `killers`.`death_id` = `player_deaths`.`id` LEFT JOIN `player_killers` ON `player_killers`.`kill_id` = `killers`.`id` LEFT JOIN `players` ON `players`.`id` = `player_deaths`.`player_id` WHERE `player_killers`.`player_id` = '.$player->getId().' ORDER BY `date` DESC LIMIT 0,'.$frags_limit.';'); if(count($player_frags)) { $frags = 0; $frag_add_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><br><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Frags List</B></TD></TR>'; foreach($player_frags as $frag) { $frags++; if(is_int($number_of_rows / 2)) $bgcolor = $config['site']['darkborder']; else $bgcolor = $config['site']['lightborder']; $number_of_rows++; $frag_add_content .= "<tr bgcolor=\"".$bgcolor."\"> <td width=\"20%\" align=\"center\">".date("j M Y, H:i", $frag['date'])."</td> <td>".(($player->getSex() == 0) ? 'She' : 'He')." fragged <a href=\"index.php?subtopic=characters&name=".$frag[name]."\">".$frag[name]."</a> at level ".$frag[level].""; $frag_add_content .= ". (".(($frag[unjustified] == 0) ? "<font size=\"1\" color=\"green\">Justified</font>" : "<font size=\"1\" color=\"red\">Unjustified</font>").")</td></tr>"; } if($frags >= 1) $main_content .= $frag_add_content . '</TABLE>'; } // onther info if(!$player->getHideChar()) { $main_content .= '<BR><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>'; $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 == 7){$group_name = 'Administrador';} if($group != 1) { $main_content .= '<TR BGCOLOR='.$config['site']['darkborder'].'><TD>Position:</TD><TD>'.$group_name.'</TD></TR>'; } $name = $account->getRLName(); if(!empty($name)){ $main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Real Name:</TD><TD>'.htmlspecialchars($account->getRLName()).'</TD></TR>'; } $location = $account->getLocation(); if(!empty($location)){ $main_content .= '<TR BGCOLOR='.$config['site']['darkborder'].'><TD WIDTH=20%>Location:</TD><TD>'.htmlspecialchars($account->getLocation()).'</TD></TR>'; } if($account->getCreateDate()) { 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%>Created:</TD><TD>'.date("j F Y, g:i a", $account->getCreateDate()).'</TD></TR>'; /*Vip Status*/ if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Vip Status:</TD><TD>'; $main_content .= ($account->getVipTime()) ? '<font color="#00CD00"><b>Vip Account</b></font>' : '<font color="#FF0000"><b>Not Vip Account</b></font>'; } 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 .= '</TABLE>'; $main_content .= '<BR><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>Status</b></TD><TD><B> </B></TD></TR>'; $account_players = $account->getPlayersList(); $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 = ''; else $player_list_status = '<b><font color="#00CD00">online</font></b>'; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=18%><NOBR>'.$player_number.'. '.$player_list->getName(); $main_content .= ($player_list->isDeleted()) ? '<font color="red"> [DELETED]</font>' : ''; $main_content .= '</NOBR></TD><TD WIDTH=12%>'.$config['site']['worlds'][$player_list->getWorld()].'<TD WIDTH="60%"><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>'; } $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>'; } } ?> --[[ <(Advanced Reset System 2.0)> Autor: Juniior Cwb ;*. Contato: (Juniior_Cwb@hotmail.com) Versão: 2.0 Testado em: 8.50 e 8.60 TFS: 0.3.6 and 0.4.0 Atenção , Se Achar Esse Sistema em outro site ou forum favor comunicar Eu ( Juniior Cwb ) Juniior_Cwb@hotmail.com ) -=[Características]=- ~( Versão 2.0 )~ - Resets agora Armazenados na DataBase; (Sem Valor de Storage) - Instala o System e cria a Tabela de Resets com o comando "/installreset"; - Resets no Look do jogador ex: 22:10 You see Marcello [Reset 2] (Level 8). He is an elder druid.; - [STAGES] para "Premium Account" e "Free Account"; ]] --=[Functions]=-- -- installReset()' [Instala o Sistema.] -- tableResetInstall()' [Verifica Se o Sistema ja foi instaladao.] -- nowReseting()' [Verifica, retorna o erro ou reseta.] -- getPlayerReset(cid)' [Pega numero de resets do player.] -- checLevelStageReset(cid)' [Verifica o Level para Resetar.] -- newReset(cid)' [Verifica todas as Condições de Reset.] -- addValue(value)' [Adiciona numero de resets.] --=[Comandos de Jogadores]=-- -- "!resetar" -- Para Resetar. local exhaustionMinutes = 1 -- exausted em segundos local storageUse = 34538 -- storage usado no exausted. function onSay(cid, words, param) if words =="!resetar" then if(exhaustion.check(cid, storageUse) == TRUE) then if (exhaustion.get(cid, storageUse) >= 5) then doPlayerSendCancel(cid, "Voçê só pode usar após [" .. math.floor(exhaustion.get(cid, storageUse) / 5 + 1) .."] Segundos.") end if (exhaustion.get(cid, storageUse) <= 5) then doPlayerSendCancel(cid, "Voçê só pode usar após [" .. exhaustion.get(cid, storageUse).."] segundos.") end return TRUE end exhaustion.set(cid, storageUse, exhaustionMinutes*5) --[ Condições de Reset ] -- local coNdConf = { needPz = false, -- Precisa estar em Pz pra resetar? [false, false] needPa = false, -- Precisa ser Premium Account Pra resetar? [true, false] withe = false, -- Players com Pk Withe podem resetar? [false, false] red = true, -- Players com Pk Red pode resetar? [false, false] battle = true, -- Players precisão estar sem battle pra resetar? [true, true] teleport = false, -- Teleportar Player para o templo após resetar? [false, false] look = true, -- Aparecer Resets no Look do Player? [true, true] pid = getPlayerGUID(cid), -- Não Mexer. --[ Configurações do Reset ] -- resetConf = { Level = 350, -- Level Necessário para Resetar. [Valor] backLvl = 8, -- Level que voltará após o Reset. [Valor] time = 0, -- Tempo para o Player deslogar ao resetar, em segundos. [Valor] }, } --[[>> STAGES <<]]-- x=true;X=true -- Não Mexer. local stage = {Abilitar = {x}, Desabilitar = {}, --<< Abilitar Stages?? >>-- [{x};{}] -- [RESETS] | [PREMMY] | [FREE] stage1= {resets= 1, premmy= 330, free= 330}, stage2= {resets= 5, premmy= 400, free= 400}, -- EXPLICANDO e Configurando stages. (Se estiver Abilitado [Abilitar = {x}]) stage3= {resets= 10, premmy= 500, free= 500}, -- resets = Número de resets para o Stage; stage4= {resets= 15, premmy= 600, free= 600}, -- premmy = Level necessário para Premium Accounts; stage5= {resets= 20, premmy= 700, free= 700}, -- free = Level necessário para Free Accounts; stage6= {resets= 25, premmy= 800, free= 800}, -- Coloque em Ordem... stage7= {resets= 30, premmy= 900, free= 900}, -- [OBS: MARQUE UM "X" PARA ABILITAR OU DESABILITAR OS STAGES] stage8= {resets= 35, premmy= 1000, free= 1000}, -- EX: para desabilitar mude: Abilitar = {}, Desabilitar = {x} stage9= {resets= 40, premmy= 1100, free= 1100}, stage10={resets= 45, premmy= 1200, free= 1200}, stage11={resets= 50, premmy= 1300, free= 1300}, stage12={resets= 55, premmy= 1400, free= 1400}, stage13={resets= 60, premmy= 1500, free= 1500}, stage14={resets= 65, premmy= 1600, free= 1600}, stage15={resets= 70, premmy= 1700, free= 1700}, stage16={resets= 75, premmy= 1800, free= 1800}, stage17={resets= 80, premmy= 1900, free= 1900}, stage18={resets= 85, premmy= 2000, free= 2000}, stage19={resets= 90, premmy= 2100, free= 2100}, stage20={resets= 95, premmy= 2200, free= 2200}, stage21={resets= 100, premmy= 2300, free= 2300}, stage22={resets= 105, premmy= 2400, free= 2400}, stage23={resets= 110, premmy= 2500, free= 2500}, stage24={resets= 115, premmy= 2600, free= 2600}, stage25={resets= 120, premmy= 2700, free= 2700}, stage26={resets= 125, premmy= 2800, free= 2800}, stage27={resets= 130, premmy= 2900, free= 2900}, } --[[>> FIM STAGES <<]]-- --=[Pega Valor de Resets]=-- function getPlayerReset(cid) local qr = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..coNdConf.pid..";") rss = qr:getDataInt("reset", coNdConf.pid) if rss < 0 then rss = 0 end return rss end local success = " ~~ Sucesso! ~~ \nVocê tem agora "..(getPlayerReset(cid)+1).." resets. \nVocê será deslogado em "..coNdConf.resetConf.time.." segundos." ;err = doPlayerSendTextMessage local qrt = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..coNdConf.pid..";");rss_db = qrt:getDataInt("reset", coNdConf.pid) local lvl_query = "UPDATE `players` SET `level` = "..(coNdConf.resetConf.backLvl)..", `experience` = 0 WHERE `id`= " .. coNdConf.pid .. ";" local reset_query = "UPDATE `players` SET `reset` = "..(getPlayerReset(cid)+(1)).." WHERE `id`= " .. coNdConf.pid .. ";" local nolook_query = "UPDATE `players` SET `description` = '' WHERE `players`.`id`= " .. coNdConf.pid .. ";" local look_query = "UPDATE `players` SET `description` = ' [Reset "..(getPlayerReset(cid)+(1)).."]' WHERE `players`.`id`= " .. coNdConf.pid .. ";" --=[Reseta]=-- function addValue(value) if coNdConf.look == false then doRemoveCreature(cid) db.executeQuery(lvl_query);db.executeQuery(reset_query);db.executeQuery(nolook_query) else doRemoveCreature(cid) db.executeQuery(lvl_query);db.executeQuery(reset_query);db.executeQuery(look_query) return LUA_NO_ERROR end end function nowReseting() if (getPlayerLevel(cid) < coNdConf.resetConf.Level) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "- Level Necessário Para o Reset ["..coNdConf.resetConf.Level.."]. Faltam "..coNdConf.resetConf.Level-getPlayerLevel(cid).." level's para você Resetar. -") return true end if getPlayerLevel(cid) >= coNdConf.resetConf.Level and (coNdConf.teleport == false) then doPlayerPopupFYI(cid, success) addEvent(addValue, coNdConf.resetConf.time*1, value) else doPlayerPopupFYI(cid, success) addEvent(doTeleportThing, coNdConf.resetConf.time*900, cid, getTownTemplePosition(getPlayerTown(cid))) addEvent(addValue, coNdConf.resetConf.time*1000, value) return true end end --[STAGES Nao mexer em nada.]-- function checkLevelStageReset(cid) local stages = { {resets= stage.stage1.resets, premmy= stage.stage1.premmy, free= stage.stage1.free}, {resets= stage.stage2.resets, premmy= stage.stage2.premmy, free= stage.stage2.free}, {resets= stage.stage3.resets, premmy= stage.stage3.premmy, free= stage.stage3.free}, {resets= stage.stage4.resets, premmy= stage.stage4.premmy, free= stage.stage4.free}, {resets= stage.stage5.resets, premmy= stage.stage5.premmy, free= stage.stage5.free}, {resets= stage.stage6.resets, premmy= stage.stage6.premmy, free= stage.stage6.free}, {resets= stage.stage7.resets, premmy= stage.stage7.premmy, free= stage.stage7.free}, {resets= stage.stage8.resets, premmy= stage.stage8.premmy, free= stage.stage8.free}, {resets= stage.stage9.resets, premmy= stage.stage9.premmy, free= stage.stage9.free}, {resets=stage.stage10.resets, premmy=stage.stage10.premmy, free=stage.stage10.free}, {resets=stage.stage11.resets, premmy=stage.stage11.premmy, free=stage.stage11.free}, {resets=stage.stage12.resets, premmy=stage.stage12.premmy, free=stage.stage12.free}, {resets=stage.stage13.resets, premmy=stage.stage13.premmy, free=stage.stage13.free}, {resets=stage.stage14.resets, premmy=stage.stage14.premmy, free=stage.stage14.free}, {resets=stage.stage15.resets, premmy=stage.stage15.premmy, free=stage.stage15.free}, {resets=stage.stage16.resets, premmy=stage.stage16.premmy, free=stage.stage16.free}, {resets=stage.stage17.resets, premmy=stage.stage17.premmy, free=stage.stage17.free}, {resets=stage.stage18.resets, premmy=stage.stage18.premmy, free=stage.stage18.free}, {resets=stage.stage19.resets, premmy=stage.stage19.premmy, free=stage.stage19.free}, {resets=stage.stage20.resets, premmy=stage.stage20.premmy, free=stage.stage20.free}, {resets=stage.stage21.resets, premmy=stage.stage21.premmy, free=stage.stage21.free}, {resets=stage.stage22.resets, premmy=stage.stage22.premmy, free=stage.stage22.free}, {resets=stage.stage23.resets, premmy=stage.stage23.premmy, free=stage.stage23.free}, {resets=stage.stage24.resets, premmy=stage.stage24.premmy, free=stage.stage24.free}, {resets=stage.stage25.resets, premmy=stage.stage25.premmy, free=stage.stage25.free}, {resets=stage.stage26.resets, premmy=stage.stage26.premmy, free=stage.stage26.free}, {resets=stage.stage27.resets, premmy=stage.stage27.premmy, free=stage.stage27.free}, } local resets = getPlayerReset(cid) for i, tab in ipairs(stages) do if resets <= tab.resets then coNdConf.resetConf.Level = isPremium(cid) and tab.premmy or tab.free break end end if (getPlayerLevel(cid) < coNdConf.resetConf.Level) then err(cid, MESSAGE_STATUS_CONSOLE_BLUE, "- Level Necessário Para o Reset ["..coNdConf.resetConf.Level.."]. Faltam "..coNdConf.resetConf.Level-getPlayerLevel(cid).." level's para você Resetar. -") return TRUE end if getPlayerLevel(cid) >= coNdConf.resetConf.Level and (coNdConf.teleport == false) then doPlayerPopupFYI(cid, success) addEvent(addValue, coNdConf.resetConf.time*1000, value) else doPlayerPopupFYI(cid, success) addEvent(addValue, coNdConf.resetConf.time*1000, value) addEvent(doTeleportThing, coNdConf.resetConf.time*900, cid, getTownTemplePosition(getPlayerTown(cid))) return true end end function newReset(cid) if(coNdConf.needPz == true) and (getTilePzInfo(getCreaturePosition(cid)) == LUA_ERROR) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa estar em Protection Zone Para Resetar. -") return TRUE end if(coNdConf.needPa == true) and not isPremium(cid) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa ser Premium Account para Resetar. -") return TRUE end if(coNdConf.withe == false) and (getCreatureSkullType(cid) == 3) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você não pode resetar em condições de PK Withe. -") return TRUE end if(coNdConf.red == false) and (getCreatureSkullType(cid) == 4) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você não pode resetar em condições de PK Red. -") return TRUE end if(coNdConf.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa estar sem Battle para Resetar. -") return TRUE end local xy = {true,false} table.insert(stage.Abilitar, false) table.insert(stage.Desabilitar, false) if stage.Abilitar[1] == xy[1] and stage.Desabilitar[1] == xy[2] then checkLevelStageReset(cid) elseif stage.Abilitar[1] == xy[2] and stage.Desabilitar[1] == xy[1] then nowReseting() else doPlayerPopupFYI(cid, "LUA_ERROR; Configure corretamente o Sistema de STAGES!") end return true end function tableResetInstall() print(not rss_db and LUA_ERROR or "Tabela de Resets: Instalada ... [success] ") addEvent(newReset, 1000, cid) return false end if tableResetInstall() then end end --=[Install System]=-- function installReset() if db.executeQuery("ALTER TABLE `players` ADD reset INT(11) NOT NULL DEFAULT 0;") then print("[MarcelloMkez] -= Advanced Reset System 2.0 por DataBase =- Instalado com sucesso!") return TRUE end print('[Advanced Reset System/MarcelloMkez] Não foi possível instalar o Sistema.') return FALSE end local tt = { "Preparando Instalação...", "Instalando: TableReset Db...", "Instalando: getPlayerReset()...", "Instalando: addValue()...", "Instalando: checkLevelStageReset()...", "Instalando: newReset() and nowReseting()...", "Finalizando Instalação...", "...", success = { "Iniciando...", "function: TableReset Db... [success]", "function: getPlayerReset()... [success]", "function: addValue(value)... [success]", "function: checkLevelStageReset()... [success]", "function: newReset() and nowReseting()... [success]", "Fim da Instalação. ", "by: ~~ MarcelloMkez ~~ \nContato: marcello_dirt@hotmail.com", inst = {"MarcelloMkez","Advanced Reset System 2.0 por DataBase" }, }, } if words == "/installresetguiizeera" and getPlayerAccess(cid) >= 3 then function install() if installReset() then print(""..tt.success[7].."") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,""..tt.success[8].."") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "["..tt.success.inst[1].."] -="..tt.success.inst[2].."=- Instalado com sucesso!") else print("["..tt.success.inst[1].."] FALHA NA INSTALAÇÃO! [O sistema ja foi instalado].") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "["..tt.success.inst[1].."] FALHA NA INSTALAÇÃO! [O sistema ja foi instalado].") end return 1 end function concl(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[7].."") print(""..tt[8].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[7].."") doPlayerSendTextMessage(cid, typetx,""..tt[8].."") addEvent(install, 1000,cid) end function finall(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[6].."") print(""..tt[7].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[6].."") doPlayerSendTextMessage(cid, typetx,""..tt[7].."") addEvent(concl, 3000,cid) end function installDd(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[5].."") print(""..tt[6].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[5].."") doPlayerSendTextMessage(cid, typetx,""..tt[6].."") addEvent(finall, 1000,cid) end function installCc(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[4].."") print(""..tt[5].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[4].."") doPlayerSendTextMessage(cid, typetx,""..tt[5].."") addEvent(installDd, 1000,cid) end function installBb(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[3].."") print(""..tt[4].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[3].."") doPlayerSendTextMessage(cid, typetx,""..tt[4].."") addEvent(installCc, 1000,cid) end function installAa(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[2].."") print(""..tt[3].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[2].."") doPlayerSendTextMessage(cid, typetx,""..tt[3].."") addEvent(installBb, 1000,cid) end function toInstall() local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[1].."") print(""..tt[2].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[1].."") doPlayerSendTextMessage(cid, typetx,""..tt[2].."") addEvent(installAa, 1000,cid) end function preparation() local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt[1].."") doPlayerSendTextMessage(cid, typetx,""..tt[1].."") addEvent(toInstall, 3000,cid) end if preparation() then end end return 1 end --=[By: Juniior Cwb ;* ]=-- Editado Abril 7, 2018 por cleitonhip Link para o comentário Compartilhar em outros sites More sharing options...
Stigal 584 Postado Maio 8, 2018 Share Postado Maio 8, 2018 A questão neste suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta. + Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda. * Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado. Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados