Jump to content

cs007

Conde
  • Posts

    574
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Upvote
    cs007 got a reaction from ianvi in [Arquivado]Como você se protege de DDOS (nukers) ?   
    Ninguém faz mas comentários... Existem vários membros na xtibia nem 1% quis falar sobre.
  2. Upvote
    cs007 reacted to diarmaint in [Resolvido] Global.towns' doesn't exist   
  3. Upvote
    cs007 reacted to Frenvius in Global War 8.70 Full   
    Global War 8.70
     
    Fala galera estou aqui para apresentar o Global War. O antigo Global War que estava online, Bom estou disponibilizando para vocês, um ótimo servidor.
    Confira abaixo alguns detalhes!
     
     

    • Cidades:         
    ├ Carlin               
    ├ Thais                
    ├ Ab'Dendriel       
    ├ Venore             
    ├ Liberty Bay       
    ├ Outlaw Camp    
    ├ Ankrahmun       
    ├ Zao + Razachai!
    ├ Edron               
    ├ Kazordoon        
    ├ Port Hope         
    ├ Svargrund        
    ├ Yalahar            
    ├ Darashia          
    └ e muitas outras.
     

     
    • O Que Contêm no Servidor:
    - War of Emperium (Evento)
    - Zombie Attack (Evento)
    - Raids Automáticas (Script)
    - Bonus 50+ (Script)
    - Database completa (DB)
    - Wrath of Emperor (Mapa-quest)
    - Zao e New Banuta Piece (Mapa)
    - TFS 0.4 (Distro: Anti-Divulgação, War System e No-otbm check)
    - Task 100% RL (Script: Com ranking e bonus bosses)
    - War System com escudos (Script)
    - VIP System (Script)
    - 10 Cidades e 15 Ilhas VIPS (Mapa)
     

     
    • Lista Das Principais Quests (Todas Funcionando 100%):
    ├ The Annihilator Quest              
    ├ Demon Helmet Quest               
    ├ The Elemental Spheres Quest    
    ├ Firewalker Boots Quest             
    ├ The Inquisition Quest               
    ├ Killing in the Name of... Quest   
    ├ The Pits of Inferno Quest          
    ├ Shadows of Yalahar Quest         
    ├ Children of the Revolution Quest
    ├ The New Frontier Quest            
    ├ The Demon Oak Quest              
    ├ Tomes of Knowledge Quest       
    └ In Service of Yalahar Quest       
     

    DOWNLOADS
    DISTRO E SOURCES
     
     
    [Distro 0.4]
     
    [Source]
     
  4. Thanks
    cs007 reacted to Tony Araujo in [TFS 0.3.6/0.4] GuildWar - Anti Entrosa   
    Fala galerinha, tudo bom? Então, hoje venho compartilhar um sistema que fiz a dois anos atrás, uma GuildWar (CityWar) - Anti Entrosa.  Bom, caso alguém não conheça, basicamente é o seguinte: Uma batalha entre duas guildas, onde é estipulado o número máximo de mortes e um tempo, quem estiver com o maior número de mortes até o final do tempo ou quem alcançar todos os abates, ganha.  Ela é Anti - Entrosa porque acontece em cidades específicas e ninguém de fora terá acesso de entrar. Ela conta também com alguns módulos de batalhas diferentes, sendo eles: Tradicional (ou seja, vale tudo), sem UE (não é permitido magias em área) e só SD rune (ou seja, nesta guerra os magos só poderão utilizar a Sudden Death Rune). Você é livre para escolher entre quatro tempos de duração e consequentemente, cada um terá valores diferentes, porém, será possível adicionar mais, remover e/ou editar. 
     
    A configuração do sistema é super fácil e auto explicativa, segue abaixo.
    CityWar_Configurations = { Players_Mode = {min = 5, max = 50}, TimePrice_Mode = {[15] = 50000, [30] = 75000, [60] = 90000, [120] = 120000}, War_Mode = { ["tradicional, padrao, normal, 1"] = 1, ["sem ue, semue, 2"] = 2, ["sosd, apenas sd, só sd, soh sd, 3"] = 3; }, Maps_Mode = { ["grendor"] = {teamA = {x = 32052, y = 33809, z = 6}, teamB = {x = 32172, y = 33784, z = 5}}, ["darashia"] = {teamA = {x = 32859, y = 34023, z = 8}, teamB = {x = 32935, y = 34044, z = 6}}, ["thais"] = {teamA = {x = 32514, y = 33722, z = 7}, teamB = {x = 32479, y = 33681, z = 7}}, ["carlin"] = {teamA = {x = 32441, y = 33527, z = 7}, teamB = {x = 32503, y = 33506, z = 7}}, ["fibula"] = {teamA = {x = 32309, y = 33886, z = 7}, teamB = {x = 32356, y = 33956, z = 6}}, ["edron"] = {teamA = {x = 33038, y = 33663, z = 7}, teamB = {x = 32969, y = 33541, z = 6}}, ["new island"] = {teamA = {x = 32573, y = 34007, z = 7}, teamB = {x = 32496, y = 33949, z = 6}}, ["venore"] = {teamA = {x = 32820, y = 33606, z = 7}, teamB = {x = 32725, y = 33629, z = 7}}; } }  
    Bom, esse é meu primeiro post de estreia à colaboração do Eks e a minha volta ao Open Tibia. Espero que gostem e façam um ótimo proveito. É nós galera! ❤️
    [TonyAraújo] CityWar.zip
  5. Upvote
    cs007 reacted to Yan Liima in [8.60] TFS 0.4 Rev3996 War & Cast   
    Boa noite! Então amigo nessa Source já possui, porém para funcionar corretamente é necessario ter os scripts no servidor. Você pode encontrar aqui: https://www.xtibia.com/forum/topic/246766-sistema-war-system-86-04-com-escudos/
    Ou nesse aqui:
    https://www.xtibia.com/forum/topic/169139-guild-war-system-com-escudos/
  6. Upvote
    cs007 reacted to Ins3rt in Gesior AAC - 2020   
    P.S: Esse site está com grave falha de segurança em vários lugares. É possível realizar SQL Injection atráves de vários inputs.
     
    Que mania que os programadores tem de receber uma variável e não tratar ela, jogando ela direto pra uma query, acontece isso ai...
     
    Um exemplo é o "método" (se é que da pra chamar de método) de recuperar senha, você joga a var $email pra dentro de uma query, então o cara pode simplesmente usar sintaxe sql no campo que será executada.....
  7. Thanks
    cs007 got a reaction from Yan Liima in [8.60] TFS 0.4 Rev3996 War & Cast   
    A sim, perdão. Só me deparei com o error e vim reportar. Obrigado!
  8. Sad
    cs007 got a reaction from Yan Liima in [8.60] TFS 0.4 Rev3996 War & Cast   
    Infelizmente não consegui fazer rodar de forma correta o devtools no ubuntu 16.04, então não consegui instalar o xml2 =/
  9. Upvote
    cs007 reacted to Kydrai in [Resolvido] Não consigo fazer login   
    Ta dizendo que não existe a coluna language na tabela accounts, deve ter o sistema de multi linguagem no seu servidor.
    Você pode remover o sistema do seu servidor ou executar esse comando SQL no seu banco de dados para inserir a coluna:
    ALTER TABLE `accounts` ADD `language` INT(11) NOT NULL DEFAULT '0'  
  10. Thanks
    cs007 reacted to deglorio in Servidor TFS 1.3 Versão 8.6 com site Gesior   
    Olá galera, depois de alguns anos nesse mundo de Otserv resolvi dedicar meu tempo fazendo um servidor na versão 8.6 porém utilizando o TFS 1.3 pois não vi nenhum servidor assim (Não to dizendo que não existe, to dizendo que não conheço). Além disso queria um Gesior compatível com a grandeza desse servidor, vi alguns por ai e resolvi fazer o meu baseando no shopping do Tibia. Vi um gesior do maluco e gostei muito do layout e me baseei nele, porém fiz tudo no Gesior 2012.
     
    Segue abaixo algumas coisas que fiz:
    Account Management.

     
    Account management 2
     

     
    Account Management 3

     
    Shopping Admin

     
    Shopping Admin 2

     
    Shopping 1

    Shopping 2

    Shopping 3

     
    Events

     
    Top Frags

     
    Logo Logo, posto imagens do Servidor.
  11. Upvote
    cs007 reacted to VictorWEBMaster in [GESIOR] VictorWEBMaster 2019v   
    REMOVIDO
  12. Upvote
    cs007 reacted to Administrador in Novo sistema de Cargos e Novas pips!   
    Novo Sistema de Cargos!
    Como sabem, nosso sistema hierárquico é composto por Estagiários e Moderadores. Acrescentamos o cargo Coordenador com o objetivo de ajudar a manter a ordem dessa hierarquia. O cargo não está em uso no momento mas já pode ser visualizado. O update dessa semana consiste em novas pips para a galera! É isso mesmo, depois de tanto tempo finalmente trocamos as pips. As pips para membros serão implementadas na próxima semana.
     
    O que é o sistema de sub-cargos e evolução? O sistema de sub-cargos se resume em divisões onde o membro passa por um processo evolutivo em que será avaliado por um superior. Há cinco níveis de avaliação, ela é dada pelo tempo no cargo e pela determinação. Ao ser aceito na equipe, o membro recebe uma pip. Esta pip irá evoluir após um tempo determinado para uma pip superior, esta, significará que o membro está se determinando para com o fórum. Há fatos que indicam que o método de avaliação (tempo), é invalido para o cargo; nesse sentido, o avanço da pip é dado com o tempo + avaliação da equipe. Em resumo, um membro pode repetir o nível do cargo. Ao alcançar o nível superior do cargo, a equipe realiza uma reunião para decidir se o membro é promovido. CARGO TEMPO NÍVEL Estagiário 1 semanas >1 Estagiário 3 semanas >2 Estagiário 4 semanas >3 Estagiário 6 semanas >4 Estagiário 8 semanas >5 Herói Prévia de ranks para membros (Será adicionado no próximo update) (...) Extra - Separadores de tópico xTibia
    ATUALIZAÇÕES: - Concertado bug dos icons de mensagem e notificação que ficavam irregulares somente na index; - Nova cor de fonte (links) no fórum; - Concertado bug de irregularidade na descrição do search; - Painel de informação de usuário reformulado; - Removido bug que alterava o layout da página ao adicionar textos maiores que o UIP; - Reformulação de botões (para staff);
  13. Upvote
    cs007 reacted to Qwizer in Global 10/11.5 + OtherWorld + Hearth of Destruction Quest+ Eventos   
    Global Full
     
    [CLIENTS COMPATÍVEIS]
      10 e 11.5.
     
    [BUGS E DOWNLOAD]
    BAIXEM E REPORTEM EM: OTXGlobal Full
     
    [FEATURES]
    NEW DEPOT, NEW SPAWN, NEW CAST SYSTEM, NEW NPC SYSTEM VIA BANK BALANCE, NEW CRITICAL BOOST SYSTEM, NEW POTIONS, REWARD SYSTEM, PREY ...
     
    [MAPA]
    FULL GLOBAL MAP WITH FEYRIST
     
    TODAS CIDADES E NOVAS AREAS
    TODAS QUESTS FUNCIONANDO!
     

     

     

     

     

     

     

     

     

     

    [EVENTS]
    WAR-ANTIENTROSA
     
    [CONTATO]
    SKYPE: onjogos WHATSAPP: (66) 998427-4493
     
    [Créditos]Tfs 1.2 Developers -Zbizu - Pitis91 - MatheusMkalo - Gesior - Lundrial
    - M4G0 -
    Fish04k - Printer - Djarek - Ninjalulz - Slavidodo - Thexamx - Socket2810 - Ciroc -Absolute - Gordonbay - Mitsuig - Alissonfgp - Gunz - Bruno Minervino - Comedinha -Hirako - Maya - Mattyx14 – Darkjav - Viking Tibia
  14. Upvote
    cs007 reacted to VictorWEBMaster in Gesior para TFS 0.1   
    Cara, to com meu gesior já para TFS 1.0... Porém estou testando..
  15. Upvote
    cs007 reacted to caotic in TV System by caotic   
    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 /delete
  16. Upvote
    cs007 reacted to VictorWEBMaster in [Arquivado][CLIENTE FLASH][ALL MAKERS] Cliente tibia em flash   
    Novas imagens disponibilizadas!!!
    Opinem!

  17. Upvote
    cs007 reacted to dyego2008 in [Encerrado] Site e database para 10.31   
    Na seção de website tem Gesior que funciona em 10.31 dê uma olhada lá.
  18. Upvote
    cs007 reacted to fitaisolante in Evento Capture The Flag   
    http://www.xtibia.com/forum/topic/197056-ctf-capture-the-flag/
  19. Upvote
    cs007 reacted to Incur in Stamina recuperando lento   
    Aqui:
    rateStaminaLoss = 1 -- o quanto perde a cada minuto online rateStaminaGain = 3 -- ele divide o quando vc ganha.. no caso, ele está dividindo por 3, então a cada 3 minutos off vai dar 1 min de stamina -Diminuia para recuperar mais rápido. rateStaminaThresholdGain = 12 -- ele divide o gain para a stamina premium (se passou acima do limite).. diminua para recuperar mais rápido. staminaRatingLimitTop = 40 * 60 -- o máximo de stamina staminaRatingLimitBottom = 14 * 60 -- esse é para ser o mínimo staminaLootLimit = 14 * 60 -- o quanto que o player deverá ter para não ganhar loot rateStaminaAboveNormal = 1.5 -- não mexa. rateStaminaUnderNormal = 0.5 -- não mexa. staminaThresholdOnlyPremium = true -- deixe true para premium ter um limite maior (acho) Para deixar bem melhor, tente colocar 1 no Gain e 2 no threshold gain... ou pode colocar 0,1 acho
  20. Upvote
    cs007 reacted to craigmabbit in Função para mandar mensagem no default   
    ta ai mano, não sabe procurar nada em
     
    function onThink(interval)
    local Message = {
    "Mensagem aqui!",
    "Mensagem aqui2!",
    "Mensagem aqui3!",
    "Mensagem aqui4!",
    }
    for a, b in pairs(getPlayersOnline()) do
    doPlayerSendTextMessage(b, MESSAGE_EVENT_ORANGE, Message[math.random(#Message)])
    end
    return true
    end
  21. Upvote
    cs007 reacted to zipter98 in Comando pvp on   
    OK. Editei meu comentário logo acima com o código alterado.
  22. Upvote
    cs007 reacted to zipter98 in Comando pvp on   
    data/talkactions/scripts
    local msg = "Agora seu sistema PvP está %s." function onSay(cid, words, param) local _table = { ["on"] = {"ativado", 1}, ["off"] = {"desativado", 0}, } if _table[param:lower()] then local mode = _table[param:lower()] setPlayerStorageValue(cid, 91821, mode[2]) doPlayerSendTextMessage(cid, 27, msg:format(mode[1])) end return true end data/creaturescripts/scripts
     
    --[[ Tags: <event type="statschange" name="PvPStats" event="script" value="nome do arquivo.lua"/> <event type="target" name="PvPTarget" event="script" value="nome do arquivo.lua"/> <event type="login" name="PvPLogin" event="script" value="nome do arquivo.lua"/> ]]-- function onTarget(cid, target) if isPlayer(target) and isPlayer(cid) then if getPlayerStorageValue(cid, 91821) < 1 then doPlayerSendCancel(cid, "Você está com o modo PvP desligado. Se quiser atacar outros jogadores, ative-o.") return false end end return true end function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and isPlayer(attacker) and type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(attacker, 91821) < 1 then doPlayerSendCancel(attacker, "Você está com o modo PvP desligado. Se quiser atacar outros jogadores, ative-o.") return false end end return true end function onLogin(cid) registerCreatureEvent(cid, "PvPTarget") registerCreatureEvent(cid, "PvPStats") return true end
  23. Upvote
    cs007 reacted to Omega in Adicionar dias VIP para todos   
    Então lá vai mais uma tentativa:
    local days_to_add = 2 function onSay(cid, words, param) for _, pid in pairs(getPlayersOnline()) do vip.addVipByAccount(getPlayerAccount(pid) , days_to_add) doPlayerSendTextMessage(pid, 27, "You have received " .. days_to_add .. " VIP days.") end return true end
  24. Upvote
    cs007 reacted to Omega in [AGS] Guild Rank   
    Aviso
    Esse script precisa do Advanced Guild System instalado corretamente para funcionar.
     
    Informações
    Essa talkaction reúne as informações de todos os jogadores que tem guild. Depois, separa os 10 lvls mais altos de cada guild e soma, fazendo um ranking. No final, o jogador que usar o comando recebe uma janela com as 10 guilds (se existirem) mais fortes do servidor, rankeadas pela soma dos 10 levels mais altos (se existirem).
     
    Código
    Salve como guildrank.lua em talkactions/scripts:
     
     
    Agora, registre a talkaction em talkactions.xml:
    <talkactions words="/guildrank" access="0" event="script" value="guildrank.lua"/>
  25. Upvote
    cs007 reacted to zipter98 in Comando tutor para GM   
    Sabe fazer a tag?
    function onSay(cid, words, param) local id = 2 --ID do group id tutor. local player = getPlayerByName(param) if not player then return doPlayerSendCancel(cid, "Esse player não existe, ou está offline.") end doPlayerSendTextMessage(cid, 27, "Você promoveu "..getCreatureName(player).." ao cargo de tutor!") doPlayerSendTextMessage(player, 27, "Você foi promovido por "..getCreatureName(cid).." ao cargo de tutor!") doSendMagicEffect(getThingPos(player), 14) --se não quiser q mande efeito, só tirar essa linha. se quiser q mande, mude o 14 pro efeito desejado. doPlayerSetGroupId(player, id) return true end Anyway,
    <talkaction words="/tutor" access="4" event="script" value="nome do arquivo.lua"/> Só mudar o acess para o group id de GM. Como usar o comando: /tutor nomedojogador.
    E feliz natal.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...