-
Total de itens
831 -
Registro em
-
Última visita
-
Dias Ganhos
69
Posts postados por Marshmello
-
-
Crypter
Tem Como Fazer uma porta q so passa se mata todos os monstros de uma area?
-
Agora, MarQuiiM SouZa disse:
Onde Coloco isso (Explica) Ja Ganhou 1 REP+ ganha Outro
acho q e no Action
function onUse
-
57 minutos atrás, Crypter disse:
Não dou suporte a codigos que eu não fiz .. tenta pegar outro ou comenta no link do cara que posto isso
manu queria Uma Script de Porta q se Passace Se Mata todos Os Poke (Ou Monstros sla)
-
11 minutos atrás, atakashi disse:
o meu script vai ajuda nao ?
Crypter
Deve Tar Fazendo man
-
manu queria Uma Script de Porta q se Passace Se Mata todos Os Poke (Ou Monstros sla)
-
Torneio + 150 e -150
-
Alguem AJuda PF
-
Alguem Pode Me AJudar PF Preciso MT
-
-
Ola galerinha estou com erro no meu servidor bem Chato sempre q crio conta no site e vou logar ele n adc as containerBar e da esse erro na distro
Spoiler
[13/03/2017 10:25:43] [Error - CreatureScript Interface]
[13/03/2017 10:25:43] buffer:onLogin
[13/03/2017 10:25:43] Description:
[13/03/2017 10:25:43] (luaDoAddContainerItem) Container not found[13/03/2017 10:25:43] [Error - CreatureScript Interface]
[13/03/2017 10:25:43] buffer:onLogin
[13/03/2017 10:25:43] Description:
[13/03/2017 10:25:43] (luaDoAddContainerItem) Container not found[13/03/2017 10:25:43] [Error - CreatureScript Interface]
[13/03/2017 10:25:43] buffer:onLogin
[13/03/2017 10:25:43] Description:
[13/03/2017 10:25:43] (luaDoAddContainerItem) Container not found[13/03/2017 10:25:43] [Error - CreatureScript Interface]
[13/03/2017 10:25:43] buffer:onLogin
[13/03/2017 10:25:43] Description:
[13/03/2017 10:25:43] (luaDoAddContainerItem) Container not found[13/03/2017 10:25:43] [Error - CreatureScript Interface]
[13/03/2017 10:25:43] buffer:onLogin
[13/03/2017 10:25:43] Description:
[13/03/2017 10:25:43] (luaDoAddContainerItem) Container not found[13/03/2017 10:25:43] [Error - CreatureScript Interface]
[13/03/2017 10:25:43] buffer:onLogin
[13/03/2017 10:25:43] Description:
[13/03/2017 10:25:43] (luaDoAddContainerItem) Container not found[13/03/2017 10:25:43] [Error - CreatureScript Interface]
[13/03/2017 10:25:43] buffer:onLogin
[13/03/2017 10:25:43] Description:
[13/03/2017 10:25:43] (luaDoAddContainerItem) Container not found[13/03/2017 10:25:43] [Error - CreatureScript Interface]
[13/03/2017 10:25:43] buffer:onLogin
[13/03/2017 10:25:43] Description:
[13/03/2017 10:25:43] (luaDoAddContainerItem) Container not found -
ADM ja pode fechar topico resouvido
-
Tmbn estou precisando de sistema de lvl em pokes para o meu
-
Bom Galera estou precisando de uma talkacions q o player digitar um comando spawnar um x monstro e um x local com delay de 5 minutos
aAlguem q possa me ajudar?
-
Estou precisando tmbn
-
Em 26/02/2017 at 16:06, kaleudd disse:
<action actionid="xxxx" event="script" value="changsex.lua"/>
function onUse(cid, item, fromposition, itemex, toposition)if( getPlayerSex(cid) == 0 )then doPlayerSetSex(cid, 1)doPlayerSendTextMessage(cid,22, "You have changed your Gender")doSendMagicEffect(getPlayerPosition(cid), 5)elseif( getPlayerSex(cid) == 1 ) then doPlayerSetSex(cid, 0)doPlayerSendTextMessage(cid,22, "You have changed your Gender")doSendMagicEffect(getPlayerPosition(cid), 5)end return true end end
Vlw Manin Rep+
-
Hi xtibia , Estou Precisando de uma Script q quando o player clicar nela ele troque de sexo
alguem pra dar essa moral
-
4 minutos atrás, tavarb disse:
Sim sim, instalei tudo certinho, com paciência. Só preciso arrumar esse bugzinho. Obrigado!
se eu arrumaar posto aki no post
-
16 minutos atrás, tavarb disse:
Poderia me ajudar? estou com esse problema (JÁ FIZ ESSE PROCEDIMENTO DE MUDAR A FUNCTIONS, MAS NÃO DEU RESULTADO).
OBS: Encontrei o local do erro:
function isInstalled() {
require('config.php');
$con = mysql_connect($config['database']['host'], $config['database']['login'], $config['database']['password']);
mysql_select_db($config['database']['database'],$con);
if(mysql_query("SELECT * FROM shop_offer,shop_history"))
return true;
else
return false;
esse erro tmbn ta cmgh mais ja estou tentando resouver mais seu shop ja foi instalado
-
Agora, Error404 disse:
Não é em nenhum desses arquivos posta o seu OTSERV.CPP pelo hastebin aqui
-
Em 22/02/2017 at 16:00, Error404 disse:
Isso não é erro é um código na source chamado RSA Key, Configurado pra só funcionar com o cliente original do servidor, você não vai conseguir acessar o servidor sem o cliente correto mais se você tiver á source do servidor é só alterar o RSA la.
Sim contenho as souces do Jogo
Minha Protocol.cpp
Spoiler////////////////////////////////////////////////////////////////////////
// OpenTibia - an opensource roleplaying game
////////////////////////////////////////////////////////////////////////
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
////////////////////////////////////////////////////////////////////////
#include "otpch.h"
#if defined WINDOWS
#include <winerror.h>
#endif
#include "protocol.h"
#include "scheduler.h"
#include "connection.h"
#include "outputmessage.h"
#include "tools.h"
#include "rsa.h"
extern RSA g_RSA;
void Protocol::onSendMessage(OutputMessage_ptr msg)
{
#ifdef __DEBUG_NET_DETAIL__
std::cout << "Protocol::onSendMessage" << std::endl;
#endif
if(!m_rawMessages)
{
msg->writeMessageLength();
if(m_encryptionEnabled)
{
#ifdef __DEBUG_NET_DETAIL__
std::cout << "Protocol::onSendMessage - encrypt" << std::endl;
#endif
XTEA_encrypt(*msg);
}
if(m_checksumEnabled)
{
#ifdef __DEBUG_NET_DETAIL__
std::cout << "Protocol::onSendMessage - crypto header" << std::endl;
#endif
msg->addCryptoHeader(m_checksumEnabled);
}
}
if(msg == m_outputBuffer)
m_outputBuffer.reset();
}
void Protocol::onRecvMessage(NetworkMessage& msg)
{
#ifdef __DEBUG_NET_DETAIL__
std::cout << "Protocol::onRecvMessage" << std::endl;
#endif
if(m_encryptionEnabled)
{
#ifdef __DEBUG_NET_DETAIL__
std::cout << "Protocol::onRecvMessage - decrypt" << std::endl;
#endif
XTEA_decrypt(msg);
}
parsePacket(msg);
}
OutputMessage_ptr Protocol::getOutputBuffer()
{
if(m_outputBuffer)
return m_outputBuffer;
if(m_connection)
{
m_outputBuffer = OutputMessagePool::getInstance()->getOutputMessage(this);
return m_outputBuffer;
}
return OutputMessage_ptr();
}
void Protocol::releaseProtocol()
{
if(m_refCount > 0)
Scheduler::getInstance().addEvent(createSchedulerTask(SCHEDULER_MINTICKS, boost::bind(&Protocol::releaseProtocol, this)));
else
deleteProtocolTask();
}
void Protocol::deleteProtocolTask()
{
//dispather thread
assert(!m_refCount);
setConnection(Connection_ptr());
delete this;
}
void Protocol::XTEA_encrypt(OutputMessage& msg)
{
uint32_t k[4];
for(uint8_t i = 0; i < 4; i++)
k = m_key;
int32_t messageLength = msg.getMessageLength();
//add bytes until reach 8 multiple
uint32_t n;
if((messageLength % != 0)
{
n = 8 - (messageLength % 8);
msg.AddPaddingBytes(n);
messageLength = messageLength + n;
}
int32_t readPos = 0;
uint32_t* buffer = (uint32_t*)msg.getOutputBuffer();
while(readPos < messageLength / 4)
{
uint32_t v0 = buffer[readPos], v1 = buffer[readPos + 1], delta = 0x61C88647, sum = 0;
for(int32_t i = 0; i < 32; i++)
{
v0 += ((v1 << 4 ^ v1 >> 5) + v1) ^ (sum + k[sum & 3]);
sum -= delta;
v1 += ((v0 << 4 ^ v0 >> 5) + v0) ^ (sum + k[sum>>11 & 3]);
}
buffer[readPos] = v0;
buffer[readPos + 1] = v1;
readPos += 2;
}
}
bool Protocol::XTEA_decrypt(NetworkMessage& msg)
{
if((msg.getMessageLength() - 6) % 8 != 0)
{
std::cout << "[Failure - Protocol::XTEA_decrypt] Not valid encrypted message size";
int32_t ip = getIP();
if(ip)
std::cout << " (IP: " << convertIPAddress(ip) << ")";
std::cout << std::endl;
return false;
}
uint32_t k[4];
for(uint8_t i = 0; i < 4; i++)
k = m_key;
int32_t messageLength = msg.getMessageLength() - 6, readPos = 0;
uint32_t* buffer = (uint32_t*)(msg.getBuffer() + msg.getReadPos());
while(readPos < messageLength / 4)
{
uint32_t v0 = buffer[readPos], v1 = buffer[readPos + 1], delta = 0x61C88647, sum = 0xC6EF3720;
for(int32_t i = 0; i < 32; i++)
{
v1 -= ((v0 << 4 ^ v0 >> 5) + v0) ^ (sum + k[sum>>11 & 3]);
sum += delta;
v0 -= ((v1 << 4 ^ v1 >> 5) + v1) ^ (sum + k[sum & 3]);
}
buffer[readPos] = v0;
buffer[readPos + 1] = v1;
readPos += 2;
}
//
int32_t tmp = msg.GetU16();
if(tmp > msg.getMessageLength() -
{
std::cout << "[Failure - Protocol::XTEA_decrypt] Not valid unencrypted message size";
uint32_t ip = getIP();
if(ip)
std::cout << " (IP: " << convertIPAddress(ip) << ")";
std::cout << std::endl;
return false;
}
msg.setMessageLength(tmp);
return true;
}
bool Protocol::RSA_decrypt(NetworkMessage& msg)
{
return RSA_decrypt(&g_RSA, msg);
}
bool Protocol::RSA_decrypt(RSA* rsa, NetworkMessage& msg)
{
if(msg.getMessageLength() - msg.getReadPos() != 128)
{
std::cout << "[Warning - Protocol::RSA_decrypt] Not valid packet size" << std::endl;
return false;
}
rsa->decrypt((char*)(msg.getBuffer() + msg.getReadPos()), 128);
if(!msg.GetByte())
return true;
std::cout << "[Warning - Protocol::RSA_decrypt] First byte != 0" << std::endl;
return true;
}
uint32_t Protocol::getIP() const
{
if(getConnection())
return getConnection()->getIP();
return 0;
}
RSA.CPP
Spoiler////////////////////////////////////////////////////////////////////////
// OpenTibia - an opensource roleplaying game
////////////////////////////////////////////////////////////////////////
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
////////////////////////////////////////////////////////////////////////
#include "otpch.h"
#include "rsa.h"
RSA::RSA()
{
m_keySet = false;
mpz_init2(m_p, 1024);
mpz_init2(m_q, 1024);
mpz_init2(m_d, 1024);
mpz_init2(m_u, 1024);
mpz_init2(m_dp, 1024);
mpz_init2(m_dq, 1024);
mpz_init2(m_mod, 1024);
}
RSA::~RSA()
{
mpz_clear(m_p);
mpz_clear(m_q);
mpz_clear(m_d);
mpz_clear(m_u);
mpz_clear(m_dp);
mpz_clear(m_dq);
mpz_clear(m_mod);
}
bool RSA::setKey(const std::string& file)
{
//loads p, q and d from a file
FILE* f = fopen(file.c_str(), "r");
if(!f)
return false;
char p[512], q[512], d[512];
delete fgets(p, 512, f);
delete fgets(q, 512, f);
delete fgets(d, 512, f);
setKey(p, q, d);
return true;
}
void RSA::setKey(const char* p, const char* q, const char* d)
{
boost::recursive_mutex::scoped_lock lockClass(rsaLock);
mpz_set_str(m_p, p, 10);
mpz_set_str(m_q, q, 10);
mpz_set_str(m_d, d, 10);
mpz_t pm1,qm1;
mpz_init2(pm1, 520);
mpz_init2(qm1, 520);
mpz_sub_ui(pm1, m_p, 1);
mpz_sub_ui(qm1, m_q, 1);
mpz_invert(m_u, m_p, m_q);
mpz_mod(m_dp, m_d, pm1);
mpz_mod(m_dq, m_d, qm1);
mpz_mul(m_mod, m_p, m_q);
mpz_clear(pm1);
mpz_clear(qm1);
}
void RSA::decrypt(char* msg, int32_t size)
{
boost::recursive_mutex::scoped_lock lockClass(rsaLock);
mpz_t c,v1,v2,u2,tmp;
mpz_init2(c, 1024);
mpz_init2(v1, 1024);
mpz_init2(v2, 1024);
mpz_init2(u2, 1024);
mpz_init2(tmp, 1024);
mpz_import(c, 128, 1, 1, 0, 0, msg);
mpz_mod(tmp, c, m_p);
mpz_powm(v1, tmp, m_dp, m_p);
mpz_mod(tmp, c, m_q);
mpz_powm(v2, tmp, m_dq, m_q);
mpz_sub(u2, v2, v1);
mpz_mul(tmp, u2, m_u);
mpz_mod(u2, tmp, m_q);
if(mpz_cmp_si(u2, 0) < 0)
{
mpz_add(tmp, u2, m_q);
mpz_set(u2, tmp);
}
mpz_mul(tmp, u2, m_p);
mpz_set_ui(c, 0);
mpz_add(c, v1, tmp);
size_t count = (mpz_sizeinbase(c, 2) + 7)/8;
memset(msg, 0, 128 - count);
mpz_export(&msg[128 - count], NULL, 1, 1, 0, 0, c);
mpz_clear©;
mpz_clear(v1);
mpz_clear(v2);
mpz_clear(u2);
mpz_clear(tmp);
}
int32_t RSA::getKeySize()
{
return (mpz_sizeinbase(m_mod, 2) + 7) / 8;
}
void RSA::getPublicKey(char* buffer)
{
size_t count = (mpz_sizeinbase(m_mod, 2) + 7) / 8;
memset(buffer, 0, 128 - count);
mpz_export(&buffer[128 - count], NULL, 1, 1, 0, 0, m_mod);
}
-
-
n deu erro ele passa sem o poke
-
Em 19/02/2017 at 02:05, Pokemonultimatetwo disse:
Só dei uma modificada no script do @Pokemon x Fire(espero que não se importe).
Tenta assim:
nao funcionou
-
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
[Encerrado]Peça seu script!
em Tópicos Sem Resposta
Postado
Vai fazer Man?