Ir para conteúdo

Todas Atividades

Atualizada automaticamente

  1. Ontem
  2. Última semana
  3. Oi, Gostaria de saber se alguem possui o mesmo erro ou ja viu o bug das potions. Eu mesmo com 500,600,650 potion ou runas, quando vou usar uma, aparece a mensagem 'using one of 100...', ele nao estava fazendo a contagem certa. Alguem poderia ajudar?
  4. Faltam apenas dois dias para o lançamento do DaWinBi 2.0!
  5. Layh

    Device System (Compro)

    Bom dia! Seria basicamente um ITEM que nele você pode usar outro Held X ou Y e esse item pode ser inserido na pokebola do seu Pokemon fazendo com que apartir daquela inserção o Pokemon passe a ter mais um Held ativado nele. Lembrando que esse held não pode ser nenhum que já esteja sendo usado naquele Pokemon. Seria por exemplo You see a Tropius. It's contain a X-Attack (Tier: 7) and Y-Cure (Tier: 7) Device: X-Lucky (Tier: 7) Ai ele teria todos esses Held ativos.
  6. BidHom provides an exceptional platform for realtors to create real estate website with seamless IDX and MLS integration. This feature ensures that your website showcases the most recent and up-to-date property listings, enhancing your clients’ search experience. Setting up your website is a breeze with BidHom’s intuitive dashboard, which guides you through each step of the website-building process. Realtors can start by selecting from a variety of customizable templates designed specifically for the real estate industry. These templates are mobile-friendly and optimized for search engines, ensuring maximum visibility and accessibility. Once a template is chosen, realtors can easily integrate IDX to automatically update their listings, saving time and providing clients with real-time data. MLS integration further enriches the website by aggregating listings from multiple sources, offering a comprehensive view of the market. BidHom’s user-friendly interface allows realtors to manage their website content effortlessly, from adding property descriptions and images to setting up contact forms and lead capture tools. In essence, BidHom simplifies the process of creating a professional and effective real estate listing websites, empowering realtors to focus on what they do best: closing deals and serving their clients.
  7. [C++] -=[TFS]=- 0.3.6 - 8.60 - PROBLEMA ENCONTRADO FOI NO PLAYER.CPP O ITEM AGORA CAI SLOT DO PLAYER NÃO CAI MAIS NO CHÃO AQUI ESTA PROBLEMA O ITEM CAI NO SLOT DO PLAYER ELE AGRUPA ITENS EMPILHA AUTOMATICAMENTE MAIS SÓ NO SLOT ELE NAO EMPILHA NA BACKPACK Cylinder* Player::__queryDestination(int32_t& index, const Thing* thing, Item** destItem, uint32_t& flags) { if (index == 0 /* drop to capacity window */ || index == INDEX_WHEREEVER) { *destItem = NULL; const Item* item = thing->getItem(); if (!item) return this; // Tentar encontrar um slot apropriado no inventário for (int32_t i = SLOT_FIRST; i < SLOT_LAST; ++i) { if (!inventory[i]) { if (__queryAdd(i, item, item->getItemCount(), 0) == RET_NOERROR) { index = i; return this; } } else if (inventory[i] != tradeItem) { if (Item* inventoryItem = inventory[i]) { // Tentar empilhar itens if (inventoryItem->getID() == item->getID() && inventoryItem->isStackable() && inventoryItem->getItemCount() < 100) { *destItem = inventoryItem; index = i; return this; } } } } // Tentar adicionar aos containers do inventário std::list<std::pair<Container*, int32_t> > deepList; for (int32_t i = SLOT_FIRST; i < SLOT_LAST; ++i) { if (inventory[i] == tradeItem) continue; if (Container* container = dynamic_cast<Container*>(inventory[i])) { if (container->__queryAdd(-1, item, item->getItemCount(), 0) == RET_NOERROR) { index = INDEX_WHEREEVER; *destItem = NULL; return container; } deepList.push_back(std::make_pair(container, 0)); } } // Verificar mais profundamente nos containers int32_t deepness = g_config.getNumber(ConfigManager::PLAYER_DEEPNESS); for (std::list<std::pair<Container*, int32_t> >::iterator dit = deepList.begin(); dit != deepList.end(); ++dit) { Container* c = (*dit).first; if (!c || c->empty()) continue; int32_t level = (*dit).second; for (ItemList::const_iterator it = c->getItems(); it != c->getEnd(); ++it) { if ((*it) == tradeItem) continue; if (Container* subContainer = dynamic_cast<Container*>(*it)) { if (subContainer->__queryAdd(-1, item, item->getItemCount(), 0) == RET_NOERROR) { index = INDEX_WHEREEVER; *destItem = NULL; return subContainer; } if (deepness < 0 || level < deepness) deepList.push_back(std::make_pair(subContainer, (level + 1))); } } } // Se não encontrou lugar adequado, retorna this return this; } Thing* destThing = __getThing(index); if (destThing) *destItem = destThing->getItem(); if (Cylinder* subCylinder = dynamic_cast<Cylinder*>(destThing)) { index = INDEX_WHEREEVER; *destItem = NULL; return subCylinder; } return this; }
  8. <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Characters Market System" version="1.0" author="LuckOake" contact="none" enabled="yes"> ------------------------------------------------------------------------------------ <config name="market"><![CDATA[ price = 27112 owner = 27113 level = 717217 -- Level min of character.-- min_price = 1 -- Price min of character (in currency 6535)-- max_price = 1000000000 -- Price maximum of character (in currency 6535)-- function doTransferCharacter(cid, accId) local playerGuid = getPlayerGUIDByName(cid) if not playerGuid then return false, "Player GUID not found." end return db.executeQuery("UPDATE `players` SET `account_id` = "..accId.." WHERE `id` = "..playerGuid.."") end function doOfflinePlayerAddMoney(guid, money, itemID) local playerGuid = getPlayerGUIDByName(guid) if not playerGuid then return false, "Player GUID not found." end return db.executeQuery("UPDATE `players` SET `balance` = `balance` + '"..money.."' WHERE `id` = '"..playerGuid.."';") end function setOfflinePlayerStorageValue(name, key, value) local playerGuid = getPlayerGUIDByName(name) if not playerGuid then return false, "Player GUID not found." end local result = db.getResult("SELECT * FROM `player_storage` WHERE `player_id` = ".. playerGuid .." AND `key` = ".. key ..";") if result:getID() == -1 then return db.executeQuery("INSERT INTO `player_storage` (`player_id`, `key`, `value`) VALUES (".. playerGuid ..", ".. key ..", ".. value ..");") else result:free() return db.executeQuery("UPDATE `player_storage` SET `value` = ".. value .." WHERE `player_id` = ".. playerGuid .." AND `key` = ".. key ..";") end end function getOfflinePlayerStorageValue(name, key) local playerGuid = getPlayerGUIDByName(name) if not playerGuid then return nil end local result = db.getResult("SELECT `value` FROM `player_storage` WHERE `player_id` = '".. playerGuid .."' AND `key` = ".. key ..";") if result:getID() == -1 then return nil end local ret = result:getDataInt("value") result:free() return ret end function getOfflinePlayerValue(name, value) local playerGuid = getPlayerGUIDByName(name) if not playerGuid then return nil end local result = db.getResult("SELECT `"..value.."` FROM `players` WHERE `id` = "..playerGuid..";") if result:getID() == -1 then return nil end local ret = result:getDataInt(value) result:free() return ret end function isCharacterForSale(name) local charPrice = getOfflinePlayerStorageValue(name, price) if not charPrice or charPrice < 1 then return false else return true end end ]]></config> ------------------------------------------------------------------------------------ <talkaction words="!character" event="buffer"><![CDATA[ domodlib('market') local t = string.explode(param, ",") if t[1] == "sell" then if not t[3] or not tonumber(t[3]) or t[4] or tonumber(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Incorrect Params. Specify the character name and the price.") return true elseif getPlayerAccountId(cid) ~= getAccountIdByName(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This is not your character.") return true elseif isCharacterForSale(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character is already for sale.") return true elseif getPlayerGUIDByName(t[2]) == getPlayerGUID(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You cannot sell yourself.") return true elseif getPlayerByName(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "The character must be offline to be sold.") return true elseif getOfflinePlayerValue(t[2], "level") < level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your character can't be sold until it has level "..level..".") return true elseif tonumber(t[3]) < min_price then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Sorry, but the minimum price for selling a character is "..min_price.." currency units.") return true elseif tonumber(t[3]) > max_price then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Sorry, but the maximum price for selling a character is "..max_price.." currency units.") return true end setOfflinePlayerStorageValue(t[2], price, t[3]) setOfflinePlayerStorageValue(t[2], owner, getPlayerGUID(cid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Your character "'..t[2]..'" is now for sale for the price of "'..t[3]..'" currency units.') elseif t[1] == "buy" then if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Incorrect Params. Specify the character name.") return true elseif not playerExists(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character doesn't exist.") return true elseif getPlayerAccountId(cid) == getAccountIdByName(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can't buy your own character.") return true elseif not isCharacterForSale(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character is not for sale.") return true elseif not doPlayerRemoveItem(cid, 6535, getOfflinePlayerStorageValue(t[2], price)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Not enough currency. This character's price is "..getOfflinePlayerStorageValue(t[2], price).." currency units.") return true end if not getPlayerByGUID(getOfflinePlayerStorageValue(t[2], owner)) then doOfflinePlayerAddItem(getPlayerNameByGUID(getOfflinePlayerStorageValue(t[2], owner)), getOfflinePlayerStorageValue(t[2], price), 6535) setOfflinePlayerStorageValue(getPlayerNameByGUID(getOfflinePlayerStorageValue(t[2], owner)), 41792, getPlayerGUIDByName(t[2])) else doPlayerAddItem(getPlayerByGUID(getOfflinePlayerStorageValue(t[2], owner)), 6535, getOfflinePlayerStorageValue(t[2], price)) doPlayerSendTextMessage(getPlayerByGUID(getOfflinePlayerStorageValue(t[2], owner)), MESSAGE_STATUS_CONSOLE_BLUE, 'Your character "'..t[2]..'" has been sold for the price of '..getOfflinePlayerStorageValue(t[2], price)..' currency units.') end doTransferCharacter(t[2], getPlayerAccountId(cid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You bought the character "'..t[2]..'" for the price of '..getOfflinePlayerStorageValue(t[2], price)..' currency units.') setOfflinePlayerStorageValue(t[2], owner, -1) setOfflinePlayerStorageValue(t[2], price, -1) return true elseif t[1] == "remove" then if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Incorrect Params. Specify the character name.") return true elseif getPlayerAccountId(cid) ~= getAccountIdByName(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This is not your character.") return true elseif not isCharacterForSale(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character is not for sale.") return true end setOfflinePlayerStorageValue(t[2], price, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You removed the character "'..t[2]..'" from the Characters Market.') return true elseif t[1] == "list" then local result = db.getResult("SELECT `name` FROM `players`") if result:getID() == -1 then return true end local msg = "Characters For Sale:\n\n" while true do local name = result:getDataString("name") if isCharacterForSale(name) then local sex = getOfflinePlayerValue(name, "sex") == 1 and "Male" or "Female" msg = ""..msg.." - ".. name .." (Level: "..getOfflinePlayerValue(name, "level").." / Vocation: "..getVocationInfo(getOfflinePlayerValue(name, "vocation")).name.." / Sex: "..sex.." / Owner: "..getPlayerNameByGUID(getOfflinePlayerStorageValue(name, owner))..") [Price: "..getOfflinePlayerStorageValue(name, price).."] \n" end if not result:next() then break end end doPlayerPopupFYI(cid, msg) return true elseif not t[1] or t[1] ~= "buy" or t[1] ~= "sell" or t[1] ~= "remove" or t[1] ~= "list" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Incorrect params. You can only 'buy' or 'sell' a character, 'remove' it from the Characters Market or see the 'list' of characters for sale.") return true end return true ]]></talkaction> ------------------------------------------------------------------------------------ <event type="login" name="MarketLogin" event="script"><![CDATA[ function onLogin(cid) domodlib('market') if getPlayerStorageValue(cid, price) > 0 then return false elseif getPlayerStorageValue(cid, 41792) ~= -1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You sold the character "..getPlayerNameByGUID(getPlayerStorageValue(cid, 41792))..". The money is in your bank account.") setPlayerStorageValue(cid, 41792, -1) end return true end ]]></event> </mod> Mudanças Realizadas Modificação para usar a moeda com ID 6535: No código doPlayerRemoveItem e doPlayerAddItem ao invés de doPlayerRemoveMoney e doPlayerAddMoney para a transação. Verificação de parâmetros: Ajuste na verificação e mensagem de erro para refletir a moeda correta. Configurações mínimas e máximas de preço: Atualização das variáveis min_price e max_price para refletir os valores corretos na nova moeda. Com essas alterações, o script agora utiliza a moeda com ID 6535 para a compra e permite que os jogadores definam a quantidade desejada ao vender um personagem.
  9. Desculpa reviver o tópico, mas alguem consegue pra tfs 1.3 ou 1.5/1.6 atuais?
  10. Elevate your dating game with the top site for hassle-free connections. [URL=https://matchnow.life]Prettys Womans from your city[/URL]
  11. Não consegui acha id channel npcs @Holograma cryingdamson 0.3.6 (8.60) V8.2 Source.rar
  12. 1. Verifique o Código JavaScript O botão de seleção de vocação e o valor do campo pdt_id são definidos pelo JavaScript. Certifique-se de que o JavaScript está funcionando corretamente e que o valor está sendo corretamente atribuído ao campo pdt_id. Aqui está um exemplo de função JavaScript que deve estar presente para selecionar a vocação: function selectpdt(id) { document.getElementById('pdt_id').value = id; var buttons = document.getElementsByClassName('pdt_blc'); for (var i = 0; i < buttons.length; i++) { buttons[i].style.border = 'none'; } document.getElementById('b' + id).style.border = '2px solid #f00'; // Ajuste a borda para indicar seleção } 2. Verifique o HTML do Formulário Assegure-se de que o formulário HTML está configurado corretamente para enviar os dados: O campo oculto para vocação (pdt_id) deve estar presente e ser atualizado pelo JavaScript quando uma vocação é selecionada. O botão de submit (Criar Personagem) deve estar habilitado quando todos os campos forem preenchidos. No seu código, o botão de submit está desabilitado (disabled), o que pode ser a causa do problema. Verifique se o JavaScript está habilitando o botão após a seleção da vocação e o preenchimento dos campos obrigatórios. 3. Verifique a Função selectpdt Verifique se a função JavaScript selectpdt está sendo chamada corretamente ao clicar em uma vocação. Você pode adicionar um console.log para depuração: function selectpdt(id) { console.log('Vocation selected:', id); // Adicione isso para verificar se a função é chamada document.getElementById('pdt_id').value = id; // Resto do código } 4. Verifique o Código PHP para Processamento de Dados Certifique-se de que o valor de $_POST['pdt_id'] está sendo corretamente verificado e validado no código PHP. Aqui está uma parte relevante do seu código: // Validate vocation id if (!in_array((int)$_POST['pdt_id'], $config['available_vocations'])) { $errors[] = 'Permissão negada. Vocação errada.'; } Certifique-se de que o $_POST['pdt_id'] está sendo enviado corretamente e contém um ID válido. atualizando seu código deve ficar mais ou menos assim: <?php require_once 'engine/init.php'; protect_page(); include 'layout/overall/header.php'; $imagem = 'http://' . $_SERVER['HTTP_HOST'] . '/layout/images/vocstatus'; $statusid = 1; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $required_fields = array('name', 'selected_town', 'pdt_id'); $errors = array(); foreach ($required_fields as $field) { if (empty($_POST[$field])) { $errors[] = 'You need to fill in all fields.'; break; } } if (empty($errors)) { if (!Token::isValid($_POST['token'])) { $errors[] = 'O token é inválido.'; } $_POST['name'] = validate_name($_POST['name']); if ($_POST['name'] === false) { $errors[] = 'Seu nome não pode conter mais de 2 palavras.'; } else { if (user_character_exist($_POST['name']) !== false) { $errors[] = 'Desculpe, esse nome de personagem já existe.'; } if (!preg_match("/^[a-zA-Z_ ]+$/", $_POST['name'])) { $errors[] = 'Seu nome pode conter apenas a-z, A-Z e espaços.'; } if (strlen($_POST['name']) < $config['minL'] || strlen($_POST['name']) > $config['maxL']) { $errors[] = 'O nome do seu personagem deve estar entre ' . $config['minL'] . ' - ' . $config['maxL'] . ' caracteres longos.'; } if (in_array(strtolower($_POST['name']), $config['invalidNames'])) { $errors[] = 'Este nome de usuario esta bloqueado.'; } $resname = explode(" ", $_POST['name']); foreach ($resname as $res) { if (in_array(strtolower($res), $config['invalidNameTags'])) { $errors[] = 'Seu nome de usuário contém uma palavra restrita.'; } else if (strlen($res) == 1) { $errors[] = 'Palavras muito curtas em seu nome.'; } } if (!in_array((int)$_POST['pdt_id'], $config['available_vocations'])) { $errors[] = 'Permissão negada. Vocação errada.'; } $char_count = user_character_list_count($session_user_id); if ($char_count >= $config['max_characters']) { $errors[] = 'Sua conta não tem permissão para ter mais de ' . $config['max_characters'] . ' personagens.'; } if (validate_ip(getIP()) === false && $config['validate_IP'] === true) { $errors[] = 'Falha ao reconhecer o seu endereço IP. (Não é um endereço IPv4 válido).'; } } } } ?> <div id="title"> <div class="name">Criar novo personagem</div> </div> <br> <?php if (isset($_GET['success']) && empty($_GET['success'])) { echo 'Parabéns! Seu personagem foi criado. Te vejo no jogo!'; } else { if ($_SERVER['REQUEST_METHOD'] === 'POST' && empty($errors)) { if ($config['log_ip']) { znote_visitor_insert_detailed_data(2); } // Register $character_data = array( 'name' => format_character_name($_POST['name']), 'elo_points' => 0, 'account_id' => $session_user_id, 'vocation' => $_POST['pdt_id'], 'lastip' => getIPLong(), 'created' => time() ); user_create_character($character_data); header('Location: createcharacter.php?success'); exit(); } else if (!empty($errors)) { echo '<font color="red"><b>'; echo output_errors($errors); echo '</b></font>'; } ?> <br> <link rel="stylesheet" type="text/css" href="layout/css/style.css"> <script type="text/javascript" src="/layout/js/selection.js"></script> <center> <div class="Text"> <br>Selecione o personagem desejado:</div> <div class="caixa" style="width: 600px;height: 300px;overflow: auto;"> <table border="0" cellspacing="10" cellpadding="0"> <?php $y = 0; $i = 0; foreach ($config['available_vocations'] as $id) { if ($i == 0) { echo '<tr>'; } $i++; $y++; ?> <td> <table style="width:115px;" border="0" cellspacing="0" cellpadding="0"> <tr style="height:75px;"> <td> <div id="i<?php echo $id; ?>" class="pdt_cls" style="background-image:url('<?php echo $config['images']['selectVocation']; ?>/<?php echo $id; ?>.png'), url(/layout/images/donate/back.png);"> <div id="b<?php echo $id; ?>" class="pdt_blc" value="<?php echo $id; ?>" onclick="selectpdt(<?php echo $id; ?>);"></div> </div> </td> </tr> <tr> <td> <center> <div class="pdt_nme"><?php echo vocation_id_to_name($id); ?></div> </center> </td> </tr> </table> </td> <td> <div style="width:20px;"></div> </td> <?php if ($i == 3) { echo '</tr>'; $i = 0; } } ?> </table> </div> <br> <form action="" method="post"> <li> <font color="white">Digite o nome para seu personagem:</font> <br> <input type="text" name="name"> </li> <input id="pdt_id" name="pdt_id" type="hidden" value="0" /> <table> <tr> <td> <input id="ckb_obs" name="ckb_obs" onclick="chkbox();" type="checkbox" /> </td> <td> <label class="Text" style="width:100%;" for="ckb_obs"> <center>Estou ciente das <a href="/termos.php" style="font-family:monospace; font-size:13px; font-weight:bold;">observações referentes a criação do personagem.</a></center> </label> </td> </tr> </table> <input type="hidden" name="token" value="<?php echo Token::generate(); ?>" /> <div style="height:20px;"></div> <input id="Button" type="submit" value="Criar Personagem" /> </form> </center> <?php } include 'layout/overall/footer.php'; ?>
  13. Parece que há dois problemas distintos com sua configuração: 1. Erro ao Abrir o Arquivo de Configuração O erro indica que o arquivo config.lua não pôde ser encontrado no caminho especificado. Verifique o seguinte: Caminho do Arquivo: Certifique-se de que o caminho D:/OTServ8.60/config.lua está correto e que o arquivo config.lua realmente existe nesse diretório. Permissões de Arquivo: Verifique se o servidor web (por exemplo, Apache no XAMPP) tem permissões suficientes para ler o arquivo config.lua. Extensão do Arquivo: Confirme se o arquivo realmente tem a extensão .lua e não .txt ou outra extensão. 2. Erro de Tipo de Banco de Dados O segundo erro indica que o tipo de banco de dados não está sendo reconhecido corretamente. Pode ser que o problema esteja na forma como o arquivo config.lua está sendo lido e interpretado. A configuração que você forneceu parece correta, mas vamos verificar algumas possíveis soluções: Passos para Resolver o Problema Verifique a Leitura do Arquivo config.lua Certifique-se de que o PHP está configurado corretamente para ler arquivos .lua. Muitas vezes, o PHP pode ter problemas com formatos de arquivo que não são padrão. Em vez de parse_ini_file, você pode usar outra abordagem para carregar e interpretar o arquivo Lua. Valide a Sintaxe do Arquivo config.lua Embora o conteúdo pareça correto, o formato do arquivo Lua deve ser adequado. Aqui está um exemplo básico de como o config.lua pode estar estruturado: sqlType = "mysql" sqlHost = "localhost" sqlPort = 3306 sqlUser = "root" sqlPass = "" sqlDatabase = "hogwarts" sqliteDatabase = "orion.s3db" sqlKeepAlive = 0 mysqlReadTimeout = 10 mysqlWriteTimeout = 10 encryptionType = "sha1" Certifique-se de que não há caracteres extras ou formatação incorreta. Verifique a Configuração do PHP Se o PHP está tentando abrir o arquivo .lua como se fosse um arquivo INI, você pode ter que ajustar o código PHP. Em vez de parse_ini_file, você pode precisar usar uma biblioteca Lua específica ou ler o arquivo Lua manualmente e processá-lo. Por exemplo: // Exemplo de leitura manual $config = file_get_contents('D:/OTServ8.60/config.lua'); // Faça o parsing necessário aqui Verifique a Configuração do Banco de Dados Certifique-se de que seu banco de dados está configurado corretamente e que o nome do banco de dados (hogwarts) existe. Além disso, o tipo de banco de dados deve ser mysql conforme definido em sqlType.
  14. Abra o arquivo config.lua: Este arquivo geralmente está localizado na pasta de configuração do seu servidor, como data/ ou config/. Procure por definições relacionadas a canais de NPC: O ID do canal NPC pode estar definido diretamente no arquivo ou pode haver uma referência para a tabela de canais. Você pode procurar por algo semelhante a: -- Definições de canais channels = { [1] = {name = "Default", description = "Canal padrão"}, [2] = {name = "NPC", description = "Canal dos NPCs"}, -- Outros canais } Verifique o Código-Fonte do Servidor Localize o arquivo de definição de canais: Isso pode estar em um arquivo relacionado a canais ou mensagens. Pode ser algo como channels.cpp ou um arquivo similar. Procure pela definição do canal NPC: Procure por IDs ou definições que correspondam ao canal de NPCs.
  15. Encontre o arquivo de configuração do cliente: Normalmente, isso pode ser um arquivo .cfg, .ini ou um arquivo XML/JSON, dependendo do cliente que você está usando. Abra o arquivo de configuração: Use um editor de texto para abrir o arquivo. Procure por configurações relacionadas à barra de saúde: Algo como healthinfo ou statusbar. Se o seu cliente usa XML para configurações, você pode encontrar algo assim: <interface> <healthinfo visible="false" /> </interface> Você precisaria alterar visible="false" para visible="true": <interface> <healthinfo visible="true" /> </interface> 2. Modificação no Código-Fonte Se a configuração não estiver diretamente disponível em um arquivo de configuração, você pode precisar modificar o código-fonte do cliente. Aqui está um exemplo de como você pode fazer isso em C++: Exemplo em C++ Encontre a função de inicialização da interface do cliente: Esta função geralmente é responsável por configurar e renderizar os elementos da interface do usuário quando o cliente é iniciado. Adicione o código para tornar a barra de saúde visível: Isso pode ser algo assim: void Interface::initialize() { // Outras inicializações // Certifique-se de que a barra de saúde esteja visível healthInfoBar->setVisible(true); }
  16. Para ajustar o código e garantir que um jogador não possa atravessar outro jogador no depósito, você pode modificar a função canWalkthrough para retornar false quando os jogadores estiverem no depósito. Aqui está uma versão atualizada da função que adiciona esta verificação: bool Player::canWalkthrough(const Creature* creature) const { if (creature == this || hasCustomFlag(PlayerCustomFlag_CanWalkthrough) || creature->isWalkable() || (creature->getMaster() && creature->getMaster() != this && canWalkthrough(creature->getMaster()))) return true; const Player* player = creature->getPlayer(); if (!player) return false; // Verifica se os jogadores estão no depósito if (player->getTile()->hasFlag(TILESTATE_DEPOT) || this->getTile()->hasFlag(TILESTATE_DEPOT)) { return false; } if ((((g_game.getWorldType() == WORLD_TYPE_NO_PVP && player->getVocation()->isAttackable()) || player->getTile()->hasFlag(TILESTATE_PROTECTIONZONE) || (player->getVocation()->isAttackable() && player->getLevel() < (uint32_t)g_config.getNumber(ConfigManager::PROTECTION_LEVEL))) && player->getTile()->ground) && (!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges) || player->getAccess() <= getAccess())) return true; return (player->isGhost() && getGhostAccess() < player->getGhostAccess()) || (isGhost() && getGhostAccess() > player->getGhostAccess()); } Aqui, adicionamos a verificação: if (player->getTile()->hasFlag(TILESTATE_DEPOT) || this->getTile()->hasFlag(TILESTATE_DEPOT)) { return false; }
  17. Os erros indicam que a função getPlayerGUIDByName está retornando nil para os nomes de personagens fornecidos. Isso pode ocorrer devido a vários motivos, como o personagem não existir na base de dados, erros de sintaxe nos nomes dos personagens, ou problemas de conexão com o banco de dados. Vamos ajustar o script para lidar melhor com esses casos e garantir que a função getPlayerGUIDByName esteja retornando valores corretos ou tratando os erros adequadamente. Vou também adicionar mais debug prints para ajudar a identificar a causa exata dos problemas. <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Characters Market System" version="1.0" author="LuckOake" contact="none" enabled="yes"> <config name="market"><![CDATA[ price = 27112 owner = 27113 level = 717217 -- Level min of character. -- min_price = 10000000000000 -- Price min of character -- max_price = 10000000000000 -- Price maximum of character -- function doTransferCharacter(cid, accId) local playerGUID = getPlayerGUIDByName(cid) print("doTransferCharacter - Player GUID for", cid, "is", playerGUID) if playerGUID then return db.executeQuery("UPDATE `players` SET `account_id` = " .. accId .. " WHERE `id` = " .. playerGUID) else print("Error: Player GUID for " .. cid .. " is nil.") return false end end function doOfflinePlayerAddMoney(guid, money) local playerGUID = getPlayerGUIDByName(guid) print("doOfflinePlayerAddMoney - Player GUID for", guid, "is", playerGUID) if playerGUID then return db.executeQuery("UPDATE `players` SET `balance` = `balance` + " .. money .. " WHERE `id` = " .. playerGUID .. ";") else print("Error: Player GUID for " .. guid .. " is nil.") return false end end function setOfflinePlayerStorageValue(name, key, value) local playerGUID = getPlayerGUIDByName(name) print("setOfflinePlayerStorageValue - Player GUID for", name, "is", playerGUID) if playerGUID then local result = db.getResult("SELECT * FROM `player_storage` WHERE `player_id` = " .. playerGUID .. " AND `key` = " .. key .. ";") if result:getID() == -1 then print("setOfflinePlayerStorageValue - No existing storage value found, inserting new value") return db.executeQuery("INSERT INTO `player_storage` (`player_id`, `key`, `value`) VALUES (" .. playerGUID .. ", " .. key .. ", " .. value .. ");") else result:free() print("setOfflinePlayerStorageValue - Existing storage value found, updating value") return db.executeQuery("UPDATE `player_storage` SET `value` = " .. value .. " WHERE `player_id` = " .. playerGUID .. " AND `key` = " .. key .. ";") end else print("Error: Player GUID for " .. name .. " is nil.") return false end end function getOfflinePlayerStorageValue(name, key) local playerGUID = getPlayerGUIDByName(name) print("getOfflinePlayerStorageValue - Player GUID for", name, "is", playerGUID) if playerGUID then local result = db.getResult("SELECT `value` FROM `player_storage` WHERE `player_id` = " .. playerGUID .. " AND `key` = " .. key .. ";") if result:getID() == -1 then print("getOfflinePlayerStorageValue - No storage value found for", name, "with key", key) return nil end local ret = result:getDataInt("value") print("getOfflinePlayerStorageValue - Retrieved storage value for", name, "with key", key, "is", ret) result:free() return ret else print("Error: Player GUID for " .. name .. " is nil.") return nil end end function getOfflinePlayerValue(name, value) local playerGUID = getPlayerGUIDByName(name) print("getOfflinePlayerValue - Player GUID for", name, "is", playerGUID) if playerGUID then local result = db.getResult("SELECT `" .. value .. "` FROM `players` WHERE `id` = " .. playerGUID .. ";") if result:getID() == -1 then print("getOfflinePlayerValue - No value found for", name, "with field", value) return nil end local ret = result:getDataInt(value) print("getOfflinePlayerValue - Retrieved value for", name, "with field", value, "is", ret) result:free() return ret else print("Error: Player GUID for " .. name .. " is nil.") return nil end end function isCharacterForSale(name) local playerGUID = getPlayerGUIDByName(name) print("isCharacterForSale - Player GUID for", name, "is", playerGUID) if playerGUID and getOfflinePlayerStorageValue(name, price) and getOfflinePlayerStorageValue(name, price) > 0 then return true else return false end end ]]></config> <talkaction words="!character" event="buffer"><![CDATA[ domodlib('market') local t = string.explode(param, ",") if t[1] == "sell" then if not t[3] or not tonumber(t[3]) or t[4] or tonumber(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Incorrect Params. Specify the character name and the price.") return true elseif getPlayerAccountId(cid) ~= getAccountIdByName(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This is not your character.") return true elseif isCharacterForSale(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character is already for sale.") return true elseif getPlayerGUIDByName(t[2]) == getPlayerGUID(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You cannot sell yourself.") return true elseif getPlayerByName(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "The character must be offline to be sold.") return true elseif getOfflinePlayerValue(t[2], "level") < level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your character can't be sold until it has level "..level..".") return true elseif tonumber(t[3]) < min_price then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Sorry, but the minimum price for selling a character is "..min_price..".") return true elseif tonumber(t[3]) > max_price then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Sorry, but the maximum price for selling a character is "..max_price..".") return true end setOfflinePlayerStorageValue(t[2], price, t[3]) setOfflinePlayerStorageValue(t[2], owner, getPlayerGUID(cid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Your character "'..t[2]..'" is now for sale for the price of "'..t[3]..'" gold coins.') elseif t[1] == "buy" then if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Incorrect Params. Specify the character name.") return true elseif not playerExists(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character doesn't exist.") return true elseif getPlayerAccountId(cid) == getAccountIdByName(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can't buy your own character.") return true elseif not isCharacterForSale(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character is not for sale.") return true elseif not doPlayerRemoveMoney(cid, getOfflinePlayerStorageValue(t[2], price)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Not enough money. This character's price is "..getOfflinePlayerStorageValue(t[2], price).." gold coins.") return true end if not getPlayerByGUID(getOfflinePlayerStorageValue(t[2], owner)) then doOfflinePlayerAddMoney(getPlayerNameByGUID(getOfflinePlayerStorageValue(t[2], owner)), getOfflinePlayerStorageValue(t[2], price)) setOfflinePlayerStorageValue(getPlayerNameByGUID(getOfflinePlayerStorageValue(t[2], owner)), 41792, getPlayerGUIDByName(t[2])) else doPlayerAddMoney(getPlayerByGUID(getOfflinePlayerStorageValue(t[2], owner)), getOfflinePlayerStorageValue(t[2], price)) end doTransferCharacter(t[2], getPlayerAccountId(cid)) setOfflinePlayerStorageValue(t[2], price, 0) setOfflinePlayerStorageValue(t[2], owner, 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have bought the character "'..t[2]..'" for "'..getOfflinePlayerStorageValue(t[2], price)..'" gold coins.') elseif t[1] == "list" then doPlayerPopupFYI(cid, "Houses for sale") end return true ]]></talkaction> </mod>
  18. A variável talkUser foi ajustada para garantir que a conversa seja atribuída corretamente ao jogador. substitua: local talkUser = cid por: local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid A lógica para verificar e atualizar a vocação e o nível do jogador foi revisada para garantir que esteja funcionando corretamente. if isInArray({"promotion", "promot", "promo"}, msg) then selfSay('Você precisa ter 100 [VIP COINS] e estar no level 717217!', cid) talkState[talkUser] = 1 elseif msg == "yes" and talkState[talkUser] == 1 then local playerVocation = getPlayerVocation(cid) if vocation[playerVocation] then if getPlayerLevel(cid) >= level then if getPlayerItemCount(cid, 11192) >= 100 then doPlayerRemoveItem(cid, 11192, 100) local newVocationId = vocation[playerVocation] doPlayerSetVocation(cid, newVocationId) doSendMagicEffect(getPlayerPosition(cid), 12) selfSay("Parabéns, você foi promovido!", cid) else selfSay("Você não tem 100 [VIP COINS] suficientes para ser promovido.", cid) end else selfSay("Desculpe, você precisa estar no level " .. level .. " ou acima para ser promovido!", cid) end else selfSay("Desculpe, você não pode receber promoção.", cid) end talkState[talkUser] = 0 end script completo corrigido: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local vocation = { [2] = 6, [3] = 7, [4] = 8 } function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if (not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid msg = string.lower(msg) local level = 717217 if isInArray({"promotion", "promot", "promo"}, msg) then selfSay('Você precisa ter 100 [VIP COINS] e estar no level 717217!', cid) talkState[talkUser] = 1 elseif msg == "yes" and talkState[talkUser] == 1 then local playerVocation = getPlayerVocation(cid) if vocation[playerVocation] then if getPlayerLevel(cid) >= level then if getPlayerItemCount(cid, 11192) >= 100 then doPlayerRemoveItem(cid, 11192, 100) local newVocationId = vocation[playerVocation] doPlayerSetVocation(cid, newVocationId) doSendMagicEffect(getPlayerPosition(cid), 12) selfSay("Parabéns, você foi promovido!", cid) else selfSay("Você não tem 100 [VIP COINS] suficientes para ser promovido.", cid) end else selfSay("Desculpe, você precisa estar no level " .. level .. " ou acima para ser promovido!", cid) end else selfSay("Desculpe, você não pode receber promoção.", cid) end talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  19. Holograma

    Device System (Compro)

    descreva o sistema que eu faço pra tu meu nobre
  20. function onSay(cid, words, param) local guilds = {} local guild_rank = {} -- Seleciona o level e a guild de cada jogador com guild e com level maior que 10, ordenados pelo level local query = db.getResult("SELECT level, guild_id FROM players WHERE guild_id > 0 AND level > 10 ORDER BY level DESC") -- Caso nenhum jogador seja selecionado, retorna verdadeiro if query:getID() == -1 then return true end repeat local level = query:getDataInt("level") local guild_id = query:getDataInt("guild_id") -- Cria uma tabela dentro da tabela guilds para cada guilda if not guilds[guild_id] then guilds[guild_id] = {level = level, members = 1} -- Se a tabela já existir e o número de membros for menor que 10, soma o level e +1 ao número de membros elseif guilds[guild_id].members < 10 then guilds[guild_id].level = guilds[guild_id].level + level guilds[guild_id].members = guilds[guild_id].members + 1 end -- Termina se não existirem mais resultados until not query:next() query:free() -- Passa os resultados obtidos para a tabela guild_rank, para ordená-la com table.sort for i, k in pairs(guilds) do table.insert(guild_rank, {id = i, level = k.level}) end -- Ordena a tabela guild_rank de acordo com a soma dos levels table.sort(guild_rank, function(a, b) return a.level > b.level end) local i = 0 local str = ' Guild Rank\n' -- Crie uma string com o nome das guildas em um ranking for _, info in pairs(guild_rank) do i = i + 1 str = str .. i .. ' - '.. getGuildNameById(info.id) .. ' - ' .. info.level .. '\n' if i == 10 then break end end -- Se algum erro ocorrer e o ranking não tiver informações, manda a mensagem "No Guild Information..." local ret = str ~= ' Guild Rank\n' and str or "No guild information to be displayed." doPlayerPopupFYI(cid, ret) return true end O erro que você está encontrando, SQLITE ERROR: no such column: guild_id, indica que a coluna guild_id não existe na tabela players. adicione no seu banco de dados: ALTER TABLE players ADD COLUMN guild_id INTEGER DEFAULT 0;
  21. Nome: Dirceu Cesar Moroni Idade: 22 Posição Desejada: Entusiastas de Pokémon Tempo de Experiencia na area: nao sei ao certo mas faz mais de 5 anos que gosto do Mundo de pokémon
  22. Olá senhores e senhoras, alguém poderia me dar uma luz de como fixar o healthinfo na barra de texto ali embaixo? E sempre que eu abro o cliente ela esta fechada, eu tenho que clicar no ícone para abrir ela, tem como deixar fixo da forma que toda vez que eu abrir o cliente ela já esteja aberta? fazendo um grandíssimo favor.
  23. Opa rapaziada, tudo beleza? Estou a procura dessas sprites ou algo parecido, caso alguém ainda tiver e puder estar disponibilizando elas agradeceria muito!
  24. -=[TFS]=- 0.3.6 - 8.60 - NPC Promotion ta Dando Erro no Console e Não Salva Vocação Fica de Primeira Com a Vocação Depois Quando Desloga e Loga Some local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local vocation = { [2] = 6, [3] = 7, [4] = 8 } function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if (not npcHandler:isFocused(cid)) then return false end local talkUser = cid msg = string.lower(msg) local level = 717217 if isInArray({"promotion", "promot", "promo"}, msg) then selfSay('Voce precisa ter 100 [VIP COINS] e estar no level 717217!', cid) talkState[talkUser] = 1 elseif msg == "yes" and talkState[talkUser] == 1 then local playerVocation = getPlayerVocation(cid) if vocation[playerVocation] then if getPlayerLevel(cid) >= level then if getPlayerItemCount(cid, 11192) >= 100 then doPlayerRemoveItem(cid, 11192, 100) local newVocationId = vocation[playerVocation] doPlayerSetVocation(cid, newVocationId) doSendMagicEffect(getPlayerPosition(cid), 12) selfSay("Parabens, voce foi promovido!", cid) else selfSay("Voce nao tem 100 [VIP COINS] suficientes para ser promovido.", cid) end else selfSay("Desculpe, voce precisa estar no level " .. level .. " ou acima para ser promovido!", cid) end else selfSay("Desculpe, voce não pode receber promocao.", cid) end talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) data/npc/scripts/promotion.lua:15: in function <data/npc/scripts/promotion.lua:15> [20/07/2024 08:57:34] [Error - Npc interface] [20/07/2024 08:57:34] data/npc/scripts/promotion.lua:onThink [20/07/2024 08:57:34] Description: [20/07/2024 08:57:34] (luaGetNpcDistanceTo) Thing not found [20/07/2024 08:57:34] [Error - Npc interface] [20/07/2024 08:57:35] data/npc/scripts/promotion.lua:onThink [20/07/2024 08:57:35] Description: [20/07/2024 08:57:35] (luaGetCreatureName) Creature not found [20/07/2024 08:57:35] [Error - Npc interface] [20/07/2024 08:57:35] data/npc/scripts/promotion.lua:onThink [20/07/2024 08:57:35] Description: [20/07/2024 08:57:35] data/npc/lib/npcsystem/npchandler.lua:301: bad argument #3 to 'gsub' (string/function/table expected) [20/07/2024 08:57:35] stack traceback: [20/07/2024 08:57:35] [C]: in function 'gsub' [20/07/2024 08:57:35] data/npc/lib/npcsystem/npchandler.lua:301: in function 'parseMessage' [20/07/2024 08:57:35] data/npc/lib/npcsystem/npchandler.lua:538: in function 'onWalkAway' [20/07/2024 08:57:35] data/npc/lib/npcsystem/npchandler.lua:473: in function 'onThink' [20/07/2024 08:57:35] data/npc/scripts/promotion.lua:15: in function <data/npc/scripts/promotion.lua:15>
  25. When taking Nitazoxanide 500 mg, it's important to avoid certain things to ensure the medication works effectively and to minimize side effects: Alcohol: While nitazoxanide doesn’t have a direct interaction with alcohol, drinking excessive amounts can worsen gastrointestinal side effects like nausea and diarrhea. Grapefruit and Grapefruit Juice: There is no specific interaction reported with nitazoxanide, but it’s generally wise to avoid grapefruit products with many medications, as they can affect drug metabolism. Over-the-Counter Medications: Avoid using antacids or medications that can alter gastrointestinal pH without consulting your healthcare provider, as they may affect the absorption of nitazoxanide. Non-Prescription Supplements: Some supplements can interfere with the effectiveness of nitazoxanide. Always discuss any new supplements or herbal products with your healthcare provider. Missed Doses: Ensure you take nitazoxanide as prescribed. Missing doses can reduce effectiveness and prolong infection. For more info visit : Dose Pharmacy
  1. Mais Resultados
×
×
  • Criar Novo...