Ir para conteúdo
  • Cadastre-se

Posts Recomendados

  • Respostas 5
  • Created
  • Última resposta

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Este tópico foi movido para a área correta. Esta é uma mensagem automática!
Pedimos que leia as regras do fórum!

  Mostrar conteúdo oculto

 

Link para o post
Compartilhar em outros sites

Vá até a pasta lib e procure o arquivo 0-50 function2.lua e mande aqui para que eu possa analizar.

  Mostrar conteúdo oculto

                                     

  Citar

                               "Sábio é aquele que conhece os limites da própria ignorância."

                                    Sócrates

Expand   Mostrar mais  

                                                          tenor.gif.b8aeb876d96198271bdf7891a50ce718.gif

Link para o post
Compartilhar em outros sites

Abra seu login.lua em creaturescripts e procure por:

  if(not isPlayerGhost(cid)) then
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
    end

Altere para:

    --if(not isPlayerGhost(cid)) then
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
    --end

 

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por L3K0T
      L3KOT tfs: 1.3
       
      Bom esse sistema é bem simples, ele anuncia pro servidor todo ao matar um tal monstro especifico.
       
       
      1° vai em otserv\data\creaturescripts\scripts copia um arquivo.lua, renomeia para monsterkill.lua e add dentro;;;
      function onDeath(monster, corpse, killer, mostDamageKiller, unjustified, mostDamageUnjustified) local monstro = "Diablo" if monster:getName() == monstro then Game.broadcastMessage("O Jogador "..killer:getName().." matou o Boss " ..monster:getName().. "! ") end return true end  
      Em creaturescripts.xml add
      <event type="death" name="monsterkill" script="monsterkill.lua"/>  
      Abra o xml do monstro que você quer que apareça a mensagem global depois de mata-lo e add lá no final depois de loot;;
      <script> <event name="monsterkill" /> </script> feito isso, salve tudo e pronto!!! Sucesso e jamais desista do seus projetos.
       
       
      ajuda sandada para @Faysal creditos: L3K0T and @Faysal  
       
       
    • Por kean1337
      After a long break, DBAW returns with a new season! 
       
      This will be the edition with the biggest update since the server's launch! 
       
      What's new?
       
      -New planet Beerus
      -New transformation from level 1000
      -New specials for new transformation
      -Fusion moved from level 750 to 600
      -New items, tasks, missions
      -New Bosses with new mechanics
      -Accelerated gameplay 1-1000
      -Additional amenities in the early game
       
      And on top of that, the systems we already know from previous editions!
       
      -16 playable classes
      -special passives for every class
      -saga system (from DB to DBGT)
      -daily mission
      -raid system
      -dragon balls system
      -advanced task system
      -glyphs & enchants
      -easy/medium/hard/very hard/bonus quests
      -offline training
      -auto loot
      -auto senzu
      -toogle stamina system
      -DP stash systems
       
      We start on April 4, 2025!
      20:00 PL
      15:00 BR
       
      Website: http://dbaw.pl/
      Discord: https://discord.gg/dnwGsaXN
    • Por Imperius
      O propósito é criar uma nova função em creaturescripts que será acionada toda vez que um novo report (CTRL + R) for aberto.
       
      Eu implementei para enviar uma notificação no grupo do Telegram, contendo os dados do report.
       
      Isso garantirá que os GMs tenham acesso aos reports dos jogadores mesmo quando não estiverem logados, e também evitará que algum report seja perdido caso o jogador saia do servidor.
      A parte do Telegram é apenas um exemplo. Você pode ajustar o script para executar outras ações desejadas.
       
      creatureevent.cpp:
      Dentro deste arquivo, localize a função:
       
      uint32_t CreatureEvent::executeChannelLeave(Player* player, uint16_t channelId, UsersMap usersMap)  
      abaixo dela, adicione:
       
      uint32_t CreatureEvent::executeOpenRuleViolation(Player* player, std::string message) { if (!m_interface->reserveEnv()) { std::clog << "[Error - CreatureEvent::executeOpenRuleViolation] Call stack overflow." << std::endl; return 0; } ScriptEnviroment* env = m_interface->getEnv(); env->setScriptId(m_scriptId, m_interface); lua_State* L = m_interface->getState(); m_interface->pushFunction(m_scriptId); lua_pushnumber(L, env->addThing(player)); lua_pushstring(L, message.c_str()); bool result = m_interface->callFunction(2); m_interface->releaseEnv(); return result; }  
      Após, procure por:
       
      std::string CreatureEvent::getScriptEventName() const  
      abaixo de:
       
      case CREATURE_EVENT_CHANNEL_LEAVE: return "onLeaveChannel";  
      adicione:
       
      case CREATURE_EVENT_OPEN_RULE_VIOLATION: return "onOpenRuleViolation";  
      Agora, procure por:
       
      std::string CreatureEvent::getScriptEventParams() const  
      abaixo de:
       
      case CREATURE_EVENT_CHANNEL_LEAVE: return "cid, channel, users";  
      adicione:
       
      case CREATURE_EVENT_OPEN_RULE_VIOLATION: return "cid, message";  
      Procure por:
       
      bool CreatureEvent::configureEvent(xmlNodePtr p)  
      abaixo de:
       
      else if(tmpStr == "leavechannel") m_type = CREATURE_EVENT_CHANNEL_LEAVE;  
      adicione:
       
      else if(tmpStr == "openruleviolation") m_type = CREATURE_EVENT_OPEN_RULE_VIOLATION;  
       
      creatureevent.h:
      Dentro deste arquivo, localize:
       
      enum CreatureEventType_t  
      adicione "CREATURE_EVENT_OPEN_RULE_VIOLATION" como o último item de enum CreatureEventType_t
       
      Exemplo:
       
      enum CreatureEventType_t { // ... CREATURE_EVENT_OPEN_RULE_VIOLATION };  
      Agora, procure por:
       
      uint32_t executeChannelLeave(Player* player, uint16_t channelId, UsersMap usersMap);  
      abaixo dela, adicione:
       
      uint32_t executeOpenRuleViolation(Player* player, std::string message);  
      game.cpp:
      Dentro deste arquivo, localize:
       
      bool Game::playerReportRuleViolation(Player* player, const std::string& text)  
      e substitua por:
       
      bool Game::playerReportRuleViolation(Player* player, const std::string& text) { //Do not allow reports on multiclones worlds since reports are name-based if(g_config.getNumber(ConfigManager::ALLOW_CLONES)) { player->sendTextMessage(MSG_INFO_DESCR, "Rule violation reports are disabled."); return false; } cancelRuleViolation(player); boost::shared_ptr<RuleViolation> rvr(new RuleViolation(player, text, time(NULL))); ruleViolations[player->getID()] = rvr; ChatChannel* channel = g_chat.getChannelById(CHANNEL_RVR); if(!channel) return false; for(UsersMap::const_iterator it = channel->getUsers().begin(); it != channel->getUsers().end(); ++it) it->second->sendToChannel(player, SPEAK_RVR_CHANNEL, text, CHANNEL_RVR, rvr->time); CreatureEventList joinEvents = player->getCreatureEvents(CREATURE_EVENT_OPEN_RULE_VIOLATION); for(CreatureEventList::iterator it = joinEvents.begin(); it != joinEvents.end(); ++it) (*it)->executeOpenRuleViolation(player, text); return true; }  
      Agora é só compilar a source.
       
      depois em "data > creaturescripts > creaturescripts.xml", adicione:
       
      <event type="login" name="loginNotifyRuleViolation" script="notifyRuleViolation.lua"/> <event type="openruleviolation" name="openNotifyRuleViolation" script="notifyRuleViolation.lua"/>  
      em "data > creaturescripts > scripts", crie um arquivo notifyRuleViolation.lua e adicione:
       
      function onOpenRuleViolation(cid, message) local config = { token = "", -- Token do seu BOT no Telegram chatId = "" -- ID do chat do Telegram que será enviado a notificação. } local message = "Player: "..getCreatureName(cid).."\n\nReport:\n"..message.."" message = string.gsub(message, "\n", "%%0A") local url = "https://api.telegram.org/bot"..config.token.."/sendMessage" local data = "chat_id="..config.chatId.."&text="..message.."" local curl = io.popen('curl -d "'..data..'" "'..url..'"'):read("*a") return true end function onLogin(cid) registerCreatureEvent(cid, "openNotifyRuleViolation") return true end  
       
      Demonstração:
      1. Jogador abre um novo report (CTRL + R)

      2. notifyRuleViolation.lua, definido em creaturescripts.xml, é acionado para enviar uma notificação ao grupo do Telegram.
       

       
    • Por Natsume
      Website: https://dbsu.eu
                Fanpage: https://www.facebook.com/profile.php?id=61550637247869
                                      Discord: https://discord.gg/hx5QHWfsgg

       
       

       
       
       
    • Por Ghaz
      Fala pessoal tudo bem?
       
      Estou com dificuldades em um script e preciso da ajuda dos magos do LUA rs.
       
      Tenho um script que quando o player morre (onDeath), ele faz algumas coisas e depois ele chama uma função que deveria retornar uma table (array) para eu fazer o for com o ipairs certinho. Segue abaixo o código:
       
       
      Segue abaixo a função getPlayersInArea:
       
       
      Acontece que no código de cima (do primeiro spoiler) eu dou um print no retorno da função getPlayersInArea, porém ela não tá me retornando a table, tá me retornando só: 2
       
       
       
      Alguém consegue me ajudar em, como raios eu faço a função retornar a lista de players ao invés da quantidade? Acredito que ta retornando o count da table, e não os itens do array.
       
       
      Agradeço desde já, valeu tchurma!
  • Estatísticas dos Fóruns

    96845
    Tópicos
    519606
    Posts



×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo