Ir para conteúdo
  • 0

deathBroadcast


tiuguedor

Pergunta

Posts Recomendados

  • 0

Ver sé assim do jeito que vc quer troca aquele lá por este :

 

 

local function sendLetter(p)

local pos = p.pos

local letter = p.letter

doSendAnimatedText(pos, letter, TEXTCOLOR_RED)

end

 

function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)

local letters = {"ONWNED!"}

for i = 1, #letters do

addEvent(sendLetter, i * 150, {pos = getCreaturePosition(cid), letter = letters})

end

return true

end

 

 

Link para o comentário
Compartilhar em outros sites

  • 0

<?xml version="1.0" encoding="UTF-8"?>

<creaturescripts>

<!-- ChaitoSoft.com -->

<event type="login" name="PlayerLogin" event="script" value="login.lua"/>

<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>

<event type="receivemail" name="Mail" event="script" value="mail.lua"/>

<event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>

<event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/>

<event type="think" name="Idle" event="script" value="idle.lua"/>

<event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>

<event type="death" name="PythiusDead" script="pythius_the_rotten.lua" />

<event type="death" name="monster2" event="script" value="monster2.lua"/>

<event type="death" name="inquisitionPortals" script="teleports_inquisition.lua"/>

<event type="kill" name="kill" event="script" value="kill.lua"/>

<event type="advance" name="reward50" event="script" value="reward50.lua"/>

<event type="advance" name="reward100" event="script" value="reward100.lua"/>

<event type="death" name="DeathBroadcast" event="script" value="deathBroadcast.lua"/>

 

 

 

<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>

 

<!-- Zombie Event -->

<event type="login" name="ExpVip" script="vipexp.lua"/>

<event type="login" name="FimVip" event="script" value="vip.lua"/>

<event type="statschange" name="zombieevent" event="script" value="zombievent.lua"/>

 

<!-- Tasks -->

<event type="kill" name="KillingInTheNameOf" event="script" value="killinginthenameof.lua"/>

 

<!-- WoE -->

<event type="death" name="empe_broken" event="script" value="empe_broken.lua"/>

<event type="death" name="pre_empes" event="script" value="pre_empes.lua"/>

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

<event type="login" name="reg_vs_guard" event="script" value="vs_guard.lua"/>

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

 

<event type="login" name="woe_rate" event="script" value="expwoe.lua"/>

 

<!-- Dota -->

<event type="death" name="ga1" event="script" value="ga1.lua"/>

<event type="death" name="ga2" event="script" value="ga2.lua"/>

<event type="death" name="ga3" event="script" value="ga3.lua"/>

<event type="death" name="gv1" event="script" value="gv1.lua"/>

<event type="death" name="gv2" event="script" value="gv2.lua"/>

<event type="death" name="gv3" event="script" value="gv3.lua"/>

 

<!-- Custom systems -->

<event type="kill" name="PlayerKill" event="script" value="arenakill.lua"/>

<event type="death" name="inquisitionPortals" event="script" value="inquisitionPortals.lua"/>

<event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/>

<event type="logout" name="demonOakLogout" event="script" value="demonOakLogout.lua"/>

<event type="death" name="demonOakDeath" event="script" value="demonOakDeath.lua"/>

<event type="death" name="Azerus" event="script" value="azerus.lua"/>

</creaturescripts>

 

TFV0.4 servidor 8.60

Link para o comentário
Compartilhar em outros sites

  • 0

TFS0.4 verçao do servidor 8.60 velho nao da erro eu sei coloca script mano e que nao aparece a porra da msg msm quando o preyer morre

 

minLevel = false, -- false if you don't want any level req

minLevelDiff = false, -- false if you don't want any level diff req (negative numbers allowed).

text = "|KILLERNAME| [|KILLERLEVEL|] just killed |TARGETNAME| [|TARGETLEVEL|]!",

messageClass = MESSAGE_STATUS_WARNING

},

 

killerAnimation = {

use = false,

text = "Frag", -- Only 9 letters! No "commands" here.

color = 144

},

 

targetAnimation = {

use = true,

text = "Owned!", -- Only 9 letters! No "commands" here.

color = 180

}

}

 

