Postado Janeiro 10, 2015 10 anos Fala galerinha, tem esse script abaixo, creaturescripts, o que eu queria é um que ao matar players em X intervalo de tempo aparece a mensagem.... Matou 1 players seguidos ja aparece a mensagem First kill Matou 2 players seguidos ja aparece a mensagem Double kill Matou 3 players seguidos ja aparece a mensagem Multi kill Matou 4 players seguidos ja aparece a mensagem Ultra kill Matou 5 players seguidos ja aparece a mensagem Fantastic Matou 6 players seguidos ja aparece a mensagem Unbelievable Player Fulano matou 3 players seguidos em menos de 3 min, então aparece para todos os jogadores, Fulano - MULTI KILL Mais se ele matar 2, e se passar dos 3 min, reinicia a contagem, a contagem pode incluir frag, pk, red skull e black skull 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 (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Janeiro 10, 2015 10 anos Solução O intervalo de tempo é em segundos. local tab = { --[kill] = {intervalo_de_tempo, "mensagem"} [1] = {nil, "FIRST KILL!"}, [2] = {10, "DOUBLE KILL!"}, } function onKill(cid, target) if isPlayer(cid) and isPlayer(target) then local storage = getPlayerStorageValue(cid, 9018) local kills = getPlayerStorageValue(cid, 9019) > -1 and getPlayerStorageValue(cid, 9019) + 1 or 1 setPlayerStorageValue(cid, 9019, kills) setPlayerStorageValue(target, 9019, -1) if tab[kills] then if kills > 1 then if storage < os.time() then setPlayerStorageValue(cid, 9019, -1) setPlayerStorageValue(cid, 9018, -1) return true end end doBroadcastMessage(getCreatureName(cid).. " - "..tab[kills][2], MESSAGE_INFO_DESCR) if tab[kills + 1] then setPlayerStorageValue(cid, 9018, os.time() + tab[kills + 1][1]) end else setPlayerStorageValue(cid, 9019, -1) end end return true end Editado Janeiro 10, 2015 10 anos por zipter98 (veja o histórico de edições) não respondo pms solicitando suporte em programação/scripting
Postado Janeiro 10, 2015 10 anos Autor Funcionou certinho, valeu, reputado (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Junho 21, 2015 9 anos O intervalo de tempo é em segundos. local tab = { --[kill] = {intervalo_de_tempo, "mensagem"} [1] = {nil, "FIRST KILL!"}, [2] = {10, "DOUBLE KILL!"}, } function onKill(cid, target) if isPlayer(cid) and isPlayer(target) then local storage = getPlayerStorageValue(cid, 9018) local kills = getPlayerStorageValue(cid, 9019) > -1 and getPlayerStorageValue(cid, 9019) + 1 or 1 setPlayerStorageValue(cid, 9019, kills) setPlayerStorageValue(target, 9019, -1) if tab[kills] then if kills > 1 then if storage < os.time() then setPlayerStorageValue(cid, 9019, -1) setPlayerStorageValue(cid, 9018, -1) return true end end doBroadcastMessage(getCreatureName(cid).. " - "..tab[kills][2], MESSAGE_INFO_DESCR) if tab[kills + 1] then setPlayerStorageValue(cid, 9018, os.time() + tab[kills + 1][1]) end else setPlayerStorageValue(cid, 9019, -1) end end return true end zipter tem como me ajudar??? eu queria algo parecido com isso ae irei transformar a area do quartel dos police em area pvp e quando chegar alguem player roket la os players police poderam atacar ele os que morrem vao pro cp e perdem exp. agradeceria a ajuda.
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.