Ir para conteúdo

bloder

Campones
  • Total de itens

    30
  • Registro em

  • Última visita

Histórico de Reputação

  1. Upvote
    bloder deu reputação a Demonbholder em Tibia Som V. 1.0 (Lua)   
    eu garanto que funciona.
     
    é possível usando as bibliotecas em c.
  2. Upvote
    bloder recebeu reputação de Khyz em [Pedido]Como Por Para Empilhar Automaticamente Itens Em Ot 8.60?   
    se vc tiver as sources do ot é só vc da uma olhada neste tópico Autostacking Items.
  3. Upvote
    bloder recebeu reputação de masquente em [Talkaction] Dúvida Sobre Números Aleatórios.   
    Voce tbm pode usar esta modificação do script !AFK:

    --[[ Talking Tp/signs/tiles for TFS 0.2+ 70%shawak,30%Damadgerz Idea by Damadgerz ]]-- local time = 5 -- 1 = 1 sec, 2 = 2 sec, ... local say_events = {} local function SayText(cid) if isPlayer(cid) == TRUE then if say_events[getPlayerGUID(cid)] ~= nil then if isPlayer(cid) == TRUE then local rand = math.random(1,250) doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"The random number is " .. rand .. "." ) end say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000 / 2, cid) end end return TRUE end function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end if param == "on" then if isPlayer(cid) == TRUE then doSendAnimatedText(getPlayerPosition(cid),"Started!", math.random(01,255)) end say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid) doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"You are now saying random numbers.") elseif param == "off" then stopEvent(say_events[getPlayerGUID(cid)]) say_events[getPlayerGUID(cid)] = nil doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"You stopped saying random numbers.") end return TRUE end

    <talkaction words="!number" hide="yes" event="script" value="script.lua"/>
    para ativar é só vc falar !number on e para desativar !number off
  4. Upvote
    bloder recebeu reputação de zani123 em Apagar Players Inativos Da Database (Sqlite). (Rep+)   
    Tente executar este script no seu sql:

    DELETE FROM `players` WHERE `level` < 50 AND `lastlogin` < UNIX_TIMESTAMP() - 30 * 24 * 60 * 60
    Ai vc configura o lvl minimo dos players inativos que ele ira deletar.
  5. Upvote
    bloder deu reputação a glauberpacheco em Pagseguro Automatico   
    Galera eu achei este post em outro forum ,acho que tem ele ripado aqui no xtibia.
    mas eu vou postar ele mesmo assim.
    Meu colega conseguiu fazer ele funcionar , mais o cara que posto no xtibia falo que vai tirar ele pq vai vender ele agora (obs: nem é de autoria dele)
    Dps que ele viu que eu ja tinha copiado o post ele flo que tava faltando arquivo , mais axo que nao ta nao , meu colega conseguiu fazer funfa de boa.
    tentem ai , pois eu vi ele em outros forum os cara vendendo por 120 pila
    aki ta de graça ^^
     
    OBS: se algum adm quizer que eu tire so avisa!
     
     
    ________________________________________________________________
    No Seu Htdocs va em Config/config.php e coloque isso no final:
     

    // Sistema automatico Pagseguro by tatu_hunter // Seu email cadastrado no pagseguro $config['pagseguro']['email'] = 'seu e-mail'; // Valor unitario do produto ou seja valor de cada ponto // Exemplo de valores // 100 = R$ 1,00 // 235 = R$ 2,35 // 4254 = R$ 42,54 $config['pagseguro']['produtoValor'] = '100'; // Token gerado no painel do pagseguro $config['pagseguro']['token'] = 'SEU TOKEN PAGSEGURO AQUI';
     
    Como ja havia dito no outro topico,crie um arquivo chamado retPagseguro.php
    Dentro adicione isso:

    <?php include('config-and-functions.php'); define('TOKEN', $config['pagseguro']['token']); // Incluindo o arquivo da biblioteca include('retorno.php'); // Função que captura os dados do retorno function retorno_automatico ( $VendedorEmail, $TransacaoID, $Referencia, $TipoFrete, $ValorFrete, $Anotacao, $DataTransacao, $TipoPagamento, $StatusTransacao, $CliNome, $CliEmail, $CliEndereco, $CliNumero, $CliComplemento, $CliBairro, $CliCidade, $CliEstado, $CliCEP, $CliTelefone, $produtos, $NumItens) { global $config; if(strtolower($StatusTransacao) == 'aprovado') { $account_logged = $ots->createObject('Account'); $account_logged->find($Referencia); if($account_logged->isLoaded()) { $pontos = $account_logged->getCustomField("premium_points"); $account_logged->setCustomField("premium_points", $pontos + $produtos[0]['ProdQuantidade']); $nome = $Referencia.'-'.date('d-m-Y',$_SERVER['REQUEST_TIME']).'.txt'; if(file_exists('logsPagseguro/'.$nome)) $nome = $Referencia.'-2-'.date('d-m-Y',$_SERVER['REQUEST_TIME']).'.txt'; $arquivo = fopen('logsPagseguro/'.$nome, "w+"); $dados = "Conta: ".$Referencia."\n"; $dados = "Email: ".$CliEmail."\n"; $dados .= "Total de Points: ".$produtos[0]['ProdQuantidade']."\n"; $dados .= "Hora da Transação: ". date('d-m-Y H:i:s', $_SERVER['REQUEST_TIME']).""; fwrite($arquivo, $dados); fclose($arquivo); } } } // A partir daqui, é só HTML: ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body> <h1>Pedido em processamento</h1> <p>Recebemos seu pedido e estamos aguardando pela confirmação do pagamento. Obrigado por comprar conosco.</p> </body> </html>
     
    Depois crie um arquivo chamado retorno.php e adicione o seguinte:
     

    <?php if (!defined('TOKEN')) define ('TOKEN', ''); /** * RetornoPagSeguro * * Classe de manipulação para o retorno do post do pagseguro * * @package PagSeguro */ class RetornoPagSeguro { /** * _preparaDados * * Prepara os dados vindos do post e converte-os para url, adicionando * o token do usuario quando necessario. * * @internal é usado pela {@see RetornoPAgSeguro::verifica} para gerar os, * dados que serão enviados pelo PagSeguro * * @access private * * @param array $post Array contendo os posts do pagseguro * @param bool $confirmacao Controlando a adicao do token no post * @return string */ function _preparaDados($post, $confirmacao=true) { if ('array' !== gettype($post)) $post=array(); if ($confirmacao) { $post['Comando'] = 'validar'; $post['Token'] = TOKEN; } $retorno=array(); foreach ($post as $key=>$value){ if('string'!==gettype($value)) $post[$key]=''; $value=urlencode(stripslashes($value)); $retorno[]="{$key}={$value}"; } return implode('&', $retorno); } /** * _tipoEnvio * * Checa qual será a conexao de acordo com a versao do PHP * preferencialmente em CURL ou via socket * * em CURL o retorno será: * <code> array ('curl','https://pagseguro.uol.com.br/Security/NPI/Default.aspx') </code> * já em socket o retorno será: * <code> array ('fsocket', '/Security/NPI/Default.aspx', $objeto-de-conexao) </code> * se não encontrar nenhum nem outro: * <code> array ('','') </code> * * @access private * @global string $_retPagSeguroErrNo Numero de erro do pagseguro * @global string $_retPagSeguroErrStr Texto descritivo do erro do pagseguro * @return array Array com as configurações * */ function _tipoEnvio() { //Prefira utilizar a função CURL do PHP //Leia mais sobre CURL em: http://us3.php.net/curl global $_retPagSeguroErrNo, $_retPagSeguroErrStr; if (function_exists('curl_exec')) return array('curl', 'https://pagseguro.uol.com.br/Security/NPI/Default.aspx'); elseif ((PHP_VERSION >= 4.3) && ($fp = @fsockopen('ssl://pagseguro.uol.com.br', 443, $_retPagSeguroErrNo, $_retPagSeguroErrStr, 30))) return array('fsocket', '/Security/NPI/Default.aspx', $fp); elseif ($fp = @fsockopen('pagseguro.uol.com.br', 80, $_retPagSeguroErrNo, $_retPagSeguroErrStr, 30)) return array('fsocket', '/Security/NPI/Default.aspx', $fp); return array ('', ''); } /** * not_null * * Extraido de OScommerce 2.2 com base no original do pagseguro, * Checa se o valor e nulo * * @access public * * @param mixed $value Variável a ser checada se é nula * @return bool */ function not_null($value) { if (is_array($value)) { if (sizeof($value) > 0) { return true; } else { return false; } } else { if (($value != '') && (strtolower($value) != 'null') && (strlen(trim($value)) > 0)) { return true; } else { return false; } } } /** * verifica * * Verifica o tipo de conexão aberta e envia os dados vindos * do post * * @access public * * @use RetornoPagSeguro::_tipoenvio() * @global string $_retPagSeguroErrNo Numero de erro do pagseguro * @global string $_retPagSeguroErrStr Texto descritivo do erro do pagseguro * @param array $post Array contendo os posts do pagseguro * @param bool $tipoEnvio (opcional) Verifica o tipo de envio do post * @return bool */ function verifica($post, $tipoEnvio=false) { global $_retPagSeguroErrNo, $_retPagSeguroErrStr; if ('array' !== gettype($tipoEnvio)) $tipoEnvio = RetornoPagSeguro::_tipoEnvio(); $spost=RetornoPagSeguro::_preparaDados($post); if (!in_array($tipoEnvio[0], array('curl', 'fsocket'))) return false; $confirma = false; if ($tipoEnvio[0] === 'curl') { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $tipoEnvio[1]); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $spost); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $resp = curl_exec($ch); if (!RetornoPagSeguro::not_null($resp)) { curl_setopt($ch, CURLOPT_URL, $tipoEnvio[1]); $resp = curl_exec($ch); } curl_close($ch); $confirma = (strcmp ($resp, 'VERIFICADO') == 0); } elseif ($tipoEnvio[0] === 'fsocket') { if (!$tipoEnvio[2]) { die ("{$_retPagSeguroErrStr} ($_retPagSeguroErrNo)"); } else { $cabecalho = "POST {$tipoEnvio[1]} HTTP/1.0\r\n"; $cabecalho .= "Content-Type: application/x-www-form-urlencoded\r\n"; $cabecalho .= "Content-Length: " . strlen($spost) . "\r\n\r\n"; $resp = ''; fwrite ($tipoEnvio[2], "{$cabecalho}{$spost}"); while (!feof($tipoEnvio[2])) { $resp = fgets ($tipoEnvio[2], 1024); if (strcmp ($resp, 'VERIFICADO') == 0) { $confirma = (strcmp ($resp, 'VERIFICADO') == 0); $confirma=true; break; } } fclose ($tipoEnvio[2]); } } if ($confirma && function_exists('retorno_automatico')) { $itens = array ( 'VendedorEmail', 'TransacaoID', 'Referencia', 'TipoFrete', 'ValorFrete', 'Anotacao', 'DataTransacao', 'TipoPagamento', 'StatusTransacao', 'CliNome', 'CliEmail', 'CliEndereco', 'CliNumero', 'CliComplemento', 'CliBairro', 'CliCidade', 'CliEstado', 'CliCEP', 'CliTelefone', 'NumItens', ); foreach ($itens as $item) { if (!isset($post[$item])) $post[$item] = ''; if ($item=='ValorFrete') $post[$item] = str_replace(',', '.', $post[$item]); } $produtos = array (); for ($i=1;isset($post["ProdID_{$i}"]);$i++) { $produtos[] = array ( 'ProdID' => $post["ProdID_{$i}"], 'ProdDescricao' => $post["ProdDescricao_{$i}"], 'ProdValor' => (double) (str_replace(',', '.', $post["ProdValor_{$i}"])), 'ProdQuantidade' => $post["ProdQuantidade_{$i}"], 'ProdFrete' => (double) (str_replace(',', '.', $post["ProdFrete_{$i}"])), 'ProdExtras' => (double) (str_replace(',', '.', $post["ProdExtras_{$i}"])), ); } retorno_automatico ( $post['VendedorEmail'], $post['TransacaoID'], $post['Referencia'], $post['TipoFrete'], $post['ValorFrete'], $post['Anotacao'], $post['DataTransacao'], $post['TipoPagamento'], $post['StatusTransacao'], $post['CliNome'], $post['CliEmail'], $post['CliEndereco'], $post['CliNumero'], $post['CliComplemento'], $post['CliBairro'], $post['CliCidade'], $post['CliEstado'], $post['CliCEP'], $post['CliTelefone'], $produtos, $post['NumItens'] ); } return $confirma; } } if ($_POST) { RetornoPagSeguro::verifica($_POST); die(); } ?>
     
    No seu buypoints.php,basta colocar isso:
     

    <?php if(!$logged) if($action == "logout") $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Logout Successful</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>You have logged out of your '.$config['server']['serverName'].' account. In order to view your account you need to <a href="?subtopic=accountmanagement" >log in</a> again.</td></tr> </table> </div> </table></div></td></tr>'; else $main_content .= 'Please enter your account name and your password.<br/><a href="?subtopic=createaccount" >Create an account</a> if you do not have one yet.<br/><br/><form action="?subtopic=accountmanagement" method="post" ><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Account Login</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >Account Name:</span></td><td style="width:100%;" ><input type="password" name="account_login" SIZE="10" maxlength="10" ></td></tr><tr><td class="LabelV" ><span >Password:</span></td><td><input type="password" name="password_login" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table width="100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><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></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=lostaccount" method="post" ><tr><td style="border:0px;" ><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="Account lost?" alt="Account lost?" src="'.$layout_name.'/images/buttons/_sbutton_accountlost.gif" ></div></div></td></tr></form></table></td></tr></table>'; else { $main_content .= ' <form target="pagseguro" method="post" action="https://pagseguro.uol.com.br/checkout/checkout.jhtml"> <input type="hidden" name="email_cobranca" value="'. $config['pagseguro']['email']. '"> <input type="hidden" name="tipo" value="CP"> <input type="hidden" name="moeda" value="BRL"> <input type="hidden" name="item_id_1" value="1"> <input type="hidden" name="item_descr_1" value="Pontos na account de nome: '.$account_logged->getCustomField("name").'"> <input type="hidden" name="item_valor_1" value="'. $config['pagseguro']['produtoValor'] .'"> <input type="hidden" name="item_frete_1" value="0"> <input type="hidden" name="item_peso_1" value="0"> <input type="hidden" name="ref_transacao" value="'.$account_logged->getCustomField("name").'"> <table border="0" cellpadding="4" cellspacing="1" width="100%" id="#estilo"><tbody> <tr bgcolor="#505050" class="white"> <th colspan="2"><strong>Escolha a quantidade de pontos que deseja comprar</strong></th> </tr> <tr> <td width="10%">Sua conta</td> <td><strong>'.$account_logged->getCustomField("name").'</strong></td> </tr> <tr> <td width="10%">Pontos</td> <td> <input name="item_quant_1" type="text" value="1" size="5" maxlength="5"> </td> </tr> <tr> <td colspan="2"> <input type="image" src="https://p.simg.uol.com.br/out/pagseguro/i/botoes/carrinhoproprio/btnFinalizar.jpg" name="submit" alt="Pague com PagSeguro - é rápido, grátis e seguro!" /> </td> </tr> </tbody></table></form>'; } ?>
     
     
    Para finalizar: Adicione no seu phpmyadmin,na parte SQL,a seguinte database:
     

    CREATE TABLE `retorno_automatico` ( `TransacaoID` varchar(36) NOT NULL, `VendedorEmail` varchar(200) NOT NULL, `Referencia` varchar(200) default NULL, `TipoFrete` char(2) default NULL, `ValorFrete` decimal(10,2) default NULL, `Extras` decimal(10,2) default NULL, `Anotacao` text, `TipoPagamento` varchar(50) NOT NULL, `StatusTransacao` varchar(50) NOT NULL, `CliNome` varchar(200) NOT NULL, `CliEmail` varchar(200) NOT NULL, `CliEndereco` varchar(200) NOT NULL, `CliNumero` varchar(10) default NULL, `CliComplemento` varchar(100) default NULL, `CliBairro` varchar(100) NOT NULL, `CliCidade` varchar(100) NOT NULL, `CliEstado` char(2) NOT NULL, `CliCEP` varchar(9) NOT NULL, `CliTelefone` varchar(14) default NULL, `NumItens` int(11) NOT NULL, `Data` datetime NOT NULL, `status` tinyint(1) unsigned NOT NULL default '0', UNIQUE KEY `TransacaoID` (`TransacaoID`,`StatusTransacao`), KEY `Referencia` (`Referencia`), KEY `status` (`status`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
     
    E essa outra aqui :
     

    CREATE TABLE `PagSeguroTransacoes` ( `TransacaoID` varchar(36) NOT NULL, `VendedorEmail` varchar(200) NOT NULL, `Referencia` varchar(200) default NULL, `TipoFrete` char(2) default NULL, `ValorFrete` decimal(10,2) default NULL, `Extras` decimal(10,2) default NULL, `Anotacao` text, `TipoPagamento` varchar(50) NOT NULL, `StatusTransacao` varchar(50) NOT NULL, `CliNome` varchar(200) NOT NULL, `CliEmail` varchar(200) NOT NULL, `CliEndereco` varchar(200) NOT NULL, `CliNumero` varchar(10) default NULL, `CliComplemento` varchar(100) default NULL, `CliBairro` varchar(100) NOT NULL, `CliCidade` varchar(100) NOT NULL, `CliEstado` char(2) NOT NULL, `CliCEP` varchar(9) NOT NULL, `CliTelefone` varchar(14) default NULL, `NumItens` int(11) NOT NULL, `Data` datetime NOT NULL, `status` tinyint(1) unsigned NOT NULL default '0', UNIQUE KEY `TransacaoID` (`TransacaoID`,`StatusTransacao`), KEY `Referencia` (`Referencia`), KEY `status` (`status`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
     
     
    Rep ++ ai plx
    :button_ok:
  6. Upvote
    bloder deu reputação a luisfe23 em Pintando Carro   
    Eae Éks Tibianos, aprendi um tuto na net bem legal pra pintar a lataria do carro, vamos começar o tuto !
     
    1 - Abra a foto de seu carro:
     

     
    2 - Crie um camada em cima da camada do carro.
     
    3 - Pinte com a cor desejada por cima da lataria:
     

     
    4- Agora mude o modo dessa camada para Hue:
     

     
    5- Está pronto a pintura:
     

     
    Aprendi o tuto com Marco Eiji.
  7. Upvote
    bloder recebeu reputação de SkyDangerous em [Encerrado] [Ajuda] Items E Dateditor   
    Sim,é possivel no outifit voce não precisa fazer nada dps que adicionar,mais os items ai vc teria que mecher no items.otb do seu ot,para adicionar vai em file>new>ai vc escolhe monster para outifit,item para item(obvio).
  8. Upvote
    bloder recebeu reputação de wiliananjo em Sistema De Cassanique   
    Bom,esse é o primeiro Script que eu faço e posto aki no :XTibia_smile: ,então espero que gostem.
    O Script funciona assim: o player pucha a alavanca e então aleatóriamente é criado 3 items,se os items forem iguais o player ganha um premio!
     
    Então vamos ao que interesssa.Primeiramente,abra o mapa do seu ot e faça uma area mais ou menos como essa da imagem abaixo:

    Depois,vá em data/actions/scripts e crie um arquivo chamado cassino.lua
    e cole isto dentro:
     

    -- Cassino System by LucasHere function onUse(cid, item, frompos, item2, topos) pos1 = {x=989, y=1013, z=7, stackpos=1} --posição que vai cria os items pos2 = {x=990, y=1013, z=7, stackpos=1} pos3 = {x=991, y=1013, z=7, stackpos=1} local config = { moneyneed = 100 -- dinheiro para jogar } local premio = 2148 -- id do premio local premio_cont = 200 -- quantidade do premio que vai ganhar function additem(cid,premio,premio_cont) doPlayerAddItem(cid, premio,premio_cont) end if item.itemid == 1945 and getPlayerMoney(cid) < config.moneyneed then doPlayerSendCancel(cid,"Desculpe,voce não grana suficiente para jogar!") return FALSE end if item.itemid == 1945 and math.random(0, 8) == 1 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) doCreateItem(6556,1,pos1) addEvent(doCreateItem, 1000, 6556, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) addEvent(additem,2000,cid,premio,premio_cont) return true elseif item.itemid == 1945 and math.random(0, 8) == 2 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) doCreateItem(6557,1,pos1) addEvent(doCreateItem, 1000, 6557, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) return true elseif item.itemid == 1945 and math.random(0, 8) == 3 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) doCreateItem(6557,1,pos1) addEvent(doCreateItem, 1000, 6557, 1, pos2) addEvent(doCreateItem, 2000, 6557, 1, pos3) addEvent(additem,2000,cid,premio,premio_cont) return true elseif item.itemid == 1945 and math.random(0, 8) == 4 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) addEvent(doCreateItem, 1000, 6556, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) doCreateItem(6557,1,pos1) return true elseif item.itemid == 1945 and math.random(0, 8) == 5 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) addEvent(doCreateItem, 1000, 6557, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) doCreateItem(6557,1,pos1) return true elseif item.itemid == 1945 and math.random(0, 8) == 6 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) addEvent(doCreateItem, 1000, 6556, 1, pos2) addEvent(doCreateItem, 2000, 6557, 1, pos3) doCreateItem(6557,1,pos1) return true elseif item.itemid == 1945 and math.random(0, 8) == 7 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) addEvent(doCreateItem, 1000, 6557, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) doCreateItem(6557,1,pos1) return true elseif item.itemid == 1945 and math.random(0, 8) == 8 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) addEvent(doCreateItem, 1000, 6556, 1, pos2) addEvent(doCreateItem, 2000, 6557, 1, pos3) doCreateItem(6556,1,pos1) return true end item0 = getThingfromPos(pos1) item1 = getThingfromPos(pos2) item2 = getThingfromPos(pos3) if item.itemid == 1946 then doTransformItem(item.uid,1945) if item0.itemid ~= 0 and item1.itemid ~= 0 and item2.itemid ~= 0 then doRemoveItem(item0.uid,1) doRemoveItem(item1.uid,1) doRemoveItem(item2.uid,1) end else doTransformItem(item.uid,1945) end return 1 end
    E em Actions.xml,Cole isto:

    <action actionid="XXXX" event="script" value="cassino.lua"/>
     
    XXXX = action id que vai ser usado para executar o script,não esqueça de colocar na alavanca do mapa.
    Espero que tenham gostado!
  9. Upvote
    bloder recebeu reputação de Strondast em System Fraqueza Elemento Pokemon Script Ajuda   
    acho que isso não precisa de script,isso é no próprio arquivo XML do monstro nessa parte:

    <elements> <element firePercent="100"/> ----100% de proteção contra fogo <element physicalPercent="25"/> ----25% de proteção contra ataque fisico <element earthpercent="20"/> ---20% de proteção contra earth <element energyPercent="20"/> <element deathPercent="20"/> <element icePercent="-25"/> <element holyPercent="-10"/> </elements>
    ai é só vc edita la.Caso vc não encontrar essa parte,é só vc adicionar no arquivo!
  10. Upvote
    bloder deu reputação a walefxavier em [Gesior Acc] Guild War System Com Escudos   
    Vou postar o tão famoso Guild War System Com Escudos.
     
    Vou começar pelo site :
     
    Vá em Xampp/Htdocs e crie e um arquivo chamado wars.php,dentro add isto:
     

    <?php $main_content = "<h1 align=\"center\">Guild Wars</h1> <script type=\"text/javascript\"><!-- function show_hide(flip) { var tmp = document.getElementById(flip); if(tmp) tmp.style.display = tmp.style.display == 'none' ? '' : 'none'; } --></script> <a onclick=\"show_hide('information'); return false;\" style=\"cursor: pointer;\"><h1><center>» Click to se the commands «<center></h1></a> <table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" id=\"information\" style=\"display: none;\";> <tr align=\"center\"><b>You must send this commands in GUILD CHAT.</tr> <tr style=\"background: #512e0b;\"><td align=\"center\" class=\"white\"><b>Command</b></td><td colspan=\"2\" align=\"center\" class=\"white\"><b>Description</b></td></tr> <tr style=\"background: #F1E0C6;\"><td><b>/war invite, guild name, fraglimit</b></td><td>Sends an invitation to start the war. Example: <font color=red><BR>/war invite, Chickens, 150<BR></font><B>(Invite a guild to war with 150 frags count.)</B></td></tr> <tr style=\"background: #D4C0A1;\"><td><b>/war invite, guild name, fraglimit, money</b></td><td>Send the invitation to start the war. Example: <font color=red><BR>/war invite, Chickens, 150, 10000</font><br><B> (Invite a guild to war with 150 frags count and payment of 10000 gold coins <- you need donate to guild to use it.)<B></td></tr> <tr style=\"background: #F1E0C6;\"><td><b>/war accept, guild name</b></td><td>Accepts the invitation to start a war. Example: <font color=red><BR>/war accept, Chickens</font><BR><B>(Accept the war against guild \"Chickens\".)</b></td></tr> <tr style=\"background: #D4C0A1;\"><td><b>/war reject, guild name</b></td><td>Rejects the invitation to start a war. Example: <font color=red><BR>/war reject, Chickens</font><BR><B>(Reject a invitation to war from Chickens.)</B></td></tr> <tr style=\"background: #F1E0C6;\"><td><b>/war cancel, guild name</b></td><td>Cancels the invitation. Example: <font color=red><BR>/war cancel, Chickens</font><br><b>(Cancel my guild invitation to war with Chickens.)</b></td></tr> <tr style=\"background: #D4C0A1;\"><td><b>/balance</b></td><td>See the guild balance - balance of money.</td></tr> <tr style=\"background: #F1E0C6;\"><td><b>/balance donate value</b></td><td>Deposits money on the guild's bank account. All players can donate. Example: <font color=red><BR>/balance donate 100000 </font><BR><B>(You will donate 100k to your guild balance.)</B></td></tr> <tr style=\"background: #D4C0A1;\"><td><b>/balance pick value</b></td><td>Withdraws money from the guild's bank account. Can be used only by the guild leader. Example: <font color=red><BR>/balance pick 100000 </font><BR><B>(You will withdraw 100k from your guild balance.)</B></td></tr> </table> <table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\"> <tr> <td style=\"background: #512e0b\" class=\"white\" width=\"150\"><b>Aggressor</b></td> <td style=\"background: #512e0b\" class=\"white\"><b>Information</b></td> <td style=\"background: #512e0b\" class=\"white\" width=\"150\"><b>Enemy</b></td> </tr><tr style=\"background: #F1E0C6;\">"; $count = 0; foreach($SQL->query('SELECT * FROM `guild_wars` WHERE `status` IN (1,4) OR ((`end` >= (UNIX_TIMESTAMP() - 604800) OR `end` = 0) AND `status` IN (0,5));') as $war) { $a = $ots->createObject('Guild'); $a->load($war['guild_id']); if(!$a->isLoaded()) continue; $e = $ots->createObject('Guild'); $e->load($war['enemy_id']); if(!$e->isLoaded()) continue; $alogo = $a->getCustomField('logo_gfx_name'); if(empty($alogo) || !file_exists('guilds/' . $alogo)) $alogo = 'default_logo.gif'; $elogo = $e->getCustomField('logo_gfx_name'); if(empty($elogo) || !file_exists('guilds/' . $elogo)) $elogo = 'default_logo.gif'; $count++; $main_content .= "<tr style=\"background: " . (is_int($count / 2) ? $config['site']['darkborder'] : $config['site']['lightborder']) . ";\"> <td align=\"center\"><a href=\"?subtopic=guilds&action=show&guild=".$a->getId()."\"><img src=\"guilds/".$alogo."\" width=\"64\" height=\"64\" border=\"0\"/><br />".$a->getName()."</a></td> <td align=\"center\">"; switch($war['status']) { case 0: { $main_content .= "<b>Pending acceptation</b><br />Invited on " . date("M d Y, H:i:s", $war['begin']) . " for " . ($war['end'] > 0 ? (($war['end'] - $war['begin']) / 86400) : "unspecified") . " days. The frag limit is set to " . $war['frags'] . " frags, " . ($war['payment'] > 0 ? "with payment of " . $war['payment'] . " bronze coins." : "without any payment.")."<br />Will expire in three days."; break; } case 3: { $main_content .= "<s>Canceled invitation</s><br />Sent invite on " . date("M d Y, H:i:s", $war['begin']) . ", canceled on " . date("M d Y, H:i:s", $war['end']) . "."; break; } case 2: { $main_content .= "Rejected invitation<br />Invited on " . date("M d Y, H:i:s", $war['begin']) . ", rejected on " . date("M d Y, H:i:s", $war['end']) . "."; break; } case 1: { $main_content .= "<font size=\"6\"><span style=\"color: red;\">" . $war['guild_kills'] . "</span> : <span style=\"color: lime;\">" . $war['enemy_kills'] . "</span></font><br /><br /><span style=\"color: darkred; font-weight: bold;\">On a brutal war</span><br />Began on " . date("M d Y, H:i:s", $war['begin']) . ($war['end'] > 0 ? ", will end up at " . date("M d Y, H:i:s", $war['end']) : "") . ".<br />The frag limit is set to " . $war['frags'] . " frags, " . ($war['payment'] > 0 ? "with payment of " . $war['payment'] . " bronze coins." : "without any payment."); break; } case 4: { $main_content .= "<font size=\"6\"><span style=\"color: red;\">" . $war['guild_kills'] . "</span> : <span style=\"color: lime;\">" . $war['enemy_kills'] . "</span></font><br /><br /><span style=\"color: darkred;\">Pending end</span><br />Began on " . date("M d Y, H:i:s", $war['begin']) . ", signed armstice on " . date("M d Y, H:i:s", $war['end']) . ".<br />Will expire after reaching " . $war['frags'] . " frags. ".($war['payment'] > 0 ? "The payment is set to " . $war['payment'] . " bronze coins." : "There's no payment set."); break; } case 5: { $main_content .= "<i>Ended</i><br />Began on " . date("M d Y, H:i:s", $war['begin']) . ", ended on " . date("M d Y, H:i:s", $war['end']) . ". Frag statistics: <span style=\"color: red;\">" . $war['guild_kills'] . "</span> to <span style=\"color: lime;\">" . $war['enemy_kills'] . "</span>."; break; } default: { $main_content .= "Unknown, please contact with gamemaster."; break; } } $main_content .= "<br /><br /><a onclick=\"show_hide('war-details:" . $war['id'] . "'); return false;\" style=\"cursor: pointer;\">» Details «</a></td> <td align=\"center\"><a href=\"?subtopic=guilds&action=show&guild=".$e->getId()."\"><img src=\"guilds/".$elogo."\" width=\"64\" height=\"64\" border=\"0\"/><br />".$e->getName()."</a></td> </tr> <tr id=\"war-details:" . $war['id'] . "\" style=\"display: none; background: " . (is_int($count / 2) ? $config['site']['darkborder'] : $config['site']['lightborder']) . ";\"> <td colspan=\"3\">"; if(in_array($war['status'], array(1,4,5))) { $deaths = $SQL->query('SELECT `pd`.`id`, `pd`.`date`, `gk`.`guild_id` AS `enemy`, `p`.`name`, `pd`.`level` FROM `guild_kills` gk LEFT JOIN `player_deaths` pd ON `gk`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `gk`.`war_id` = ' . $war['id'] . ' AND `p`.`deleted` = 0 ORDER BY `pd`.`date` DESC')->fetchAll(); if(!empty($deaths)) { foreach($deaths as $death) { $killers = $SQL->query('SELECT `p`.`name` AS `player_name`, `p`.`deleted` AS `player_exists`, `k`.`war` AS `is_war` FROM `killers` k LEFT JOIN `player_killers` pk ON `k`.`id` = `pk`.`kill_id` LEFT JOIN `players` p ON `p`.`id` = `pk`.`player_id` WHERE `k`.`death_id` = ' . $death['id'] . ' ORDER BY `k`.`final_hit` DESC, `k`.`id` ASC')->fetchAll(); $count = count($killers); $i = 0; $others = false; $main_content .= date("j M Y, H:i", $death['date']) . " <span style=\"font-weight: bold; color: " . ($death['enemy'] == $war['guild_id'] ? "red" : "lime") . ";\">+</span> <a href=\"index.php?subtopic=characters&name=" . urlencode($death['name']) . "\"><b>".$death['name']."</b></a> "; foreach($killers as $killer) { $i++; if($killer['is_war'] != 0) { if($i == 1) $main_content .= "killed at level <b>".$death['level']."</b> by "; else if($i == $count && $others == false) $main_content .= " and by "; else $main_content .= ", "; if($killer['player_exists'] == 0) $main_content .= "<a href=\"index.php?subtopic=characters&name=".urlencode($killer['player_name'])."\">"; $main_content .= $killer['player_name']; if($killer['player_exists'] == 0) $main_content .= "</a>"; } else $others = true; if($i == $count) { if($others == true) $main_content .= " and few others"; $main_content .= ".<br />"; } } } } else $main_content .= "<center>There were no frags on this war so far.</center>"; } else $main_content .= "<center>This war did not began yet.</center>"; $main_content .= "</td> </tr>"; } if($count == 0) $main_content .= "<tr style=\"background: ".$config['site']['darkborder'].";\"> <td colspan=\"3\">Currently there are no active wars.</td> </tr>"; $main_content .= "</table>"; $main_content .= '<div align="right"><small><b>Customized by: <a href="http://www.xtibia.com/forum/user/240289-walef-xavier">Walef Xavier</a></b></small></div><br />'; ?>
     
    Agora vá em Xampp/Htdocs/index.php e add o seguinte:
     

    case "wars"; $subtopic = "wars"; $topic = "Guild Wars"; include("wars.php"); break;
     
    Agora para finalizar a parte do site vá em Xampp/Htdocs/Layout/Tibiacom/layout.php e add o seguinte:
     

    <a href='?subtopic=wars'> <div id='submenu_wars' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'> <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div> <div id='ActiveSubmenuItemIcon_polls' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div> <div class='SubmenuitemLabel'><font color=red>Guild Wars</font></div> <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div> </div> </a>
     
    Agora vamos para seu Ot:
     
    Va em GlobalEvents/scripts/start.lua e add o seguinte:
     

    db.executeQuery("DELETE FROM `guild_wars` WHERE `status` = 0 AND `begin` < " .. (os.time() - 2 * 86400) .. ";") db.executeQuery("UPDATE `guild_wars` SET `status` = 5, `end` = " .. os.time() .. " WHERE `status` = 1 AND `end` > 0 AND `end` < " .. os.time() .. ";")
     
    Agora vá em Lib e crie um arquivo .lua chamado 101-war,dentro add o seguinte:
     

    WAR_GUILD = 0 WAR_ENEMY = 1
     
    Agora para finalizar vamos colocar os comandos em Talkactions !
     
    Vá em Talkactions/scripts e crie dois arquivos chamados war.lua e balance.lua,dentro add o seguinte:
     
    War.lua

    function onSay(cid, words, param, channel) local guild = getPlayerGuildId(cid) if(not guild or getPlayerGuildLevel(cid) < GUILDLEVEL_LEADER) then doPlayerSendChannelMessage(cid, "", "You cannot execute this talkaction.", TALKTYPE_CHANNEL_W, 0) return true end local t = string.explode(param, ",") if(not t[2]) then doPlayerSendChannelMessage(cid, "", "Not enough param(s).", TALKTYPE_CHANNEL_W, 0) return true end local enemy = getGuildId(t[2]) if(not enemy) then doPlayerSendChannelMessage(cid, "", "Guild \"" .. t[2] .. "\" does not exists.", TALKTYPE_CHANNEL_W, 0) return true end if(enemy == guild) then doPlayerSendChannelMessage(cid, "", "You cannot perform war action on your own guild.", TALKTYPE_CHANNEL_W, 0) return true end local enemyName, tmp = "", db.getResult("SELECT `name` FROM `guilds` WHERE `id` = " .. enemy) if(tmp:getID() ~= -1) then enemyName = tmp:getDataString("name") tmp:free() end if(isInArray({"accept", "reject", "cancel"}, t[1])) then local query = "`guild_id` = " .. enemy .. " AND `enemy_id` = " .. guild if(t[1] == "cancel") then query = "`guild_id` = " .. guild .. " AND `enemy_id` = " .. enemy end tmp = db.getResult("SELECT `id`, `begin`, `end`, `payment` FROM `guild_wars` WHERE " .. query .. " AND `status` = 0") if(tmp:getID() == -1) then doPlayerSendChannelMessage(cid, "", "Currently there's no pending invitation for a war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end if(t[1] == "accept") then local _tmp = db.getResult("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = _tmp:getID() < 0 or _tmp:getDataInt("balance") < tmp:getDataInt("payment") _tmp:free() if(state) then doPlayerSendChannelMessage(cid, "", "Your guild balance is too low to accept this invitation.", TALKTYPE_CHANNEL_W, 0) return true end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. tmp:getDataInt("payment") .. " WHERE `id` = " .. guild) end query = "UPDATE `guild_wars` SET " local msg = "accepted " .. enemyName .. " invitation to war." if(t[1] == "reject") then query = query .. "`end` = " .. os.time() .. ", `status` = 2" msg = "rejected " .. enemyName .. " invitation to war." elseif(t[1] == "cancel") then query = query .. "`end` = " .. os.time() .. ", `status` = 3" msg = "canceled invitation to a war with " .. enemyName .. "." else query = query .. "`begin` = " .. os.time() .. ", `end` = " .. (tmp:getDataInt("end") > 0 and (os.time() + ((tmp:getDataInt("begin") - tmp:getDataInt("end")) / 86400)) or 0) .. ", `status` = 1" end query = query .. " WHERE `id` = " .. tmp:getDataInt("id") if(t[1] == "accept") then doGuildAddEnemy(guild, enemy, tmp:getDataInt("id"), WAR_GUILD) doGuildAddEnemy(enemy, guild, tmp:getDataInt("id"), WAR_ENEMY) end tmp:free() db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has " .. msg, MESSAGE_EVENT_ADVANCE) return true end if(t[1] == "invite") then local str = "" tmp = db.getResult("SELECT `guild_id`, `status` FROM `guild_wars` WHERE `guild_id` IN (" .. guild .. "," .. enemy .. ") AND `enemy_id` IN (" .. enemy .. "," .. guild .. ") AND `status` IN (0, 1)") if(tmp:getID() ~= -1) then if(tmp:getDataInt("status") == 0) then if(tmp:getDataInt("guild_id") == guild) then str = "You have already invited " .. enemyName .. " to war." else str = enemyName .. " have already invited you to war." end else str = "You are already on a war with " .. enemyName .. "." end tmp:free() end if(str ~= "") then doPlayerSendChannelMessage(cid, "", str, TALKTYPE_CHANNEL_W, 0) return true end local frags = tonumber(t[3]) if(frags ~= nil) then frags = math.max(10, math.min(1000, frags)) else frags = 100 end local payment = tonumber(t[4]) if(payment ~= nil) then payment = math.max(100000, math.min(1000000000, payment)) tmp = db.getResult("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = tmp:getID() < 0 or tmp:getDataInt("balance") < payment tmp:free() if(state) then doPlayerSendChannelMessage(cid, "", "Your guild balance is too low for such payment.", TALKTYPE_CHANNEL_W, 0) return true end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. payment .. " WHERE `id` = " .. guild) else payment = 0 end local begining, ending = os.time(), tonumber(t[5]) if(ending ~= nil and ending ~= 0) then ending = begining + (ending * 86400) else ending = 0 end db.query("INSERT INTO `guild_wars` (`guild_id`, `enemy_id`, `begin`, `end`, `frags`, `payment`) VALUES (" .. guild .. ", " .. enemy .. ", " .. begining .. ", " .. ending .. ", " .. frags .. ", " .. payment .. ");") doBroadcastMessage(getPlayerGuildName(cid) .. " has invited " .. enemyName .. " to war till " .. frags .. " frags.", MESSAGE_EVENT_ADVANCE) return true end if(not isInArray({"end", "finish"}, t[1])) then return false end local status = (t[1] == "end" and 1 or 4) tmp = db.getResult("SELECT `id` FROM `guild_wars` WHERE `guild_id` = " .. guild .. " AND `enemy_id` = " .. enemy .. " AND `status` = " .. status) if(tmp:getID() ~= -1) then local query = "UPDATE `guild_wars` SET `end` = " .. os.time() .. ", `status` = 5 WHERE `id` = " .. tmp:getDataInt("id") tmp:free() doGuildRemoveEnemy(guild, enemy) doGuildRemoveEnemy(enemy, guild) db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has " .. (status == 4 and "mend fences" or "ended up a war") .. " with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return true end if(status == 4) then doPlayerSendChannelMessage(cid, "", "Currently there's no pending war truce from " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end tmp = db.getResult("SELECT `id`, `end` FROM `guild_wars` WHERE `guild_id` = " .. enemy .. " AND `enemy_id` = " .. guild .. " AND `status` = 1") if(tmp:getID() ~= -1) then if(tmp:getDataInt("end") > 0) then tmp:free() doPlayerSendChannelMessage(cid, "", "You cannot request ending for war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end local query = "UPDATE `guild_wars` SET `status` = 4, `end` = " .. os.time() .. " WHERE `id` = " .. tmp:getDataInt("id") tmp:free() db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has signed an armstice declaration on a war with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return true end doPlayerSendChannelMessage(cid, "", "Currently there's no active war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end
     
    balance.lua

    local function isValidMoney(value) if(value == nil) then return false end return (value > 0 and value <= 99999999999999) end function onSay(cid, words, param, channel) local guild = getPlayerGuildId(cid) if(guild == 0) then return false end local t = string.explode(param, ' ', 1) if(getPlayerGuildLevel(cid) == GUILDLEVEL_LEADER and isInArray({ 'pick' }, t[1])) then if(t[1] == 'pick') then local money = { tonumber(t[2]) } if(not isValidMoney(money[1])) then doPlayerSendChannelMessage(cid, '', 'Invalid amount of money specified.', TALKTYPE_CHANNEL_W, 0) return true end local result = db.getResult('SELECT `balance` FROM `guilds` WHERE `id` = ' .. guild) if(result:getID() == -1) then return false end money[2] = result:getDataLong('balance') result:free() if(money[1] > money[2]) then doPlayerSendChannelMessage(cid, '', 'The balance is too low for such amount.', TALKTYPE_CHANNEL_W, 0) return true end if(not db.query('UPDATE `guilds` SET `balance` = `balance` - ' .. money[1] .. ' WHERE `id` = ' .. guild .. ' LIMIT 1;')) then return false end doPlayerAddMoney(cid, money[1]) doPlayerSendChannelMessage(cid, '', 'You have just picked ' .. money[1] .. ' money from your guild balance.', TALKTYPE_CHANNEL_W, 0) else doPlayerSendChannelMessage(cid, '', 'Invalid sub-command.', TALKTYPE_CHANNEL_W, 0) end elseif(t[1] == 'donate') then local money = tonumber(t[2]) if(not isValidMoney(money)) then doPlayerSendChannelMessage(cid, '', 'Invalid amount of money specified.', TALKTYPE_CHANNEL_W, 0) return true end if(getPlayerMoney(cid) < money) then doPlayerSendChannelMessage(cid, '', 'You don\'t have enough money.', TALKTYPE_CHANNEL_W, 0) return true end if(not doPlayerRemoveMoney(cid, money)) then return false end db.query('UPDATE `guilds` SET `balance` = `balance` + ' .. money .. ' WHERE `id` = ' .. guild .. ' LIMIT 1;') doPlayerSendChannelMessage(cid, '', 'You have transfered ' .. money .. ' money to your guild balance.', TALKTYPE_CHANNEL_W, 0) else local result = db.getResult('SELECT `name`, `balance` FROM `guilds` WHERE `id` = ' .. guild) if(result:getID() == -1) then return false end doPlayerSendChannelMessage(cid, '', 'Current balance of guild ' .. result:getDataString('name') .. ' is: ' .. result:getDataLong('balance') .. ' bronze coins.', TALKTYPE_CHANNEL_W, 0) result:free() end return true end
     
    Agora vá em Talkactions/talkactions.xml e add as duas tags:
     

    <talkaction words="/war" channel="0" event="script" value="war.lua" desc="(Guild channel command) War management."/> <talkaction words="/balance" channel="0" event="script" value="balance.lua" desc="(Guild channel command) Balance management."/>
     
    Pronto,seu Guild War Systema está instalado...mas para funcionar necessitará das tabelas na sua database e do Tfs 0.4 .Vou posta-los abaixo,respectivamente.
     
    . Tabelas .
     
    Para quem ainda não sabe add tabelas a sua database,vou ensinar:
     
    Acesse seu phpmyadmin,digite sua senha (caso tenha),clique no nome da sua database a esquerda,assim que carregar a sua database clique em SQL lá em cima...Aparecerá um espaço em branco lá voce irá add as seguintes tabelas...e depois clicar em Executar.
     

    CREATE TABLE IF NOT EXISTS `guild_wars` ( `id` INT NOT NULL AUTO_INCREMENT, `guild_id` INT NOT NULL, `enemy_id` INT NOT NULL, `begin` BIGINT NOT NULL DEFAULT '0', `end` BIGINT NOT NULL DEFAULT '0', `frags` INT UNSIGNED NOT NULL DEFAULT '0', `payment` BIGINT UNSIGNED NOT NULL DEFAULT '0', `guild_kills` INT UNSIGNED NOT NULL DEFAULT '0', `enemy_kills` INT UNSIGNED NOT NULL DEFAULT '0', `status` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `status` (`status`), KEY `guild_id` (`guild_id`), KEY `enemy_id` (`enemy_id`) ) ENGINE=InnoDB;
     

    ALTER TABLE `guild_wars` ADD CONSTRAINT `guild_wars_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `guild_wars_ibfk_2` FOREIGN KEY (`enemy_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;
     

    ALTER TABLE `guilds` ADD `balance` BIGINT UNSIGNED NOT NULL AFTER `motd`;
     

    CREATE TABLE IF NOT EXISTS `guild_kills` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `guild_id` INT NOT NULL, `war_id` INT NOT NULL, `death_id` INT NOT NULL ) ENGINE = InnoDB;
     

    ALTER TABLE `guild_kills` ADD CONSTRAINT `guild_kills_ibfk_1` FOREIGN KEY (`war_id`) REFERENCES `guild_wars` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `guild_kills_ibfk_2` FOREIGN KEY (`death_id`) REFERENCES `player_deaths` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `guild_kills_ibfk_3` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;
     
     

    ALTER TABLE `killers` ADD `war` INT NOT NULL DEFAULT 0;
     
     
    Pronto o Guild Wars System está totalmente instalado...falta apenas o Tfs 0.4 !
     
    O meu The Forggoten Server 0.4 também comprei do mesmo cara que me vendeu o GWS,tenho um também que comprei na ChaitoSoft,mais conversei com eles por Msn e não permitirão que eu postasse pra ninguem,rsrs.
     
    Então vou postar o link do download e o scan:
     
    TFS 0.4 DEV
    Scan
     
    Ai está a DEV....
     
    Também será necessario usar o items.xml e items.otb , a não ser que o que vc tenha seja compativel com o distro.
     
    Item.xml e otb
    Scan
     
     
     
    Obs: Este distro não carrega scripts que tenha a função "dbExecute.query",sempre que tiver mude para "db.query" .Todo o script ja está configurado para funcionar assim,não se preucupe.
     
    Só isso,obrigado a todos...que Deus Abençoe voces sempre !
  11. Upvote
    bloder recebeu reputação de Secular em Itens Ids - Rme - Ajudou? Rep +   
    Telhado = 9092-9099, ou raw pallet,Roofs
    Enfeites para o telhado = 9102,9103,9106,8012,8014
    Walls = 1037,10227,10254
    Espero ter Ajudado.
    Flw's
  12. Upvote
    bloder recebeu reputação de gustavoxl em Sistema De Cassanique   
    Bom,esse é o primeiro Script que eu faço e posto aki no :XTibia_smile: ,então espero que gostem.
    O Script funciona assim: o player pucha a alavanca e então aleatóriamente é criado 3 items,se os items forem iguais o player ganha um premio!
     
    Então vamos ao que interesssa.Primeiramente,abra o mapa do seu ot e faça uma area mais ou menos como essa da imagem abaixo:

    Depois,vá em data/actions/scripts e crie um arquivo chamado cassino.lua
    e cole isto dentro:
     

    -- Cassino System by LucasHere function onUse(cid, item, frompos, item2, topos) pos1 = {x=989, y=1013, z=7, stackpos=1} --posição que vai cria os items pos2 = {x=990, y=1013, z=7, stackpos=1} pos3 = {x=991, y=1013, z=7, stackpos=1} local config = { moneyneed = 100 -- dinheiro para jogar } local premio = 2148 -- id do premio local premio_cont = 200 -- quantidade do premio que vai ganhar function additem(cid,premio,premio_cont) doPlayerAddItem(cid, premio,premio_cont) end if item.itemid == 1945 and getPlayerMoney(cid) < config.moneyneed then doPlayerSendCancel(cid,"Desculpe,voce não grana suficiente para jogar!") return FALSE end if item.itemid == 1945 and math.random(0, 8) == 1 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) doCreateItem(6556,1,pos1) addEvent(doCreateItem, 1000, 6556, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) addEvent(additem,2000,cid,premio,premio_cont) return true elseif item.itemid == 1945 and math.random(0, 8) == 2 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) doCreateItem(6557,1,pos1) addEvent(doCreateItem, 1000, 6557, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) return true elseif item.itemid == 1945 and math.random(0, 8) == 3 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) doCreateItem(6557,1,pos1) addEvent(doCreateItem, 1000, 6557, 1, pos2) addEvent(doCreateItem, 2000, 6557, 1, pos3) addEvent(additem,2000,cid,premio,premio_cont) return true elseif item.itemid == 1945 and math.random(0, 8) == 4 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) addEvent(doCreateItem, 1000, 6556, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) doCreateItem(6557,1,pos1) return true elseif item.itemid == 1945 and math.random(0, 8) == 5 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) addEvent(doCreateItem, 1000, 6557, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) doCreateItem(6557,1,pos1) return true elseif item.itemid == 1945 and math.random(0, 8) == 6 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) addEvent(doCreateItem, 1000, 6556, 1, pos2) addEvent(doCreateItem, 2000, 6557, 1, pos3) doCreateItem(6557,1,pos1) return true elseif item.itemid == 1945 and math.random(0, 8) == 7 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) addEvent(doCreateItem, 1000, 6557, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) doCreateItem(6557,1,pos1) return true elseif item.itemid == 1945 and math.random(0, 8) == 8 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) addEvent(doCreateItem, 1000, 6556, 1, pos2) addEvent(doCreateItem, 2000, 6557, 1, pos3) doCreateItem(6556,1,pos1) return true end item0 = getThingfromPos(pos1) item1 = getThingfromPos(pos2) item2 = getThingfromPos(pos3) if item.itemid == 1946 then doTransformItem(item.uid,1945) if item0.itemid ~= 0 and item1.itemid ~= 0 and item2.itemid ~= 0 then doRemoveItem(item0.uid,1) doRemoveItem(item1.uid,1) doRemoveItem(item2.uid,1) end else doTransformItem(item.uid,1945) end return 1 end
    E em Actions.xml,Cole isto:

    <action actionid="XXXX" event="script" value="cassino.lua"/>
     
    XXXX = action id que vai ser usado para executar o script,não esqueça de colocar na alavanca do mapa.
    Espero que tenham gostado!
  13. Upvote
    bloder deu reputação a PedroXtibiaaaa em [8.6] Eternal Kingdoms Map   
    Download: Clique aqui
    Scan: Clique aqui
    Remere's Map Editor 2.1
    Créditos: Artii e o pessoal do Eternal Kingdoms (otland)
    Versão: 8.60/8.61, testei com 8.70 e funcionou também...
     
    O mapa possui o mínimo de bugs possíveis, talvez alguns pequenos bugs simples, todas as houses estão 100%.
     
    Cidades:
     
    Aleda
    Leafport
    Fallen
    Selroth
    Seldia
    Shadow Wood
     
    Screenshots
     
     
  14. Upvote
    bloder recebeu reputação de 7854605 em Sprites Como Adc Elas Ao Tibia?   
    No forum tem alguns tutoriais de como adicionar sprites é só vc procura,mais eu recomendo vc a baixar um cliente ja com as sprites que tbm tem no forum disponivel para download.
    :forward: Cliente para download
    Flw's :smile_positivo:
  15. Upvote
    bloder deu reputação a Caspita em Como Fazer Um Templo   
    Templos.
    Bom, resolvi criar esse tutorial, sei que já tem um a respeito do tema, mas não é muito bom para ensinar os noobs inciantes.
    Nesse eu ensinarei o que é, a fazer e a detalhar um templo.
     
    O que é um templo?
    Alguém sabe? dou um ponto na média pra quem responder essa.
     
    Bom um templo é uma construção sagrada, mágica muitas vezes (no caso do jogo), pode ser um local de adoração e sempre é feito em tributo à algum deus, deusa ou semi-deus.
    Um templo não apenas para o retardado jogador renasçer, o templo é a referência que ele tem a respeito do mapa, mas eles não podem ser feito como local de ressureição apenas, também podem ser somente para encher-liguiça exposição.
     
    Também pode haver templos de adoração demoniaca (caverna e 4458~)
     
    Os pisos de um templo devem ser combinados, para que fiquem bonitos e para que tenha um piso central no qual o jogador renasça ou seja criado.
    Um templo deve ter uma história a respeito de sua mágica (peidei).
     
    Ponto para o senhor Caspita, respondeu certinho a resposta, esse é um dos que passam no vestibular.
    Brigado professor Caspita meu numero é o 8.
     
    Exemplo de combinação de pisos (para templos em cidades comuns):


     
    Próximo passo é a estrutura.
    A estrutura deve ser bonita, agradavél e ainda deve ser harmoniosa, para deixar o templo com um tom de agradavel e sagrado. O local do templo muda o estilo dele e também muda os deuses, nesse tutorial não vamos construir todos os tipos de templos (peidei de novo).
     
    A estrutura de um templo (um exemplo é claro):
    1º A sala principal (onde o jogador renasçe):

     
    2º A sala secundária (onde os jogadores vagabundos que não querem caçar ficam conversando):

     
    Agora seu templo está bem estruturado, vamos aos detalhes (na ordem do RAW Pallet).
    -* Arquitetura:
    ~ Pilares - IDs:- 1514, 1515, 1549, 1551, 3766, 3767, 8538, 8539, 8540,
    ~ Musgos de parede - IDs:- 1909 até 1944.
     
    OBS: Nunca coloque grades no seu templo, fica horrivel! (puts, acho que eu devo ter comido algo podre)

     
    -* Exterior:
    ~ Fontes de água:- 1360 até 1367, 1370 até 1378.
    ~ Estatuas:- 1442 até 1478, 8834 até 8837, 8777 até 8780, 8615, 8616, 8625, 8626, 3697 até 3710, 3715 até 3742, 9597 até 9599.
    ~ Coal basin:- (acho que não precisa colocar os ids)
    ~ Musgos de chão:- também não precisa colocar os ids
     

     
    -* Hangables:
    É possivel usar todos os items dessa divisão (na raw pallet) em um templo. [exceto bloodstains]
     
    -* Interior:
    Apenas tapetes, flores e estantes de livros são possiveis de usar nessa divisão.
     

     
    -* Nature:
    Pedrinhas pequenas, alguns tufos de grama e aquelas trepadeiras.
     
    -* Others:
    Apenas as rachaduras, as fontes e os detalhes de gelo, e os brilhosinhos pra dar um ar de sagrado.
     
    Ai está seu templo :positive:

    Tutorial 100% de minha autoria.
    Mapas 100% de minha autoria.
     
    Até o próximo esterco tutorial
  16. Upvote
    bloder recebeu reputação de Tibizeiro em Sistema De Cassanique   
    Bom,esse é o primeiro Script que eu faço e posto aki no :XTibia_smile: ,então espero que gostem.
    O Script funciona assim: o player pucha a alavanca e então aleatóriamente é criado 3 items,se os items forem iguais o player ganha um premio!
     
    Então vamos ao que interesssa.Primeiramente,abra o mapa do seu ot e faça uma area mais ou menos como essa da imagem abaixo:

    Depois,vá em data/actions/scripts e crie um arquivo chamado cassino.lua
    e cole isto dentro:
     

    -- Cassino System by LucasHere function onUse(cid, item, frompos, item2, topos) pos1 = {x=989, y=1013, z=7, stackpos=1} --posição que vai cria os items pos2 = {x=990, y=1013, z=7, stackpos=1} pos3 = {x=991, y=1013, z=7, stackpos=1} local config = { moneyneed = 100 -- dinheiro para jogar } local premio = 2148 -- id do premio local premio_cont = 200 -- quantidade do premio que vai ganhar function additem(cid,premio,premio_cont) doPlayerAddItem(cid, premio,premio_cont) end if item.itemid == 1945 and getPlayerMoney(cid) < config.moneyneed then doPlayerSendCancel(cid,"Desculpe,voce não grana suficiente para jogar!") return FALSE end if item.itemid == 1945 and math.random(0, 8) == 1 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) doCreateItem(6556,1,pos1) addEvent(doCreateItem, 1000, 6556, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) addEvent(additem,2000,cid,premio,premio_cont) return true elseif item.itemid == 1945 and math.random(0, 8) == 2 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) doCreateItem(6557,1,pos1) addEvent(doCreateItem, 1000, 6557, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) return true elseif item.itemid == 1945 and math.random(0, 8) == 3 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) doCreateItem(6557,1,pos1) addEvent(doCreateItem, 1000, 6557, 1, pos2) addEvent(doCreateItem, 2000, 6557, 1, pos3) addEvent(additem,2000,cid,premio,premio_cont) return true elseif item.itemid == 1945 and math.random(0, 8) == 4 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) addEvent(doCreateItem, 1000, 6556, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) doCreateItem(6557,1,pos1) return true elseif item.itemid == 1945 and math.random(0, 8) == 5 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) addEvent(doCreateItem, 1000, 6557, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) doCreateItem(6557,1,pos1) return true elseif item.itemid == 1945 and math.random(0, 8) == 6 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) addEvent(doCreateItem, 1000, 6556, 1, pos2) addEvent(doCreateItem, 2000, 6557, 1, pos3) doCreateItem(6557,1,pos1) return true elseif item.itemid == 1945 and math.random(0, 8) == 7 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) addEvent(doCreateItem, 1000, 6557, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) doCreateItem(6557,1,pos1) return true elseif item.itemid == 1945 and math.random(0, 8) == 8 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) addEvent(doCreateItem, 1000, 6556, 1, pos2) addEvent(doCreateItem, 2000, 6557, 1, pos3) doCreateItem(6556,1,pos1) return true end item0 = getThingfromPos(pos1) item1 = getThingfromPos(pos2) item2 = getThingfromPos(pos3) if item.itemid == 1946 then doTransformItem(item.uid,1945) if item0.itemid ~= 0 and item1.itemid ~= 0 and item2.itemid ~= 0 then doRemoveItem(item0.uid,1) doRemoveItem(item1.uid,1) doRemoveItem(item2.uid,1) end else doTransformItem(item.uid,1945) end return 1 end
    E em Actions.xml,Cole isto:

    <action actionid="XXXX" event="script" value="cassino.lua"/>
     
    XXXX = action id que vai ser usado para executar o script,não esqueça de colocar na alavanca do mapa.
    Espero que tenham gostado!
  17. Upvote
    bloder recebeu reputação de hsz em Sistema De Cassanique   
    Bom,esse é o primeiro Script que eu faço e posto aki no :XTibia_smile: ,então espero que gostem.
    O Script funciona assim: o player pucha a alavanca e então aleatóriamente é criado 3 items,se os items forem iguais o player ganha um premio!
     
    Então vamos ao que interesssa.Primeiramente,abra o mapa do seu ot e faça uma area mais ou menos como essa da imagem abaixo:

    Depois,vá em data/actions/scripts e crie um arquivo chamado cassino.lua
    e cole isto dentro:
     

    -- Cassino System by LucasHere function onUse(cid, item, frompos, item2, topos) pos1 = {x=989, y=1013, z=7, stackpos=1} --posição que vai cria os items pos2 = {x=990, y=1013, z=7, stackpos=1} pos3 = {x=991, y=1013, z=7, stackpos=1} local config = { moneyneed = 100 -- dinheiro para jogar } local premio = 2148 -- id do premio local premio_cont = 200 -- quantidade do premio que vai ganhar function additem(cid,premio,premio_cont) doPlayerAddItem(cid, premio,premio_cont) end if item.itemid == 1945 and getPlayerMoney(cid) < config.moneyneed then doPlayerSendCancel(cid,"Desculpe,voce não grana suficiente para jogar!") return FALSE end if item.itemid == 1945 and math.random(0, 8) == 1 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) doCreateItem(6556,1,pos1) addEvent(doCreateItem, 1000, 6556, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) addEvent(additem,2000,cid,premio,premio_cont) return true elseif item.itemid == 1945 and math.random(0, 8) == 2 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) doCreateItem(6557,1,pos1) addEvent(doCreateItem, 1000, 6557, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) return true elseif item.itemid == 1945 and math.random(0, 8) == 3 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) doCreateItem(6557,1,pos1) addEvent(doCreateItem, 1000, 6557, 1, pos2) addEvent(doCreateItem, 2000, 6557, 1, pos3) addEvent(additem,2000,cid,premio,premio_cont) return true elseif item.itemid == 1945 and math.random(0, 8) == 4 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) addEvent(doCreateItem, 1000, 6556, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) doCreateItem(6557,1,pos1) return true elseif item.itemid == 1945 and math.random(0, 8) == 5 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) addEvent(doCreateItem, 1000, 6557, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) doCreateItem(6557,1,pos1) return true elseif item.itemid == 1945 and math.random(0, 8) == 6 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) addEvent(doCreateItem, 1000, 6556, 1, pos2) addEvent(doCreateItem, 2000, 6557, 1, pos3) doCreateItem(6557,1,pos1) return true elseif item.itemid == 1945 and math.random(0, 8) == 7 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) addEvent(doCreateItem, 1000, 6557, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) doCreateItem(6557,1,pos1) return true elseif item.itemid == 1945 and math.random(0, 8) == 8 then doTransformItem(item.uid,1946) doPlayerRemoveMoney(cid,config.moneyneed) addEvent(doCreateItem, 1000, 6556, 1, pos2) addEvent(doCreateItem, 2000, 6557, 1, pos3) doCreateItem(6556,1,pos1) return true end item0 = getThingfromPos(pos1) item1 = getThingfromPos(pos2) item2 = getThingfromPos(pos3) if item.itemid == 1946 then doTransformItem(item.uid,1945) if item0.itemid ~= 0 and item1.itemid ~= 0 and item2.itemid ~= 0 then doRemoveItem(item0.uid,1) doRemoveItem(item1.uid,1) doRemoveItem(item2.uid,1) end else doTransformItem(item.uid,1945) end return 1 end
    E em Actions.xml,Cole isto:

    <action actionid="XXXX" event="script" value="cassino.lua"/>
     
    XXXX = action id que vai ser usado para executar o script,não esqueça de colocar na alavanca do mapa.
    Espero que tenham gostado!
  18. Upvote
    bloder deu reputação a renansdc em Error No Console!   
    Isso acontece porque tem definido no items.xml algum item com o atributo "replaceable" e o mesmo não está adicionado no distro.
    Para arrumar abra seu items.xml, e procure por attribute key="replaceable"
    Quando encontrar delete a linha.
    Obs: isso não interfere de modo algum nas magias.
  19. Upvote
    bloder deu reputação a joaohd em [Talkaction] Name Changer   
    Dá pra fazer por dinheiro também, esse ae foi pq deu uma confusão pra fazer aí decidimos postar. Caso queiram por dinheiro:
     

    -- Creditos a Won Helder, apocarai, MatheusMkalo function onSay(cid, words, param) local maxLen = 15 -- tamanho maximo do nome local moeyNeed = 1000 ------ Dinheiro necessário para mudar o nome local proibido = {"!","@","*"} -- simbolos proibidos for i = 1, #proibido do if string.find(tostring(param), proibido[i]) then doPlayerSendCancel(cid,"Não pode usar símbolos em seu nome.") return TRUE end end if tostring(param) == "" then -- checkar se não é nome vazio doPlayerSendCancel(cid, "Você deve informar um nome.") return TRUE end if string.len(tostring(param)) > maxLen then doPlayerSendCancel(cid, "Você pode usar no máximo " .. maxLen .. " letras.") return TRUE end if not getTilePzInfo(getCreaturePosition(cid)) then doPlayerSendCancel(cid,"So pode ser usado em pz.") return TRUE end if getPlayerMoney(cid=) >= moneyNeed then doPlayerRemoveMoney(cid, moneyNeed) db.executeQuery("UPDATE `players` SET `name` = '"..param.."' WHERE `id` = "..getPlayerGUID(cid)..";") doPlayerSendTextMessage(cid,25,"Você será kickado em 5 segundos.") addEvent(doRemoveCreature, 5*1000, cid, true) else doPlayerSendCancel(cid,"Você não possui " .. moneyNeed .. " gp's.") end return TRUE end
     
     
    flw
  20. Upvote
    bloder deu reputação a Tryller em [8.6 - 8.61 - 8.62] Crystal Server V0.2.2   
    Crystal Server

     
     
    Venho até aqui para lhes trazer o Crystal Server (Ice Fenix)
     
    O mapa deste servidor é o Evolutions, mas estamos desenvolvendo um próprio, caso você esteja afim de usar este mapa Evolutions você pode ultilizar, mas é bom verificarem se há bugs no mapa, pois não nos preucupa-mos com este mapa, apenas com o servidor.
     
    Para reportar bugs (Link Removido)
    Evite flood neste tópico
     
     

    [ CHANGELOG Project Name Crystal Server Version: 0.2.2 Codename: Ice Fenix License: GNU GPLv3 ] [ 0.1.0 A = Tag "log" para commandos (Tryller) A = Protocolo 8.54 (SVN, Tryller) A = Items 8.54 (SVN, Tryller) A = Outfits 8.54 (SVN, Tryller) A = Novos values para weapons (sword, axe, club, rod)(Tryller) A = Comando /premium playername days para GOD's (Tryller) A = Novos commandos para players (Tryller) A = Novas configurações para account manager (Tryller) A = Novas configurações para guilds (Tryller) A = Novas configurações para o sistema de premium account (Tryller) A = Novas configurações para critical hit (Tryller) A = Novas configuraçoes para sistema de cap (Tryller) M = Talkactions setWorldType /pvp, /clean, /B, /i , /n., /bc, /closeserver, /openserver, /m, /summon (Tryller) M = MOD buypremium (Tryller) D = Talkactions em lua /mode, !pvp, !q, !uptime, /clean, !serverinfo, /b, /i, /bc, openserver & /closeserver, /s, !commands (Tryller) D Em data/MODS changender_command.xml, custommonsters.xml, customspells.xml, firstitems.xml, highscorebook.xml (Tryller) D = No distro blacklist code, file's protocolhttp (Tryller) ] [ 0.1.1 A = Todos os outfits e addons (Tryller) A = Novo npc de addons (Tryller) A = Novas funçoes para talkactions (Tryller) C = Spell spaming (TFS, Tryller) C = Recuperação da premium stamina (TFS) C = Skull yellow (TFS) C = Ghost mode (TFS) C = Todos os possiveis crashs (TFS, Tryller) C = Outfits.xml (Tryller) D = Commands.xml (Tryller) D = Preço e numero de dias premium do config.lua (Tryller) ] [ 0.1.3 A = Versão GUI do executavel (Tryller) A = Mnu "About" na versão GUI, lá você encontra informações sobre o servidor (Tryller) A = Novo sistema para verificar se o servidor está atualizado, (Tryller) C = Problema de incompatibilidade com Gesior account maker (Tryller) ] [ 0.1.3 A = Commands.xml (Tryller) A = reloads para commands.xml (Tryller) A = Warsystem adicionado nas sources (TFS, Tryller) A = Adicionado "emblem" para monstros e npcs (TFS, Tryller) M = Agora commandos e talkactions não são mais definidos por "access" e sim por "group" (Tryller) C = Arrumado problema com QuestLog (Tryller) D = "access" dos commandos e talkactions (Tryller) ] [ 0.1.8 A = 8.62 Protocolo suport (SVN) A = 8.60 Items (SVN) A = Sistema de cap configuravel no config.lua (Tryller) C = death debug (TFS) C = sqlite bug em disband guild (TFS) C = unified spells typo (TFS) C = bug que poderia ser usado para criar items (TFS) ] [ 0.1.9 A = Novas configurações para o account manager no config.lua (Tryller) A = Guild Wars funcionando perfeitamente (TFS, Tryller) A = Database atualizando automaticamente para adicionar o guild wars sem resetar o server (Tryller, TFS) A = Sistema de noticias, para ver uma noticia use !notice, e para editar vá no arquivo data/XML/notices.xml (Tryller) A = Mais items 8.6 funcionando corretamente - armors - shields - swords e mais... (Tryller) M = Loot dos monstros não cai mais bag, e já cai amontoado (Tryller) M = Legion helmet não dropa mais de rotworms (Tryller) M = Nome dos items de beholder agora é bonelord (Tryller) M = Agora os player já ganham acesso à todas as outfits apenas pagando premium (Tryller) ] [ 0.2.0 A = Adicionado sistema de VIP - 2 novas funções lua - getPlayerVipDays(cid), doPlayerAddVipDays(cid, days) - comandos do vip system /vip playerName, 1, adiciona 1 dia de VIP ao player, !vip mostra quantos dias vip o player possui (Tryller) A = Adicionado comando para GOD's adicionar premium ao player /premium playerName, 1, adiciona 1 dia de premium ao player (Tryller) A = 2 novas funções lua - getCreatureStorage() & getCreatureStorageList(cid) (TFS) A = NPC de Addon C = Corrigido bug no Global Save - em alguns casos, ele estava funcionando uma hora antes do previsto (TFS) C = Crash bug enquanto estiver usando impressão com null ou tables (TFS) C = Bug do sistema de noticias (TFS) M = Diminuiu o tempo de sleep quando o servidor inicia (de 10 segundos para 1 segundo) - Também foi alterado na SVN, então vamos ver se há alguma desvantagem (SVN) M = Aprimorado sistema de premium account (Tryller) M = data/talkactions/scripts/frags.lua (TFS) M = Mostrar a descrição do erro sqlite quando o servidor não conseguiu conexão M = data/lib/050-functions.lua - doSummonCreature function (TFS) M = Alterado as opções de reload, sem necessidade de reiniciar - experienceStages, useFragHandler, advancedFragList (TFS) ] [ 0.2.1 A = data/XML/commands.xml (Tryller) A = Todos os items 8.6 funcionando (items.xml) (SVN, Tryller) A = Versão para 8.60 (Tryller) A = Novos comandos - /addon - /bless (Tryller) C = Bugs em conexão MySql (Tryller) C = Bugs em houses (TFS, Tryller) C = Bugs em Guilds (TFS) C = Alguns erros com reloads (Tryller) C = Jewelled Backpack, antes tava key ring e não dava de usar como backpack (Tryller) C = Bug em spellbook of dark mysteries (Tryller) M = data/talkactions/talkactions.xml (Tryller) M = data/movements/scripts/citizen.lua (Tryller) M = data/items/items.xml (Tryller) M = data/movements/movements.xml (Tryller) M = data/weapowns/weapons.xml (Tryller) D = data/lib/000-constant.lua - reload types (Tryller) D = data/talkactions/scripts/reload.lua (Tryller) D = data/talkactions/scripts/commands.lua (Tryller) D = data/talkactions/scripts/mode.lua (Tryller) D = data/talkactions/scripts/pvp.lua (Tryller) S = Systema de verificação de versão do servidor (Tryller) ] [ 0.2.2 A = Novos comandos para players !exp, !mana, !r (Tryller) A = Mais items 8.6 adcionados - Corpses, Grounds (Picachu) C = Erros com sqlie (Tryller) C = Erro no war system (Tryller, Picachu) C = Eros em conexão (Tryller) C = Erros da versão 8.60 (Tryller) M = data/npc/lib - isto fará as libs de npc dos ot 8.5 compativeis com o servidor (Tryller) ]
     
    Download do Servidor
    (Links Removidos)
     
    Caso você goste do nosso trabalho add Rep++
    O Servidor foi compilado com o war system, mas não liberei os scripts, caso queira os scripts faça uma doação no paypal para o endereço a baixo.
    Faça uma doação no paypal.com para ajudar nosso servidor, doe para shynzomapper@hotmail.com.
     
    acc do GOD é 222222/password
    Não troque a senha na database pois este servidor não usa mais password plain se você mudar lá vai dizer que a senha ta errada, você deve trocar a senha no Account Manager.
  21. Upvote
    bloder recebeu reputação de manovegyta em Spell Maker Nao Sai Hits   
    tenta coloka assim sem as areas :

    -----------------This Spell was made with Mindrage's Spell Maker v0.56b --------- --Do not post the spells in any forum without this line or you will be caught!--- --This Software is free to use and can't be for for real-life values!------------ local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat1, COMBAT_PARAM_BLOCKSHIELD, 1) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 0) setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 8) setCombatFormula(combat1, COMBAT_FORMULA_SKILL, 2, -80, 3, -105) --======================================================================= local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat2, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat2, COMBAT_PARAM_BLOCKSHIELD, 1) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 0) setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 8) setCombatFormula(combat2, COMBAT_FORMULA_SKILL, 2, -50, 3, -70) --======================================================================= local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat3, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat3, COMBAT_PARAM_BLOCKSHIELD, 1) setCombatParam(combat3, COMBAT_PARAM_EFFECT, 0) setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 8) setCombatFormula(combat3, COMBAT_FORMULA_SKILL, 3, -150, 4, -180) --======================================================================= function onCastSpell(cid, var) addEvent(doCombat, 0, cid, combat1, var) addEvent(doCombat, 500, cid, combat2, var) addEvent(doCombat, 1000, cid, combat3, var) return doCombat(cid, combat1, var) end
    flw!
  22. Upvote
    bloder recebeu reputação de brendorox em Exori Mas Gran E Exevo Frozen Hur   
    Exori mas Gran :

    local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 36) setCombatParam(combat, COMBAT_PARAM_USECHARGES, true) setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0.8, 0, 1.6, 0) local condition = createConditionObject(CONDITION_PARALYZE) setConditionParam(condition, CONDITION_PARAM_TICKS, 20000) setConditionFormula(condition, -0.9, 0, -0.9, 0) setCombatCondition(combat, condition) combat_arr = { {1, 1, 1}, {1, 2, 1}, {1, 1, 1} } local combat_area = createCombatArea(combat_arr) setCombatArea(combat, combat_area) local combat_area = createCombatArea(combat_arr) setCombatArea(condition, combat_area) function onCastSpell(cid, var) return doCombat(cid, combat, var) end
     
     
    exevo Frozen hur:
     

    local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 52) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.6, -50, -1.8, 0) combat_arr = { {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {0, 1, 0}, {0, 3, 0} } local combat_area = createCombatArea(combat_arr) setCombatArea(combat, combat_area) function onCastSpell(cid, var) return doCombat(cid, combat, var) end
     
     
    Ai no spells.xml vc ja sabe né.
    Flw!
  23. Upvote
    bloder recebeu reputação de ImperiumOT em Utani Gran Hur Com Efeito   
    Tenta coloca esse aki que ja esta configurado
     

    local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) setCombatParam(combat, COMBAT_PARAM_EFFECT, 36) setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1494) local condition = createConditionObject(CONDITION_HASTE) setConditionParam(condition, CONDITION_PARAM_TICKS, 22000) setConditionFormula(condition, 10.7, -156, 10.7, -156) setCombatCondition(combat, condition) local function fire(parameters) doCombat(parameters.cid, parameters.combat, parameters.var) end function onCastSpell(cid, var) local delay = 1 local seconds = 0 local parameters = { cid = cid, var = var, combat = combat } repeat addEvent(fire, seconds, parameters) seconds = seconds + delay until seconds == 220 end
  24. Upvote
    bloder deu reputação a Koddy em Aprendendo A Modificar Extensions   
    Saudações XTibianos!
     
    Bom, depois de muitos pedirem, insistirem, e beijarem meus pés; cá estou eu. Mas não para lhe dar uma extension de mão beijada, e sim para lhe ensinar a como fazer a sua própria.
    É isso mesmo! Agora você vai aprender a customizar seu Palette, criar um novo Palette; enfim, colocar os atalhos para os itens que você quiser, onde você quiser e na ordem que você quiser.
    Sem contar também que agora os novos itens da versão 8.6 poderão ser juntados aos diferentes pisos/paredes para facilitar na hora de mappear. Espero que ajude muita gente, e que todos possam entender com clareza.
     
    Lembrando que eu ainda não aprendi todos as funções de cada palavra, mas independente delas, consegui fazer o que quis, então vamos lá (se conserguir fazer de um jeito melhor, fique a vontade para fazer, e se quiser poste aqui sua sugestão).
     



    Aprendendo a modificar extensions

     
    Índice/Partes:
    •Introdução
    •Alterando posições de itens no Palette
    •Criando seu próprio Piso, com direito a borda
    •Criando sua própria parede, com todos os 'quatro cantos'
    •Criando Doodads 'Espaçosos' (estilo Fontes)
    •Criando Doodads 'Aleatórios' (estilo Flores)
    •Frequently Asked Questions - FAQ
     
     
    Introdução
     
     
     
    A. Alterando posições de itens no Palette
     
     
     
    B. Criando seu próprio Piso, com direito a borda
     
     
     
    C. Criando sua própria parede, com todos os 'quatro cantos'
     
     
     
    D. Criando Doodads 'Espaçosos' (estilo Fontes)
     
     
     
    E. Criando Doodads 'Aleatórios' (estilo Flores)
     
     
     
    ---
    Obs: Não sabe o que significa uma opção? Tente alterá-la e veja no que dá (mas por favor, não esqueça do 'BackUp'). (:
    ---
    Dicionário:
    'AB' = Auto Border
    ---
    Frequently Asked Questions - FAQ (Leia antes de postar uma Dúvida):
     
     
    ---
     
    No mais, desejo boa sorte para o que quer que você faça modificando suas "Extensions". Ensinei tudo que eu sei, e espero continuar aprendendo para que eu possa compartilhar com vocês.
    Acho que este foi o tutorial mais cansativo longo (que levou alguns dias) que já fiz até hoje. Espero que tenham gostado, e por favor, agradeçam para que eu possa continuar fazendo meus tutoriais ver que meu esforço valeu a pena.
    Obrigado por lerem até aqui. Não deixem de continuar visitando o XTibia.
     
    Atenciosamente,
    Koddy.
  25. Upvote
    bloder deu reputação a SirDeeD em Aprendendo A Modificar Extensions   
    Excelente tutorial,
    certeza que vai ajudar muita gente.
    Obrigado.
  • Quem Está Navegando   0 membros estão online

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