LU
creatureevent

M-M-M-Monster Kill!

Por LuckinhaSan, 24 de abr. de 2013 em Globalevents e Spells

script
7
2.2k
LuckinhaSanL
24 de abril de 2013 às 00:06

De Warcraft Dota

 

Vá em data/creaturescripts/creaturescripts.xml, e adicione a tag -

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

 

Vá em data/creaturescripts/login.lua, e adicione esta tag -

registerCreatureEvent(cid, "pvpsystem")

 

Vá em data/creaturescripts/scripts, crie um arquivo .lua com o nome de pvpsystem e adicione isto -

local storage = {  kills = 8003
}

local streaks = {
[2] = "DOUBLE KILL!",
[3] = "TRIPLE KILL!",
[5] = "M-M-M-MONSTER KILL!!",
[7] = "RAMPAGE!",
[9] = "UNSTOPPABLE!",
[12] = "HOLY SHIT!",
[15] = "GODLIKE!!"
}

function onKill(cid, target, lastHit)
if isPlayer(cid) and isPlayer(target) then
setPlayerStorageValue(cid, storage.kills, getPlayerStorageValue(cid, storage.kills) + 1)
setPlayerStorageValue(target, storage.kills, 0)
for _, pid in ipairs(getPlayersOnline()) do
local s = {"matou", "cortou em pedaços", "detonou", "humilhou", "Num Quero Falar Mais Nada Pra Foder"}
doPlayerSendChannelMessage(pid, "PVP", "".. getCreatureName(cid) .." ".. s[math.random(1, #s)] .." ".. getCreatureName(target) ..".", TALKTYPE_CHANNEL_Y, 10)
end
local k = streaks[getPlayerStorageValue(cid, storage.kills)]
if k then
doBroadcastMessage(getCreatureName(cid) .. " - ".. k, MESSAGE_INFO_DESCR)
end
end
return true
end

SelimBredlyS
25 de abril de 2013 às 16:38

pra que serve isso?

LuckinhaSanL
25 de abril de 2013 às 16:53

[2] = "DOUBLE KILL!",
[3] = "TRIPLE KILL!",
[5] = "M-M-M-MONSTER KILL!!",
[7] = "RAMPAGE!",
[9] = "UNSTOPPABLE!",
[12] = "HOLY SHIT!",
[15] = "GODLIKE!!"

 

Qundo você mata alguém, aparecerá essas mensagens animadas. Por exemplo -

Matou 2 - DOUBLE KILL

3 TRIPLE KILL

 

Você pode configurar isso, como visto acima no código.

1 mês depois...
folferF
27 de maio de 2013 às 19:45

Legal Mano , Gostei husuhshus Agora só devia botar o Penta Kill .-. é melhor que monster .-. RSRSRS

ThaynaT
29 de maio de 2013 às 17:46

Gostei, me lembrou do Unreal Tournament 3, Repp ++ he.gif

__

Testado e Aprovado button_ok.png :thumbsupsmiley:

Editado Maio 29 por skynet2

5 meses depois...
Alencar522A
28 de outubro de 2013 às 20:38

Teria como por um item diferente pro player ganhar se ele fizesse um desses: [5] = "M-M-M-MONSTER KILL!!",

[7] = "RAMPAGE!",
[9] = "UNSTOPPABLE!",
[12] = "HOLY SHIT!",
[15] = "GODLIKE!!"

 

?

1 mês depois...
ThaynaT
29 de novembro de 2013 às 11:54

Teria como por um item diferente pro player ganhar se ele fizesse um desses: [5] = "M-M-M-MONSTER KILL!!",

[7] = "RAMPAGE!",

[9] = "UNSTOPPABLE!",

[12] = "HOLY SHIT!",

[15] = "GODLIKE!!"

 

?

gostei da ideia, poderia ser por gold.

e poderia por pra ao invez de aparecer na tela, aparecer no brodcast do Serv Log na cor azul?