Ir para conteúdo

Comando Para Ver Quantidade De Skills


ilusionBRsv1

Posts Recomendados

bom se for um comando para o próprio player usar, para saber valores dele mesmo ( que eu axei uma coisa estranha, pois para ver seus status é facil ), vc vai usar este script:

 

function onSay(cid, words)
local tab = {
["!level"] =  getPlayerLevel(cid),
["!magic"] = getPlayerMagLevel(cid),
["!hp"] = getCreatureMaxHealth(cid),
["!mana"] = getPlayerMana(cid),
["!first"] = getPlayerSkill(cid, 0),
["!club"] = getPlayerSkill(cid, 1),
["!sword"] = getPlayerSkill(cid, 2),
["!axe"] = getPlayerSkill(cid, 3),
["!distance"] = getPlayerSkill(cid, 4),
["!shield"] = getPlayerSkill(cid, 5),
["!fishing"] =  getPlayerSkill(cid, 6)
}
return doPlayerSendTextMessage(cid, 27, "You have "..words:sub(2, #words)):upper()..": "..tab[words])
end

 

tag:

<talkaction words="!level;!magic;!hp;!mana;!fist;!club;!sword;!axe;!distance;!shield;!fishing" event="script" value="NOME DO ARQUIVO.lua"/>

 

agora se for um script para saber os skills de outro player exemplo !level Fulano, vc vai usar este script:

 

function onSay(cid, words, param)
if not param or param == "" then
	return doPlayerSendTextMessage(cid, 27, "Param Require.")
end
local pid = getPlayerByName(param)
if pid then
	local tab = {
		["!level"] =  getPlayerLevel(pid),
		["!magic"] = getPlayerMagLevel(pid),
		["!hp"] = getCreatureMaxHealth(pid),
		["!mana"] = getPlayerMana(pid),
		["!first"] = getPlayerSkill(pid, 0),
		["!club"] = getPlayerSkill(pid, 1),
		["!sword"] = getPlayerSkill(pid, 2),
		["!axe"] = getPlayerSkill(pid, 3),
		["!distance"] = getPlayerSkill(pid, 4),
		["!shield"] = getPlayerSkill(pid, 5),
		["!fishing"] =  getPlayerSkill(pid, 6)
	}
	return doPlayerSendTextMessage(cid, 27, getCreatureName(pid).." have "..words:sub(2, #words)):upper()..": "..tab[words])
else
	return doPlayerSendTextMessage(cid, 27, "Player not found.")
end
end

 

tag:

<talkaction words="!level;!magic;!hp;!mana;!fist;!club;!sword;!axe;!distance;!shield;!fishing" event="script" value="NOME DO ARQUIVO.lua"/>

 

e se for só para adms usar a tag é:

<talkaction words="!level;!magic;!hp;!mana;!fist;!club;!sword;!axe;!distance;!shield;!fishing" event="script" access="5" value="NOME DO ARQUIVO.lua"/>

 

Fui.

Link para o comentário
Compartilhar em outros sites

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...