Líderes
Conteúdo Popular
Exibindo conteúdo com a maior reputação em 07/11/15 em %
-
Hunters http://3.1m.yt/ix4CGfBlp.png2 pontos
-
Galera, vim hoje agradecer a todos e dizer que a semana de testes foi um sucesso, e poucos bugs foram encontrados! A inauguração oficial será no dia 13 de julho de 2015, esperamos todos vocês la! Mais uma vez, obrigado a todos!2 pontos
-
Tibia Harry Potter - By Beddy
irandasilvaalve reagiu a beddy por um tópico no fórum
HARRY POTTER ONLINE - by BEDDY Servidor TIBIA HARRY POTTER Alguma vez voce pensou que poderia ser um aluno de HOGWARTS? Agora é sua chance! Venha para o Harry Potter Online e fassa amigos, pegue varinhas, voe de vassoura e muito mais! Estou disponibilizando o servidor pois meu projeto do Harry Potter Online foi por agua abaixo, por causa de um cara que conseguiu rippar as sprites do quilante... Meu projeto já estava 90% andado, mas agora ferrou-se tudo. Então estou mandando a parte do meu projeto que está pronta, porem com sprites do quilante (Já ESTA TUDO ADAPTADO) - O QUE VOCE VAI TER QUE FAZER: Ajustar o servidor... Já estou te dando quase tudo de mao beijada, agora é só fazer alguns ajustes. Como: adicionar NPC, fazer action de compra de TOGA, e coisas simples! Bem.. é isso aproveitem! Distro Totalmente Estavel Sem bugs Sem virus Sem motherfuckingthings! Apenas alegria! -O QUE TEM NO SERVIDOR: •1 Classes: Aluno •O player ao upar um level, ganha "POINTS" para trocar por LIFE OU MANA assim torna o jogo mais sensivel •Mapa Proprio •JA EXISTE VIP E DONATES - AJUSTE PARA O NESCESSARIO -O QUE FALTA NO SERVIDOR: •AJUSTAR LIFE/HIT/LOOT DE MONSTROS - AJUSTAR OS SPRITES DAS HORCRUX (MAS O SISTEMA JA ESTA FUNCIONANDO CORRETAMENTE) -SISTEMAS: • Vassoura • Preparar poçoes (voce pega o axe [iD:2386], usa-o naqueles crystais que estaão espalhados pelo servidor, e com o crystal na backpack, use a magia "preparar", isso vai fazer com que seu caldeirão tenha carga,dai voce poderá dar USE no vial em cima do caldeirão para terminar sua poção!) -SITE HTML INCLUSO! DOWNLOAD: http://depositfiles....files/csh0uuxil http://depositfiles....files/csh0uuxil (INCLUSO: SERVIDOR, CLIENTE, SITE) SCREENS: REP+ PRA MIM POW! SCAN: Por Kaspersky PRO https://www.virustotal.com/file/c5b9fb7a023599d3be295eff034717e55d6e428753164d8377bc79777e34f722/analysis/1342184200/ Por Virus Total CREDITOS: Beddy Erickrusha - fez a parte do mapa do entorno de HOGWARTS,obrigado man!1 ponto -
[OTC] Modificando seu OTcliente
cowboynordico reagiu a Luga03 por um tópico no fórum
Eai Pesosal, blz? estou atualizando o tópico de como Editar as funções mais basicas do OTC! Vou ensinar a trocar o IP do OTC! Trocar a Resolver o Debug que fica preto ao andar! Resolver o erro que diz que não existe um arquivo dat compatível! Como deixar o OTC com aparencia Transplarente! como o OTP Como Mudar o Nome Que Aparece no Canto Superior do OTC! 1.0- Trocar o IP do OTC Primeiramente, Para Rrocar o IP, Localize o Arquivo "Cliente/Module/Cliente_entergame/Entergame.lua" Abra o Arquivo entergame.lua Procure Por: "setUniqueServer" Ai vai ter algo parecido com isto: "EnterGame.setUniqueServer('127.0.0.1', 7171, 854, 270, 210)" Ai o "127.0.0.1" Troque Pelo Seu IP! Agora o OTC esta Entrando Normalmente no seu OTserv! 2.0- Trocar os Arquivos .spr e .dat pelos seus! Vá em data/things/854 Ai Vai ter Dois Arquivos .spr e .dat, Remova eles e troque Pelo Seu! Pronto, Cliente com as Sprites do Seu Servidor! 3.0- Resolver Erro de Arquivo Dat Não Compatível! Existem Duas Soluções! 3.1- A Primeira Solução: Se seus Arquivos .dat e .spr não forem EXTENDIDO, você pode EXTENDER ele, Segue o Tutorial ao Lado >> http://www.tibiaking...ite-de-sprites/<< 3.2- A Segunda Solução: Vá em Cliente\modules\game_things e Abre o Arquivo Things.lua Procure Por: "g_game.enableFeature(GameSpritesU32)" Se seu cliente For EXTENDIDO não mexa em nada! Mas se seu Cliente Não for Extendido Substitua: "g_game.enableFeature(GameSpritesU32)" Por: "--g_game.enableFeature(GameSpritesU32)" 4.0- Para deixar o OTC por padrão com Forma Transplarente Igual ao OTP! Abrir o Arquivo: "modules\game_interface\gameinterface.lua" Procure Por "setupViewMode(0)" obs: Pode ter Até 3 deste! Substitua todos Por "setupViewMode(2)" 5.0- Como Mudar o Nome Que Aparece no Canto Superior do OTC! Vá em modules\client Abra o Arquivo Client.lua e Procure Por: "g_window.setTitle" Vai Tar Algo Mais ou Menos Como Isto: "g_window.setTitle('OTclient')" Oque esta dentro da Aspas na Tag, substitua pelo Nome desejado! ex: "g_window.setTitle('OTclient1000000')" Pronto, Este Tutorial Já Ajudou Muita Gente e Agora Vai Ajudar a Muito mais! Atualizei o Tópico, com Mais Informações, Removi as Imagens Por Deixarem o Tópico com Poluição Visual e Reformulei Todo o Resto do Tópico! Créditos Summer Slyer(Zet0N0Murmurou) Pelo Tutorial! GabrielSapient Por Me Ensinar a Deixar o OTC Transplarente Como o OTP! Wend Por Me Ensinar a Mudar o Nome!1 ponto -
Eae galeerrra xtibiana. Venho disponibilizar o famoso sistema de televisão poketibiano completo o sistema foi feito para ambos os clients tibianos. O sistema permite você assistir outro players jogando assim você fica sem usar itens,falar(so pm), se movimentar e etc... Vamos la: Vá em luascript.cpp e procure: int32_t LuaScriptInterface::luaGetTopCreature(lua_State* L) { //getTopCreature(pos) PositionEx pos; popPosition(L, pos); ScriptEnviroment* env = getEnv(); Tile* tile = g_game.getTile(pos); if(!tile) { pushThing(L, NULL, 0); return 1; } Thing* thing = tile->getTopCreature(); if(!thing || !thing->getCreature()) { pushThing(L, NULL, 0); return 1; } pushThing(L, thing, env->addThing(thing)); return 1; } E coloque embaixo: int32_t LuaScriptInterface::luaGetAllsTvs(lua_State* L) { //getAllsTvs(cid) ScriptEnviroment* env = getEnv(); Player* player = env->getPlayerByUID(popNumber(L)); if (!player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); return 1; } Tvlist::iterator it; it = player->tv.begin(); lua_newtable(L); uint32_t tableplayers = 1; for(uint32_t i = 1; it != player->tv.end(); ++it, ++i) { Player* players = env->getPlayerByUID(*it); if (players) { lua_pushnumber(L, tableplayers); lua_pushnumber(L, env->addThing(players)); pushTable(L); tableplayers = tableplayers+1; } } return 1; } int32_t LuaScriptInterface::luaSetPlayerTv(lua_State* L) { ScriptEnviroment* env = getEnv(); Player* player_tv = env->getPlayerByUID(popNumber(L)); Creature* creature = env->getCreatureByUID(popNumber(L)); if (!creature) { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } Player* player = creature->getPlayer(); if (!player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); return 1; } if (!player_tv) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); return 1; } player_tv->tv.push_back(player->getID()); SpectatorVec::iterator it; SpectatorVec list = g_game.getSpectators(player->getPosition()); Player* tmpPlayer = NULL; Condition* condition = NULL; if((condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_GAMEMASTER, -1, 0, false, GAMEMASTER_INVISIBLE))) { creature->setHideName(false); player->addCondition(condition); g_game.internalCreatureChangeVisible(creature, VISIBLE_GHOST_DISAPPEAR); for(it = list.begin(); it != list.end(); ++it) { if((tmpPlayer = (*it)->getPlayer()) && !tmpPlayer->canSeeCreature(player)) tmpPlayer->sendMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF); } for(AutoList<Player>::iterator pit = Player::autoList.begin(); pit != Player::autoList.end(); ++pit) { if(!pit->second->canSeeCreature(player)) pit->second->notifyLogOut(player); } IOLoginData::getInstance()->updateOnlineStatus(player->getGUID(), false); if(player->isTrading()) g_game.internalCloseTrade(player); player->clearPartyInvitations(); if(player->getParty()) player->getParty()->leave(player); g_game.internalTeleport(player, player_tv->getPosition(), true); } lua_pushboolean(L, true); } int32_t LuaScriptInterface::luaDoSendChannelsTv(lua_State* L) { ScriptEnviroment* env = getEnv(); Player* player = env->getPlayerByUID(popNumber(L)); if (!player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); return 1; } player->sendChannelsDialog(true); lua_pushboolean(L, true); return 1; } int32_t LuaScriptInterface::luaDoRemovePlayerTv(lua_State* L) { ScriptEnviroment* env = getEnv(); Player* player = env->getPlayerByUID(popNumber(L)); Player* creature = env->getPlayerByUID(popNumber(L)); if (!player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); return 1; } for(std::list<uint32_t>::iterator it = player->tv.begin(); it != player->tv.end(); ++it) { if ((*it) == creature->getID()) { Tvlist tv = player->tv; if (!creature) { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); return 1; } Player* player_tv = creature->getPlayer(); if (!player) { return 1; } SpectatorVec::iterator its; SpectatorVec list = g_game.getSpectators(player_tv->getPosition()); Player* tmpPlayer = NULL; Condition* condition = NULL; creature->setHideName(false); if((condition = player_tv->getCondition(CONDITION_GAMEMASTER, CONDITIONID_DEFAULT, GAMEMASTER_INVISIBLE))) { IOLoginData::getInstance()->updateOnlineStatus(player_tv->getGUID(), true); for(AutoList<Player>::iterator pit = Player::autoList.begin(); pit != Player::autoList.end(); ++pit) { if(!pit->second->canSeeCreature(player_tv)) pit->second->notifyLogIn(player_tv); } for(its = list.begin(); its != list.end(); ++its) { if((tmpPlayer = (*its)->getPlayer()) && !tmpPlayer->canSeeCreature(player_tv)) tmpPlayer->sendMagicEffect(player_tv->getPosition(), MAGIC_EFFECT_TELEPORT); } player_tv->removeCondition(condition); g_game.internalCreatureChangeVisible(creature, VISIBLE_GHOST_APPEAR); *it = NULL; } } } lua_pushboolean(L, true); } Continuando em luascript.cpp procure: //doCreatureSay(uid, text[, type = SPEAK_SAY[, ghost = false[, cid = 0[, pos]]]]) lua_register(m_luaState, "doCreatureSay", LuaScriptInterface::luaDoCreatureSay); Coloque embaixo: //doRemovePlayerTv(cid, id) lua_register(m_luaState, "removePlayerTv", LuaScriptInterface::luaDoRemovePlayerTv); //getAllsTv() lua_register(m_luaState, "getTvs", LuaScriptInterface::luaGetAllsTvs); //setPlayerTv(cid, player) lua_register(m_luaState, "setPlayerTv", LuaScriptInterface::luaSetPlayerTv); //doSendChannelstTv(cid) lua_register(m_luaState, "doSendChannelsTv", LuaScriptInterface::luaDoSendChannelsTv); Em luascript.h procure: static int32_t luaGetPlayerParty(lua_State* L); Coloque embaixo: static int32_t luaGetAllsTvs(lua_State* L); static int32_t luaSetPlayerTv(lua_State* L); static int32_t luaDoSendChannelsTv(lua_State* L); static int32_t luaDoRemovePlayerTv(lua_State* L); Vamos agora em game.cpp: Procure: bool Game::playerSay(uint32_t playerId, uint16_t channelId, SpeakClasses type, const std::string& receiver, const std::string& text) E substitua função por esta nova função: bool Game::playerSay(uint32_t playerId, uint16_t channelId, SpeakClasses type, const std::string& receiver, const std::string& text) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()) return false; std::string str; if (player->getStorage(34421, str) && str == "true") { if (type == SPEAK_SAY) { player->getStorage(292924, str); player->sendTextMessage(MSG_STATUS_SMALL, str.c_str()); return false; } switch(type) { case SPEAK_WHISPER: return playerWhisper(player, text); case SPEAK_YELL: return playerYell(player, text); case SPEAK_PRIVATE: case SPEAK_PRIVATE_RED: case SPEAK_RVR_ANSWER: return playerSpeakTo(player, type, receiver, text); case SPEAK_CHANNEL_O: case SPEAK_CHANNEL_Y: case SPEAK_CHANNEL_RN: case SPEAK_CHANNEL_RA: case SPEAK_CHANNEL_W: { if(playerTalkToChannel(player, type, text, channelId)) return true; return playerSay(playerId, 0, SPEAK_SAY, receiver, text); } case SPEAK_BROADCAST: return playerBroadcastMessage(player, SPEAK_BROADCAST, text); case SPEAK_RVR_CHANNEL: return playerReportRuleViolation(player, text); case SPEAK_RVR_CONTINUE: return playerContinueReport(player, text); default: break; } internalCreatureSay(player, SPEAK_SAY, text, false); return false; } uint32_t muteTime = 0; bool muted = player->isMuted(channelId, type, muteTime); if(muted) { char buffer[75]; sprintf(buffer, "You are still muted for %d seconds.", muteTime); player->sendTextMessage(MSG_STATUS_SMALL, buffer); return false; } if(player->isAccountManager()) { player->removeMessageBuffer(); return internalCreatureSay(player, SPEAK_SAY, text, false); } if(g_talkActions->onPlayerSay(player, type == SPEAK_SAY ? CHANNEL_DEFAULT : channelId, text, false)) return true; if(!muted) { ReturnValue ret = RET_NOERROR; if(!muteTime) { ret = g_spells->onPlayerSay(player, text); if(ret == RET_NOERROR || (ret == RET_NEEDEXCHANGE && !g_config.getBool(ConfigManager::BUFFER_SPELL_FAILURE))) return true; } player->removeMessageBuffer(); if(ret == RET_NEEDEXCHANGE) return true; } switch(type) { case SPEAK_SAY: return internalCreatureSay(player, SPEAK_SAY, text, false); case SPEAK_WHISPER: return playerWhisper(player, text); case SPEAK_YELL: return playerYell(player, text); case SPEAK_PRIVATE: case SPEAK_PRIVATE_RED: case SPEAK_RVR_ANSWER: return playerSpeakTo(player, type, receiver, text); case SPEAK_CHANNEL_O: case SPEAK_CHANNEL_Y: case SPEAK_CHANNEL_RN: case SPEAK_CHANNEL_RA: case SPEAK_CHANNEL_W: { if(playerTalkToChannel(player, type, text, channelId)) return true; return playerSay(playerId, 0, SPEAK_SAY, receiver, text); } case SPEAK_PRIVATE_PN: return playerSpeakToNpc(player, text); case SPEAK_BROADCAST: return playerBroadcastMessage(player, SPEAK_BROADCAST, text); case SPEAK_RVR_CHANNEL: return playerReportRuleViolation(player, text); case SPEAK_RVR_CONTINUE: return playerContinueReport(player, text); default: break; } return false; } Continuando em game.cpp procure a função: ReturnValue Game::internalMoveCreature(Creature* creature, Direction direction, uint32_t flags/* = 0*/) E substitua por esta função: ReturnValue Game::internalMoveCreature(Creature* creature, Direction direction, uint32_t flags/* = 0*/) { const Position& currentPos = creature->getPosition(); Cylinder* fromTile = creature->getTile(); Cylinder* toTile = NULL; Position destPos = getNextPosition(direction, currentPos); if(direction < SOUTHWEST && creature->getPlayer()) { Tile* tmpTile = NULL; if(currentPos.z != 8 && creature->getTile()->hasHeight(3)) //try go up { if((!(tmpTile = map->getTile(Position(currentPos.x, currentPos.y, currentPos.z - 1))) || (!tmpTile->ground && !tmpTile->hasProperty(BLOCKSOLID))) && (tmpTile = map->getTile(Position(destPos.x, destPos.y, destPos.z - 1))) && tmpTile->ground && !tmpTile->hasProperty(BLOCKSOLID)) { flags = flags | FLAG_IGNOREBLOCKITEM | FLAG_IGNOREBLOCKCREATURE; destPos.z--; } } else if(currentPos.z != 7 && (!(tmpTile = map->getTile(destPos)) || (!tmpTile->ground && !tmpTile->hasProperty(BLOCKSOLID))) && (tmpTile = map->getTile(Position( destPos.x, destPos.y, destPos.z + 1))) && tmpTile->hasHeight(3)) //try go down { flags = flags | FLAG_IGNOREBLOCKITEM | FLAG_IGNOREBLOCKCREATURE; destPos.z++; } } ReturnValue ret = RET_NOTPOSSIBLE; if((toTile = map->getTile(destPos))) ret = internalMoveCreature(NULL, creature, fromTile, toTile, flags); if(ret != RET_NOERROR) { if(Player* player = creature->getPlayer()) { player->sendCancelMessage(ret); player->sendCancelWalk(); } } Player* player = creature->getPlayer(); if (player) { Tvlist::iterator it; it = player->tv.begin(); for(uint32_t i = 1; it != player->tv.end(); ++it, ++i) { Player* players = getPlayerByID(*it); if (players) { internalTeleport(players, player->getPosition(), true, 0); } } } return ret; } Procure a função: bool Game::playerRequestChannels(uint32_t playerId) Substitua a função por: bool Game::playerRequestChannels(uint32_t playerId) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()) return false; player->sendChannelsDialog(false); return true; } Agora vamos a protocolgame.cpp e procure a função; void ProtocolGame::sendChannelsDialog(bool tv) E substitua por esta função: void ProtocolGame::sendChannelsDialog(bool tv) { NetworkMessage_ptr msg = getOutputBuffer(); std::string str; if(msg) { if (tv) { uint16_t bytes = 0; for(AutoList<Player>::iterator it = Player::autoList.begin(); it != Player::autoList.end(); ++it) { it->second->getStorage(22120, str); if (str == "true") { bytes = bytes+1; } } if (bytes < 1) { player->sendCancel("Não há nenhuma tv online"); return; } TRACK_MESSAGE(msg); msg->AddByte(0xAB); msg->AddByte(bytes); uint16_t id = 200; for(AutoList<Player>::iterator it = Player::autoList.begin(); it != Player::autoList.end(); ++it) { it->second->getStorage(22120, str); if (str == "true") { id = id+1; it->second->getStorage(12121, str); msg->AddU16(id); msg->AddString(str); } } return; } TRACK_MESSAGE(msg); msg->AddByte(0xAB); ChannelList list = g_chat.getChannelList(player); msg->AddByte(list.size()); for(ChannelList::iterator it = list.begin(); it != list.end(); ++it) { if(ChatChannel* channel = (*it)) { msg->AddU16(channel->getId()); msg->AddString(channel->getName()); } } } } Procure em protocolgame.h a seguinta declaração: void sendChannelsDialog(); Substitua por: void sendChannelsDialog(bool tv); Agora vamos em player.h e procure: void sendChannelsDialog() {if(client) client->sendChannelsDialog();} E substitua por: void sendChannelsDialog(bool tv) {if(client) client->sendChannelsDialog(tv);} Procure denovo em player.h: typedef std::list<Party*> PartyList; E adicione embaixo: typedef std::list<uint32_t> Tvlist; Continuando em player.h procure: AttackedSet attackedSet; Coloque embaixo: Tvlist tv; Vamos denovo a protocolgame.cpp e procure: if(player->isAccountManager()) { switch(recvbyte) { case 0x14: parseLogout(msg); break; case 0x96: parseSay(msg); break; default: sendCancelWalk(); break; } } Coloque embaixo: std::string str; if (player->getStorage(34421, str) && str == "true") { player->getStorage(292924, str); switch(recvbyte) { case 0x14: parseLogout(msg); break; case 0x96: parseSay(msg); break; case 0x97: // request channels parseGetChannels(msg); break; case 0x98: // open channel parseOpenChannel(msg); break; case 0x99: // close channel parseCloseChannel(msg); break; case 0x9A: // open priv parseOpenPriv(msg); break; case 0x1E: // keep alive / ping response parseReceivePing(msg); break; default: player->sendTextMessage(MSG_INFO_DESCR, str); break; } Seguidamente vá em creatureevent.cpp e procure: else if(tmpStr == "preparedeath") m_type = CREATURE_EVENT_PREPAREDEATH; Coloque embaixo: else if(tmpStr == "selecttv") m_type = CREATURE_EVENT_SELECTTV; Procure depois: case CREATURE_EVENT_PREPAREDEATH: return "onPrepareDeath"; Coloque embaixo: case CREATURE_EVENT_SELECTTV: return "onSelectTv"; Procure: case CREATURE_EVENT_PREPAREDEATH: return "cid, deathList"; Coloque embaixo: case CREATURE_EVENT_SELECTTV: return "cid, id"; Procure: uint32_t CreatureEvent::executeChannelJoin(Player* player, uint16_t channelId, UsersMap usersMap) { //onJoinChannel(cid, channel, users) if(m_interface->reserveEnv()) { ScriptEnviroment* env = m_interface->getEnv(); if(m_scripted == EVENT_SCRIPT_BUFFER) { std::stringstream scriptstream; scriptstream << "local cid = " << env->addThing(player) << std::endl; scriptstream << "local channel = " << channelId << std::endl; scriptstream << "local users = {}" << std::endl; for(UsersMap::iterator it = usersMap.begin(); it != usersMap.end(); ++it) scriptstream << "users:insert(" << env->addThing(it->second) << ")" << std::endl; scriptstream << m_scriptData; bool result = true; if(m_interface->loadBuffer(scriptstream.str())) { lua_State* L = m_interface->getState(); result = m_interface->getGlobalBool(L, "_result", true); } m_interface->releaseEnv(); return result; } else { #ifdef __DEBUG_LUASCRIPTS__ char desc[35]; sprintf(desc, "%s", player->getName().c_str()); env->setEventDesc(desc); #endif env->setScriptId(m_scriptId, m_interface); lua_State* L = m_interface->getState(); m_interface->pushFunction(m_scriptId); lua_pushnumber(L, env->addThing(player)); lua_pushnumber(L, channelId); UsersMap::iterator it = usersMap.begin(); lua_newtable(L); for(int32_t i = 1; it != usersMap.end(); ++it, ++i) { lua_pushnumber(L, i); lua_pushnumber(L, env->addThing(it->second)); lua_settable(L, -3); } bool result = m_interface->callFunction(3); m_interface->releaseEnv(); return result; } } else { std::cout << "[Error - CreatureEvent::executeChannelJoin] Call stack overflow." << std::endl; return 0; } } Coloque embaixo: uint32_t CreatureEvent::executeSelectTv(Player* player, uint16_t id) { //onSelectTv(cid, id) if(m_interface->reserveEnv()) { ScriptEnviroment* env = m_interface->getEnv(); if(m_scripted == EVENT_SCRIPT_BUFFER) { std::stringstream scriptstream; scriptstream << "local cid = " << env->addThing(player) << std::endl; scriptstream << "local id = " << id << std::endl; scriptstream << m_scriptData; bool result = true; if(m_interface->loadBuffer(scriptstream.str())) { lua_State* L = m_interface->getState(); result = m_interface->getGlobalBool(L, "_result", true); } m_interface->releaseEnv(); return result; } else { #ifdef __DEBUG_LUASCRIPTS__ char desc[35]; sprintf(desc, "%s", player->getName().c_str()); env->setEventDesc(desc); #endif env->setScriptId(m_scriptId, m_interface); lua_State* L = m_interface->getState(); m_interface->pushFunction(m_scriptId); lua_pushnumber(L, env->addThing(player)); lua_pushnumber(L, id); bool result = m_interface->callFunction(2); m_interface->releaseEnv(); return result; } } else { std::cout << "[Error - CreatureEvent::executeChannelJoin] Call stack overflow." << std::endl; return 0; } } Vá em creatureevent.h e procure: CREATURE_EVENT_ATTACK, Coloque embaixo: CREATURE_EVENT_SELECTTV Procure continuando em creatureevent.h: uint32_t executeCombat(Creature* creature, Creature* target); Coloque embaixo: uint32_t executeSelectTv(Player* player, uint16_t id); Vá agora em game.cpp denovo e procure a função: bool Game::playerOpenChannel(uint32_t playerId, uint16_t channelId) Substitua a função por: bool Game::playerOpenChannel(uint32_t playerId, uint16_t channelId) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()) return false; if (channelId >= 200) { CreatureEventList tvEvents = player->getCreatureEvents(CREATURE_EVENT_SELECTTV); for(CreatureEventList::iterator it = tvEvents.begin(); it != tvEvents.end(); ++it) (*it)->executeSelectTv(player, channelId); return true; } ChatChannel* channel = g_chat.addUserToChannel(player, channelId); if(!channel) { #ifdef __DEBUG_CHAT__ std::cout << "Game::playerOpenChannel - failed adding user to channel." << std::endl; #endif return false; } if(channel->getId() != CHANNEL_RVR) player->sendChannel(channel->getId(), channel->getName()); else player->sendRuleViolationsChannel(channel->getId()); return true; } Vá em data/lib e crie um novo arquivo lua chamado tv system: names = {} storage_hastv = 22120 storage_watchtv = 34421 storage_nametv = 12121 storage_idwatchtv = 21213 storage_msgwatch = 292924 storage_namewatchtv = 21923 storage_save_group_id = 63732 smallerros = false ERROR_ID_NOT_FOUND = "ERROR\nPLAYER NOT FOUND\nSet Storage FALSE ON LOGIN" MSG_TV_SYSTEM = "Esta ação não e possivel você esta assistindo" MSG_CREATE_TV = "Parabéns, você criou sua TV " MSG_LOGOUT_TV = "Você saiu da tv " MSG_LOGOUT_TV_TOWN = "Você retornou a sua cidade " ID_ITEM_TV = 1949 ---- IMPORTANTE ID DA SUA CAM(CAMERA) MSG_WATCH_TV = "Você esta assitindo a uma tv" MSG_HAS_TV = "Você ja tem tv" MSG_NO_HAS_TV = "Você não tem tv" MSG_ENTER_PLAYER = "Um novo player entrou - " MININUM_STRING_CARACTER = 4 HAS_TV = "Você ja tem uma tv" MSG_DELETE_TV = "Você deletou sua channel com sucesso" MSG_WATCH_TV_ENTER_TV = "Você entrou na channel " NAME_WRONG = "Nome incorreto" MSG_HAS_NAME_TV = "Desculpe, ja existe uma tv com este nome escolha outro por favor" function setBooleanStorage(cid, storage, bool) if not bool then setPlayerStorageValue(cid, storage, -1) return true end setPlayerStorageValue(cid, storage, "true") return true end function checkFindStrings(str, array) for i=1, #array do if string.find(str, array[i]) then return true end end return false end function playerHasTv(cid) return getPlayerStorageValue(cid, storage_hastv) == "true" and true end function playerWatchTv(cid) return getPlayerStorageValue(cid, storage_watchtv) == "true" and true end function getTvOnlines() local t = {} local online = getPlayersOnline() for i=1, #online do if playerHasTv(online[i]) then table.insert(t, online[i]) end end return t end function getNamesTv(sep) local tvs = getTvOnlines() str = "" for i=1, #tvs do str = str..sep..getTvName(tvs[i]) end return str end function getIdByTvName(name) local tvs = getTvOnlines() for i=1, #tvs do if tvs[i] == name then return name end end return false end function stopWatchAllsPlayerTv(id) local onlines = getTvs(id) for i=1, #onlines do playerStopWatchTv(onlines[i]) end return true end function getNameTv(id) if not isPlayer(id) then print(ERROR_ID_NOT_FOUND) return false end local storage = getPlayerStorageValue(id, storage_nametv) if storage ~= -1 then return storage end return "" end function createNewTv(cid, name) if #name < MININUM_STRING_CARACTER or checkFindStrings(name, names) then doPlayerSendCancel(cid, NAME_WRONG) return false end local tvs = getTvOnlines() for i=1, #tvs do if getNameTv(tvs[i]) == name then doPlayerSendCancel(cid, MSG_HAS_NAME_TV) return false end end if playerHasTv(cid) then doPlayerSendCancel(cid, MSG_HAS_TV) return false end if playerWatchTv(cid) then doPlayerSendCancel(cid, MSG_WATCH_TV) return false end setBooleanStorage(cid, storage_hastv, true) setPlayerStorageValue(cid, storage_nametv, name) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, MSG_CREATE_TV..name) return true end function getTvNameById(id) if not isPlayer(id) then print(ERROR_ID_NOT_FOUND) return false end return getPlayerStorageValue(id, storage_nametv) end function playerWatchTv(cid, id) if not isPlayer(id) then if smallerros then print(ERROR_ID_NOT_FOUND) end return false end if playerHasTv(cid) then doPlayerSendCancel(cid, MSG_HAS_TV) return false end if playerWatchTv(cid) then doPlayerSendCancel(cid, MSG_WATCH_TV) return false end local name = getTvNameById(id) setBooleanStorage(cid, storage_watchtv, true) setPlayerStorageValue(cid, storage_msgwatch, MSG_TV_SYSTEM) setPlayerStorageValue(cid, storage_idwatchtv, id) setPlayerStorageValue(cid, storage_namewatchtv, name) setPlayerStorageValue(cid, storage_save_group_id, getPlayerGroupId(cid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, MSG_WATCH_TV_ENTER_TV) doPlayerSendTextMessage(id, MESSAGE_STATUS_CONSOLE_BLUE, MSG_ENTER_PLAYER..getCreatureName(cid)) setPlayerTv(cid, id) return true end function playerStopWatchTv(cid) local id = getPlayerStorageValue(cid, storage_idwatchtv) local name = getPlayerStorageValue(cid, storage_namewatchtv) local town = getPlayerTown(cid) local namet = getTownName(town) local post = getTownTemplePosition(town) if getPlayerStorageValue(cid, storage_watchtv) ~= "true" then return true end removePlayerTv(cid, id) setBooleanStorage(cid, storage_watchtv, false) setPlayerStorageValue(cid, storage_idwatchtv, -1) setPlayerStorageValue(cid, storage_namewatchtv, -1) setPlayerGroupId(cid, getPlayerStorageValue(cid, storage_save_group_id)) doTeleportThing(cid, post) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, MSG_LOGOUT_TV..name) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, MSG_LOGOUT_TV_TOWN..namet) return true end function deleteTv(cid) if getPlayerStorageValue(cid, 22120) ~= "true" then return false end stopWatchAllsPlayerTv(cid) setBooleanStorage(cid, storage_hastv) setPlayerStorageValue(cid, storage_nametv, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, MSG_DELETE_TV) return true end Agora vamos em actions e crie um arquivo lua chamado tv e coloque: function onUse(cid, item, fromPosition, itemEx, toPosition) doSendChannelsTv(cid) end Vá em actions.xml e coloque a seguinte configurando com o id da sua tv: Agora vamos em talkactions e crie um novo arquivo lua chamado delete e coloque isto: function onSay(cid, words, param, channel) deleteTv(cid) return true end Agora vamos em talkactions.xml e coloque a seguinte tag: <talkaction words="/delete" event="script" value="delete.lua"/> Agora vamos a creaturescripts e crie um arquivo lua chamado createTv e coloque: function onTextEdit(cid, it:em, newText) if item.itemid == ID_ITEM_TV then createNewTv(cid, newText) return true end return true end Crie outro chamado de tv e coloque: function onSelectTv(cid, id) local tv = getTvOnlines() local idstarter = 200 for i=1, #tv do local tv = tv[i] local sub_id = i+idstarter if sub_id == id then playerWatchTv(cid, tv) end end return true end Crie outro chamado de tvlogout : function onLogout(cid) if isPlayer(cid) then deleteTv(cid) playerStopWatchTv(cid) end return true end Vá em creaturescripts.xml e coloque as seguintes as tags: <event type="textedit" name="newTv" event="script" value="createTv.lua"/> <event type="selecttv" name="selecttv" event="script" value="tv.lua"/> <event type="logout" name="tvlogout" event="script" value="tvlogout.lua"/> Vá em data/xml/group.xml e abra o arquivo e coloque o novo group: <group id="8" name="Tv" flags="3845069447162" customFlags="2097151" access="1" violationReasons="4" nameViolationFlags="2"/> Video do sistema em execução: E recomendavel NUNCA modificar as storages porques estão ligados aos codigos. Para mudar o id da camera e so mudar a variavel ID_ITEM_TV Para deletar uma tv diga o comand /delete1 ponto
-
DevAAC (TFS 1.0)
Administrador reagiu a Mudrock por um tópico no fórum
Site Original Download https://github.com/DevelopersPL/DevAAC Créditos : Don Daniello1 ponto -
Buff que muda a outfit e perde HP delay.
Storm Night reagiu a Tiagone por um tópico no fórum
ja tento coloca local health = -80 -- A cada 1 segundo quantos aumentar de vida se n me engano é só coloca o - na frente do numero1 ponto -
[Encerrado] Por Favor sou novato e tenho um problema para entrar no otserv que baixei
nunes3629 reagiu a JOSHSILLER por um tópico no fórum
Ola, Baixei um ot aqui no XTibia otserv versao 10.78 10.79 : http://www.xtibia.com/forum/topic/233142-global-xtibia-1079-full-oramond-cast-system-lions-rock-v13/ Consegui configurar o site no Xampp coloco o ip no config.lua abro o site e quando tento logar diz serv off mesmo com o site online pelo Xampp, este é meu config lua: worldType = "pvp" hotkeyAimbotEnabled = "yes" protectionLevel = 8 killsToRedSkull = 5 killsToBlackSkull = 8 pzLocked = 60000 removeAmmoWhenUsingDistanceWeapon = "yes" removeChargesFromRunes = "yes" timeToDecreaseFrags = 8 * 60 * 60 * 1000 whiteSkullTime = 15 * 60 * 1000 stairJumpExhaustion = 2000 experienceByKillingPlayers = "no" ip = "meuip do no-ip" bindOnlyGlobalAddress = "no" loginProtocolPort = 7171 gameProtocolPort = 7172 statusProtocolPort = 7171 maxPlayers = "1000" motd = "Welcome to Thornia!" onePlayerOnlinePerAccount = "yes" allowClones = "no" serverName = "Thornia" statusTimeout = 60000 replaceKickOnLogin = "yes" maxPacketsPerSecond = 300 pushCreatureDelay = 1 * 1000 deathLosePercent = -1 housePriceEachSQM = 1000 houseRentPeriod = "never" timeBetweenActions = 200 timeBetweenExActions = 1000 mapName = "realmap" mapAuthor = "Thornia" marketOfferDuration = 30 * 24 * 60 * 60 premiumToCreateMarketOffer = "yes" checkExpiredMarketOffersEachMinutes = 60 maxMarketOffersAtATimePerPlayer = 100 mysqlHost = "127.0.0.1" mysqlUser = "root" mysqlPass = "senhado xamp esta correta" mysqlDatabase = "global" mysqlPort = 3306 mysqlSock = "" passwordType = "sha1" allowChangeOutfit = "yes" freePremium = "yes" kickIdlePlayerAfterMinutes = 200 maxMessageBuffer = 4 noDamageToSameLookfeet = "no" emoteSpells = "no" rateExp = 50 rateSkill = 20 rateLoot = 10 rateMagic = 7 rateSpawn = 1 deSpawnRange = 2 deSpawnRadius = 50 staminaSystem = "yes" defaultPriority = "high" startupDatabaseOptimization = "no" ownerName = "" ownerEmail = "" url = "http://otland.net/" location = "Canada" o site abre mas o ot aparece online no executavel mas n abre quando tento logar no tibia alguem teria alguma ideia do que seja, agradeço desde já, e se postou no lugar errado a duvida pessoa desculpas.1 ponto -
Ola amigos e seguidores do Eribaiak... Hoje fiquei sabendo da volta do Xtibia. E tomei a decisão de tbm voltar com o Eribaiak.... Em breve estarei disponibilizando uma nova versão com muita novidade... Gostaria de saber se ainda tem alguém que segue o progeto e tiver sugestões ou quiser ajudar na área de desenvolvimento entre em contato comigo atraves de mensagem privada.1 ponto
-
PxG Sprites - Megas - Itens
Yan Oliveira reagiu a mariano1 por um tópico no fórum
se não em engano tem um tópico com essas sprites . basta recortar . vou conseguir o link pra vc @ Link http://www.xtibia.com/forum/topic/234156-novas-sprites-nature-pxg/1 ponto -
[Encerrado] Erro no theforgottenserver
ball cat reagiu a SkyDarkyes por um tópico no fórum
Posta seu config.lua1 ponto -
Potions por %
SkyDarkyes reagiu a RigBy por uma questão
Antes de alguém vim fala, sim eu podia ter feito isso em um script só, mas eu to com preguiça ta ai: Action: x % de life: local porcetagem = 5 -- 5% function onUse(cid, item, fromPosition, itemEx, toPosition) doCreatureAddHealth(cid, math.ceil(getCreatureMaxHealth(cid) / 100 * porcetagem)) doRemoveItem(item.uid, 1) return true end x % de Mana local porcetagem = 5 -- 5% function onUse(cid, item, fromPosition, itemEx, toPosition) doCreatureAddMana(cid, math.ceil(getCreatureMaxMana(cid) / 100 * porcetagem)) doRemoveItem(item.uid, 1) return true end x % de life e mana: local porcetagemH = 5 -- 5% -- Life local porcetagemM = 5 -- 5% -- Mana function onUse(cid, item, fromPosition, itemEx, toPosition) doCreatureAddHealth(cid, math.ceil(getCreatureMaxHealth(cid) / 100 * porcetagemH)) doPlayerAddMana(cid, math.ceil(getCreatureMaxMana(cid) / 100 * porcetagemM)) doRemoveItem(item.uid, 1) return true end Aumenta as skill's por um determinado tempo: local melee = 5 -- Axe,Sword,Club Skill local shield = 10 -- Shielding Skill local distance = 5 -- Distance Skill local magic = 10 -- Magic level local tempo = 15 -- 15 minutos local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo * 60 * 1000) -- 10 minutes setConditionParam(condition, CONDITION_PARAM_SKILL_MELEE, melee) setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, distance) setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, magic) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, shield) function onUse(cid, item, fromPosition, itemEx, toPosition) if(doAddCondition(cid, condition)) then doSendMagicEffect(fromPosition, CONST_ME_MAGIC_RED) doRemoveItem(item.uid, 1) end return true end tag's, .xml <action itemid="IDDOITEM" event="script" value="Nomedoscript.lua"/> <action itemid="IDDOITEM" event="script" value="Nomedoscript.lua"/> <action itemid="IDDOITEM" event="script" value="Nomedoscript.lua"/> <action itemid="IDDOITEM" event="script" value="Nomedoscript.lua"/>1 ponto -
Global 10/11.5 + OtherWorld + Hearth of Destruction Quest+ Eventos
snop reagiu a Malucovisk por um tópico no fórum
Deu isso dai, cliquei em no. O npc addon não funciona, tento adicionar ele e o mesmo não aparece. Já arrumei e coloquei atalhos em warzone, wote, poi, inquisition e coloquei tp pra trainers off e hunts modificadas ao redor de thais, depois postarei o server aqui. O bug do roaring lion quando abria o loot é simples, basta adicionar isso no items <item id="21420" article="a" name="dead noble lion"> <attribute key="containerSize" value="10" /> <attribute key="decayTo" value="0" /> <attribute key="duration" value="900" /> <attribute key="corpseType" value="blood" /> <attribute key="fluidSource" value="blood" /> </item>1 ponto -
[OFF] Animes
Shadow Phantom reagiu a Oiuhygwueuho por um tópico no fórum
huehuehue queria ver se dava isso dava de enganar altas pessoas1 ponto -
Auto-Restarter Com Screen Linux Debian 6.0 (100% Funcional)
danilo9317 reagiu a Administrador por um tópico no fórum
Restarter Em Linux (100% Funcional) Testado em Debian 6.0 Primeiro de tudo você deve se logar na máquina usando SSH, não vou cobrir isso aqui neste tutorial, pois é o básico do básico para entrar em um servidor linux. Usaremos o Screen que é um aplicativo do linux que te permite trabalhar com várias janelas e já que precisamos deixar um OT funcionando mesmo quando a gente saia do SSH, iremos usá-lo. Instalando Screen sudo apt-get update sudo apt-get install screen Comandos Básicos do Screen Screen -ls (listagem de screens abertas) root@globalwarts:~# screen -ls There is a screen on: 2037.pts-0.globalwarts (02/01/12 16:40:47) (Detached) 1 Socket in /var/run/screen/S-root.[/left] screen (abre uma screen nova) screen -r 2037.pts-0.globalwarts CTRL + A + D (volta para a tela anterior) Outras dicas (enviadas por usuários) screen -s nome (permite dar um nome a screen - thx kydrai) crtl + A (que deixa você "rolar" (scrollback) a screen - thx kydrai) Pronto, já aprendeu screen né? Criando o Restarter em Linux Supondo que o meu executável compilado se chame theforgottenserver Na mesma pasta do seu otserver, faça: pico autoRestarter.sh Agora cole no arquivo: while true; do ./theforgottenserver; done Abra a screen nova para que ele não feche quando voce sair do SSH: screen Não se esqueça de dar permissões de escrita ao restarter e ao seu executável do OTserv chmod 777 autoRestarter.sh chmod 777 theforgottenserver Execute dentro da screen ./autoRestarter.sh Espero que tenha ajudado, quando eu precisei não encontrei em nenhum forum BR, acho que é legal trazer esse conhecimento para a galera.1 ponto -
Subwat Kamikaze V26 - Atualização 24/03
animestvlh reagiu a fortation por um tópico no fórum
da vontade de vomitar1 ponto -
[Friday13War] (V4.1) - (Evolução X-Dream) {8.60}
animestvlh reagiu a jacking por um tópico no fórum
Update V3.0 - Download disponível. . . . Arrumado um delay que dava quando avisava a troca de mapa (favor, quem baixou o antigo V3, exclua e baixe esse)1 ponto