Meu ot eh um slayer yurots versão 8.40, TFS 0.3.1...
Ja tentei 2 scripts q peguei, 1 aki no xtibia o outro em outro lugar ae...
Mas nem um deles deu certo =/
São os seguintes:
script 1:
local ranks = {
['fist'] = {0},
['club'] = {1},
['sword'] = {2},
['axe'] = {3},
['distance'] = {4},
['shield'] = {5},
['fish'] = {6},
['magic'] = {7},
['level'] = {8},
}
function onSay(cid, words, param)
local msg = string.lower(param)
if ranks[msg] ~= nil then
str = getHighscoreString((ranks[msg][1]))
else
str = getHighscoreString((8))
end
doShowTextDialog(cid,6500, str)
return TRUE
end
Script 2:
function getPlayerNameByGUID2(n)
local c = db.getResult("SELECT `name` FROM `players` WHERE `id` = "..n..";")
if c:getID() == -1 then
return "SQL_ERROR["..n.."]"
end
return c:getDataString("name")
end
function onSay(cid, words, param)
local max = 10
local letters_to_next = 20 -- dont change
--
local skills = {
['fist'] = 0,
['club'] = 1,
['sword'] = 2,
['axe'] = 3,
['distance'] = 4,
['shielding'] = 5,
['fishing'] = 6,
-- outros nomes
['dist'] = 4,
['shield'] = 5,
['fish'] = 6,
}
local name_now
local name = "Ranks By Mock and Marcryzius\n"
local rkn = 0
local no_break = 0
param = string.lower(param)
dofile('config.lua')
if param == "" or param == "level" and ( param ~= "magic" and param == "ml") and skills[param] == nil then
name = name.."Name Level Exp\n"
local v = db.getResult("SELECT `name`, `level`, `experience` FROM `players` WHERE `group_id` <= 2 ORDER BY `experience` DESC LIMIT 0,"..(max)..";")
repeat
no_break = no_break +1
if v:getID() == -1 then
break
end
rkn = rkn+1
name_now, l = v:getDataString("name"), string.len(v:getDataString("name"))
space = ""
for i=1, letters_to_next-l do
space = space.." "
end
name = name..rkn.."º "..name_now..space.."|"..v:getDataInt("level") .."| ".."|"..v:getDataInt("experience").."|".."\n"
if no_break >= 20 then
break
end
until v:next() == false
elseif param == "magic" or param == "ml" then
name = name.."Name Level MLp\n"
local v = db.getResult("SELECT `name`, `level`, `maglevel` FROM `players` WHERE `group_id` <= 2 ORDER BY `maglevel` DESC LIMIT 0,"..(max)..";")
repeat
if v:getID() == -1 then
break
end
rkn = rkn+1
name_now, l = v:getDataString("name"), string.len(v:getDataString("name"))
space = ""
for i=1, letters_to_next-l do
space = space.." "
end
name = name..rkn.."º "..name_now..space.."|"..v:getDataInt("level").."| ".." ".."|"..v:getDataInt("maglevel").."|".."\n"
until v:next() == false
elseif param == "resets" then
name = name.."Name resets\n"
local v = db.getResult("SELECT `player_id`, `value` FROM `player_storage` WHERE `key` = 1020 ORDER BY `value` DESC;")
local kk = 0
repeat
if kk == max or v:getID() == -1 then
break
end
kk = kk+1
name_now, l = getPlayerNameByGUID2(v:getDataInt("player_id")), string.len(getPlayerNameByGUID2(v:getDataInt("play er_id")))
space = ""
for i=1, letters_to_next-l do
space = space.." "
end
if name_now == nil then
name_now = 'sql error['..v:getDataInt("player_id")..']'
end
name = name..kk.."º "..name_now..space.."|"..v:getDataInt("value").."| \n"
until v:next() == false
elseif skills[param] ~= nil then
name = name.."Name "..param.." fighting.\n"
local v = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = "..skills[param].." ORDER BY `value` DESC;")
local kk = 0
repeat
if kk == max or v:getID() == -1 then
break
end
kk = kk+1
name_now, l = getPlayerNameByGUID2(v:getDataInt("player_id")), string.len(getPlayerNameByGUID2(v:getDataInt("play er_id")))
space = ""
for i=1, letters_to_next-l do
space = space.." "
end
if name_now == nil then
name_now = 'sql error['..v:getDataInt("player_id")..']'
end
name = name..kk.."º "..name_now..space.."|"..v:getDataInt("value").."| \n"
until v:next() == false
end
if name ~= "Ranks By Mock and Marcryzius\n" then
doPlayerPopupFYI(cid, name)
end
--doPlayerSendTextMessage(cid, 25, name)
return TRUE
end
nem um deles funciona...
alguem pode me ajudar com isso ?
Obrigado
será q eu devo alterar algo no sript pra ele funfar ?