Postado Maio 29, 2015 10 anos Este é um post popular. TESTADO EM TFS 0.4 E 0.6, PEÇO PARA QUE TESTEM EM OUTRAS VERSÕES, POR FAVOR. Prévia; Crie um arquivo KillsandDeath.lua function onLook(cid, thing, position, lookDistance) function getDeathsAndKills(cid, type) -- by vodka local query,d = db.getResult("SELECT `player_id` FROM "..(tostring(type) == "kill" and "`player_killers`" or "`player_deaths`").." WHERE `player_id` = "..getPlayerGUID(cid)),0 if (query:getID() ~= -1) then repeat d = d+1 until not query:next() query:free() end return d end if isPlayer(thing.uid) then doPlayerSetSpecialDescription(thing.uid, "\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." has Killed: ["..getDeathsAndKills(thing.uid, "kill").."] Players.\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." has Died: ["..getDeathsAndKills(thing.uid, "death").."] Times") end return true end No creaturescript.xml, coloque: <event type="look" name="showKD" event="script" value="KillsandDeath.lua"/> Em creaturescript/script/login.lua, coloque: registerCreatureEvent(cid, "showKD") Script disponibilizado por Critico. Tópico organizado por mim. Abraços!
Postado Maio 30, 2015 10 anos Em nome da comunidade do TK muito obrigado pela contribuição! Seu tópico de conteúdo foi aprovado e será movido para a seção adequada. Você ganhou 1 REP+!
Postado Junho 27, 2015 9 anos Desculpe reviver o tópico, porém estou tentando editar este mesmo código e estou com algumas dificuldades. Poderiam me ajudar? Estou tentando mudar isto doPlayerSetSpecialDescription(thing.uid, "\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." has Killed: ["..getDeathsAndKills(thing.uid, "kill")..] Players.\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." has Died: ["..getDeathsAndKills(thing.uid, "death")..] Times") Para isto doPlayerSetSpecialDescription(thing.uid, "\n Frags:" ["..getDeathsAndKills(thing.uid, "kill").."] Players.) Apresenta um erro na distro. Poderiam me ajudar? Desculpe reviver o tópico, porém estou tentando editar este mesmo código e estou com algumas dificuldades. Poderiam me ajudar? Estou tentando mudar isto Para isto Apresenta um erro na distro. Poderiam me ajudar? Consegui resolver.. Obrigado mesmo assim. Resolvi usando assim: doPlayerSetSpecialDescription(thing.uid,'\n Frags: ['..getDeathsAndKills(thing.uid, "kill")..']') Baiak Thunder New TFS Downgrade [TFS 1.5 - 8.60] Gesior Ferobra Downgrade Evento Monster Hunt [TFS 1.X] Evento SafeZone [TFS 1.X] Online Bonus System [TFS 1.X] Dodge & Critical [TFS 1.X] Nova moeda, funcionando com NPCs [TFS 1.X] Square System [TFS 1.X] Loot Channel [TFS 1.X] Gerenciador de Quests [All TFS] NPCs comprando vial/flasks por storage [TFS 1.X] AntiBot [TFS 1.X] Como compilar TFS 0.X
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.