Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Isso aqui vai deixar o Training Monk um pouquinho mais 'interativo' ! Ele vai te falar uma estimativa de quanto dano você está causando por segundo.

Adicione isso em creaturescripts.xml

<event type="statschange" name="DPScounter" event="script" value="dpscounter.lua"/>

Agora crie um arquivo .lua na pasta creaturescripts com o nome de dpscounter.lua e adicione isso
local exhaust = createConditionObject(CONDITION_EXHAUST)

setConditionParam(exhaust, CONDITION_PARAM_SUBID, 82936)

setConditionParam(exhaust, CONDITION_PARAM_TICKS, 10000)


function getDamageDone(cid, targetpos)

targetpos.x = targetpos.x - 1

if(isPlayer(cid)) then

  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Average DPS: ".. getPlayerStorageValue(cid, 82936) / 10 .."")

  doCreatureSay(cid, "You are currently dealing an average of ".. getPlayerStorageValue(cid, 82936) / 10 .." damage per second.", TALKTYPE_ORANGE_1, false, 0, targetpos)

  return setPlayerStorageValue(cid, 82936, 0)

end

return true

end


function onStatsChange(cid, attacker, type, combat, value)

if(type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) then

  if(not isPlayer(attacker)) then

   return true

  end


  setPlayerStorageValue(attacker, 82936, getPlayerStorageValue(attacker, 82936) + value)


  if(getCreatureCondition(attacker, CONDITION_EXHAUST, 82936) == false) then

   setPlayerStorageValue(attacker, 82936, 0)

   addEvent(getDamageDone, 9900, attacker, getCreaturePosition(cid))

   doAddCondition(attacker, exhaust)

  end

end

    return true

end

E por último, modifique seu Training Monk, que normalmente fica na pasta monsters
<?xml version="1.0" encoding="UTF-8"?>

<monster name="Training Monk" nameDescription="a training monk" race="blood" experience="0" speed="210" manacost="0">

<health now="99000" max="99000"/>

<look type="57" corpse="3128"/>

<targetchange interval="60000" chance="0"/>

<strategy attack="100" defense="0"/>

<flags>

  <flag summonable="0"/>

  <flag attackable="1"/>

  <flag hostile="1"/>

  <flag illusionable="0"/>

  <flag convinceable="0"/>

  <flag pushable="0"/>

  <flag canpushitems="1"/>

  <flag staticattack="50"/>

  <flag lightlevel="0"/>

  <flag lightcolor="0"/>

  <flag targetdistance="1"/>

  <flag runonhealth="0"/>

</flags>

<script>

  <event name="DPScounter"/>

</script>

<attacks>

  <attack name="melee" interval="5000" min="0" max="-1"/>

</attacks>

<defenses armor="0" defense="0">

  <defense name="healing" interval="10000" chance="100" min="24000" max="24000"/>

</defenses>

</monster>

Créditos ao Shawn por todo o script

29161_4.png

 

 

2d168ur.png

 

Link para o post
Compartilhar em outros sites

Grande Guilherme...sumido cara ;D

Excelente Script :accept:

# Regras Gerais - TibiaKing.com #
Contato: augusto@tibiaking.com
Não respondo dúvidas via MP.


1C2tu.png4Tlqo.png1C2tu.png


 

Link para o post
Compartilhar em outros sites
  Em 07/03/2012 em 21:22, Alberess disse:

Guilherme tem como voce posta ss ou um video?

Expand   Mostrar mais  

Po cara, vai ter que ficar pra depois, estou tentando arrumar um server aqui pra colocar online e ainda vou testar isso, mas tudo o que o script faz está basicamente aqui, que é o que o training monk fala ao player:

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Average DPS: ".. getPlayerStorageValue(cid, 82936) / 10 .."")

doCreatureSay(cid, "You are currently dealing an average of ".. getPlayerStorageValue(cid, 82936) / 10 .." damage per second.", TALKTYPE_ORANGE_1, false, 0, targetpos)

return setPlayerStorageValue(cid, 82936, 0)

Pois é Augusto, estava sumido mesmo kkkkk quem sabe agora eu volte :D

29161_4.png

 

 

2d168ur.png

 

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.

  • Estatísticas dos Fóruns

    96847
    Tópicos
    519607
    Posts
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo