Ir para conteúdo

DarkWore

Membro
  • Registro em

  • Última visita

Tudo que DarkWore postou

  1. DarkWore postou uma resposta no tópico em Suporte Tibia OTServer
    Não pague o cara para falar o bug, passe o cliente do seu OT irei logar e averiguar, informe também sua base e o tipo de servidor é derivado ou normal?
  2. Como é PDA Não tem como extender os effects
  3. O TFS 0.4 é o melhor e mais estável porém o TFS Do momento é o 1.2 Recomendo se for Poketibia 0.4
  4. Ele disse corretamente sobre o luascript.cpp porém no arquivo só tem as funções utilizadas que é essa: int32_t LuaInterface::luaDoShowTextDialog(lua_State* L) { //doShowTextDialog(cid, itemid, text) std::string text = popString(L); uint32_t itemId = popNumber(L); ScriptEnviroment* env = getEnv(); if(Player* player = env->getPlayerByUID(popNumber(L))) { player->setWriteItem(NULL, 0); player->sendTextWindow(itemId, text); lua_pushboolean(L, true); } else { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } Entendi agora oque você quer porém eu realmente nunca pensei nisso, tente ver oque á função puxa e oque o script puxa e tente caçar na source e em scripts. Boa Sorte
  5. @mastof Tente por aqui: https://github.com/edubart/otclient/wiki/Compiling-on-Windows
  6. Eu não entendi muito bem sua dúvida mais se você quer modificar o conteúdo da janela vai no arquivo lua do comando e modifica ao seu gosto, agora para achar esse arquivo é simples vá em: data/talkactions/talkactions.xml e procure no xml por: /commands depois disso vai achar o comando e vai estár assim: <talkaction log="yes" words="/exemplo" access="1" event="script" value="exemplo.lua"/> e basta abrir o arquivo lua achado com o nome configurado ae no caso aqui é: value="exemplo.lua"/> Espero ter ajudado desculpe caso não for isso não entendi sua dúvida. Boa Sorte
  7. DarkWore postou uma resposta no tópico em Suporte Tibia OTServer
    8.54
  8. Existe esse tutorial aqui mesmo: Boa Sorte
  9. Olá Amigo, Primeiramente você vai precisar do Dev use esse que o amigo acima postou: http://www.mediafire.com/download/os3063htddwxlb9/dev-cpp.rar após isso abra o programa e vá em: Após isso procure pelo local da sua source e clique em abrir depois disso basta clicar em compilar ou CTRL+ F9: Após isso aguarde á compilação terminar. Boa Sorte
  10. Vai em Data/Modules/Game_Things/Things.lua Abre o arquivo things.lua e procura por: function load() local version = g_game.getClientVersion() Vejá se no arquivo tem isso: g_game.enableFeature(GameSpritesAlphaChannel) Também pode ser um desses outros faltando ou está atrapalhando á visão do OTCliente, Teste tirando e colocando, ambos: g_game.enableFeature(GameSpritesU32) g_game.enableFeature(GameMagicEffectU16) Boa Sorte
  11. DarkWore postou uma resposta no tópico em Suporte Tibia OTServer
    Talvez uma source da versão do seu NTO de Tibia normal funcione, mais se foi feito alguma modificação ou adicionado funções, você terá que adaptar á base para o NTO Funcionar Corretamente, Á Melhor coisa que você pode fazer é testar uma source adaptada. Tente essa: Source do NTO White De Qualquer forma eu dei uma olhada na base do NTO Hero, ela é derivada da base do shinobi, então tente á source do shinobi também. Boa Sorte
  12. DarkWore postou uma resposta no tópico em Formação de Equipe
    Muito Bom, Parabéns á Equipe.
  13. Sim eu não curto muito isso de pegar códigos de outros fóruns e trazer ao tk, porém vejo como algo necessário, em breve irei trazer códigos próprios só preciso de tempo para escrever, vamos ver se á minha dedicação vai ser o suficiente pra conseguir uma vaga de estagiário Obrigado por Aprovar
  14. Bom essa função serve para seguir determinado monstro. Exemplo: (você irá seguir á criatura com nome de Tibiaking) doPlayerFollowCreature(cid,getCreatureName("Tibiaking") Vá em luascript.cpp e procure por: lua_register (m_luaState, "doPlayerSetPartner", LuaInterface :: luaDoPlayerSetPartner); embaixo da linha acima coloque: // doPlayerFollowCreature (cid) Lua_register (m_luaState, "doPlayerFollowCreature", LuaInterface :: luaDoPlayerFollowCreature); no mesmo arquivo procure por: int32_t LuaInterface :: luaDoPlayerSetPartner (lua_State * L) após á linha acima coloque embaixo: int32_t LuaInterface::luaDoPlayerFollowCreature(lua_State* L) { //doPlayerFollowCreature(cid, target) ScriptEnviroment* env = getEnv(); Creature* creature = env->getCreatureByUID(popNumber(L)); if(!creature) { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); return 1; } Player* player = env->getPlayerByUID(popNumber(L)); if(!player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } g_game.playerFollowCreature(player->getID(), creature->getID()); lua_pushboolean(L, true); return 1; } depois disso vá em luascript.h e procure por: static int32_t luaDoPlayerSetPartner(lua_State* L); e por fim embaixo da linha acima coloque: static int32_t luaDoPlayerFollowCreature(lua_State* L); Créditos Syntax (Por desenvolver e postar em outro fórum) Eu (Por trazer ao fórum)
  15. DarkWore postou uma resposta no tópico em Scripts tfs 0.4 (OLD)
    De Certa forma podemos dizer que sim á versão é 0.3.6
  16. DarkWore postou uma resposta no tópico em Scripts tfs 0.4 (OLD)
    TV System é um sistema que possibilita players assistirem outros jogadores pela tv em seu servidor, bom eu só irei deixar á parte dos códigos aqui vocês terão que desenvolver os scripts em lua para funcionar porém os códigos estão prontos e funcionais. em luascript.cpp adicione: //getCreatureNoMove(cid) lua_register(m_luaState, "getCreatureNoMove", LuaScriptInterface::luaGetCreatureNoMove); //doCreatureSetNoMove(cid, block) lua_register(m_luaState, "doCreatureSetNoMove", LuaScriptInterface::luaDoCreatureSetNoMove); //doInviteToPrivateChannel(cid, msg) lua_register(m_luaState, "doInviteToPrivateChannel", LuaScriptInterface::luaDoInviteToPrivateChannel); //doRemoveIntoPrivateChannel(cid, msg) lua_register(m_luaState, "doRemoveIntoPrivateChannel", LuaScriptInterface::luaDoRemoveIntoPrivateChannel); //doDeletePrivateChannel(cid) lua_register(m_luaState, "doDeletePrivateChannel", LuaScriptInterface::luaDoDeletePrivateChannel); //getCreatureHideHealth(cid) lua_register(m_luaState, "getCreatureHideHealth", LuaScriptInterface::luaGetCreatureHideHealth); //doCreatureSetHideHealth(cid, hide) lua_register(m_luaState, "doCreatureSetHideHealth", LuaScriptInterface::luaDoCreatureSetHideHealth); //doCreatePrivateChannel(cid) lua_register(m_luaState, "doCreatePrivateChannel", LuaScriptInterface::luaDoCreatePrivateChannel); ainda em luascript.cpp: int32_t LuaScriptInterface::luaGetCreatureHideHealth(lua_State* L) { //getCreatureHideHealth(cid) ScriptEnviroment* env = getEnv(); if(Creature* creature = env->getCreatureByUID(popNumber(L))) lua_pushboolean(L, creature->getHideHealth()); else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } int32_t LuaScriptInterface::luaDoCreatureSetHideHealth(lua_State* L) { //doCreatureSetHideHealth(cid, hide) bool hide = popNumber(L); ScriptEnviroment* env = getEnv(); if(Creature* creature = env->getCreatureByUID(popNumber(L))) { creature->setHideHealth(hide); g_game.addCreatureHealth(creature); lua_pushboolean(L, true); } else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } int32_t LuaScriptInterface::luaDoRemoveIntoPrivateChannel(lua_State* L) { //doRemoveIntoPrivateChannel(cid, string) std::string name = popString(L); uint32_t cid = popNumber(L); ScriptEnviroment* env = getEnv(); if(Player* player = env->getPlayerByUID(cid)) { if(g_game.playerChannelExclude(player->getID(), name)) lua_pushboolean(L, true); else lua_pushboolean(L, false); } else { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } int32_t LuaScriptInterface::luaDoDeletePrivateChannel(lua_State* L) { //doDeletePrivateChannel(cid) uint32_t cid = popNumber(L); ScriptEnviroment* env = getEnv(); if(Player* player = env->getPlayerByUID(cid)) { if(g_chat.deleteChannel(player, g_chat.getPrivateChannel(player)->getId())) lua_pushboolean(L, true); else lua_pushboolean(L, false); } else { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } int32_t LuaScriptInterface::luaDoInviteToPrivateChannel(lua_State* L) { //doCreatePrivateChannel(cid) std::string name = popString(L); uint32_t cid = popNumber(L); ScriptEnviroment* env = getEnv(); if(Player* player = env->getPlayerByUID(cid)) { if(g_game.playerChannelInvite(player->getID(), name)) lua_pushboolean(L, true); else lua_pushboolean(L, false); } else { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } int32_t LuaScriptInterface::luaDoCreatePrivateChannel(lua_State* L) { //doCreatePrivateChannel(cid) //std::string loot = popString(L); uint32_t cid = popNumber(L); ScriptEnviroment* env = getEnv(); if(Player* player = env->getPlayerByUID(cid)) { if(g_game.playerCreatePrivateChannel(player->getID())) lua_pushboolean(L, true); else lua_pushboolean(L, false); } else { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } int32_t LuaScriptInterface::luaDoCreatureSetNoMove(lua_State* L) { //doCreatureSetNoMove(cid, block) bool block = popNumber(L); ScriptEnviroment* env = getEnv(); if(Creature* creature = env->getCreatureByUID(popNumber(L))) { creature->setNoMove(block); lua_pushboolean(L, true); } else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } int32_t LuaScriptInterface::luaGetCreatureNoMove(lua_State* L) { //getCreatureNoMove(cid) ScriptEnviroment* env = getEnv(); if(Creature* creature = env->getCreatureByUID(popNumber(L))) lua_pushboolean(L, creature->getNoMove()); else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } agora em luascript.h adicione: static int32_t luaDoCreatePrivateChannel(lua_State* L); static int32_t luaDoInviteToPrivateChannel(lua_State* L); static int32_t luaDoRemoveIntoPrivateChannel(lua_State* L); static int32_t luaDoDeletePrivateChannel(lua_State* L); static int32_t luaGetCreatureNoMove(lua_State* L); static int32_t luaDoCreatureSetNoMove(lua_State* L); static int32_t luaGetCreatureHideHealth(lua_State* L); static int32_t luaDoCreatureSetHideHealth(lua_State* L); agora vai em chat.cpp e adicione: ChatChannel* Chat::createChannel(Player* player, uint16_t channelId) // tv cam system { if(!player || player->isRemoved() || getChannel(player, channelId)) return NULL; switch(channelId) { case CHANNEL_GUILD: { ChatChannel* newChannel = NULL; if((newChannel = new ChatChannel(channelId, player->getGuildName(), ChatChannel::staticFlags))) m_guildChannels[player->getGuildId()] = newChannel; return newChannel; } case CHANNEL_PARTY: { ChatChannel* newChannel = NULL; if(player->getParty() && (newChannel = new ChatChannel(channelId, partyName, ChatChannel::staticFlags))) m_partyChannels[player->getParty()] = newChannel; return newChannel; } case CHANNEL_PRIVATE: { //only 1 private channel for each premium player if(!player->isPremium() || getPrivateChannel(player)) return NULL; //find a free private channel slot for(uint16_t i = 100; i < 10000; ++i) { if(m_privateChannels.find(i) != m_privateChannels.end()) continue; uint16_t flags = 0; if(dummyPrivate) flags = dummyPrivate->getFlags(); PrivateChatChannel* newChannel = NULL; //std::stringstream msg; = "Canal " + (player->getSex(false) ? "do " : "da ") + player->getName(); if((newChannel = new PrivateChatChannel(i, player->getName() + "'s channels", ChatChannel::staticFlags))) { newChannel->setOwner(player->getGUID()); m_privateChannels[i] = newChannel; } return newChannel; } } default: break; } return NULL; } depois vá em chat.h e adicione: class Player; enum ChannelFlags_t { CHANNELFLAG_NONE = 0, CHANNELFLAG_ENABLED = 1 << 0, CHANNELFLAG_ACTIVE = 1 << 1, CHANNELFLAG_LOGGED = 1 << 2, }; typedef std::map<uint32_t, Player*> UsersMap; typedef std::list<uint32_t> InviteList; class ChatChannel { public: ChatChannel(uint16_t id, const std::string& name, uint16_t flags, uint32_t access = 0, uint32_t level = 1, Condition* condition = NULL, int32_t conditionId = -1, const std::string& conditionMessage = "", VocationMap* vocationMap = NULL); virtual ~ChatChannel() { if(m_condition) delete m_condition; if(m_vocationMap) delete m_vocationMap; } static uint16_t staticFlags; uint16_t getId() const {return m_id;} const std::string& getName() const {return m_name;} uint16_t getFlags() const {return m_flags;} int32_t getConditionId() const {return m_conditionId;} const std::string& getConditionMessage() const {return m_conditionMessage;} const UsersMap& getUsers() {return m_users;} uint32_t getLevel() const {return m_level;} uint32_t getAccess() const {return m_access;} virtual const uint32_t getOwner() {return 0;} bool hasFlag(uint16_t value) const {return ((m_flags & (uint16_t)value) == (uint16_t)value);} bool checkVocation(uint32_t vocationId) const {return !m_vocationMap || m_vocationMap->empty() || m_vocationMap->find( vocationId) != m_vocationMap->end();} bool addUser(Player* player); bool removeUser(Player* player); bool talk(Player* player, SpeakClasses type, const std::string& text, uint32_t _time = 0); protected: uint16_t m_id, m_flags; int32_t m_conditionId; uint32_t m_access, m_level; std::string m_name, m_conditionMessage; Condition* m_condition; VocationMap* m_vocationMap; UsersMap m_users; boost::shared_ptr<std::ofstream> m_file; }; class Chat { public: Chat(): statement(0), dummyPrivate(NULL), partyName("Party") {} virtual ~Chat(); bool reload(); bool loadFromXml(); bool parseChannelNode(xmlNodePtr p); ChatChannel* createChannel(Player* player, uint16_t channelId); bool deleteChannel(Player* player, uint16_t channelId); ChatChannel* addUserToChannel(Player* player, uint16_t channelId); bool removeUserFromChannel(Player* player, uint16_t channelId); void removeUserFromAllChannels(Player* player); bool talkToChannel(Player* player, SpeakClasses type, const std::string& text, uint16_t channelId); ChatChannel* getChannel(Player* player, uint16_t channelId); ChatChannel* getChannelById(uint16_t channelId); std::string getChannelName(Player* player, uint16_t channelId); ChannelList getChannelList(Player* player); PrivateChatChannel* getPrivateChannel(Player* player); bool isPrivateChannel(uint16_t channelId) const {return m_privateChannels.find(channelId) != m_privateChannels.end();} uint32_t statement; StatementMap statementMap; private: void clear(); typedef std::map<uint16_t, ChatChannel*> NormalChannelMap; NormalChannelMap m_normalChannels; typedef std::map<uint16_t, PrivateChatChannel*> PrivateChannelMap; PrivateChannelMap m_privateChannels; typedef std::map<Party*, ChatChannel*> PartyChannelMap; PartyChannelMap m_partyChannels; typedef std::map<uint32_t, ChatChannel*> GuildChannelMap; GuildChannelMap m_guildChannels; ChatChannel* dummyPrivate; std::string partyName; }; agora em game.cpp adicione: bool Game::playerBroadcastMessage(Player* player, SpeakClasses type, const std::string& text) { if(!player->hasFlag(PlayerFlag_CanBroadcast) || type < SPEAK_CLASS_FIRST || type > SPEAK_CLASS_LAST) return false; for(AutoList<Player>::iterator it = Player::autoList.begin(); it != Player::autoList.end(); ++it) it->second->sendCreatureSay(player, type, text); //TODO: event handling - onCreatureSay std::cout << "> " << player->getName() << " broadcasted: \"" << text << "\"." << std::endl; return true; } bool Game::playerCreatePrivateChannel(uint32_t playerId) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved() || !player->isPremium()) return false; ChatChannel* channel = g_chat.createChannel(player, 0xFFFF); if(!channel || !channel->addUser(player)) return false; player->sendCreatePrivateChannel(channel->getId(), channel->getName()); return true; } bool Game::playerChannelInvite(uint32_t playerId, const std::string& name) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()) return false; Player* invitePlayer = getPlayerByName(name); if(!invitePlayer) return false; PrivateChatChannel* channel = g_chat.getPrivateChannel(player); if(!channel) return false; channel->invitePlayer(player, invitePlayer); channel->addInvited(invitePlayer); ChatChannel* teste = (ChatChannel*) channel; teste->addUser(invitePlayer); invitePlayer->sendChannel(channel->getId(), channel->getName()); return true; } bool Game::playerChannelExclude(uint32_t playerId, const std::string& name) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()) return false; PrivateChatChannel* channel = g_chat.getPrivateChannel(player); if(!channel) return false; Player* excludePlayer = getPlayerByName(name); if(!excludePlayer) return false; if (player->getID() == excludePlayer->getID()){ g_chat.deleteChannel(player, g_chat.getPrivateChannel(player)->getId()); return true; } channel->excludePlayer(player, excludePlayer); return true; } bool Game::playerRequestChannels(uint32_t playerId) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()) return false; player->sendChannelsDialog(); return true; } bool Game::playerOpenChannel(uint32_t playerId, uint16_t channelId) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()) return false; 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; } bool Game::playerCloseChannel(uint32_t playerId, uint16_t channelId) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()) return false; g_chat.removeUserFromChannel(player, channelId); return true; } bool Game::playerOpenPrivateChannel(uint32_t playerId, std::string& receiver) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()) return false; if(IOLoginData::getInstance()->playerExists(receiver)) player->sendOpenPrivateChannel(receiver); else player->sendCancel("A player with this name does not exist."); return true; } Créditos Eu (Por postar aqui no TK) Lordbaxx Smix
  17. hasSpaceInContainer é uma função que retorna true ou false, ela checa se tem algum espaço livre na mochila, se você tiver carregando uma mochila dentro de uma mochila ela checa a primeira mochila e se não tiver espaço ela checa a outra mochila. em game.cpp em baixo de: void Game::showHotkeyUseMessage(Player* player, Item* item) { int32_t subType = -1; if(item->hasSubType() && !item->hasCharges()) subType = item->getSubType(); const ItemType& it = Item::items[item->getID()]; uint32_t count = player->__getItemTypeCount(item->getID(), subType, false); char buffer[40 + it.name.size()]; if(count == 1) sprintf(buffer, "Using the last %s...", it.name.c_str()); else sprintf(buffer, "Using one of %d %s...", count, it.pluralName.c_str()); } adicione: bool Game::hasSpaceInContainer(Container* container) { if(container->size() < container->capacity()) return true; for(int slot = 0; slot <= (container->size()-1); slot++) { Item* item = container->getItem(slot); if(item->getContainer()) { if(hasSpaceInContainer(item->getContainer())) return true; } } return false; } em game.h em baixo de: bool playerReceivePing(uint32_t playerId); adicione: bool hasSpaceInContainer(Container* container); em luascript.cpp em baixo de: int32_t LuaScriptInterface::luaGetCreatureName(lua_State* L) { //getCreatureName(cid) ScriptEnviroment* env = getEnv(); if(Creature* creature = env->getCreatureByUID(popNumber(L))) lua_pushstring(L, creature->getName().c_str()); else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } adicione: int32_t LuaScriptInterface::luaHasSpaceInContainer(lua_State* L) { //hasSpaceInContainer(container) ScriptEnviroment* env = getEnv(); Container* container = env->getContainerByUID(popNumber(L)); if(!container) { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); return 1; } if(g_game.hasSpaceInContainer(container)) lua_pushboolean(L, true); else lua_pushboolean(L, false); return 1; } em baixo de: //getCreatureName(cid) lua_register(m_luaState, "getCreatureName", LuaScriptInterface::luaGetCreatureName); adicione: //hasSpaceInContainer(container) lua_register(m_luaState, "hasSpaceInContainer", LuaScriptInterface::luaHasSpaceInContainer); em luascript.h em baixo de: static int32_t luaGetCreatureName(lua_State* L); adicione: static int32_t luaHasSpaceInContainer(lua_State* L); exemplo: if hasSpaceInContainer(container) then funcao() else sendCancel(cid, "desculpe, voce nao tem espaço na mochila") end Créditos Gristoyn (Por todo o conteúdo e pelo código) Eu (Apenas pro Trazer ao Fórum)
  18. DarkWore postou uma resposta no tópico em Suporte & Pedidos
    Muito Bom, Parabéns ! Muito Bom, Parabéns !
  19. DarkWore postou uma resposta no tópico em Suporte Tibia OTServer
    Não Entendi á Dúvida você usa Linux ou Windows?
  20. DarkWore postou uma resposta no tópico em Suporte Tibia OTServer
    @Mhollow Recomendo: http://weblara.com.br/ https://www.servercore.com.br/ http://www.otpanel.com/ www.4youstart.com ----------------------------------------- Introdução VPS: VPS é como um computador você pode usar e modificar como quiser e fica online 24/7 ou sejá 24 horas online 7 dias por semana, eu recomendo as hospedagens acima.
  21. Se você conseguisse trazer á solução do OPCODE DA DXP, pq tem algo no OPCODE Que Permite clonar itens.

Informação Importante

Confirmação de Termo