function onDeath(cid, corpse, deathList)

for i = 1, math.min(config.affected, getConfigInfo('deathAssistCount')) do

local killer = deathList

if(isPlayer(killer) == TRUE) then

local targetKills = math.max(0, getPlayerStorageValue(cid, config.killStorageValue)) + 1

local targetDeaths = math.max(0, getPlayerStorageValue(cid, config.deathStorageValue)) + 1

 

local killerKills = math.max(0, getPlayerStorageValue(killer, config.killStorageValue)) + 1

local killerDeaths = math.max(0, getPlayerStorageValue(killer, config.deathStorageValue)) + 1

 

setPlayerStorageValue(killer, config.killStorageValue, targetKills)

setPlayerStorageValue(cid, config.deathStorageValue, targetDeaths)

 

local killerLevel = getPlayerLevel(killer)

local targetLevel = getPlayerLevel(cid)

local levelDiff = targetLevel - killerLevel

 

local values = {

["KILLERKILLS"] = killerKills,

["KILLERDEATHS"] = killerDeaths,

["KILLERNAME"] = getCreatureName(killer),

["KILLERLEVEL"] = killerLevel,

 

["TARGETKILLS"] = targetKills,

["TARGETDEATHS"] = targetDeaths,

["TARGETNAME"] = getCreatureName(cid),

["TARGETLEVEL"] = targetLevel

}

 

function formateString(str)

return(str:gsub("|([A-Z]+)|", (function(a) return values[a] end)))

end

 

if(config.rewardItem.use and (not config.rewardItem.minLevel or targetLevel >= config.rewardItem.minLevel) and (not config.rewardItem.minLevelDiff or levelDiff >= config.rewardItem.minLevelDiff)) then

local uid = doPlayerAddItem(killer, config.rewardItem.itemid, 5)

end

if(config.killMessage.use) then

doPlayerSendTextMessage(killer, config.killMessage.messageClass, formateString(config.killMessage.text))

end

if(config.broadcastMessage.use and (not config.broadcastMessage.minLevel or getPlayerLevel(cid) >= config.broadcastMessage.minLevel) and (not config.broadcastMessage.minLevelDiff or levelDiff >= config.broadcastMessage.minLevelDiff)) then

broadcastMessage(formateString(config.broadcastMessage.text), config.broadcastMessage.messageClass)

end

if(config.killerAnimation.use) then

doSendAnimatedText(getCreaturePosition(killer), config.killerAnimation.text, config.killerAnimation.color)

end

if(config.targetAnimation.use) then

doSendAnimatedText(getCreaturePosition(cid), config.targetAnimation.text, config.targetAnimation.color)

end

end

end

return true

end

 

 

e niso que tem que mexe iso eu sei pq ese script ai funciona so que as letras aparecem juntas que quero que apareçao em sequencia

Editado por tiuguedor
Link para o comentário
Compartilhar em outros sites

  • 0

Vai em seuot->data->creaturescripts

E adicione essa linha:

 

 

<event type="preparedeath" name="onPrepareDeath" event="script" value="preparedeath.lua"/>

 

 

 

seuot -> creaturescripts -> scripts -> preparedeath.lua

 

 

local function sendLetter(p)

local pos = p.pos

local letter = p.letter

doSendAnimatedText(pos, letter, TEXTCOLOR_RED)

end

 

function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)

local letters = {"!", "D", "E", "N", "W", "O"}

for i = 1, #letters do

addEvent(sendLetter, i * 150, {pos = getCreaturePosition(cid), letter = letters})

end

return true

end

 

 

 

E em seuot -> creaturescripts -> scripts -> login.lua

Adicione essa linha:

 

 

registerCreatureEvent(cid, "onPrepareDeath")

 

 

Link para o comentário
Compartilhar em outros sites

  • 0

Agora sim você me explico direito mano !

Tenta ai :

 

 

minLevel = false, -- false if you don't want any level req

minLevelDiff = false, -- false if you don't want any level diff req (negative numbers allowed).

text = "|KILLERNAME| [|KILLERLEVEL|] just killed |TARGETNAME| [|TARGETLEVEL|]!",

