Ir para conteúdo

Sistema ao dar look


Duuhzinhow

Posts Recomendados

Galera, eu queria um sistema, que funcionaria tipo.. se ele tem 10 frags, ele entrara na classe "assassin" , quando tiver 20 frags, entrara na classe "Nightmare", e assim por diante.. (configuravel).

Estas classes irão aparecer quando der look no player, exemplo: He is Duuhzinhow. o level, guilda caso tiver.. etc, e depois do ponto. He is a Assassin.

 

Espero que tenham entendido e possam me ajudar. Obrigado :D

Link para o comentário
Compartilhar em outros sites

Achei esse mod aqui no meu servidor, deve servir, basta editar ao seu gosto:

<?xml version = "1.0" encoding = "UTF-8"?>
<mod name = "Military Ranks" version = "1.0" author = "Teckman" enabled = "yes">
  <config name = "ranks"><![CDATA[
   titles = {
    [5] = "Shinobi Agressive",
    [10] = "Shinobi Killer",
    [15] = "Shinobi Advanced Killer",
    [20] = "Shinobi Advanced",
    [25] = "Shinobi Nukenin Killer",
    [30] = "Shinobi Almost Killer",
    [35] = "Shinobi Nukenin",
    [40] = "Shinobi Renegade Killer",
    [45] = "Shinobi Almost Killer",
    [50] = "Shinobi Renegade",
    [55] = "Akatsuki Novice",
    [60] = "Akatsuki Member",
    [65] = "Akatsuki Espion",
    [70] = "Akatsuki Infiltration",
    [75] = "Akatsuki Espadashin",
    [80] = "Akatsuki Agressive",
    [85] = "Akatsuki Assassin",
    [90] = "Akatsuki Killer",
    [95] = "Akatsuki Espadashin Agressive",
    [100] = "Akatsuki Espion Agressive",
    [105] = "Akatsuki Scout",
    [110] = "Akatsuki Leader"
   }
   fragsStorage = 600
  ]]></config>
  <event type = "look" name = "ranksLook" event = "script"><![CDATA[
   domodlib("ranks")
   function onLook(cid, thing, position, lookDistance)
    if(isPlayer(thing.uid)) then
	 local rank = {rank = "Shinobi Passive", frags = 0}
	 for k, v in pairs(titles) do
	  if(math.max(0, getPlayerStorageValue(thing.uid, fragsStorage)) > k - 1) then
	   if(k - 1 > rank.frags) then
	    rank.rank, rank.frags = v, k - 1
	   end
	  end
	 end
	 doPlayerSetSpecialDescription(thing.uid, "\n Military rank: " .. rank.rank)
    end
    return true
   end
  ]]></event>
  <event type = "kill" name = "ranksKill" event = "script"><![CDATA[
   domodlib("ranks")
   function onKill(cid, target)
    if(isPlayer(target)) then
	 setPlayerStorageValue(cid, fragsStorage, math.max(0, getPlayerStorageValue(cid, fragsStorage) + 1))
	 if(titles[getPlayerStorageValue(cid, fragsStorage)]) then
	  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You advanced to military rank: " .. titles[getPlayerStorageValue(cid, fragsStorage)] .. ". Congratulations " .. titles[getPlayerStorageValue(cid, fragsStorage)] .. "!")
	 end
    end
    return true
   end
  ]]></event>
  <event type = "login" name = "ranksLogin" event = "script"><![CDATA[
   function onLogin(cid)
    registerCreatureEvent(cid, "ranksKill")
    registerCreatureEvent(cid, "ranksLook")
    return true
   end
  ]]></event>
</mod>
Link para o comentário
Compartilhar em outros sites

 

Achei esse mod aqui no meu servidor, deve servir, basta editar ao seu gosto:

<?xml version = "1.0" encoding = "UTF-8"?>
<mod name = "Military Ranks" version = "1.0" author = "Teckman" enabled = "yes">
  <config name = "ranks"><![CDATA[
   titles = {
    [5] = "Shinobi Agressive",
    [10] = "Shinobi Killer",
    [15] = "Shinobi Advanced Killer",
    [20] = "Shinobi Advanced",
    [25] = "Shinobi Nukenin Killer",
    [30] = "Shinobi Almost Killer",
    [35] = "Shinobi Nukenin",
    [40] = "Shinobi Renegade Killer",
    [45] = "Shinobi Almost Killer",
    [50] = "Shinobi Renegade",
    [55] = "Akatsuki Novice",
    [60] = "Akatsuki Member",
    [65] = "Akatsuki Espion",
    [70] = "Akatsuki Infiltration",
    [75] = "Akatsuki Espadashin",
    [80] = "Akatsuki Agressive",
    [85] = "Akatsuki Assassin",
    [90] = "Akatsuki Killer",
    [95] = "Akatsuki Espadashin Agressive",
    [100] = "Akatsuki Espion Agressive",
    [105] = "Akatsuki Scout",
    [110] = "Akatsuki Leader"
   }
   fragsStorage = 600
  ]]></config>
  <event type = "look" name = "ranksLook" event = "script"><![CDATA[
   domodlib("ranks")
   function onLook(cid, thing, position, lookDistance)
    if(isPlayer(thing.uid)) then
	 local rank = {rank = "Shinobi Passive", frags = 0}
	 for k, v in pairs(titles) do
	  if(math.max(0, getPlayerStorageValue(thing.uid, fragsStorage)) > k - 1) then
	   if(k - 1 > rank.frags) then
	    rank.rank, rank.frags = v, k - 1
	   end
	  end
	 end
	 doPlayerSetSpecialDescription(thing.uid, "\n Military rank: " .. rank.rank)
    end
    return true
   end
  ]]></event>
  <event type = "kill" name = "ranksKill" event = "script"><![CDATA[
   domodlib("ranks")
   function onKill(cid, target)
    if(isPlayer(target)) then
	 setPlayerStorageValue(cid, fragsStorage, math.max(0, getPlayerStorageValue(cid, fragsStorage) + 1))
	 if(titles[getPlayerStorageValue(cid, fragsStorage)]) then
	  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You advanced to military rank: " .. titles[getPlayerStorageValue(cid, fragsStorage)] .. ". Congratulations " .. titles[getPlayerStorageValue(cid, fragsStorage)] .. "!")
	 end
    end
    return true
   end
  ]]></event>
  <event type = "login" name = "ranksLogin" event = "script"><![CDATA[
   function onLogin(cid)
    registerCreatureEvent(cid, "ranksKill")
    registerCreatureEvent(cid, "ranksLook")
    return true
   end
  ]]></event>
</mod>

 

É só o mod? nao precisa adicionar mais nada em lugar nenhum? '-'

 

Link para o comentário
Compartilhar em outros sites

  • 4 weeks later...

O tópico foi fechado e movido para lixeira por estar inativo a mais de 10 dias. Caso seja preciso reabrir o mesmo, favor entrar em contato com a equipe.

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...