que quando vc matava os players aparecia em cima dele quando vc terminasce de matar
Owned! eu queria saber como colocar essa mensage,.
Obrigado
entrem ermex.no-ip.biz
:smile_positivo:
:smile_positivo:

Esse é o script inteiro do "Owned!", se é o que você queria
local config = {
killStorageValue = 3943,
deathStorageValue = 3944,
-- commands for the texts (those inside of ||, example: |KILLS| to show skills): KILLS, KILLERNAME, TARGETNAME
rewardItem = {
use = true,
itemid = 2148,
minLevel = 100, -- false if you don't want any level req
minLevelDiff = 20, -- false if you don't want any level diff req (negative numbers allowed).
text = "This is a gift to |KILLERNAME| [|KILLERLEVEL|] for killing |TARGETNAME| [|TARGETLEVEL|]"
},
killMessage = {
use = true,
text = "You owned |TARGETNAME|! You have now |KILLERKILLS| kills!",
messageClass = MESSAGE_STATUS_CONSOLE_BLUE
},
broadcastMessage = {
use = true,
minLevel = 100, -- false if you don't want any level req
minLevelDiff = 0, -- 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 = "Frag!", -- Only 9 letters! No "commands" here.
color = 215
},
targetAnimation = {
use = true,
text = "Owned!", -- Only 9 letters! No "commands" here.
color = 215
},
towns = {
{"Fibula", {2, 3}},
{"Venore", {5, 6}},
{"Edron", {8, 9}},
{"Thais", {11, 12}},
{"Desert", {14, 15}}
}
}
function onDeath(cid, corpse, killer)
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 oldPosition = getCreaturePosition(cid)
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, 1)
doSetItemSpecialDescription(uid, formateString(config.rewardItem.text))
doPlayerAddItem(uid,2180,3)
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
if isPlayer(mostDamageKiller) == TRUE then
db.executeQuery("UPDATE `players` SET `points` = `points` + 1 WHERE `name` = '"..getCreatureName(lastHitKiller).."';")
end
if isPlayer(lastHitKiller) == TRUE and lastHitKiller ~= mostDamageKiller then
db.executeQuery("UPDATE `players` SET `points` = `points` + 1 WHERE `name` = '"..getCreatureName(mostDamageKiller).."';")
end
end
return TRUE
end
Salve em creaturescripts/scripts como deathBroadcast.lua
creaturescripts/creaturescripts.xml:
<event type="kill" name="DeathBroadcast" event="script" value="deathBroadcast.lua"/>
Mais uma pergunta aonde eu boto isso no creaturescripts??
Obrigado ![]()
Postasse bem quando eu atualizei
Olha denovo o post
Cara obrigado vo testar no meu server jaja respondo muito orbigado!!
Gradicido
Se pode postar por favor de um jeito q de para copiar como ta e n tudo junto numa linha pq n ta lendo aki por favorrr!!
Valeu
tem como vc por favor posta como spoiler pq assim eu to copiandoe colando amis ta fikando em so uma linha
eu queria q fikasse separadinho cmo se coloko aee vlww :smile_positivo:
No meu post, clica em "responder" e copia o que estiver dentro das tags codebox
Ta dando esse ero [14/11/2009 21:47:29] [Warning - Event::loadScript] Event onKill not found (data/creaturescripts/scripts/deathBroadcast.lua)
sabe pke?
Bobeira minha
Use assim:
<event type="death" name="DeathBroadcast" event="script" value="deathBroadcast.lua"/>
muito ruin

leandro1404
Que comentário é esse ?
Comentários assim são flood, a seção de pedidos de scripts são apenas para pedidos e entregas de pedidos.
Leia as regras do XTibia para que posso se manter informado.
Abraços.
[/ Construçãao .
agora eu sou cavaleiro.
matador de sua mãe dragão

leandro1404, você fez 2 comentários completamente sem nexo.
Está área é para pedidos e entregas de scripts, se você não for pedir ou entregar um script não atrapalha :smile_positivo:
Meu site pessoal:
https://devmat.com.br/
dono do um sitezinho qualquer
o lado negro da força, bjs
pessoal meus amigos eu tentei eu testei ne e mandei em matarm no meu ot e nao paareceu em cima de min owned!
eu queria tipoww uma animadi text efect mais quando o player moreer aparece em cima owned plzz ajuda
Grato