Ir para conteúdo

Featured Replies

Postado
8 horas atrás, djteteh disse:

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
doPlayerPopupFYI(cid, str)
return TRUE

end

image.thumb.png.2d174683ab106b1d460a5492227f8342.png

Nao Apareceu Nada Mais Que nem Eu Falei la Em Cima quero Que Pareça Juntos que nem o Primeiro Print que eu Mandei

 

Observção ( MEU SERVER CONTEM 19 Vocações Famosos Rozinx )

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",
['magic'] = "maglevel",
['health'] = "healthmax",
['mana'] = "manamax"
},
vocations = {
['sorcerer'] = {1,5},
['druid'] = {2,6},
['paladin'] = {3,7},
['knight'] = {4,8}
}
}
function onSay(cid, words, param)
local store,exausted = 156201,5
local param,str = string.lower(param),""
if not config.fight_skills[param] and not config.other_skills[param] and not config.vocations[param] then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "this ranking does not exists.") return true
elseif getPlayerStorageValue(cid, store) >= os.time() then
doPlayerSendCancel(cid, "wait " .. getPlayerStorageValue(cid, store) - os.time() .. " seconds to use this command again.") 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 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 query:getDataString("name")).." - [" .. query:getDataInt((config.fight_skills[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)
setPlayerStorageValue(cid, store, os.time()+exausted)
return true
end

Voce precisa editar a tabela vocations, caso contrario, nao vai aparecer

 

  • Respostas 11
  • Visualizações 1.4k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • FlameArcixt
    FlameArcixt

    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'] =

  • Manda o script do rank ai

  • ADMRagnarok
    ADMRagnarok

    boa, essa eu tmb queria, eu vou adicionar até resets do lado no meu

Posted Images

Postado
  • Autor
14 horas atrás, FlameArcixt disse:


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",
['magic'] = "maglevel",
['health'] = "healthmax",
['mana'] = "manamax"
},
vocations = {
['sorcerer'] = {1,5},
['druid'] = {2,6},
['paladin'] = {3,7},
['knight'] = {4,8}
}
}
function onSay(cid, words, param)
local store,exausted = 156201,5
local param,str = string.lower(param),""
if not config.fight_skills[param] and not config.other_skills[param] and not config.vocations[param] then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "this ranking does not exists.") return true
elseif getPlayerStorageValue(cid, store) >= os.time() then
doPlayerSendCancel(cid, "wait " .. getPlayerStorageValue(cid, store) - os.time() .. " seconds to use this command again.") 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 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 query:getDataString("name")).." - [" .. query:getDataInt((config.fight_skills[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)
setPlayerStorageValue(cid, store, os.time()+exausted)
return true
end

Voce precisa editar a tabela vocations, caso contrario, nao vai aparecer

 

EU QUERO TODOS LEVEL E VOCATION JUNTOS QUE NEM NA PRIMEIRA IMAGEM QUE EU MANDEI QUANDO ABRI O TIPICO !

 

!Rank

 

Aparecer Tudo

1- 140256 - Yoshiizin - Sorcerer

 

Nao Aparecer so o Level ou so ml ou so Vocation Separados

Editado por djteteh (veja o histórico de edições)

Postado
2 horas atrás, djteteh disse:

EU QUERO TODOS LEVEL E VOCATION JUNTOS QUE NEM NA PRIMEIRA IMAGEM QUE EU MANDEI QUANDO ABRI O TIPICO !

 

!Rank

 

Aparecer Tudo

1- 140256 - Yoshiizin - Sorcerer

 

Nao Aparecer so o Level ou so ml ou so Vocation Separados

Olha eu tava preparando pra vc um script assim, mas sinto uma arrogancia e um desejo de ter isso na mao sem esforço, vou desistir aqui, quem quiser ajudar ajude, eu nao vou ajudar.

 

Postado
  • Autor
6 horas atrás, FlameArcixt disse:

Olha eu tava preparando pra vc um script assim, mas sinto uma arrogancia e um desejo de ter isso na mao sem esforço, vou desistir aqui, quem quiser ajudar ajude, eu nao vou ajudar.

 

Irmão to tentando te Explicar nao Sendo Ignorante Desculpa se Te Ofendi de Alguma Forma Nao Foi Intenção

 

Postado
16 horas atrás, FlameArcixt disse:

Olha eu tava preparando pra vc um script assim, mas sinto uma arrogancia e um desejo de ter isso na mao sem esforço, vou desistir aqui, quem quiser ajudar ajude, eu nao vou ajudar.

 

 

Poderia me enviar? estou precisando

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo