Postado Março 7, 2012 13 anos 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
Postado Março 7, 2012 13 anos Grande Guilherme...sumido cara Excelente Script # Regras Gerais - TibiaKing.com # Contato: [email protected]Não respondo dúvidas via MP.
Postado Março 7, 2012 13 anos Autor Guilherme tem como voce posta ss ou um video? 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
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.