Postado Julho 27, 2012 12 anos Autor Vou testar os dois e ja edito ! @edit: nao funciono nenhum dos dois! Editado Julho 27, 2012 12 anos por MonsterOt (veja o histórico de edições)
Postado Julho 27, 2012 12 anos bom, vo posta um script aqui que é parecido com o que vc quer, mas ele faz um broadcast do cara que matou outro player, e ele acaba recebendo um premio por isso, com alguns efeitos de animação ok? se nao curtir nao usa e a gente tenta cata outro! 1o inclua no creaturescripts.xml: <event type="death" name="DeathBroadcast" script="deathBroadcast.lua"/> 2o no login.lua (la dentro da pasta /creaturescripts/scripts/) inclua: registerCreatureEvent(cid, "DeathBroadcast") 3o. crie o arquivo deathbroadcast.lua nba pasta /creaturescripts/scripts/ e cole: 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 = 8698, minLevel = 100, -- false se nao quiser requerimento de level text = "Este é um presente para |KILLERNAME| [|KILLERLEVEL|] por matar |TARGETNAME| [|TARGETLEVEL|]" }, killMessage = { use = true, text = "Você arrebentou |TARGETNAME|! E tem agora |KILLERKILLS| mortes!", messageClass = MESSAGE_STATUS_CONSOLE_BLUE }, broadcastMessage = { use = true, text = "|KILLERNAME| [|KILLERLEVEL|] acabou de matar |TARGETNAME| [|TARGETLEVEL|]!", messageClass = MESSAGE_STATUS_WARNING }, killerAnimation = { use = true, text = "Frag!", -- Only 9 letters! No "commands" here. color = 215 }, targetAnimation = { use = true, text = "Tooooma!", -- maximo de 9 letras, sem comandos. color = 215 } } 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 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 values = { ["KILLERKILLS"] = killerKills, ["KILLERDEATHS"] = killerDeaths, ["KILLERNAME"] = getCreatureName(killer), ["KILLERLEVEL"] = getPlayerLevel(killer), ["TARGETKILLS"] = targetKills, ["TARGETDEATHS"] = targetDeaths, ["TARGETNAME"] = getCreatureName(cid), ["TARGETLEVEL"] = getPlayerLevel(cid) } function formateString(str) return(str:gsub("|([A-Z]+)|", (function(a) return values[a] end))) end if(config.rewardItem.use and (not config.rewardItem.level or getPlayerLevel(cid) >= config.rewardItem.level)) then local uid = doPlayerAddItem(killer, config.rewardItem.itemid) doSetItemSpecialDescription(uid, formateString(config.rewardItem.text)) end if(config.killMessage.use) then doPlayerSendTextMessage(killer, config.killMessage.messageClass, formateString(config.killMessage.text)) end if(config.broadcastMessage.use) 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 return TRUE end Creditos: colandus
Postado Julho 27, 2012 12 anos hsuahsua e funciona de boa, eh maneiro? Mas explica ai, tu quer q quem veja a mensagem, o morto ou o matador?
Postado Julho 27, 2012 12 anos Autor o matador, nao tem como botar essa funçao pro matador ver? doPlayerPopupFYI(cid,"texto aki") Editado Julho 27, 2012 12 anos por MonsterOt (veja o histórico de edições)
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.