TR
dúvida

Rank ' Frags ---

Por Trivelatos, 28 de fev. de 2013 em Scripts

resolvido
otserv
tibia
13
2.3k
TrivelatosT
28 de fevereiro de 2013 às 16:39

Coloquei um rank que achei aqui no XTibia só que o rank frags não tá funcionando, pq será? tem que arrumar storage?

 

 

 

local config = {

MaxPlayer = 20,

fight_skills = {

['fist'] = 0,

['club'] = 1,

['sword'] = 2,

['axe'] = 3,

['distance'] = 4,

['shielding'] = 5,

['fishing'] = 6,

['dist'] = 4,

['shield'] = 5,

['fish'] = 6,

},

other_skills = {

[''] = "level",

['level'] = "level",

['magic'] = "maglevel",

['health'] = "healthmax",

['mana'] = "manamax"

},

vocations = {

['sorcerer'] = {1,5},

['druid'] = {2,6},

['paladin'] = {3,7},

['knight'] = {4,8}

},

storages = {

['frags'] = 824544

}

}

function onSay(cid, words, param)

local param,str = string.lower(param),""

if not config.fight_skills[param] and not config.other_skills[param] and not config.vocations[param] and not config.storages[param] then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "este rank não existe.") return true

end

str = "--[ RANK "..(param == "" and "LEVEL" or string.upper(param)).." ]--\n\n"

query = config.fight_skills[param] and db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = "..config.fight_skills[param].." ORDER BY `value` DESC;") or config.other_skills[param] and db.getResult("SELECT `name`, `"..config.other_skills[param].."` FROM `players` WHERE `id` > 6 AND `group_id` < 2 ORDER BY `"..config.other_skills[param].."` DESC, `name` ASC;") or config.storages[param] and db.getResult("SELECT `player_id`, `value` FROM `player_storage` WHERE `key` = "..config.storages[param].." ORDER BY cast(value as INTEGER) DESC;") or db.getResult("SELECT `name`, `level` FROM `players` WHERE `group_id` <= 2 AND `vocation` = "..config.vocations[param][1].." or `vocation` = "..config.vocations[param][2].." ORDER BY `level` DESC;")

if (query:getID() ~= -1) then

k = 1

while true do

str = str .. "\n " .. k .. ". "..(config.fight_skills[param] and getPlayerNameByGUID(query:getDataString("player_id")) or config.storages[param] and getPlayerNameByGUID(query:getDataString("player_id")) or query:getDataString("name")).." - [" .. query:getDataInt((config.fight_skills[param] and "value" or config.storages[param] and "value" or config.vocations[param] and "level" or config.other_skills[param])) .. "]"

k = k + 1

if not(query:next()) or k > config.MaxPlayer then

break

end

end

query:free()

end

doShowTextDialog(cid,6500, str)

return true

end

SkyLighS
28 de fevereiro de 2013 às 16:42

utilize esse script pro rank frags .

 

http://www.xtibia.com/forum/topic/144807-top-frags/

TrivelatosT
28 de fevereiro de 2013 às 16:51

esse não funcionou aqui não o ot caiu...

GearsG
28 de fevereiro de 2013 às 16:58

Tenta esse aqui

 

frags system

 

flw

SkyLighS
28 de fevereiro de 2013 às 16:58

em qual link se acho esse seu script ?

TrivelatosT
28 de fevereiro de 2013 às 17:26

Gears

 

 

 

Nem funcionou esse ai , o ot cai também, esse script que uso é do Vodkart

SkyLighS
28 de fevereiro de 2013 às 19:14

Se adiciona o codigo da database ?

TrivelatosT
01 de março de 2013 às 10:42

não lá não diz o código não

 

problema resolvido, obrigado a todos que tentou ajudar ...

Editado Março 1 por Trivelatos

AsLimaA
01 de março de 2013 às 11:13

não lá não diz o código não

 

problema resolvido, obrigado a todos que tentou ajudar ...

 

Nem deu rep+ pra os que te ajudaram fio...

SkyLighS
01 de março de 2013 às 12:57

Duvida Sanada

Reportado

 

Para ser movido.

 

não lá não diz o código não

 

problema resolvido, obrigado a todos que tentou ajudar ...

 

Nem deu rep+ pra os que te ajudaram fio...

 

Reputação nem é tudo o importante é ajudar.

noobinhuN
01 de março de 2013 às 13:01

Tópico movido para a seção de dúvidas e pedidos resolvidos.

TrivelatosT
01 de março de 2013 às 13:17

eu só posso dá um REP por dia, e todo dia eu dou... se não dei é porque to sem rep --'

GearsG
01 de março de 2013 às 13:58

Na verdade o limite é 2rep+, o lordfire aumentou um dia desses aew

flw