MA
pedido

!rank Health, !rank Mana, !rank Frags

Por manojown, 27 de ago. de 2012 em Scripts

otserv
tibia
script
6
1.1k
manojownM
27 de agosto de 2012 às 19:15

queria os scripts !rank health, !rank mana, !rank frags

 

 

FEZ CERTIN? rules.gif

AKI PRO CE >>>>>>>>>>>>>>>>>>>>> REP+

 

FALO PESSOAL!!!!!!!!!!!!!!!!!!!!!!!!!

notle2012N
27 de agosto de 2012 às 19:23

data\talkactions\scripts\ranking.lua

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",
['frags'] = "frags"
},
vocations = {
['druid'] = {1,2,5,6,9,10},
['paladin'] = {3,7,11},
['knight'] = {4,8,12}
}
}
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] 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"
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)
return true
end

 

data\talkactions\talkactions.xml

adiciona isso

 

<talkaction words="!rank" script="ranking.lua" />

Editado Agosto 27 por notle2012

VodkartV
27 de agosto de 2012 às 19:31

@up

 

esse não vai funcionar, tinha que ter passado o MODS junto...

 

@topic

 

atualizei o script pode suar já:

 

http://www.xtibia.com/forum/topic/191311-comando-rank-atualizado/

notle2012N
27 de agosto de 2012 às 19:37

@Vodkart

aqui pega sim mais eu use sem

 

['frags'] = "frags"

manojownM
28 de agosto de 2012 às 16:13

VODKART RETIRE A PARTE DO MAGIC LEVEL PRA MIM QUE IRA GANHAR REP CONSIDERAVELMENTE

 

Att: [ADM] Marcio

 

Se preparem pois estou preparando um Baiak que sera o mais completo da historia! Inovacao sempre!

VodkartV
28 de agosto de 2012 às 17:50

VODKART RETIRE A PARTE DO MAGIC LEVEL PRA MIM QUE IRA GANHAR REP CONSIDERAVELMENTE

 

Att: [ADM] Marcio

 

Se preparem pois estou preparando um Baiak que sera o mais completo da historia! Inovacao sempre!

 

é só remover essa linha

 

['magic'] = "maglevel",