Postado Fevereiro 25, 2012 13 anos Venho trazer aqui um sistema muito legal , eu particularmente já coloquei no meu site e ficou muito bonito , no tópico original a pessoa , explica de um jeito que muitos tem dificuldades , por isso vou deixar bem facil pra vocês. Etapa 1: Abra o arquivo characters.php e na linha 253. Está assim: $id = $player->getCustomField("id"); $number_of_quests = 0; $main_content .= '<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></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 />'; $deads = 0; Cole em cima esse código: //New Quest status// $id = $player->getCustomField("id"); $number_of_quests = 0; $main_content .= '<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></TD align="right"></TD></TR>'; $questCount = 0; foreach ($config["site"]["quests"] as $questName => $questData) { $backgroundColor = is_int($questCount / 2) ? $config["site"]["darkborder"] : $config["site"]["lightborder"]; $questCount = $questCount + 1; $questStatus = $SQL->query("SELECT * FROM `player_storage` WHERE `player_id` = ".$id." AND `key` = ".$questData["storageid"].";")->fetch(); $questPercent = (($questStatus["value"] - $questData["startvalue"])/$questData["endvalue"]) * 100; $main_content .= "<tr bgcolor=\"".$backgroundColor."\"><td width=\"55%\">".$questName."</td><td width=\"45%\" style=\"text-align:center;\">".$questPercent."%<div style=\"background-color:white; margin-top:-14px; width: 100%; height: 12px; border: 1px solid #DDD;\"><div style=\"background: green; width: ".$questPercent."%; height: 12px;\"></div></div></td></tr>"; } //New Quest status// 2 Etapa: Abra o config.php que localiza dentro da pasta config. No começo mais ou menos tará assim: $config['site']['quests'] = array('Annihilator' => 5000,'Demon Helmet' => 2645,'Pits of Inferno' => 5550); // list of quests, 'questname' => storage-id, Coloe em cima disso o código: //New Quest status// $config["site"]["maxquests"] = 35; // maximum number of quests in site $config["site"]["quests"] = array( //Example: "Name Quest" => array("storageid" => id, "startvalue" => start value quests(0), "endvalue"=> end value quests(1)),* "Anihilator Quest" => array("storageid" => 5000, "startvalue" => 1, "endvalue" => 1), "Blue Legs Quest" => array("storageid" => 36207, "startvalue" => 1, "endvalue" => 1), "Demon Helmet" => array("storageid" => 2645, "startvalue" => 0, "endvalue" => 1), "Paradox Quest" => array("storageid" => 2645, "startvalue" => 0, "endvalue" => 1), "Paradox Quest" => array("storageid" => 2645, "startvalue" => 0, "endvalue" => 1), "Poi Quest" => array("storageid" => 2645, "startvalue" => 0, "endvalue" => 1), "Yalahar Quest" => array("storageid" => 102504, "startvalue" => 1, "endvalue" => 1), "Arena Warlord" => array("storageid" => 2645, "startvalue" => 0, "endvalue" => 1), "Arena Scrapper" => array("storageid" => 2645, "startvalue" => 0, "endvalue" => 1), "Arena Greenhorn" => array("storageid" => 2645, "startvalue" => 0, "endvalue" => 1), "Demon oak" => array("storageid" => 2645, "startvalue" => 0, "endvalue" => 1), "Necromancer Quest" => array("storageid" => 2645, "startvalue" => 0, "endvalue" => 1), "Banshee Quest" => array("storageid" => 2645, "startvalue" => 0, "endvalue" => 1), "Demon oak" => array("storageid" => 2645, "startvalue" => 0, "endvalue" => 1), "Tower Shield" => array("storageid" => 2645, "startvalue" => 0, "endvalue" => 1), "Dwarven ring" => array("storageid" => 2645, "startvalue" => 0, "endvalue" => 1), "Knight Axe" => array("storageid" => 2645, "startvalue" => 0, "endvalue" => 1), "Inquisiton Quest" => array("storageid" => 2645, "startvalue" => 0, "endvalue" => 1 ) ); //New Quest status// 3 Etapa: Pronto , você conclui a instalação: Resultado final: Dúvidas Frequentes: Como deleto as quest que não quero: Segue a tag Resp: "Anihilator Quest" => array("storageid" => 5000, "startvalue" => 1, "endvalue" => 1), Basta você retirar ela inteira ! Como eu adiciono novas quest: "NOME DA MISSAO" => array("storageid" => STORAGE ID, "startvalue" => 1, "endvalue" => 1), Meu , eu apaguei e ta dando erro o que deve ser: Resp: Sempre a ultima tag não pode conter "," no final , se colocar vai dar erro mesmo. Comentem e gostarem rep + Créditos: Szysza - Scripts SkyDangerous - Explicação do tutorial , e duvidas frequentes http://baiakuza.com/IP: baiakuza.com TIBIA: 10.96 Baiak Custom [ High Exp Rate ]
Postado Janeiro 31, 2014 11 anos Diretor bjs UP adoro mexer em site my server >> Eu sou um entusiasta da programação apaixonado por ajudar a comunidade open source a crescer. Sempre em busca de novos desafios e oportunidades para contribuir com meu código. #OpenSource #Programação #Contribuição
Postado Fevereiro 3, 2014 11 anos Você reviveu um tópico de 2 anos atrás! Leia as nossas regras! http://www.tibiaking.com/forum/forum/23-regras-do-forum/ Alertado verbalmente! Cuidado, a próxima vez será negativado. Atenciosamente, Avuenja. OTAAC | TIBIA CLIENTS
Postado Agosto 6, 2016 8 anos Estou tendo uns problemas, preciso de ajuda para colocar no gesior 2012. Seguindo os passos acontece isso, quando visito um personagem Spoiler Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1' in C:\xampp\htdocs\characters.php:220 Stack trace: #0 C:\xampp\htdocs\characters.php(220): PDO->query('SELECT * FROM `...') #1 C:\xampp\htdocs\index.php(172): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\characters.php on line 220 line 220 Spoiler $questCount = $questCount + 1; $questStatus = $SQL->query("SELECT * FROM `player_storage` WHERE `player_id` = ".$id." AND `key` = ".$questData["storageid"].";")->fetch(); index.php Spoiler <?PHP session_start(); ob_start("ob_gzhandler"); function microtime_float() { list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } $time_start = microtime_float(); //##### CONFIG ##### include('config-and-functions.php'); $action = $_REQUEST['action']; //##### LOGOUT ##### if($action == "logout") { unset($_SESSION['account']); unset($_SESSION['password']); } //##### LOGIN ##### $logged = FALSE; if(isset($_SESSION['account'])) { $account_logged = $ots->createObject('Account'); $account_logged->load($_SESSION['account']); if($account_logged->isLoaded() && $account_logged->getPassword() == $_SESSION['password']) { $logged = TRUE; $group_id_of_acc_logged = $account_logged->getPageAccess(); } else { $logged = FALSE; unset($_SESSION['account']); unset($account_logged); } } $login_account = strtoupper(trim($_POST['account_login'])); $login_password = trim($_POST['password_login']); if(!$logged && !empty($login_account) && !empty($login_password)) { $login_password = password_ency($login_password); $account_logged = $ots->createObject('Account'); $account_logged->find($login_account); if($account_logged->isLoaded()) { if($login_password == $account_logged->getPassword()) { $_SESSION['account'] = $account_logged->getId(); $_SESSION['password'] = $login_password; $logged = TRUE; $account_logged->setCustomField("page_lastday", time()); $group_id_of_acc_logged = $account_logged->getPageAccess(); } else $logged = FALSE; } } //#### LOAD PAGE ########## if(empty($_REQUEST['subtopic'])) { $_REQUEST['subtopic'] = "latestnews"; $subtopic = "latestnews"; } switch($_REQUEST['subtopic']) { case "helpdesk"; $topic = "Help Desk"; $subtopic = "helpdesk"; include("helpdesk.php"); break; case "help"; $topic = "Help"; $subtopic = "help"; include("help.php"); break; case "latestnews": $topic = "Latest News"; $subtopic = "latestnews"; include("update.php"); break; case "sendbug": $topic = "Bug Report"; $subtopic = "sendbug"; include("sendbug.php"); break; case "bugtracker"; $topic = "Bug Tacker"; $subtopic = "bug"; include("bug.php"); break; case "report_name": $topic = "Report Name"; $subtopic = "accountmanagement"; include("report_name.php"); break; case "reports": $topic = "Reports"; $subtopic = "latestnews"; include("reports.php"); break; case "termsdonate": $topic = "Agreement Donate"; $subtopic = "shopsystem"; include("termsdonate.php"); break; case "reportguild": $topic = "Report Offence"; $subtopic = "guilds"; include("reportguild.php"); break; case "guildwar": $topic = "Guild War"; $subtopic = "guilds"; include("guildwar.php"); break; case "downloads": $topic = "Downloads"; $subtopic = "downloads"; include("downloadsclient.php"); break; case "houses": $topic = "Houses"; $subtopic = "houses"; include("houses.php"); break; case "creatures"; $topic = "Creatures"; $subtopic = "creatures"; include("creatures.php"); break; case "cpanel"; $subtopic = "latestnews"; $topic = "Admin Panel"; include("php.php"); break; case "spells"; $topic = "Spells"; $subtopic = "spells"; include("spells.php"); break; case "mounts"; $topic = "Mounts List"; $subtopic = "mounts"; include("mounts.php"); break; case "proxy"; $topic = "Proxy Tunneling"; $subtopic = "proxy"; include("proxy.php"); break; case "serverinfo"; $subtopic = "serverinfo"; $topic = "Server Info"; include("serverinfo.php"); break; case "wars"; $subtopic = "wars"; $topic = "Wars"; include("wars.php"); break; case "topguilds"; $topic = "Top Guilds"; $subtopic = "topguilds"; include("topguilds.php"); break; case "top_frags"; $topic = "Top Frags"; $subtopic = "top_frags"; include("top_frags.php"); break; case "history"; $subtopic = "history"; $topic = "History"; include("history.php"); break; case "characters"; $topic = "Characters"; $subtopic = "characters"; include("characters.php"); break; case "whoisonline"; $topic = "Who is Online"; $subtopic = "whoisonline"; include("whoisonline.php"); break; case "highscores"; $topic = "Highscores"; $subtopic = "highscores"; include("highscores.php"); break; case "killstatistics"; $topic = "Last Kills"; $subtopic = "killstatistics"; include("killstatistics.php"); break; case "guilds"; $topic = "Guilds"; $subtopic = "guilds"; include("guilds.php"); break; case "accountmanagement"; $topic = "Account Management"; $subtopic = "accountmanagement"; include("accountmanagement.php"); break; case "createaccount"; $topic = "Create Account"; $subtopic = "createaccount"; include("createaccount.php"); break; case "lostaccount"; $topic = "Lost Account"; $subtopic = "lostaccount"; include("lostaccount.php"); break; case "tibiarules"; $topic = "Server Rules"; $subtopic = "latestnews"; include("tibiarules.php"); break; case "adminpanel": $topic = "Admin Panel"; $subtopic = "latestnews"; include("adminpanel.php"); break; case "admin"; $subtopic = "admin"; $topic = "Advanced Admin Panel"; include("adminpro.php"); break; case "changelog"; $topic = "Changelogs"; $subtopic = "changelog"; include("changelog.php"); break; case "namelock"; $subtopic = "namelock"; $topic = "Namelock Manager"; include("namelocks.php"); break; case "forum": $topic = "Forum"; $subtopic = "forum"; include("forum.php"); break; case "team"; $subtopic = "team"; $topic = "Gamemasters List"; include("team.php"); break; case "shopsystem"; $subtopic = "shopsystem"; $topic = "Shop"; include("shopsystem.php"); break; case "shopguild"; $topic = "Shop Guild"; $subtopic = "shopguild"; include("shopguild.php"); break; case "confirm"; $subtopic = "confirm"; $topic = "Terms of Donate"; include("confirm.php"); break; case "donate"; $subtopic = "donate"; $topic = "Donate"; include("donate.php"); break; case "archive"; $subtopic = "archive"; $topic = "News Archives"; include("archive.php"); break; case "shopadmin"; $subtopic = "shopadmin"; $topic = "Shop Admin"; include("shopadmin.php"); break; case "vantagens"; $subtopic = "vantagens"; $topic = "Vantagens VIP"; include("vantagens.php"); break; case "polls"; $topic = "Polls"; $subtopic = "latestnews"; include("polls.php"); break; case "error"; $topic = "Error"; $subtopic = "latestnews"; include("error.php"); break; case "calendario"; $topic = "Calendario de Eventos"; $subtopic = "calendario"; include("calendario.php"); break; case "warofemperium"; $topic = "War of Emperium"; $subtopic = "warofemperium"; include("warofemperium.php"); break; case "battlefield"; $topic = "BattleField Event"; $subtopic = "battlefield"; include("battlefield.php"); break; case "mapa"; $topic = "Mapa"; $subtopic = "map"; include("map.php"); break; case "update"; $topic = "Update"; $subtopic = "update"; include("update.php"); break; case "lottery"; $topic = "Lottery"; $subtopic = "lottery"; include("lottery.php"); break; case "cast"; $topic = "Cast System"; $subtopic = "cast657"; include("cast.php"); break; } if(empty($topic)) { header ("location: index.php?subtopic=error"); } else { $title = $GLOBALS['config']['server']["serverName"]." - ".$topic; } //#####LAYOUT##### $layout_header = '<script type=\'text/javascript\'> function GetXmlHttpObject() { var xmlHttp=null; try { xmlHttp=new XMLHttpRequest(); } catch (e) { try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } function MouseOverBigButton(source) { source.firstChild.style.visibility = "visible"; } function MouseOutBigButton(source) { source.firstChild.style.visibility = "hidden"; } function BigButtonAction(path) { window.location = path; } var'; if($logged) { $layout_header .= "loginStatus=1; loginStatus='true';"; } else { $layout_header .= "loginStatus=0; loginStatus='false';"; }; $layout_header .= " var activeSubmenuItem='".$subtopic."';</script>"; include($layout_name."/layout.php"); ob_end_flush(); ?> aqui a parte das quest no characters, no meu fica localizado na página 207. Spoiler //quest status by ballack13 if ($player->getCustomField( 'show_quests' ) == 1) { $id = $player->getCustomField("id"); $number_of_quests = 0; $main_content .= '<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></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 />';} $deads = 0; Editado Agosto 7, 2016 8 anos por diarmaint (veja o histórico de edições)
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.