Postado Dezembro 24, 2011 13 anos eae galera blz?8.6 bom, to precisando de um comando de !deathlist que funcione em um baiak (aquele editado pelo bryaan). vlw
Postado Dezembro 24, 2011 13 anos data/talkactions/script Crie um arquivo deathlist.lua e coloque o seguinte script. function onSay(cid, words, param) local target = db.getResult("SELECT `name`, `id` FROM `players` WHERE `name` = " .. db.escapeString(param) .. ";") if(target:getID() ~= -1) then local targetName = target:getDataString("name") local targetGUID = target:getDataInt("id") target:free() local str = "" local deaths = db.getResult("SELECT `time`, `level`, `killed_by`, `altkilled_by` FROM `player_deaths` WHERE `player_id` = " .. targetGUID .. " ORDER BY `time` DESC;") if(deaths:getID() ~= -1) then local breakline = "" while(true) do if(str ~= "") then breakline = "\n" end local time = os.date("%d %B %Y %X ", deaths:getDataInt("time")) local level = deaths:getDataInt("level") local killed = "" local lastHitKiller = deaths:getDataString("killed_by") local mostDamageKiller = deaths:getDataString("altkilled_by") if(tonumber(lastHitKiller)) then killed = getPlayerNameByGUID(tonumber(lastHitKiller)) else killed = getArticle(lastHitKiller) .. " " .. string.lower(lastHitKiller) end if(mostDamageKiller ~= "") then if(tonumber(mostDamageKiller)) then killed = killed .. " and by " .. getPlayerNameByGUID(tonumber(mostDamageKiller)) else killed = killed .. " and by " .. getArticle(mostDamageKiller) .. " " .. string.lower(mostDamageKiller) end end str = str .. breakline .. " " .. time .. " Died at Level " .. level .. " by " .. killed .. "." if not(deaths:next()) then break end end deaths:free() else str = "No deaths recorded." end doPlayerPopupFYI(cid, "Deathlist for player: " .. targetName .. ".\n\n" .. str) else doPlayerSendCancel(cid, "Este Jogador Não Existe") end return TRUE end Depois vai em data/talkactions/talkactions.xml E adicione a linha <talkaction words="!deathlist" script="deathlist.lua"/>
Postado Dezembro 24, 2011 13 anos Autor fiz tudo certin nas talkactions.xml, add o script, mas funcionou mais ou menos... ficou assim: http://imageshack.us/photo/my-images/707/imagemtwj.png/
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.