Ir para conteúdo

MaTTch

Membro
  • Registro em

  • Última visita

Tudo que MaTTch postou

  1. Você vai ter que criar na sua sources. Até onde sei só da pra aumentar % de poderes mágicos, isso envolve todos os elementos.
  2. Entendi não. É mais fácil criar outro tópico sobre isso explicando melhor.
  3. Em player.cpp, procure pela função: void Player::manageAccount e poste ela toda aqui. (só a função)
  4. Testado TFS 0.4
  5. Coloca o script como código e depois coloca entre spoilers
  6. Posta a função bool Game::combatChangeHealth aqui.
  7. posta seu reward_chest.lua
  8. Em game.cpp, procure por: bool Game::combatChangeHealth dentro dessa função, procure por: if(g_config.getBool(ConfigManager::SHOW_HEALING_DAMAGE) && !target->isGhost() && (g_config.getBool(ConfigManager::SHOW_HEALING_DAMAGE_MONSTER) || !target->getMonster())) e substitua por: if(g_config.getBool(ConfigManager::SHOW_HEALING_DAMAGE) && !target->isGhost() && (g_config.getBool(ConfigManager::SHOW_HEALING_DAMAGE_MONSTER) || !target->getMonster())) { int32_t realHeal = healthChange; if((realHeal + target->getHealth()) > target->getMaxHealth()) realHeal = (target->getMaxHealth() - target->getHealth()); if(realHeal > 0) { char buffer[20]; sprintf(buffer, "+%d", realHeal); const SpectatorVec& list = getSpectators(targetPos); if(combatType != COMBAT_HEALING) addMagicEffect(list, targetPos, MAGIC_EFFECT_WRAPS_BLUE); addAnimatedText(list, targetPos, COLOR_GREEN, buffer); } } OBS: Não testei, apenas fiz em base dos meus conhecimentos.
  9. Sim, com um delay de 200 milissegundos (0.2 segundo).
  10. Creaturescripts: local delay = 200 -- milliseconds local cidTable = {} function onDirection(cid, old, current) if(old == current) then return true end if(cidTable[cid] and cidTable[cid] > os.clock()) then return false end cidTable[cid] = os.clock() + (delay/1000) return true end TAG: <event type="direction" name="NOME" event="script" value="NOME.lua"/> Login.lua: registerCreatureEvent(cid, "NOME")
  11. MaTTch postou uma resposta no tópico em Suporte Tibia OTServer
  12. Não testei. local trade = { {items = {5944, 2160}, newitem = 5957} -- Items = items para remover/newitem = item para adicionar ao player. } local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end msg = msg:lower(); local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(msgcontains(msg, 'yes')) then selfSay('Deseja trocar um X e Y por um Z?', cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if(doPlayerItemCount(cid, trade.items[1]) >= 1 and doPlayerItemCount(cid, trade.items[2]) >= 1) then doPlayerRemoveItem(cid, trade.items[1], 1) doPlayerRemoveItem(cid, trade.items[2], 1) doPlayerAddItem(cid, trade.newitem, 1) selfSay('Aqui está.', cid) else selfSay('Está tentando me enganar? Você não tem os itens necessários.', cid) end elseif(msgcontains(msg, 'no')) then selfSay('Ok...', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  13. MaTTch postou uma resposta no tópico em Suporte Tibia OTServer
    Tenta assim:
  14. MaTTch postou uma resposta no tópico em Suporte Tibia OTServer
    E quando ele volta pro primeiro ele começa tudo de novo? Tipo num loop infinito?
  15. MaTTch postou uma resposta no tópico em Suporte Tibia OTServer
    Eu fiz essa spell rápida aqui, pois estou de saída. Se não for assim que você quis dizer, mais tarde eu entro pra ver.
  16. MaTTch postou uma resposta no tópico em Suporte Tibia OTServer
    Sim, você também pode substituir. for i = 1, 50 do addEvent(onCastSpell1, i * 200, parameters) end
  17. MaTTch postou uma resposta no tópico em Suporte Tibia OTServer
    for i = 1, 50 do -- usa 50 vezes addEvent(function(), if(isCreature(cid)) then doCombat(cid, combat, var) end end, i * 200) -- repete a magia a cada 0.2 segundos end
  18. Não testei. function onStatsChange(cid, attacker, type, combat, value) if(isMonster(attacker) and combat ~= COMBAT_HEALING) then return false end return true end
  19. Os players não estão com privilégios no groups.xml não? Isso ta estranho
  20. Você recentemente mexeu no creaturescripts ou nas sources?
  21. Isso acontece só com essa magia? Aparece algum erro no distro?

Informação Importante

Confirmação de Termo