SU

[Creaturescripts]Training Monk Interativo

Por Subwat, 07 de mar. de 2012 em Globalevents e Spells

script
8
2.4k
SubwatS
07 de março de 2012 às 11:44

Codigo Lua em creaturescripts

 

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

 

XML:

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

 

 

Mude seu training monk para:

 

 

<?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:

Sportacus

Editado Março 7 por Subwat

AnneMottaA
07 de março de 2012 às 11:52

Poste o que o script faz

Editado Dezembro 14 por AnneMotta

LolkskyL
07 de março de 2012 às 12:09

Poste o que o script faça!

 

Ia dizer isso '-'

só entendi mais ou menos devido a mensagem que t ano script ;s

gonorreiaswatG
07 de março de 2012 às 12:25

Verdade, seria interessante postar o que o Script faz.

No entanto, me parece um ótimo script.

 

Abraços e valeu por compartilhar'

BeekiB
08 de março de 2012 às 18:04

parece que esse script mostra a velocidade que o Player está batendo no Training Monk,

kelvinvictorK
09 de março de 2012 às 13:35

O Que este script faz? Por favor poste

VincV
10 de março de 2012 às 11:43

pelo que entedi da mensagem que tem no script mostra quanto se ranca do trenig monk por segundo

Piabeta KunP
14 de março de 2012 às 06:38

o proprio dono do script nao da uma luz aos seus usuarios q lindo ta devendo explicaçoes subwat!