Seja Específico , Não Entendi Sua Dúvida,
Você Não Saber Aplicar ele é Isso?
Por Flaah, 24 de jul. de 2012 em Scripts
info
Grupo: Campones
Registrado: 28/08/10
Posts: 23
Reputação: +1
Char no Tibia: Goriin Pele

Seja Específico , Não Entendi Sua Dúvida,
Você Não Saber Aplicar ele é Isso?
info
Grupo: Artesão
Registrado: 30/03/11
Posts: 138
Reputação: +4
Char no Tibia: Druida de Asgard

O que essa script faz?
Ele informa para quem o player morreu e em que level.
local config = {
deathAssistCount = getConfigValue('deathAssistCount') + 1,
maxDeathRecords = getConfigValue('maxDeathRecords'),
limit = ""
}
if(config.deathAssistCount > 0) then
config.limit = " LIMIT 0, " .. config.deathAssistCount
end
function onSay(cid, words, param, channel)
local target = db.getResult("SELECT `name`, `id` FROM `players` WHERE `name` = " .. db.escapeString(param) .. ";")
if(target:getID() == -1) then
doPlayerSendCancel(cid, "A player with that name does not exist.")
return true
end
local targetName, targetId = target:getDataString("name"), target:getDataInt("id")
target:free()
local str, deaths = "", db.getResult("SELECT `id`, `date`, `level` FROM `player_deaths` WHERE `player_id` = " .. targetId .." ORDER BY `date` DESC LIMIT 0, " .. config.maxDeathRecords)
if(deaths:getID() ~= -1) then
repeat
local killers = db.getResult("SELECT environment_killers.name AS monster_name, players.name AS player_name FROM killers LEFT JOIN environment_killers ON killers.id = environment_killers.kill_id LEFT JOIN player_killers ON killers.id = player_killers.kill_id LEFT JOIN players ON players.id = player_killers.player_id WHERE killers.death_id = " .. deaths:getDataInt("id") .. " ORDER BY killers.final_hit DESC, killers.id ASC" .. config.limit)
if(killers:getID() ~= -1) then
if(str ~= "") then
str = str .. "\n" .. os.date("%d %B %Y %X ", deaths:getDataLong("date"))
else
str = os.date("%d %B %Y %X ", deaths:getDataLong("date"))
end
local count, i = killers:getRows(false), 0
repeat
local monster = killers:getDataString("monster_name")
if(i == 0 or i == (count - 1)) then
monster = string.gsub(monster:gsub("an ", ""), "a ", "")
end
if(killers:getDataString("player_name") ~= "") then
if(i == 0) then
str = str .. "Killed at level " .. deaths:getDataInt("level") .. " by:\n "
elseif(i == count) then
str = str .. " and by "
elseif(i % 4 == 0) then
str = str .. ",\n "
else
str = str .. ", "
end
if(monster ~= "") then
str = str .. monster .. " summoned by "
end
str = str .. killers:getDataString("player_name")
else
if(i == 0) then
str = str .. "Died at level " .. deaths:getDataInt("level") .. " by:\n "
elseif(i == count) then
str = str .. " and by "
elseif(i % 4 == 0) then
str = str .. ",\n "
else
str = str .. ", "
end
str = str .. monster
end
i = i + 1
if(i == count) then
str = str .. "."
end
until not(killers:next())
killers:free()
end
until not(deaths:next())
deaths:free()
else
str = "No deaths recorded."
end
doPlayerPopupFYI(cid, "Deathlist for player: " .. targetName .. ".\n\n" .. str)
return true
end
TALKACTIONS.XML
<talkaction words="!deathlist" event="script" value="deathlist.lua"/>
info
Grupo: Barão
Registrado: 26/12/11
Posts: 201
Reputação: +18
Char no Tibia: Flaah

Seja Específico , Não Entendi Sua Dúvida,
Você Não Saber Aplicar ele é Isso?
Eu expliquei muito bem explicadinho, mensagens como esta são considerados FLOODS, porfavor não repita isso denovo.
No SCRIPT que eu mandei acima, eu queria saber se tem as TANGS pra eu colocar no SCRIPT, as TANGS seria:
Informa quantas veses o player ja morreu.
Informa quantos players, o player ja matou.
HarpiaLOOK o SCRIPT que vc me mando é muito bom, mais não é bem o que quero, queria essas informaçoes acima, junto com o SCRIPT que mandei, teria como? :T
AJUDA PORFAVOR, VALENDO +REP
info
Grupo: Visconde
Registrado: 19/07/12
Posts: 395
Reputação: +36
Char no Tibia: Billy Poul