messageClass = MESSAGE_STATUS_WARNING

},

 

killerAnimation = {

use = true,

text = "O", -- Only 9 letters! No "commands" here.

color = 144

},

 

targetAnimation = {

use = true,

text = "w", -- Only 9 letters! No "commands" here.

color = 180

},

 

killerAnimation = {

use = true,

text = "n", -- Only 9 letters! No "commands" here.

color = 144

},

 

killerAnimation = {

use = true,

text = "e", -- Only 9 letters! No "commands" here.

color = 145

},

 

killerAnimation = {

use = true,

text = "d", -- Only 9 letters! No "commands" here.

color = 181

}

}

 

function onDeath(cid, corpse, deathList)

for i = 1, math.min(config.affected, getConfigInfo('deathAssistCount')) do

local killer = deathList

if(isPlayer(killer) == TRUE) then

local targetKills = math.max(0, getPlayerStorageValue(cid, config.killStorageValue)) + 1

local targetDeaths = math.max(0, getPlayerStorageValue(cid, config.deathStorageValue)) + 1

 

local killerKills = math.max(0, getPlayerStorageValue(killer, config.killStorageValue)) + 1

local killerDeaths = math.max(0, getPlayerStorageValue(killer, config.deathStorageValue)) + 1

 

setPlayerStorageValue(killer, config.killStorageValue, targetKills)

setPlayerStorageValue(cid, config.deathStorageValue, targetDeaths)

 

local killerLevel = getPlayerLevel(killer)

local targetLevel = getPlayerLevel(cid)

local levelDiff = targetLevel - killerLevel

 

local values = {

["KILLERKILLS"] = killerKills,

["KILLERDEATHS"] = killerDeaths,

["KILLERNAME"] = getCreatureName(killer),

["KILLERLEVEL"] = killerLevel,

 

["TARGETKILLS"] = targetKills,

["TARGETDEATHS"] = targetDeaths,

["TARGETNAME"] = getCreatureName(cid),

["TARGETLEVEL"] = targetLevel

}

 

function formateString(str)

return(str:gsub("|([A-Z]+)|", (function(a) return values[a] end)))

end

 

if(config.rewardItem.use and (not config.rewardItem.minLevel or targetLevel >= config.rewardItem.minLevel) and (not config.rewardItem.minLevelDiff or levelDiff >= config.rewardItem.minLevelDiff)) then

local uid = doPlayerAddItem(killer, config.rewardItem.itemid, 5)

end

if(config.killMessage.use) then

doPlayerSendTextMessage(killer, config.killMessage.messageClass, formateString(config.killMessage.text))

end

if(config.broadcastMessage.use and (not config.broadcastMessage.minLevel or getPlayerLevel(cid) >= config.broadcastMessage.minLevel) and (not config.broadcastMessage.minLevelDiff or levelDiff >= config.broadcastMessage.minLevelDiff)) then

broadcastMessage(formateString(config.broadcastMessage.text), config.broadcastMessage.messageClass)

end

if(config.killerAnimation.use) then

doSendAnimatedText(getCreaturePosition(killer), config.killerAnimation.text, config.killerAnimation.color)

end

if(config.targetAnimation.use) then

doSendAnimatedText(getCreaturePosition(cid), config.targetAnimation.text, config.targetAnimation.color)

end

end

end

return true

end

 

 

 

é qualquer coisa tenta Esse :

 

 

local function sendLetter(p)

local pos = p.pos

local letter = p.letter

doSendAnimatedText(pos, letter, TEXTCOLOR_RED)

end

 

function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)

local letters = {"!", "D", "e", "N", "w", "O"}

for i = 1, #letters do

addEvent(sendLetter, i * 150, {pos = getCreaturePosition(cid), letter = letters})

end

return true

end

Editado por AdilsonHacker
Link para o comentário
Compartilhar em outros sites

  • 0

velho eu sei coloca script ate ese script que eu mostrei logo asima ai ele funfa so que a msg aparese td junta manja

 

tiagoduuarte nem tinha visto seu script ele pego aki manow vlw vo da +rep pra tu lek e um pro adilson pq ele tava tentano ajuda a tempao

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...