Ir para conteúdo

RenanBispo123

Campones
  • Total de itens

    21
  • Registro em

  • Última visita

Posts postados por RenanBispo123

  1. cara ótimos mapas, eu to bem parado como mapper faz 1 ano que eu não mecho mais com mapper, mas vendo mappers assim como você mostrando seu show off me da inspirações para voltar a brincar com os mapa '-'.

     

     

    continue assim não desanima rápido igual eu não!

  2. cara se vc diz:

    obs: ja refiz a house por completo exclui tudo e refiz mais erro ainda persiste

     

    se fez tudo certo não era pra acontecer isso.

     

    tente excluir a house no RME, retirar o PZ do tile e fazer tudo novamente.

  3. Tente fazer de um modo diferente, vá ate a pasta world abra o -spawn do mapa que você ira utilizar, procure por:

     

    <monster name="nome do monstro que vc quer " x="2" y="3" z="4" spawntime="60"/>

     

     

    CTRL + F <--- ajuda você achar bem mais rápido aonde esta escrito isso.

     

    no spawntime="60"/> você substitui para spawntime="43200"/>

     

     

    nas posições x, y e z você deve colocar a coordenada que a criatura de respaw!

     

     

    espero ajudar!!

  4. como arrumo isso?

     

    14ahgtf.png

     

    minha latestnews.php

     

     

    <?PHP

    $time = time();
    /////////////////////////////////////////////////////////////////////////////////////////
    //The new edition of my script: Best Player, Last joined and something new Server Motd.//
    /////////////////////////Everything in the new appearance.///////////////////////////////
    //////////////////////////////////////by Aleh///////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////
    ///Queries ///
    $query = $SQL->query('SELECT `players`.`name`,`players`.`id`,`players`.`level`, `players`.`experience`, `server_motd`.`id`, `server_motd`.`text` FROM `players`,`server_motd` WHERE `players`.`group_id` < '.$config['site']['players_group_id_block'].' AND `players`.`name` != "Account Manager" ORDER BY `players`.`level` DESC, `players`.`experience` DESC, `server_motd`.`id` DESC LIMIT 1;')->fetch();
    $query2 = $SQL->query('SELECT `id`, `name` FROM `players` ORDER BY `id` DESC LIMIT 1;')->fetch();
    $housesfree = $SQL->query('SELECT COUNT(*) FROM `houses` WHERE `owner`=0;')->fetch();
    $housesrented = $SQL->query('SELECT COUNT(*) FROM `houses` WHERE `lastwarning`>1;')->fetch();
    $players = $SQL->query('SELECT COUNT(*) FROM `players` WHERE `id`>0;')->fetch();
    $accounts = $SQL->query('SELECT COUNT(*) FROM `accounts` WHERE `id`>0;')->fetch();
    $banned = $SQL->query('SELECT COUNT(*) FROM `bans` WHERE `id`>0;')->fetch();
    $guilds = $SQL->query('SELECT COUNT(*) FROM `guilds` WHERE `id`>0;')->fetch();
    ///End Queries ///
    $main_content .= '<table bgcolor='.$config['site']['darkborder'].' border=0 cellpadding=4 cellspacing=1 width=100%>
    <tr bgcolor='. $config['site']['vdarkborder'] .'><td align="center" class=white colspan=1><b>Welcome to '.$config['server']['serverName'].'</b></td></tr>
    <tr><td><table border=0 cellpadding=1 cellspacing=1 width=100%>
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center>Last joined us: <a href="?subtopic=characters&name='.urlencode($query2['name']).'">'.$query2['name'].'</a>, player number '.$query2['id'].'. Welcome and wish you a nice game!</center></td></tr>
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center>Currently, the best player on the server is: <a href="index.php?subtopic=characters&name='.urlencode($query['name']).'"> '.$query['name'].'</a> ('.urlencode($query['level']).'). Congratulations!</center></td></tr>
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Server motd:</b> '.$query['text'].'</center></td></tr>
    <table border=0 cellpadding=0 cellspacing=1 width=100%>
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Free Houses:</b> '.$housesfree[0].'</center></td>
    <td><center><b>Rented Houses:</b> '.$housesrented[0].'</center></td></tr>
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Accounts</b> in database: '.$accounts[0].'</center></td>
    <td><center><b>Players</b> in database: '.$players[0].'</center></td></tr>
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Banned</b> accounts: '.$banned[0].'</center></td>
    <td><center><b>Guilds</b> in databese: '.$guilds[0].'</center></td></tr>
    </table></td></tr></table>';
    ///Don't delete this! Please respect my work! I am counting on reputation.
    $main_content .= '<div align="right"><small><b></b></small></div><br />';
    ///Don't delete this! Please respect my work! I am counting on reputation.
    div>';';
    //######################## SHOW TICKERS AND NEWS #######################
    $time = time();
    $main_content .= '<div class="NewsHeadline">
    <div class="NewsHeadlineBackground" style="background-image:url(' . $layout_name . '/images/news/newsheadline_background.gif)">
    <table border="0">
    <tr>
    <td style="text-align: center; font-weight: bold;">
    <font color="white">Most powerfull guilds</font>
    </td>
    </tr>
    </table>
    </div>
    </div>
    <table border="0" cellspacing="3" cellpadding="4" width="100%">
    <tr>';
    foreach($SQL->query('SELECT `g`.`id` AS `id`, `g`.`name` AS `name`,
    `g`.`logo_gfx_name` AS `logo`, COUNT(`g`.`name`) as `frags`
    FROM `killers` k
    LEFT JOIN `player_killers` pk ON `k`.`id` = `pk`.`kill_id`
    LEFT JOIN `players` p ON `pk`.`player_id` = `p`.`id`
    LEFT JOIN `guild_ranks` gr ON `p`.`rank_id` = `gr`.`id`
    LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id`
    WHERE `k`.`unjustified` = 1 AND `k`.`final_hit` = 1
    GROUP BY `name`
    ORDER BY `frags` DESC, `name` ASC
    LIMIT 0, 6;') as $guild)
    $main_content .= ' <td style="width: 25%; text-align: center;">
    <a href="?subtopic=guilds&action=show&guild=' . $guild['id'] . '"><img src="guilds/' . ((!empty($guild['logo']) && file_exists('guilds/' . $guild['logo'])) ? $guild['logo'] : 'default_logo.gif') . '" width="64" height="64" border="0"/><br />' . $guild['name'] . '</a><br />' . $guild['frags'] . ' kills
    </td>';
    $main_content .= ' </tr>
    </table>';
    if ($logged){
    $players_from_account = $SQL->query("SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = ".(int) $account_logged->getId())->fetchAll();
    foreach($players_from_account as $player)
    {
    $str .= '<option value="'.$player['id'].'"';
    if($player['id'] == $char_id)
    $strt .= ' selected="selected"';
    $str .= '>'.$player['name'].'</option>';
    }
    }
    $time = time();
    $news_content .= '<div id="newsticker" class="Box">
    <div class="Corner-tl" style="background-image: url('.$layout_name.'/images/content/corner-tl.gif);"></div>
    <div class="Corner-tr" style="background-image: url('.$layout_name.'/images/content/corner-tr.gif);"></div>
    <div class="Border_1" style="background-image: url('.$layout_name.'/images/content/border-1.gif);"></div>
    <div class="BorderTitleText" style="background-image: url('.$layout_name.'/images/content/title-background-green.gif);"></div>
    <img class="Title" src="headline.php?text=News ticker" alt="Contentbox headline">
    <div class="Border_2">
    <div class="Border_3">
    <div class="BoxContent" style="background-image: url('.$layout_name.'/images/content/scroll.gif);">';
    //##################### ADD NEW TICKER #####################
    if($action == "newticker") {
    if($group_id_of_acc_logged >= $config['site']['access_tickers']) {
    $ticker_text = stripslashes(trim($_POST['new_ticker']));
    $ticker_icon = (int) $_POST['icon_id'];
    if(empty($ticker_text)) {
    $news_content .= 'You can\'t add empty ticker.';
    }
    else
    {
    if(empty($ticker_icon)) {
    $news_icon = 0;
    }
    $SQL->query('INSERT INTO '.$SQL->tableName('z_news_tickers').' (date, author, image_id, text, hide_ticker) VALUES ('.$SQL->quote($time).', '.$account_logged->getId().', '.$ticker_icon.', '.$SQL->quote($ticker_text).', 0)');
    $news_content .= '<center><h2><font color="red">Added new ticker:</font></h2></center><hr/><div id="newsticker" class="Box"><div id="TickerEntry-1" class="Row" onclick=\'TickerAction("TickerEntry-1")\'>
    <div class="Odd">
    <div class="NewsTickerIcon" style="background-image: url('.$layout_name.'/images/news/icon_'.$ticker['image_id'].'.gif);"></div>
    <div id="TickerEntry-1-Button" class="NewsTickerExtend" style="background-image: url('.$layout_name.'/images/general/plus.gif);"></div>
    <div class="NewsTickerText">
    <span class="NewsTickerDate">'.date("j M Y", $time).' -</span>
    <div id="TickerEntry-1-ShortText" class="NewsTickerShortText">';
    $news_content .= '<a href="?subtopic=latestnews&action=deleteticker&id='.$time.'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>';
    $news_content .= short_text($ticker_text, 60).'</div>
    <div id="TickerEntry-1-FullText" class="NewsTickerFullText">';
    $news_content .= '<a href="?subtopic=latestnews&action=deleteticker&id='.$time.'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>';
    $news_content .= $ticker_text.'</div>
    </div>
    </div>
    </div></div><hr/>';
    }
    }
    else
    {
    $news_content .= 'You don\'t have admin rights. You can\'t add new ticker.';
    }
    $news_content .= '<form action="?subtopic=latestnews" METHOD=post><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></form>';
    }
    //#################### DELETE (HIDE only!) TICKER ############################
    if($action == "deleteticker") {
    if($group_id_of_acc_logged >= $config['site']['access_tickers']) {
    header("Location: ");
    $date = (int) $_REQUEST['id'];
    $SQL->query('UPDATE '.$SQL->tableName('z_news_tickers').' SET hide_ticker = 1 WHERE '.$SQL->fieldName('date').' = '.$date.';');
    $news_content .= '<center>News tickets with <b>date '.date("j F Y, g:i a", $date).'</b> has been deleted.<form action="?subtopic=latestnews" METHOD=post><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></form></center>';
    }
    else
    {
    $news_content .= '<center>You don\'t have admin rights. You can\'t delete tickers.<form action="?subtopic=latestnews" METHOD=post><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></form></center>';
    }
    }
    //show tickers if any in database or not blocked (tickers limit = 0)
    $tickers = $SQL->query('SELECT * FROM `z_news_tickers` WHERE hide_ticker != 1 ORDER BY date DESC LIMIT 4;');
    $number_of_tickers = 0;
    if(is_object($tickers)) {
    foreach($tickers as $ticker) {
    if(is_int($number_of_tickers / 2))
    $color = "Odd";
    else
    $color = "Even";
    $tickers_to_add .= '<div id="TickerEntry-'.$number_of_tickers.'" class="Row" onclick=\'TickerAction("TickerEntry-'.$number_of_tickers.'")\'>
    <div class="'.$color.'">
    <div class="NewsTickerIcon" style="background-image: url('.$layout_name.'/images/news/icon_'.$ticker['image_id'].'.gif);"></div>
    <div id="TickerEntry-'.$number_of_tickers.'-Button" class="NewsTickerExtend" style="background-image: url('.$layout_name.'/images/general/plus.gif);"></div>
    <div class="NewsTickerText">
    <span class="NewsTickerDate">'.date("j M Y", $ticker['date']).' -</span>
    <div id="TickerEntry-'.$number_of_tickers.'-ShortText" class="NewsTickerShortText">';
    //if admin show button to delete (hide) ticker
    if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) {
    $tickers_to_add .= '<a href="?subtopic=latestnews&action=deleteticker&id='.$ticker['date'].'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>';
    }
    $tickers_to_add .= short_text($ticker['text'], 60).'</div>
    <div id="TickerEntry-'.$number_of_tickers.'-FullText" class="NewsTickerFullText">';
    //if admin show button to delete (hide) ticker
    if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) {
    $tickers_to_add .= '<a href="?subtopic=latestnews&action=deleteticker&id='.$ticker['date'].'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>';
    }
    $tickers_to_add .= $ticker['text'].'</div>
    </div>
    </div>
    </div>';
    $number_of_tickers++;
    }
    }
    if(!empty($tickers_to_add)) {
    //show table with tickers
    if($group_id_of_acc_logged >= $config['site']['access_admin_panel'] && $action!=newticker)
    $news_content .= '<script type="text/javascript">
    var showednewticker_state = "0";
    function showNewTickerForm()
    {
    if(showednewticker_state == "0") {
    document.getElementById("newtickerform").innerHTML = \'<form action="?subtopic=latestnews&action=newticker" method="post" ><table border="0"><tr><td bgcolor="D4C0A1" align="center"><b>Select icon:</b></td><td><table border="0" bgcolor="F1E0C6"><tr><td><img src="images/news/icon_0.gif" width="20"></td><td><img src="images/news/icon_1.gif" width="20"></td><td><img src="images/news/icon_2.gif" width="20"></td><td><img src="images/news/icon_3.gif" width="20"></td><td><img src="images/news/icon_4.gif" width="20"></td></tr><tr><td><input type="radio" name="icon_id" value="0" checked="checked"></td><td><input type="radio" name="icon_id" value="1"></td><td><input type="radio" name="icon_id" value="2"></td><td><input type="radio" name="icon_id" value="3"></td><td><input type="radio" name="icon_id" value="4"></td></tr></table></td></tr><tr><td align="center" bgcolor="D4C0A1"><b>New<br>ticker<br>text:</b></td><td bgcolor="F1E0C6"><textarea name="new_ticker" rows="3" cols="45"></textarea></td></tr><tr><td><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></form><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="AddTicker" src="'.$layout_name.'/images/buttons/_sbutton_cancel.gif" onClick="showNewTickerForm()" alt="AddTicker" /></div></div></td></tr></table>\';
    document.getElementById("jajo").innerHTML = \'\';
    showednewticker_state = "1";
    }
    else {
    document.getElementById("newtickerform").innerHTML = \'\';
    document.getElementById("jajo").innerHTML = \'<div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="AddTicker" src="'.$layout_name.'/images/buttons/addticker.gif" onClick="showNewTickerForm()" alt="AddTicker" /></div></div>\';
    showednewticker_state = "0";
    }
    }
    </script><div id="newtickerform"></div><div id="jajo"><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="AddTicker" src="'.$layout_name.'/images/buttons/addticker.gif" onClick="showNewTickerForm()" alt="AddTicker" /></div></div></div><hr/>';
    //add tickers list
    $news_content .= $tickers_to_add;
    //koniec
    $news_content .= '</div>
    </div>
    </div>
    <div class="Border_1" style="background-image: url('.$layout_name.'/images/content/border-1.gif);"></div>
    <div class="CornerWrapper-b"><div class="Corner-bl" style="background-image: url('.$layout_name.'/images/content/corner-bl.gif);"></div></div>
    <div class="CornerWrapper-b"><div class="Corner-br" style="background-image: url('.$layout_name.'/images/content/corner-br.gif);"></div></div>
    </div>';
    }
    //end of tickers, news part
    //adding news
    if($action == "newnews") {
    if($group_id_of_acc_logged >= $config['site']['access_news']) {
    $text = ($_REQUEST['text']);
    $char_id = (int) $_REQUEST['char_id'];
    $post_topic = stripslashes(trim($_REQUEST['topic']));
    $smile = (int) $_REQUEST['smile'];
    $news_icon = (int) $_REQUEST['icon_id'];
    if(empty($news_icon)) {
    $news_icon = 0;
    }
    if(empty($post_topic)) {
    $an_errors[] .= 'You can\'t add news without topic.';
    }
    if(empty($text)) {
    $an_errors[] .= 'You can\'t add empty news.';
    }
    if(empty($char_id)) {
    $an_errors[] .= 'Select character.';
    }
    //execute query
    if(empty($an_errors)) {
    $SQL->query("INSERT INTO `z_forum` (`id` ,`first_post` ,`last_post` ,`section` ,`replies` ,`views` ,`author_aid` ,`author_guid` ,`post_text` ,`post_topic` ,`post_smile` ,`post_date` ,`last_edit_aid` ,`edit_date`, `post_ip`, `icon_id`) VALUES ('NULL', '0', '".time()."', '1', '0', '0', '".$account_logged->getId()."', '".(int) $char_id."', ".$SQL->quote($text).", ".$SQL->quote($post_topic).", '".(int) $smile."', '".time()."', '0', '0', '".$_SERVER['REMOTE_ADDR']."', '".$news_icon."')");
    $thread_id = $SQL->lastInsertId();
    $SQL->query("UPDATE `z_forum` SET `first_post`=".(int) $thread_id." WHERE `id` = ".(int) $thread_id);//show added data
    $main_content .= '<form action="?subtopic=latestnews" METHOD=post><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></form>';
    }
    else
    {
    //show 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($an_errors as $an_error) {
    $main_content .= '<li>'.$an_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/>';
    //okno edycji newsa z wpisanymi danymi przeslanymi wczesniej
    $main_content .= '<form action="?subtopic=latestnews&action=newnews" method="post" ><table border="0"><tr><td bgcolor="D4C0A1" align="center"><b>Select icon:</b></td><td><table border="0" bgcolor="F1E0C6"><tr><td><img src="images/news/icon_0.gif" width="20"></td><td><img src="images/news/icon_1.gif" width="20"></td><td><img src="images/news/icon_2.gif" width="20"></td><td><img src="images/news/icon_3.gif" width="20"></td><td><img src="images/news/icon_4.gif" width="20"></td></tr><tr><td><input type="radio" name="icon_id" value="0" checked="checked"></td><td><input type="radio" name="icon_id" value="1"></td><td><input type="radio" name="icon_id" value="2"></td><td><input type="radio" name="icon_id" value="3"></td><td><input type="radio" name="icon_id" value="4"></td></tr></table></td></tr><tr><td align="center" bgcolor="F1E0C6"><b>Topic:</b></td><td><input type="text" name="topic" maxlenght="50" style="width: 300px" value="'.$post_topic.'"></td></tr><tr><td align="center" bgcolor="D4C0A1"><b>News<br>text:</b></td><td bgcolor="F1E0C6"><textarea name="text" rows="6" cols="60">'.$text.'</textarea></td></tr><tr><td width="180"><b>Character:</b></td><td><select name="char_id"><option value="0">(Choose character)</option>'.$str.'</select></td></tr><tr><td><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></form><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="CancelAddNews" src="'.$layout_name.'/images/buttons/_sbutton_cancel.gif" onClick="location.href=\'?subtopic=latestnews\';" alt="CancelAddNews" /></div></div></td></tr></table>';
    }
    }
    else
    {
    $main_content .= 'You don\'t have site-admin rights. You can\'t add news.';}
    }
    //####################Show script with new news panel############################
    if($group_id_of_acc_logged >= $config['site']['access_news'] && $action != 'newnews')
    {
    $main_content .= '<script type="text/javascript">
    var showednewnews_state = "0";
    function showNewNewsForm()
    {
    if(showednewnews_state == "0") {
    document.getElementById("newnewsform").innerHTML = \'<form action="?subtopic=latestnews&action=newnews" method="post" ><table border="0"><tr><td bgcolor="D4C0A1" align="center"><b>Select icon:</b></td><td><table border="0" bgcolor="F1E0C6"><tr><td><img src="images/news/icon_0.gif" width="20"></td><td><img src="images/news/icon_1.gif" width="20"></td><td><img src="images/news/icon_2.gif" width="20"></td><td><img src="images/news/icon_3.gif" width="20"></td><td><img src="images/news/icon_4.gif" width="20"></td></tr><tr><td><input type="radio" name="icon_id" value="0" checked="checked"></td><td><input type="radio" name="icon_id" value="1"></td><td><input type="radio" name="icon_id" value="2"></td><td><input type="radio" name="icon_id" value="3"></td><td><input type="radio" name="icon_id" value="4"></td></tr></table></td></tr><tr><td align="center" bgcolor="F1E0C6"><b>Topic:</b></td><td><input type="text" name="topic" maxlenght="50" style="width: 300px" ></td></tr><tr><td align="center" bgcolor="D4C0A1"><b>News<br>text:</b></td><td bgcolor="F1E0C6"><textarea name="text" rows="6" cols="60"></textarea></td></tr><tr><td width="180"><b>Character:</b></td><td><select name="char_id"><option value="0">(Choose character)</option>'.$str.'</select></td></tr><tr><td><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></form><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="CancelAddNews" src="'.$layout_name.'/images/buttons/_sbutton_cancel.gif" onClick="showNewNewsForm()" alt="CancelAddNews" /></div></div></td></tr></table>\';
    document.getElementById("chicken").innerHTML = \'\';
    showednewnews_state = "1";
    }
    else {
    document.getElementById("newnewsform").innerHTML = \'\';
    document.getElementById("chicken").innerHTML = \'<div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="AddNews" src="'.$layout_name.'/images/buttons/addnews.gif" onClick="showNewNewsForm()" alt="AddNews" /></div></div>\';
    showednewnews_state = "0";
    }
    }
    </script><div id="newnewsform"></div><div id="chicken"><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="AddNews" src="'.$layout_name.'/images/buttons/addnews.gif" onClick="showNewNewsForm()" alt="AddNews" /></div></div></div><hr/>';$zapytanie = $SQL->query("SELECT `z_forum`.`icon_id`,`z_forum`.`post_topic`, `z_forum`.`author_guid`, `z_forum`.`post_date`, `z_forum`.`post_text`, `z_forum`.`id`, `z_forum`.`replies`, `players`.`name` FROM `z_forum`, `players` WHERE `section` = '1' AND `z_forum`.`id` = `first_post` AND `players`.`id` = `z_forum`.`author_guid` ORDER BY `post_date` DESC LIMIT 3;")->fetchAll();
    }
    ///show news
    $zapytanie = $SQL->query("SELECT `z_forum`.`icon_id`, `z_forum`.`post_topic`, `z_forum`.`author_guid`, `z_forum`.`post_date`, `z_forum`.`post_text`, `z_forum`.`id`, `z_forum`.`replies`, `players`.`name` FROM `z_forum`, `players` WHERE `section` = '1' AND `z_forum`.`id` = `first_post` AND `players`.`id` = `z_forum`.`author_guid` ORDER BY `post_date` DESC LIMIT 3;")->fetchAll();
    foreach ($zapytanie as $row)
    {
    $BB = array(
    '/\[youtube\](.*?)\[\/youtube\]/is' => '<center><object width="500" height="405"><param name="movie" value="http://www.youtube.com/watch?v=$1&hl=pt-br&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999&border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/watch?v=$1&hl=pt-br&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="405"></embed></object></center>',
    '/\[b\](.*?)\[\/b\]/is' => '<strong>$1</strong>',
    '/\[center\](.*?)\[\/center\]/is' => '<center>$1</center>',
    '/\
    (.*?)\[\/quote\]/is' => '<table cellpadding="0" style="background-color: #c4c4c4; width: 480px; border-style: dotted; border-color: #007900; border-width: 2px"><tr><td>$1</td></tr></table>',
    '/\[u\](.*?)\[\/u\]/is' => '<u>$1</u>',
    '/\[i\](.*?)\[\/i\]/is' => '<i>$1</i>',
    '/\[letter\](.*?)\[\/letter\]/is' => '<img src=images/letters/$1.gif alt=$1 />',

  5. no meu site a pagina principal esta dando error e não abre
    aparece esse error ake

    Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'otserv.server_motd' doesn't exist' in C:\xampp1\htdocs\latestnews.php:9 Stack trace: #0 C:\xampp1\htdocs\latestnews.php(9): PDO->query('SELECT `players...') #1 C:\xampp1\htdocs\index.php(63): include('C:\xampp1\htdoc...') #2 {main} thrown in C:\xampp1\htdocs\latestnews.php on line 9

    e eu nen modifiquei nada nessa pasta latestnews.php

     

    aqui esta a minha latestnews.php

     

    <?PHP

    $time = time();
    /////////////////////////////////////////////////////////////////////////////////////////
    //The new edition of my script: Best Player, Last joined and something new Server Motd.//
    /////////////////////////Everything in the new appearance.///////////////////////////////
    //////////////////////////////////////by Aleh///////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////
    ///Queries ///
    $query = $SQL->query('SELECT `players`.`name`,`players`.`id`,`players`.`level`, `players`.`experience`, `server_motd`.`id`, `server_motd`.`text` FROM `players`,`server_motd` WHERE `players`.`group_id` < '.$config['site']['players_group_id_block'].' AND `players`.`name` != "Account Manager" ORDER BY `players`.`level` DESC, `players`.`experience` DESC, `server_motd`.`id` DESC LIMIT 1;')->fetch();
    $query2 = $SQL->query('SELECT `id`, `name` FROM `players` ORDER BY `id` DESC LIMIT 1;')->fetch();
    $housesfree = $SQL->query('SELECT COUNT(*) FROM `houses` WHERE `owner`=0;')->fetch();
    $housesrented = $SQL->query('SELECT COUNT(*) FROM `houses` WHERE `lastwarning`>1;')->fetch();
    $players = $SQL->query('SELECT COUNT(*) FROM `players` WHERE `id`>0;')->fetch();
    $accounts = $SQL->query('SELECT COUNT(*) FROM `accounts` WHERE `id`>0;')->fetch();
    $banned = $SQL->query('SELECT COUNT(*) FROM `bans` WHERE `id`>0;')->fetch();
    $guilds = $SQL->query('SELECT COUNT(*) FROM `guilds` WHERE `id`>0;')->fetch();
    ///End Queries ///
    $main_content .= '<table bgcolor='.$config['site']['darkborder'].' border=0 cellpadding=4 cellspacing=1 width=100%>
    <tr bgcolor='. $config['site']['vdarkborder'] .'><td align="center" class=white colspan=1><b>Welcome to '.$config['server']['serverName'].'</b></td></tr>
    <tr><td><table border=0 cellpadding=1 cellspacing=1 width=100%>
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center>Last joined us: <a href="?subtopic=characters&name='.urlencode($query2['name']).'">'.$query2['name'].'</a>, player number '.$query2['id'].'. Welcome and wish you a nice game!</center></td></tr>
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center>Currently, the best player on the server is: <a href="index.php?subtopic=characters&name='.urlencode($query['name']).'"> '.$query['name'].'</a> ('.urlencode($query['level']).'). Congratulations!</center></td></tr>
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Server motd:</b> '.$query['text'].'</center></td></tr>
    <table border=0 cellpadding=0 cellspacing=1 width=100%>
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Free Houses:</b> '.$housesfree[0].'</center></td>
    <td><center><b>Rented Houses:</b> '.$housesrented[0].'</center></td></tr>
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Accounts</b> in database: '.$accounts[0].'</center></td>
    <td><center><b>Players</b> in database: '.$players[0].'</center></td></tr>
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Banned</b> accounts: '.$banned[0].'</center></td>
    <td><center><b>Guilds</b> in databese: '.$guilds[0].'</center></td></tr>
    </table></td></tr></table>';
    ///Don't delete this! Please respect my work! I am counting on reputation.
    $main_content .= '<div align="right"><small><b></b></small></div><br />';
    ///Don't delete this! Please respect my work! I am counting on reputation.
    div>';';
    //######################## SHOW TICKERS AND NEWS #######################
    $time = time();
    $main_content .= '<div class="NewsHeadline">
    <div class="NewsHeadlineBackground" style="background-image:url(' . $layout_name . '/images/news/newsheadline_background.gif)">
    <table border="0">
    <tr>
    <td style="text-align: center; font-weight: bold;">
    <font color="white">Most powerfull guilds</font>
    </td>
    </tr>
    </table>
    </div>
    </div>
    <table border="0" cellspacing="3" cellpadding="4" width="100%">
    <tr>';
    foreach($SQL->query('SELECT `g`.`id` AS `id`, `g`.`name` AS `name`,
    `g`.`logo_gfx_name` AS `logo`, COUNT(`g`.`name`) as `frags`
    FROM `killers` k
    LEFT JOIN `player_killers` pk ON `k`.`id` = `pk`.`kill_id`
    LEFT JOIN `players` p ON `pk`.`player_id` = `p`.`id`
    LEFT JOIN `guild_ranks` gr ON `p`.`rank_id` = `gr`.`id`
    LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id`
    WHERE `k`.`unjustified` = 1 AND `k`.`final_hit` = 1
    GROUP BY `name`
    ORDER BY `frags` DESC, `name` ASC
    LIMIT 0, 6;') as $guild)
    $main_content .= ' <td style="width: 25%; text-align: center;">
    <a href="?subtopic=guilds&action=show&guild=' . $guild['id'] . '"><img src="guilds/' . ((!empty($guild['logo']) && file_exists('guilds/' . $guild['logo'])) ? $guild['logo'] : 'default_logo.gif') . '" width="64" height="64" border="0"/><br />' . $guild['name'] . '</a><br />' . $guild['frags'] . ' kills
    </td>';
    $main_content .= ' </tr>
    </table>';
    if ($logged){
    $players_from_account = $SQL->query("SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = ".(int) $account_logged->getId())->fetchAll();
    foreach($players_from_account as $player)
    {
    $str .= '<option value="'.$player['id'].'"';
    if($player['id'] == $char_id)
    $strt .= ' selected="selected"';
    $str .= '>'.$player['name'].'</option>';
    }
    }
    $time = time();
    $news_content .= '<div id="newsticker" class="Box">
    <div class="Corner-tl" style="background-image: url('.$layout_name.'/images/content/corner-tl.gif);"></div>
    <div class="Corner-tr" style="background-image: url('.$layout_name.'/images/content/corner-tr.gif);"></div>
    <div class="Border_1" style="background-image: url('.$layout_name.'/images/content/border-1.gif);"></div>
    <div class="BorderTitleText" style="background-image: url('.$layout_name.'/images/content/title-background-green.gif);"></div>
    <img class="Title" src="headline.php?text=News ticker" alt="Contentbox headline">
    <div class="Border_2">
    <div class="Border_3">
    <div class="BoxContent" style="background-image: url('.$layout_name.'/images/content/scroll.gif);">';
    //##################### ADD NEW TICKER #####################
    if($action == "newticker") {
    if($group_id_of_acc_logged >= $config['site']['access_tickers']) {
    $ticker_text = stripslashes(trim($_POST['new_ticker']));
    $ticker_icon = (int) $_POST['icon_id'];
    if(empty($ticker_text)) {
    $news_content .= 'You can\'t add empty ticker.';
    }
    else
    {
    if(empty($ticker_icon)) {
    $news_icon = 0;
    }
    $SQL->query('INSERT INTO '.$SQL->tableName('z_news_tickers').' (date, author, image_id, text, hide_ticker) VALUES ('.$SQL->quote($time).', '.$account_logged->getId().', '.$ticker_icon.', '.$SQL->quote($ticker_text).', 0)');
    $news_content .= '<center><h2><font color="red">Added new ticker:</font></h2></center><hr/><div id="newsticker" class="Box"><div id="TickerEntry-1" class="Row" onclick=\'TickerAction("TickerEntry-1")\'>
    <div class="Odd">
    <div class="NewsTickerIcon" style="background-image: url('.$layout_name.'/images/news/icon_'.$ticker['image_id'].'.gif);"></div>
    <div id="TickerEntry-1-Button" class="NewsTickerExtend" style="background-image: url('.$layout_name.'/images/general/plus.gif);"></div>
    <div class="NewsTickerText">
    <span class="NewsTickerDate">'.date("j M Y", $time).' -</span>
    <div id="TickerEntry-1-ShortText" class="NewsTickerShortText">';
    $news_content .= '<a href="?subtopic=latestnews&action=deleteticker&id='.$time.'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>';
    $news_content .= short_text($ticker_text, 60).'</div>
    <div id="TickerEntry-1-FullText" class="NewsTickerFullText">';
    $news_content .= '<a href="?subtopic=latestnews&action=deleteticker&id='.$time.'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>';
    $news_content .= $ticker_text.'</div>
    </div>
    </div>
    </div></div><hr/>';
    }
    }
    else
    {
    $news_content .= 'You don\'t have admin rights. You can\'t add new ticker.';
    }
    $news_content .= '<form action="?subtopic=latestnews" METHOD=post><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></form>';
    }
    //#################### DELETE (HIDE only!) TICKER ############################
    if($action == "deleteticker") {
    if($group_id_of_acc_logged >= $config['site']['access_tickers']) {
    header("Location: ");
    $date = (int) $_REQUEST['id'];
    $SQL->query('UPDATE '.$SQL->tableName('z_news_tickers').' SET hide_ticker = 1 WHERE '.$SQL->fieldName('date').' = '.$date.';');
    $news_content .= '<center>News tickets with <b>date '.date("j F Y, g:i a", $date).'</b> has been deleted.<form action="?subtopic=latestnews" METHOD=post><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></form></center>';
    }
    else
    {
    $news_content .= '<center>You don\'t have admin rights. You can\'t delete tickers.<form action="?subtopic=latestnews" METHOD=post><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></form></center>';
    }
    }
    //show tickers if any in database or not blocked (tickers limit = 0)
    $tickers = $SQL->query('SELECT * FROM `z_news_tickers` WHERE hide_ticker != 1 ORDER BY date DESC LIMIT 4;');
    $number_of_tickers = 0;
    if(is_object($tickers)) {
    foreach($tickers as $ticker) {
    if(is_int($number_of_tickers / 2))
    $color = "Odd";
    else
    $color = "Even";
    $tickers_to_add .= '<div id="TickerEntry-'.$number_of_tickers.'" class="Row" onclick=\'TickerAction("TickerEntry-'.$number_of_tickers.'")\'>
    <div class="'.$color.'">
    <div class="NewsTickerIcon" style="background-image: url('.$layout_name.'/images/news/icon_'.$ticker['image_id'].'.gif);"></div>
    <div id="TickerEntry-'.$number_of_tickers.'-Button" class="NewsTickerExtend" style="background-image: url('.$layout_name.'/images/general/plus.gif);"></div>
    <div class="NewsTickerText">
    <span class="NewsTickerDate">'.date("j M Y", $ticker['date']).' -</span>
    <div id="TickerEntry-'.$number_of_tickers.'-ShortText" class="NewsTickerShortText">';
    //if admin show button to delete (hide) ticker
    if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) {
    $tickers_to_add .= '<a href="?subtopic=latestnews&action=deleteticker&id='.$ticker['date'].'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>';
    }
    $tickers_to_add .= short_text($ticker['text'], 60).'</div>
    <div id="TickerEntry-'.$number_of_tickers.'-FullText" class="NewsTickerFullText">';
    //if admin show button to delete (hide) ticker
    if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) {
    $tickers_to_add .= '<a href="?subtopic=latestnews&action=deleteticker&id='.$ticker['date'].'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>';
    }
    $tickers_to_add .= $ticker['text'].'</div>
    </div>
    </div>
    </div>';
    $number_of_tickers++;
    }
    }
    if(!empty($tickers_to_add)) {
    //show table with tickers
    if($group_id_of_acc_logged >= $config['site']['access_admin_panel'] && $action!=newticker)
    $news_content .= '<script type="text/javascript">
    var showednewticker_state = "0";
    function showNewTickerForm()
    {
    if(showednewticker_state == "0") {
    document.getElementById("newtickerform").innerHTML = \'<form action="?subtopic=latestnews&action=newticker" method="post" ><table border="0"><tr><td bgcolor="D4C0A1" align="center"><b>Select icon:</b></td><td><table border="0" bgcolor="F1E0C6"><tr><td><img src="images/news/icon_0.gif" width="20"></td><td><img src="images/news/icon_1.gif" width="20"></td><td><img src="images/news/icon_2.gif" width="20"></td><td><img src="images/news/icon_3.gif" width="20"></td><td><img src="images/news/icon_4.gif" width="20"></td></tr><tr><td><input type="radio" name="icon_id" value="0" checked="checked"></td><td><input type="radio" name="icon_id" value="1"></td><td><input type="radio" name="icon_id" value="2"></td><td><input type="radio" name="icon_id" value="3"></td><td><input type="radio" name="icon_id" value="4"></td></tr></table></td></tr><tr><td align="center" bgcolor="D4C0A1"><b>New<br>ticker<br>text:</b></td><td bgcolor="F1E0C6"><textarea name="new_ticker" rows="3" cols="45"></textarea></td></tr><tr><td><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></form><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="AddTicker" src="'.$layout_name.'/images/buttons/_sbutton_cancel.gif" onClick="showNewTickerForm()" alt="AddTicker" /></div></div></td></tr></table>\';
    document.getElementById("jajo").innerHTML = \'\';
    showednewticker_state = "1";
    }
    else {
    document.getElementById("newtickerform").innerHTML = \'\';
    document.getElementById("jajo").innerHTML = \'<div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="AddTicker" src="'.$layout_name.'/images/buttons/addticker.gif" onClick="showNewTickerForm()" alt="AddTicker" /></div></div>\';
    showednewticker_state = "0";
    }
    }
    </script><div id="newtickerform"></div><div id="jajo"><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="AddTicker" src="'.$layout_name.'/images/buttons/addticker.gif" onClick="showNewTickerForm()" alt="AddTicker" /></div></div></div><hr/>';
    //add tickers list
    $news_content .= $tickers_to_add;
    //koniec
    $news_content .= '</div>
    </div>
    </div>
    <div class="Border_1" style="background-image: url('.$layout_name.'/images/content/border-1.gif);"></div>
    <div class="CornerWrapper-b"><div class="Corner-bl" style="background-image: url('.$layout_name.'/images/content/corner-bl.gif);"></div></div>
    <div class="CornerWrapper-b"><div class="Corner-br" style="background-image: url('.$layout_name.'/images/content/corner-br.gif);"></div></div>
    </div>';
    }
    //end of tickers, news part
    //adding news
    if($action == "newnews") {
    if($group_id_of_acc_logged >= $config['site']['access_news']) {
    $text = ($_REQUEST['text']);
    $char_id = (int) $_REQUEST['char_id'];
    $post_topic = stripslashes(trim($_REQUEST['topic']));
    $smile = (int) $_REQUEST['smile'];
    $news_icon = (int) $_REQUEST['icon_id'];
    if(empty($news_icon)) {
    $news_icon = 0;
    }
    if(empty($post_topic)) {
    $an_errors[] .= 'You can\'t add news without topic.';
    }
    if(empty($text)) {
    $an_errors[] .= 'You can\'t add empty news.';
    }
    if(empty($char_id)) {
    $an_errors[] .= 'Select character.';
    }
    //execute query
    if(empty($an_errors)) {
    $SQL->query("INSERT INTO `z_forum` (`id` ,`first_post` ,`last_post` ,`section` ,`replies` ,`views` ,`author_aid` ,`author_guid` ,`post_text` ,`post_topic` ,`post_smile` ,`post_date` ,`last_edit_aid` ,`edit_date`, `post_ip`, `icon_id`) VALUES ('NULL', '0', '".time()."', '1', '0', '0', '".$account_logged->getId()."', '".(int) $char_id."', ".$SQL->quote($text).", ".$SQL->quote($post_topic).", '".(int) $smile."', '".time()."', '0', '0', '".$_SERVER['REMOTE_ADDR']."', '".$news_icon."')");
    $thread_id = $SQL->lastInsertId();
    $SQL->query("UPDATE `z_forum` SET `first_post`=".(int) $thread_id." WHERE `id` = ".(int) $thread_id);//show added data
    $main_content .= '<form action="?subtopic=latestnews" METHOD=post><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></form>';
    }
    else
    {
    //show 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($an_errors as $an_error) {
    $main_content .= '<li>'.$an_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/>';
    //okno edycji newsa z wpisanymi danymi przeslanymi wczesniej
    $main_content .= '<form action="?subtopic=latestnews&action=newnews" method="post" ><table border="0"><tr><td bgcolor="D4C0A1" align="center"><b>Select icon:</b></td><td><table border="0" bgcolor="F1E0C6"><tr><td><img src="images/news/icon_0.gif" width="20"></td><td><img src="images/news/icon_1.gif" width="20"></td><td><img src="images/news/icon_2.gif" width="20"></td><td><img src="images/news/icon_3.gif" width="20"></td><td><img src="images/news/icon_4.gif" width="20"></td></tr><tr><td><input type="radio" name="icon_id" value="0" checked="checked"></td><td><input type="radio" name="icon_id" value="1"></td><td><input type="radio" name="icon_id" value="2"></td><td><input type="radio" name="icon_id" value="3"></td><td><input type="radio" name="icon_id" value="4"></td></tr></table></td></tr><tr><td align="center" bgcolor="F1E0C6"><b>Topic:</b></td><td><input type="text" name="topic" maxlenght="50" style="width: 300px" value="'.$post_topic.'"></td></tr><tr><td align="center" bgcolor="D4C0A1"><b>News<br>text:</b></td><td bgcolor="F1E0C6"><textarea name="text" rows="6" cols="60">'.$text.'</textarea></td></tr><tr><td width="180"><b>Character:</b></td><td><select name="char_id"><option value="0">(Choose character)</option>'.$str.'</select></td></tr><tr><td><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></form><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="CancelAddNews" src="'.$layout_name.'/images/buttons/_sbutton_cancel.gif" onClick="location.href=\'?subtopic=latestnews\';" alt="CancelAddNews" /></div></div></td></tr></table>';
    }
    }
    else
    {
    $main_content .= 'You don\'t have site-admin rights. You can\'t add news.';}
    }
    //####################Show script with new news panel############################
    if($group_id_of_acc_logged >= $config['site']['access_news'] && $action != 'newnews')
    {
    $main_content .= '<script type="text/javascript">
    var showednewnews_state = "0";
    function showNewNewsForm()
    {
    if(showednewnews_state == "0") {
    document.getElementById("newnewsform").innerHTML = \'<form action="?subtopic=latestnews&action=newnews" method="post" ><table border="0"><tr><td bgcolor="D4C0A1" align="center"><b>Select icon:</b></td><td><table border="0" bgcolor="F1E0C6"><tr><td><img src="images/news/icon_0.gif" width="20"></td><td><img src="images/news/icon_1.gif" width="20"></td><td><img src="images/news/icon_2.gif" width="20"></td><td><img src="images/news/icon_3.gif" width="20"></td><td><img src="images/news/icon_4.gif" width="20"></td></tr><tr><td><input type="radio" name="icon_id" value="0" checked="checked"></td><td><input type="radio" name="icon_id" value="1"></td><td><input type="radio" name="icon_id" value="2"></td><td><input type="radio" name="icon_id" value="3"></td><td><input type="radio" name="icon_id" value="4"></td></tr></table></td></tr><tr><td align="center" bgcolor="F1E0C6"><b>Topic:</b></td><td><input type="text" name="topic" maxlenght="50" style="width: 300px" ></td></tr><tr><td align="center" bgcolor="D4C0A1"><b>News<br>text:</b></td><td bgcolor="F1E0C6"><textarea name="text" rows="6" cols="60"></textarea></td></tr><tr><td width="180"><b>Character:</b></td><td><select name="char_id"><option value="0">(Choose character)</option>'.$str.'</select></td></tr><tr><td><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></form><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="CancelAddNews" src="'.$layout_name.'/images/buttons/_sbutton_cancel.gif" onClick="showNewNewsForm()" alt="CancelAddNews" /></div></div></td></tr></table>\';
    document.getElementById("chicken").innerHTML = \'\';
    showednewnews_state = "1";
    }
    else {
    document.getElementById("newnewsform").innerHTML = \'\';
    document.getElementById("chicken").innerHTML = \'<div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="AddNews" src="'.$layout_name.'/images/buttons/addnews.gif" onClick="showNewNewsForm()" alt="AddNews" /></div></div>\';
    showednewnews_state = "0";
    }
    }
    </script><div id="newnewsform"></div><div id="chicken"><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="AddNews" src="'.$layout_name.'/images/buttons/addnews.gif" onClick="showNewNewsForm()" alt="AddNews" /></div></div></div><hr/>';$zapytanie = $SQL->query("SELECT `z_forum`.`icon_id`,`z_forum`.`post_topic`, `z_forum`.`author_guid`, `z_forum`.`post_date`, `z_forum`.`post_text`, `z_forum`.`id`, `z_forum`.`replies`, `players`.`name` FROM `z_forum`, `players` WHERE `section` = '1' AND `z_forum`.`id` = `first_post` AND `players`.`id` = `z_forum`.`author_guid` ORDER BY `post_date` DESC LIMIT 3;")->fetchAll();
    }
    ///show news
    $zapytanie = $SQL->query("SELECT `z_forum`.`icon_id`, `z_forum`.`post_topic`, `z_forum`.`author_guid`, `z_forum`.`post_date`, `z_forum`.`post_text`, `z_forum`.`id`, `z_forum`.`replies`, `players`.`name` FROM `z_forum`, `players` WHERE `section` = '1' AND `z_forum`.`id` = `first_post` AND `players`.`id` = `z_forum`.`author_guid` ORDER BY `post_date` DESC LIMIT 3;")->fetchAll();
    foreach ($zapytanie as $row)
    {
    $BB = array(
    '/\[youtube\](.*?)\[\/youtube\]/is' => '<center><object width="500" height="405"><param name="movie" value="http://www.youtube.com/watch?v=$1&hl=pt-br&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999&border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/watch?v=$1&hl=pt-br&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="405"></embed></object></center>',
    '/\[b\](.*?)\[\/b\]/is' => '<strong>$1</strong>',
    '/\[center\](.*?)\[\/center\]/is' => '<center>$1</center>',
    '/\
    (.*?)\[\/quote\]/is' => '<table cellpadding="0" style="background-color: #c4c4c4; width: 480px; border-style: dotted; border-color: #007900; border-width: 2px"><tr><td>$1</td></tr></table>',
    '/\[u\](.*?)\[\/u\]/is' => '<u>$1</u>',
    '/\[i\](.*?)\[\/i\]/is' => '<i>$1</i>',
    '/\[letter\](.*?)\[\/letter\]/is' => '<img src=images/letters/$1.gif alt=$1 />',

    REP+

  6. o error no localhost, eu não consigo acessalo:

     

    Ops! Este link parece estar corrompido.

    Você quis dizer: www.­localhost.­com.­br

    mas se eu entro pelo localhost:8090 eu consigo normalmente só que até entao esta tudo normal mais depois que vem o problema

    eu não consigo deichar o server online ele da essa error ake

    14e2rtg.jpg

    e pelo que eu entendi o distro não conseguio uma conexão com o database e não sei como resolver!

    meu config.lua

    sqlType = "mysql"
    sqlHost = "localhost"
    sqlPort = 3306
    sqlUser = "root"
    sqlPass = "nbq2cp1234"
    sqlDatabase = "otserv"
    sqlFile = "otserv.s3db"
    sqlKeepAlive = 0
    mysqlReadTimeout = 10
    mysqlWriteTimeout = 10
    encryptionType = "plain"

    REP+ se pra quem me ajudar VLW!

  7. Queria um sistema de desafio de monstros o sistema funciona assim: link do vídeo: http://www.youtube.com/watch?v=_XodAtRvq4w

     

    explicação

     

     

    para ter acesso ao evento vc tem que pegar a permição com um npcs!

     

    itens nessesario para conseguir a permição com o npcs:

     

    nivel 1: 10k

    nivel 2: 10k + 10 small saphires (n lembro se é assim que se escreve)

    nivel 3: 10k + 10 small saphires + 10 blue gem

    nivel 4: 10k + 10 small sphires + 10 blue gem + 10 turtle shell

     

    inicialização:

     

    o evento se inicia as 20:00 (segunda e sexta) e as 15:00 (quarta)

     

    na arena:

     

    quando começa a apareser os bichos tem que apareser 1 bicho para cada player.

     

    Ex: 1 dragon,1 demon, 1 rat

    caso tenha 2 players na arena aparesera 2 dragon 2 demon e 2 rat

    e assim sucessivamente.

     

    o maximo de player em cada arena (nivel) são 20 player!

    dentro da arena não pode mandar magic wall rune ou algum tipo de runa que impessa que o bicho nasça.

     

    e naqueles pisos brancos semente bichos podem andar por la os players não podem andar naquele piso.

     

     

    Premio:

    nivel 1: 120k + trofeu com o seu nome e data (os ID eu escolho depois)

    nivel 2: 300k + trofeu com o seu nome e data (os ID eu escolho depois)

    nivel 3: 450k + trofeu com o seu nome e data (os ID eu escolho depois)

    nivel 4: 700k + trofeu com o seu nome e data (os ID eu escolho depois)

     

     

     

    OBRIGADO!

     

    REP+

  8. Versão do seu OTServ: 9.81

    Dificuldade do pedido: fácil

    Oque deseja: Preciso de um comando para comprar skill só que não consigo.

    Comentários: Tenho um script que estava funcionando na versão 8.6 só que passei o servidor para 9.81 e agora o comando não esta funcionando.

     

     

     

     

    function onSay(cid, words, param)

     

    if (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você precisa está em área protegida para utilizar este comando.")

    return TRUE

    end

     

    if (getPlayerStorageValue(cid, 11548) >= os.time()) then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED,"Por medidas de segurança você só pode utilizar este comando em " .. (getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.")

    return TRUE

    end

     

     

    if(param ~= "") and (param ~= "200k") and (param ~= "sd") and (param ~= "uh") and (param ~= "explo") and (param ~= "vip10") and (param ~= "vip30") and (param ~= "golden-set") and (param ~= "full-set") and (param ~= "dragon-set") and (param ~= "demon-set") and (param ~= "divine staff") and (param ~= "divine axe") and (param ~= "divine club") and (param ~= "divine sword") and (param ~= "divine crossbow") and (param ~= "livro nivel 5") and (param ~= "super divine staff") and (param ~= "super divine axe") and (param ~= "super divine club") and (param ~= "super divine sword") and (param ~= "super divine crossbow") and (param ~= "livro nivel 6") and (param ~= "skillclub") and (param ~= "skillsword") and (param ~= "skillaxe") and (param ~= "skilldistance") and (param ~= "skillshielding") and (param ~= "magiclevel") and (param ~= "magiclevel5") and (param ~= "skillclub10") and (param ~= "skillsword10") and (param ~= "skillaxe10") and (param ~= "skilldistance10") and (param ~= "skillshielding10") and (param ~= "removerfrag") and (param ~= "removerredskull") and (param ~= "removerblackskull") and (param ~= "novark") then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Para comprar digite !comprar (nome do item)\nOpcoes:\nsd = 4000 em SD por 10 barras.\nuh = 6000 em UH por 10 barras.\nexplo = 6000 em explosion por 10 barras.\nvip10 = 10 dias de vip por 5 barras.\nvip30 = 30 dias de vip por 10 barras.\ndivine staff = divine staff por 30 barras.\ndivine axe = divine axe por 30 barras.\ndivine club = divine club por 30 barras.\ndivine sword = divine sword por 30 barras.\ndivine crossbow = divine crossbow por 30 barras.\nlivro nivel 5 = livro nivel 5 por 30 barras.\nsuper divine staff = super divine staff por 60 barras.")

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nsuper divine axe = super divine axe por 60 barras.\nsuper divine club = super divine club por 60 barras.\nsuper divine sword = super divine sword por 60 barras.\nsuper divine crossbow = super divine crossbow por 60 barras.\nlivro nivel 6 = livro nivel 6 por 60 barras.\nskillclub = adiciona 1 skill club por 1 barras.\nskillsword = adiciona 1 skill sword por 1 barras.\nskillaxe = adiciona 1 skill axe por 1 barras.\nskilldistance = adiciona 1 skill distance por 1 barras.")

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nskillshielding = adiciona 1 skill shielding por 1 barras.\nmagiclevel = adiciona 1 magic level por 3 barras.\nmagiclevel5 = adiciona 5 magic level por 15 barras.\nskillclub10 = adiciona 10 skills club por 10 barras.\nskillsword10 = adiciona 10 skills sword por 10 barras.\nskillaxe10 = adiciona 10 skills axe por 10 barras.\nskilldistance10 = adiciona 10 skill distance por 10 barras.\nskillshielding10 = adiciona 10 skill shielding por 10 barras.\nremoverfrag = remove todos frags por 5 barras.")

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nremoverredskull = remove red skull por 120 barras.\nremoverblackskull = remove black skull por 200 barras.\nnovark = gera uma nova RK para sua account por 10 barras.\n")

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O Item desejado não existe em nosso stock. Veja a cima os detalhes dos items disponíveis.")

    return TRUE

    end

     

    if(param == "") then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Para comprar digite !comprar (nome do item)\nOpcoes:\nsd = 4000 em SD por 10 barras.\nuh = 6000 em UH por 10 barras.\nexplo = 6000 em explosion por 10 barras.\nvip10 = 10 dias de vip por 5 barras.\nvip30 = 30 dias de vip por 10 barras.\ndivine staff = divine staff por 30 barras.\ndivine axe = divine axe por 30 barras.\ndivine club = divine club por 30 barras.\ndivine sword = divine sword por 30 barras.\ndivine crossbow = divine crossbow por 30 barras.\nlivro nivel 5 = livro nivel 5 por 30 barras.\nsuper divine staff = super divine staff por 60 barras.")

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nsuper divine axe = super divine axe por 60 barras.\nsuper divine club = super divine club por 60 barras.\nsuper divine sword = super divine sword por 60 barras.\nsuper divine crossbow = super divine crossbow por 60 barras.\nlivro nivel 6 = livro nivel 6 por 60 barras.\nskillclub = adiciona 1 skill club por 1 barras.\nskillsword = adiciona 1 skill sword por 1 barras.\nskillaxe = adiciona 1 skill axe por 1 barras.\nskilldistance = adiciona 1 skill distance por 1 barras.")

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nskillshielding = adiciona 1 skill shielding por 1 barras.\nmagiclevel = adiciona 1 magic level por 3 barras.\nmagiclevel5 = adiciona 5 magic level por 15 barras.\nskillclub10 = adiciona 10 skills club por 10 barras.\nskillsword10 = adiciona 10 skills sword por 10 barras.\nskillaxe10 = adiciona 10 skills axe por 10 barras.\nskilldistance10 = adiciona 10 skill distance por 10 barras.\nskillshielding10 = adiciona 10 skill shielding por 10 barras.\nremoverfrag = remove um frag por 2 barras.")

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nremoverredskull = remove red skull por 120 barras.\nremoverblackskull = remove black skull por 200 barras.\nnovark = gera uma nova RK para sua account por 10 barras.\n")

    return TRUE

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "sd") then

    if getPlayerItemCount(cid, 9971) >= 10 then

    local bag = doPlayerAddItem(cid, 5926, 1)

    doAddContainerItem(bag, 2268, 2000)

    local bag = doPlayerAddItem(cid, 5926, 1)

    doAddContainerItem(bag, 2268, 2000)

    doPlayerRemoveItem(cid, 9971, 10)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 4k de SD com sucesso.")

    setPlayerStorageValue(cid,11548,os.time()+30)

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "uh") then

    if getPlayerItemCount(cid, 9971) >= 10 then

    local bag = doPlayerAddItem(cid, 2002, 1)

    doAddContainerItem(bag, 2273, 2000)

    local bag = doPlayerAddItem(cid, 2002, 1)

    doAddContainerItem(bag, 2273, 2000)

    local bag = doPlayerAddItem(cid, 2002, 1)

    doAddContainerItem(bag, 2273, 2000)

    doPlayerRemoveItem(cid, 9971, 10)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 6k de UH com sucesso.")

    setPlayerStorageValue(cid,11548,os.time()+10)

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "explo") then

    if getPlayerItemCount(cid, 9971) >= 10 then

    local bag = doPlayerAddItem(cid, 2001, 1)

    doAddContainerItem(bag, 2313, 2000)

    local bag = doPlayerAddItem(cid, 2001, 1)

    doAddContainerItem(bag, 2313, 2000)

    local bag = doPlayerAddItem(cid, 2001, 1)

    doAddContainerItem(bag, 2313, 2000)

    doPlayerRemoveItem(cid, 9971, 10)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 6k de Explosion com sucesso.")

    setPlayerStorageValue(cid,11548,os.time()+30)

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "vip10") then

    if getPlayerItemCount(cid, 9971) >= 5 then

    doPlayerAddPremiumDays(cid, 10)

    doPlayerRemoveItem(cid, 9971, 5)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 10 dias de vip com sucesso.")

    setPlayerStorageValue(cid,11548,os.time()+30)

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "vip30") then

    if getPlayerItemCount(cid, 9971) >= 10 then

    doPlayerAddPremiumDays(cid, 30)

    doPlayerRemoveItem(cid, 9971, 10)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 30 dias de vip com sucesso.")

    setPlayerStorageValue(cid,11548,os.time()+30)

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "divine staff") then

    if getPlayerItemCount(cid, 9971) >= 30 then

    local bag = doPlayerAddItem(cid, 1997, 1)

    local new_item = doAddContainerItem(bag, 6534, 1)

    doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: ".. getPlayerGUID(cid) ..".")

    doPlayerRemoveItem(cid, 9971, 30)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um divine staff com sucesso.")

    setPlayerStorageValue(cid,11548,os.time()+30)

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "divine axe") then

    if getPlayerItemCount(cid, 9971) >= 30 then

    local bag = doPlayerAddItem(cid, 1997, 1)

    local new_item = doAddContainerItem(bag, 7453, 1)

    doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: ".. getPlayerGUID(cid) ..".")

    doPlayerRemoveItem(cid, 9971, 30)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um divine axe com sucesso.")

    setPlayerStorageValue(cid,11548,os.time()+30)

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "divine club") then

    if getPlayerItemCount(cid, 9971) >= 30 then

    local bag = doPlayerAddItem(cid, 1997, 1)

    local new_item = doAddContainerItem(bag, 7392, 1)

    doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: ".. getPlayerGUID(cid) ..".")

    doPlayerRemoveItem(cid, 9971, 30)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um divine club com sucesso.")

    setPlayerStorageValue(cid,11548,os.time()+30)

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "divine sword") then

    if getPlayerItemCount(cid, 9971) >= 30 then

    local bag = doPlayerAddItem(cid, 1997, 1)

    local new_item = doAddContainerItem(bag, 7418, 1)

    doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: ".. getPlayerGUID(cid) ..".")

    doPlayerRemoveItem(cid, 9971, 30)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um divine sword com sucesso.")

    setPlayerStorageValue(cid,11548,os.time()+30)

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "divine crossbow") then

    if getPlayerItemCount(cid, 9971) >= 30 then

    local bag = doPlayerAddItem(cid, 1997, 1)

    local new_item = doAddContainerItem(bag, 8853, 1)

    doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: ".. getPlayerGUID(cid) ..".")

    doPlayerRemoveItem(cid, 9971, 30)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um divine crossbow com sucesso.")

    setPlayerStorageValue(cid,11548,os.time()+30)

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "livro nivel 5") then

    if getPlayerItemCount(cid, 9971) >= 30 then

    local bag = doPlayerAddItem(cid, 1997, 1)

    local new_item = doAddContainerItem(bag, 8904, 1)

    doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: ".. getPlayerGUID(cid) ..".")

    doPlayerRemoveItem(cid, 9971, 30)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um livro nível 5 com sucesso.")

    setPlayerStorageValue(cid,11548,os.time()+30)

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "super divine staff") then

    if getPlayerItemCount(cid, 9971) >= 60 then

    local bag = doPlayerAddItem(cid, 1997, 1)

    local new_item = doAddContainerItem(bag, 8922, 1)

    doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: ".. getPlayerGUID(cid) ..".")

    doPlayerRemoveItem(cid, 9971, 60)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine staff com sucesso.")

    setPlayerStorageValue(cid,11548,os.time()+30)

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "super divine axe") then

    if getPlayerItemCount(cid, 9971) >= 60 then

    local bag = doPlayerAddItem(cid, 1997, 1)

    local new_item = doAddContainerItem(bag, 8926, 1)

    doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: ".. getPlayerGUID(cid) ..".")

    doPlayerRemoveItem(cid, 9971, 60)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine axe com sucesso.")

    setPlayerStorageValue(cid,11548,os.time()+30)

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "super divine club") then

    if getPlayerItemCount(cid, 9971) >= 60 then

    local bag = doPlayerAddItem(cid, 1997, 1)

    local new_item = doAddContainerItem(bag, 7423, 1)

    doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: ".. getPlayerGUID(cid) ..".")

    doPlayerRemoveItem(cid, 9971, 60)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine club com sucesso.")

    setPlayerStorageValue(cid,11548,os.time()+30)

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "super divine sword") then

    if getPlayerItemCount(cid, 9971) >= 60 then

    local bag = doPlayerAddItem(cid, 1997, 1)

    local new_item = doAddContainerItem(bag, 7403, 1)

    doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: ".. getPlayerGUID(cid) ..".")

    doPlayerRemoveItem(cid, 9971, 60)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine sword com sucesso.")

    setPlayerStorageValue(cid,11548,os.time()+30)

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "super divine crossbow") then

    if getPlayerItemCount(cid, 9971) >= 60 then

    local bag = doPlayerAddItem(cid, 1997, 1)

    local new_item = doAddContainerItem(bag, 8851, 1)

    doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: ".. getPlayerGUID(cid) ..".")

    doPlayerRemoveItem(cid, 9971, 60)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine crossbow com sucesso.")

    setPlayerStorageValue(cid,11548,os.time()+30)

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "livro nivel 6") then

    if getPlayerItemCount(cid, 9971) >= 60 then

    local bag = doPlayerAddItem(cid, 1997, 1)

    local new_item = doAddContainerItem(bag, 8921, 1)

    doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: ".. getPlayerGUID(cid) ..".")

    doPlayerRemoveItem(cid, 9971, 60)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um livro nível 6 com sucesso.")

    setPlayerStorageValue(cid,11548,os.time()+30)

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "magiclevel") then

    if getPlayerMagLevel(cid) >= 200 then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter magic level acima de 200.")

    return TRUE

    end

    if(not isSorcerer(cid) and not isDruid(cid) and not isInfernalist(cid)) then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Sorcerers, Druids e Infernalists podem comprar magic level.")

    return TRUE

    end

    if getPlayerItemCount(cid, 9971) >= 3 then

    local pid = getPlayerGUID(cid)

    doPlayerRemoveItem(cid, 9971, 3)

    setPlayerStorageValue(cid,11548,os.time()+0)

    doRemoveCreature(cid)

    db.executeQuery("UPDATE `players` SET `maglevel` = `maglevel` + 1 WHERE `id` = "..pid)

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "skillclub") then

    if getPlayerSkillLevel(cid, SKILL_CLUB) >= 350 then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")

    return TRUE

    end

    if not isDrunou(cid) then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Drunous podem comprar skill de club.")

    return TRUE

    end

    if getPlayerItemCount(cid, 9971) >= 1 then

    local pid = getPlayerGUID(cid)

    local club = getPlayerSkillLevel(cid, SKILL_CLUB)

    doPlayerRemoveItem(cid, 9971, 1)

    setPlayerStorageValue(cid,11548,os.time()+0)

    doRemoveCreature(cid)

    db.executeQuery("UPDATE `player_skills` SET `value` = " .. (club + 1) .. ", `count` = 0 WHERE `skillid` = 1 and `player_id` = " .. pid .. ";")

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "skillsword") then

    if getPlayerSkillLevel(cid, SKILL_SWORD) >= 350 then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")

    return TRUE

    end

    if not isKnight(cid) then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de sword.")

    return TRUE

    end

    if getPlayerItemCount(cid, 9971) >= 1 then

    local pid = getPlayerGUID(cid)

    local sword = getPlayerSkillLevel(cid, SKILL_SWORD)

    doPlayerRemoveItem(cid, 9971, 1)

    setPlayerStorageValue(cid,11548,os.time()+0)

    doRemoveCreature(cid)

    db.executeQuery("UPDATE `player_skills` SET `value` = " .. (sword + 1) .. ", `count` = 0 WHERE `skillid` = 2 and `player_id` = " .. pid .. ";")

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "skillaxe") then

    if getPlayerSkillLevel(cid, SKILL_AXE) >= 350 then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")

    return TRUE

    end

    if not isKnight(cid) then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de axe.")

    return TRUE

    end

    if getPlayerItemCount(cid, 9971) >= 1 then

    local pid = getPlayerGUID(cid)

    local axe = getPlayerSkillLevel(cid, SKILL_AXE)

    doPlayerRemoveItem(cid, 9971, 1)

    setPlayerStorageValue(cid,11548,os.time()+0)

    doRemoveCreature(cid)

    db.executeQuery("UPDATE `player_skills` SET `value` = " .. (axe + 1) .. ", `count` = 0 WHERE `skillid` = 3 and `player_id` = " .. pid .. ";")

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "skilldistance") then

    if getPlayerSkillLevel(cid, SKILL_DISTANCE) >= 350 then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")

    return TRUE

    end

    if not isPaladin(cid) then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins podem comprar skill de distance.")

    return TRUE

    end

    if getPlayerItemCount(cid, 9971) >= 1 then

    local pid = getPlayerGUID(cid)

    local distance = getPlayerSkillLevel(cid, SKILL_DISTANCE)

    doPlayerRemoveItem(cid, 9971, 1)

    setPlayerStorageValue(cid,11548,os.time()+0)

    doRemoveCreature(cid)

    db.executeQuery("UPDATE `player_skills` SET `value` = " .. (distance + 1) .. ", `count` = 0 WHERE `skillid` = 4 and `player_id` = " .. pid .. ";")

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "skillshielding") then

    if getPlayerSkillLevel(cid, SKILL_SHIELD) >= 350 then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")

    return TRUE

    end

    if(not isPaladin(cid) and not isKnight(cid) and not isDrunou(cid)) then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins, Knights e Drunous podem comprar skill de shield.")

    return TRUE

    end

    if getPlayerItemCount(cid, 9971) >= 1 then

    local pid = getPlayerGUID(cid)

    local shield = getPlayerSkillLevel(cid, SKILL_SHIELD)

    doPlayerRemoveItem(cid, 9971, 1)

    setPlayerStorageValue(cid,11548,os.time()+0)

    doRemoveCreature(cid)

    db.executeQuery("UPDATE `player_skills` SET `value` = " .. (shield + 1) .. ", `count` = 0 WHERE `skillid` = 5 and `player_id` = " .. pid .. ";")

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "magiclevel5") then

    if getPlayerMagLevel(cid) >= 196 then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter magic level acima de 200.")

    return TRUE

    end

    if(not isSorcerer(cid) and not isDruid(cid) and not isInfernalist(cid)) then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Sorcerers, Druids e Infernalists podem comprar magic level.")

    return TRUE

    end

    if getPlayerItemCount(cid, 9971) >= 15 then

    local pid = getPlayerGUID(cid)

    doPlayerRemoveItem(cid, 9971, 15)

    setPlayerStorageValue(cid,11548,os.time()+0)

    doRemoveCreature(cid)

    db.executeQuery("UPDATE `players` SET `maglevel` = `maglevel` + 5 WHERE `id` = "..pid)

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "skillclub10") then

    if getPlayerSkillLevel(cid, SKILL_CLUB) >= 341 then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")

    return TRUE

    end

    if not isDrunou(cid) then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Drunous podem comprar skill de club.")

    return TRUE

    end

    if getPlayerItemCount(cid, 9971) >= 10 then

    local pid = getPlayerGUID(cid)

    local club = getPlayerSkillLevel(cid, SKILL_CLUB)

    doPlayerRemoveItem(cid, 9971, 10)

    setPlayerStorageValue(cid,11548,os.time()+0)

    doRemoveCreature(cid)

    db.executeQuery("UPDATE `player_skills` SET `value` = " .. (club + 10) .. ", `count` = 0 WHERE `skillid` = 1 and `player_id` = " .. pid .. ";")

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "skillsword10") then

    if getPlayerSkillLevel(cid, SKILL_SWORD) >= 341 then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")

    return TRUE

    end

    if not isKnight(cid) then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de sword.")

    return TRUE

    end

    if getPlayerItemCount(cid, 9971) >= 10 then

    local pid = getPlayerGUID(cid)

    local sword = getPlayerSkillLevel(cid, SKILL_SWORD)

    doPlayerRemoveItem(cid, 9971, 10)

    setPlayerStorageValue(cid,11548,os.time()+0)

    doRemoveCreature(cid)

    db.executeQuery("UPDATE `player_skills` SET `value` = " .. (sword + 10) .. ", `count` = 0 WHERE `skillid` = 2 and `player_id` = " .. pid .. ";")

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "skillaxe10") then

    if getPlayerSkillLevel(cid, SKILL_AXE) >= 341 then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")

    return TRUE

    end

    if not isKnight(cid) then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de axe.")

    return TRUE

    end

    if getPlayerItemCount(cid, 9971) >= 10 then

    local pid = getPlayerGUID(cid)

    local axe = getPlayerSkillLevel(cid, SKILL_AXE)

    doPlayerRemoveItem(cid, 9971, 10)

    setPlayerStorageValue(cid,11548,os.time()+0)

    doRemoveCreature(cid)

    db.executeQuery("UPDATE `player_skills` SET `value` = " .. (axe + 10) .. ", `count` = 0 WHERE `skillid` = 3 and `player_id` = " .. pid .. ";")

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "skilldistance10") then

    if getPlayerSkillLevel(cid, SKILL_DISTANCE) >= 341 then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")

    return TRUE

    end

    if not isPaladin(cid) then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins podem comprar skill de distance.")

    return TRUE

    end

    if getPlayerItemCount(cid, 9971) >= 10 then

    local pid = getPlayerGUID(cid)

    local distance = getPlayerSkillLevel(cid, SKILL_DISTANCE)

    doPlayerRemoveItem(cid, 9971, 10)

    setPlayerStorageValue(cid,11548,os.time()+0)

    doRemoveCreature(cid)

    db.executeQuery("UPDATE `player_skills` SET `value` = " .. (distance + 10) .. ", `count` = 0 WHERE `skillid` = 4 and `player_id` = " .. pid .. ";")

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "skillshielding10") then

    if getPlayerSkillLevel(cid, SKILL_SHIELD) >= 341 then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")

    return TRUE

    end

    if(not isPaladin(cid) and not isKnight(cid) and not isDrunou(cid)) then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins, Knights e Drunous podem comprar skill de shield.")

    return TRUE

    end

    if getPlayerItemCount(cid, 9971) >= 10 then

    local pid = getPlayerGUID(cid)

    local shield = getPlayerSkillLevel(cid, SKILL_SHIELD)

    doPlayerRemoveItem(cid, 9971, 10)

    setPlayerStorageValue(cid,11548,os.time()+0)

    doRemoveCreature(cid)

    db.executeQuery("UPDATE `player_skills` SET `value` = " .. (shield + 10) .. ", `count` = 0 WHERE `skillid` = 5 and `player_id` = " .. pid .. ";")

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "removerfrag") then

    if getPlayerItemCount(cid, 9971) >= 2 then

    doPlayerRemoveItem(cid, 9971, 2)

    db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `unjustified` = 1 AND `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ") LIMIT 1;")

    setPlayerStorageValue(cid,11548,os.time()+30)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você removeu seus frags com sucesso.")

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "removerredskull") then

    if (getCreatureSkullType(cid) == SKULL_RED) == FALSE then

    doPlayerSendTextMessage(cid,27,"Você não está Red Skull para utilizar este comando.")

    return TRUE

    end

    if getPlayerItemCount(cid, 9971) >= 5 then

    doPlayerRemoveItem(cid, 9971, 5)

    db.executeQuery("UPDATE `players` SET `skulltime`=0 WHERE `id` = "..getPlayerGUID(cid))

    local skullEnd = getPlayerSkullEnd(cid)

    doPlayerSetSkullEnd(cid, skullEnd, SKULL_NONE)

    setPlayerStorageValue(cid,11548,os.time()+30)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você removeu sua Red Skull com sucesso.")

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "removerblackskull") then

    if (getCreatureSkullType(cid) == SKULL_BLACK) == FALSE then

    doPlayerSendTextMessage(cid,27,"Você não está Black Skull para utilizar este comando.")

    return TRUE

    end

    if getPlayerItemCount(cid, 9971) >= 10 then

    doPlayerRemoveItem(cid, 9971, 10)

    db.executeQuery("UPDATE `players` SET `skulltime`=0 WHERE `id` = "..getPlayerGUID(cid))

    local skullEnd = getPlayerSkullEnd(cid)

    doPlayerSetSkullEnd(cid, skullEnd, SKULL_NONE)

    setPlayerStorageValue(cid,11548,os.time()+30)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você removeu sua Black Skull com sucesso.")

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    return TRUE

    end

    end

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    if(param == "novark") then

    if getPlayerItemCount(cid, 9971) >= 10 then

    setPlayerRecoveryKey(cid)

    doPlayerRemoveItem(cid, 9971, 10)

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "ATENÇÃO! Esta será a única vez que sua RK será mostrada, portanto, anote-a em um lugar seguro fora de seu computador!\n" .. setPlayerRecoveryKey(cid) .. "")

    setPlayerStorageValue(cid,11548,os.time()+30)

    return TRUE

    else

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")

    end

    end

    return TRUE

    end

     

     

     

     

    por favor esse script funcionava certinho na versão 8.6 mais já na versão 9.81 não funciona!

    +REP pra quem me ajudar!

     

     

    OBS: Primeira Vez que posto no Xtibia e não sei se esta na área correta se estiver em área errada por favor movam!

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...