Flaah 18 Postado Julho 24, 2012 Share Postado Julho 24, 2012 (editado) 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: 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") .. "\nLevel: " .. getPlayerLevel(pid) .. "\nChakra: " .. getPlayerMagLevel(pid) .. "\nVIP: " .. (getCreatureStorage(pid, 13540) > os.time() and "Sim" or "Não") .. "\nSaldo Bancário: " .. getPlayerBalance(pid) .. "\nReputação: " .. getCreatureStorage(pid, 6001) .. "\n\nAtributos\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)) return true end AJUDA PORFAVOR, VALENDO +REP Editado Julho 24, 2012 por Flaah Link para o comentário Compartilhar em outros sites More sharing options...
0 medmu 1 Postado Julho 25, 2012 Share Postado Julho 25, 2012 Seja Específico , Não Entendi Sua Dúvida, Você Não Saber Aplicar ele é Isso? Link para o comentário Compartilhar em outros sites More sharing options...
0 lukas13on 4 Postado Julho 25, 2012 Share Postado Julho 25, 2012 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"/> Link para o comentário Compartilhar em outros sites More sharing options...
0 Flaah 18 Postado Julho 25, 2012 Autor Share Postado Julho 25, 2012 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 Link para o comentário Compartilhar em outros sites More sharing options...
0 Tchubaka 36 Postado Julho 25, 2012 Share Postado Julho 25, 2012 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. Link para o comentário Compartilhar em outros sites More sharing options...
0 Flaah 18 Postado Julho 25, 2012 Autor Share Postado Julho 25, 2012 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 Link para o comentário Compartilhar em outros sites More sharing options...
0 Tchubaka 36 Postado Julho 25, 2012 Share Postado Julho 25, 2012 nem manjo narutibia. =/ vou vtentar aki. Link para o comentário Compartilhar em outros sites More sharing options...
0 Flaah 18 Postado Julho 25, 2012 Autor Share Postado Julho 25, 2012 (editado) 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, 2012 por Flaah Link para o comentário Compartilhar em outros sites More sharing options...
Pergunta
Flaah 18
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 por FlaahLink para o comentário
Compartilhar em outros sites
7 respostass a esta questão
Posts Recomendados