MODS:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="KDR SYSTEM" version="1.0" author="Narko" contact="crmb92@hotmail.com" enabled="yes">
<event type="kill" name="killpoint" event="script"><![CDATA[
function onKill(cid, target, damage, flags)
if isPlayer(target) == true then
db.query("UPDATE `players` SET `frags` = `frags` + 1 WHERE id = " .. getPlayerGUID(cid) .. ";")
doCreatureSay(cid, '+1 Frag Point!', TALKTYPE_ORANGE_1)
end
return true
end
]]></event>
<event type="preparedeath" name="deathpoint" event="script"><![CDATA[
function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller)
if isPlayer(cid) == true then
db.query("UPDATE `players` SET `deaths` = `deaths` + 1 WHERE id = " .. getPlayerGUID(cid) .. ";")
doCreatureSay(cid, '+1 Death Point!', TALKTYPE_ORANGE_1)
end
return true
end
]]></event>
<event type="look" name="KdrLook" event="script"><![CDATA[
function onLook(cid, thing, position, lookDistance)
function getKillsPlayer(cid)
local Info = db.getResult("SELECT `frags` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. " LIMIT 1")
local frags= Info:getDataInt("frags")
return frags
end
function getDeathsPlayer(cid)
local Info = db.getResult("SELECT `deaths` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. " LIMIT 1")
local deaths= Info:getDataInt("deaths")
return deaths
end
if isPlayer(thing.uid) then
local kdr = getKillsPlayer(thing.uid)/getDeathsPlayer(thing.uid)
doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == 0 and "\nShe" or "\nHe") .. " has Killed: ["..getKillsPlayer(thing.uid).."] Players."..(getPlayerSex(thing.uid) == 0 and "\nShe" or "\nHe") .. " has Died: ["..getDeathsPlayer(thing.uid).."] Times.\nThe Kdr(Kill Death Ratio) is: ["..kdr.."].")
end
if(thing.uid == cid) then
local kdr = getKillsPlayer(thing.uid)/getDeathsPlayer(thing.uid)
doPlayerSetSpecialDescription(thing.uid, "\nYou have Killed: ["..getKillsPlayer(thing.uid).."] Players.\nYou have Died: ["..getDeathsPlayer(thing.uid).."] Times.\nYou Kdr(Kill Death Ratio) is: ["..kdr.."].")
end
return true
end
]]></event>
<event type="login" name="KdrLook" event="buffer"><![CDATA[
registerCreatureEvent(cid, "KdrLook")
registerCreatureEvent(cid, "killpoint")
registerCreatureEvent(cid, "deathpoint")
_result = true
]]></event>
</mod>
Dando Look No player vai mostrar quantas Vezes você morreu,quantas vezes matou alguém,e o percentual de death/kill.
info
Grupo: Barão
Registrado: 26/12/11
Posts: 201
Reputação: +18
Char no Tibia: Flaah

Tchubaka Teria como vc colocar essas informaçoes, nesse SCRIPT?
function onSay(cid, words, param, channel)param = param or ""
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end
local pid = getPlayerByNameWildcard(param)
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player ".. param .." not found.")
return true
end
doShowTextDialog(cid, 2175, "Informações Pessoais\n" ..
"\nNome: " .. getCreatureName(pid) ..
"\nSexo: " .. (getPlayerSex(pid) == 0 and "Feminino" or "Masculino") ..
"\nPersonagem: " .. getPlayerVocationName(pid) ..
"\nLevel: " .. getPlayerLevel(pid) ..
"\nChakra: " .. getPlayerMagLevel(pid) ..
"\nReputação: " .. getCreatureStorage(pid, 6001) ..
"\nAldeia: " .. getTownName(getPlayerTown(pid)) ..
"\nResets: " .. (getCreatureStorage(pid, 1873) > 0 and getCreatureStorage(pid, 1873) or "Nenhum") ..
"\n\nAtributos do Player\n" ..
"\nTaijutsu: " .. getPlayerSkillLevel(pid, 0) ..
"\nNinjutsu: " .. getPlayerSkillLevel(pid, 1) ..
"\nGenjutsu: " .. getPlayerSkillLevel(pid, 2) ..
"\nKenjutsu: " .. getPlayerSkillLevel(pid, 3) ..
"\nDistance: " .. getPlayerSkillLevel(pid, 4) ..
"\nDefense: " .. getPlayerSkillLevel(pid, 5) ..
"\nFishing: " .. getPlayerSkillLevel(pid, 6) ..
"\n\nInformações da Tribo\n" ..
"\nNome: " .. getPlayerGuildName(pid) ..
"\nPosto: " .. getPlayerGuildRank(pid) ..
"\nNível: " .. getPlayerGuildLevel(pid) ..
"\n\nInformações da Finanseiras\n" ..
"\nPlayer VIP: " .. (getCreatureStorage(pid, 13540) > os.time() and "Sim" or "Não") ..
"\nSaldo Bancario: " .. getPlayerBalance(pid) ..
"\n\nDinheiro na Mochila\n" ..
"\nReal: " .. getPlayerItemCount(pid, 2152) ..
"\nCentavos: " .. getPlayerItemCount(pid, 2160) ..
"\nBarra de Ouro: " .. getPlayerItemCount(pid, 2148))
return true
end
AJUDA PORFAVOR, VALENDO +REP
info
Grupo: Visconde
Registrado: 19/07/12
Posts: 395
Reputação: +36
Char no Tibia: Billy Poul

nem manjo narutibia. =/
vou vtentar aki.
info
Grupo: Barão
Registrado: 26/12/11
Posts: 201
Reputação: +18
Char no Tibia: Flaah

Tipo, não to conseguindo colocar essas TANGS no SCRIPT, não é questão de naruto tibia e taus, é mais as TANGS mesmo. ![]()
PS: Esse sistema de LOOK que vc mando, não esta funcionando no meu server, (The Forgotten Server, version 0.3.6)
AJUDA PORFAVOR, VALENDO +REP
Editado Julho 25 por Flaah
info
Grupo: Barão
Registrado: 26/12/11
Posts: 201
Reputação: +18
Char no Tibia: Flaah
Ola amigos do XTIBIA, estou com 2 probleminhas, que to querendo adicionar ao SCRIPT que meu amigo me ajudou a montar, que seria:
Quantas veses o player ja morreu.
Quantos players, o player ja matou.
SCRIPT:
AJUDA PORFAVOR, VALENDO +REP
Editado Julho 24 por Flaah