Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''tfs.4''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • xTibia - Notícias e Suporte
    • Regras
    • Noticias
    • Soluções
    • Projetos Patrocinados
    • Tutoriais para Iniciantes
    • Imprensa
  • OTServ
    • Notícias e Debates
    • OTServlist
    • Downloads
    • Recursos
    • Suporte
    • Pedidos
    • Show-Off
    • Tutoriais
  • OFF-Topic
    • Barzinho do Éks
    • Design
    • Informática

Encontrar resultados em...

Encontrar resultados que contenham...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


Sou

Encontrado 1 registro

  1. Olá, o Adriano Swatt estava fazendo um script pra mim, mas devido a alguns problemas e aos corres do dia-a-dia ele não teve tempo de terminar, gostaria da ajuda para terminar esse script... O script consiste em: O boost é ativado ao summonar o monstro e não usando algum item como ja vi em outro post O cálculo do dano adicionado é feito através da soma do level e do ML, o resultado disso se toma como porcentagem a adicionar no dano que o monstro iria hitar, ex; level = 50 + ML = 35, result = 85, o hit do monstro ficaria 350(exemplo) + 85% dos 350, o mesmo serve no caso do monstro se auto healar (MONK por exemplo), mas o boost é pra qualquer summon A vida do monstro segue a mesma logica só que ao invés do hit aumentar é a vida obviamente local eventName = "00testing"local percent_limit = 500function onStatsChange(cid, attacker, type, combat, value) print('LUTA OCORRENDO') if type == STATSCHANGE_HEALTHLOSS and value >= 1 then -- print('LIST TARGET: '..getMonsterTargetList(attacker)[1]..'') -- Retorna UID registerCreatureEvent(getCreatureTarget(attacker), eventName) print('REGISTRANDO EVENTO EM: '..getCreatureName(attacker):lower()..' ATACANDO UM '..getCreatureName(getCreatureTarget(attacker)):lower()..'.') if getCreatureMaster(attacker) then ownSummon = getCreatureMaster(attacker) print('TEMOS: '..getCreatureName(attacker):lower()..' ATACANDO UM '..getCreatureName(cid):lower()..'.') if isPlayer(ownSummon) then local overflow_protection = {} if overflow_protection[attacker] then overflow_protection[attacker] = nil return true end getML = getPlayerMagLevel(ownSummon) getLvL = getPlayerLevel(ownSummon) addDMG = getML + getLvL -- Percent if addDMG < percent_limit then percDMG = math.floor(value*(addDMG/100)) newValue = (value+percDMG) print('True Value: '..value..' // PercDMG: '..percDMG..' // NewValue: '..newValue..' [ML: '..getML..'/ LVL: '..getLvL..].') else percDMG = math.floor(value*(percent_limit/100)) newValue = (value+percDMG) print('True Value: '..value..' // PercDMG: '..percDMG..' // NewValue: '..newValue..' [ML: '..getML..'/ LVL: '..getLvL..].') end overflow_protection[attacker] = true doPlayerSendTextMessage(ownSummon, MESSAGE_STATUS_DEFAULT, "Your "..getCreatureName(attacker).." deals "..newValue.." [hit "..value.." + "..percDMG.." boost damage] to "..(getMonsterInfo(getCreatureName(cid)).description)..".") doTargetCombatHealth(attacker, cid, combat, -newValue, -newValue, CONST_ME_NONE) return false else print('SUMMON ISN\'T BY PLAYER // ATTACKER: '..getCreatureName(attacker)..' -> CID: '..getCreatureName(cid)..'.') end else print('NOT IS A SUMMON // ATTACKER: '..getCreatureName(attacker)..' -> CID: '..getCreatureName(cid)..'.') end else print('SEM PERDA DE VIDA // CID: '..getCreatureName(cid)..'.') endreturn trueend
×
×
  • Criar Novo...