Ir para conteúdo
  • Cadastre-se

(Resolvido)Look no reset


Ir para solução Resolvido por ZoR,

Posts Recomendados

.Galera quero colocar look quando clicar em cima do player aparecer quantos reset essa pessoa tem e possivel ?

 

script de reset aki

Spoiler

--[[ SCRIPTING> MarcelloMkez <scriptING ]]

    --[[  [Advanced Reset System]
       Autor: MarcelloMkez
       Versão: 1.0
       TFS: 0.3.6
       Testado em: 8.50
                  Fórum: www.xtibia.com/forum/topic/138026-talk-action-advanced-reset-system/

    [Características]
    ~ Versão 1.0 ~

   - Resets no Look;  
   - Premium Account ou não;
   - Mudar Vocação;
          - Limite de Resets;
          - Opções para Abilitar e Desabilitar Condições;

 [Em Construção]

      - Stages Free e Premium; 
      - 'Talvez' um novo sistema de mudar Vocação;
   sem data para postagem.   ]]

   function onSay(cid, words, param)

--[Configurações de Condição]__

   config = {                                                                             --[[verdadeiro / Falso]]

     needPa = false,                   -- Precisa de Premium Account?                          [true / false]
     needPz = true,                    -- Precisa estar em Protection Zone?                    [true / false]      
     battle = false,                   -- Precisa estar sem Batlle para Resetar?               [true / false]
     withe = false,                    -- Players PK Withe pode Resetar?                       [true / false]       
     red = false,                      -- Players PK Red pode Resetar?                         [true / false]
     tp = true,                        -- Teleportar para o Templo após o reset?               [true / false]
     look = true,                      -- Mostrar Resets no Look do Player?                    [true / false]
     addLimite = false,                -- Abilitar Limite de Resets?                           [true / false]
     setClasse = true,                 -- Mudar Vocação do player quando resetar?              [true / false]
     storage = 2310,                   -- Storage                                                 [valor]


--[Configurações do Reset]__ 

             resetStatus = {    

             player = getPlayerGUID(cid),        -- Não Mude.
             lvl = 41000 ,                         -- Level Necessário para Resetar.                                 [valor]
             lvlreset = 8000,                       -- Level que retornará após o Reset.                              [valor]
             limite = 114,                       -- Máximo de resets que um player pode chegar.                    [valor]
             newClasse = 1,                      -- Id da Nova Vocação após o Reset.                               [valor]
             tempo= 5                            -- Tempo para o Player deslogar para Resetar. Em segundos.        [valor]
       },
   }   

--[Funções]__

       function Reseting(cid)
            resets = getResets(cid)
          setPlayerStorageValue(cid,config.storage,resets+1)
                  doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
         doPlayerSetVocation(cid, config.resetStatus.newClasse)
         doRemoveCreature(cid)
        db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)
         db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
          return TRUE
           end

        function noAll(cid)
           resets = getResets(cid)
         setPlayerStorageValue(cid,config.storage,resets+1)
         doRemoveCreature(cid)
         db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
         db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player)
         return TRUE
        end

        function noTeleporting(cid)
           resets = getResets(cid)
         setPlayerStorageValue(cid,config.storage,resets+1)
              doPlayerSetVocation(cid, config.resetStatus.newClasse)
         doRemoveCreature(cid)
           db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
         db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)
            return TRUE
           end

        function noLook(cid)
           resets = getResets(cid)
         setPlayerStorageValue(cid,config.storage,resets+1)
             doPlayerSetVocation(cid, config.resetStatus.newClasse)
         doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
         doRemoveCreature(cid)
         db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
         db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player)
            return TRUE
           end

        function noClasse(cid)
                     resets = getResets(cid)
         setPlayerStorageValue(cid,config.storage,resets+1)
             doTeleportThing(cid,   getTownTemplePosition(getPlayerTown(cid)))
         doRemoveCreature(cid)
            db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)
         db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
          return TRUE
           end

        function setClasse(cid)
                        resets = getResets(cid)
         setPlayerStorageValue(cid,config.storage,resets+1)
                        doPlayerSetVocation(cid, config.resetStatus.newClasse)             
                        doRemoveCreature(cid)
                       db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player)
         db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
          return TRUE
           end

        function look(cid)
            resets = getResets(cid)
         setPlayerStorageValue(cid,config.storage,resets+1)
         doRemoveCreature(cid)
                      db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)
         db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
          return TRUE
           end

        function teleporting(cid)
            resets = getResets(cid)
         setPlayerStorageValue(cid,config.storage,resets+1)
         doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
         doRemoveCreature(cid)
            db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player)
         db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
          return TRUE
           end

      function getResets(cid)
           resets = getPlayerStorageValue(cid,config.storage)

       if resets < 0 then
            resets = 0
          end
           return resets

        end


   local resets = getResets(cid)
   local needLvl ="Você precisa de "..config.resetStatus.lvl-getPlayerLevel(cid).." level's para resetar."
   local msg ="~~[Reset: "..getResets(cid).."]~~ 'Sucesso ao Resetar!  Você será deslogado em "..config.resetStatus.tempo.." Segundos."


 --[Condiçoes]__    

 if(config.needPz == true) and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then
  doPlayerSendTextMessage(cid,22,"Você Precisa estar em Protection Zone Para Resetar.")
   return TRUE

   elseif(config.addLimite == true) and (getResets(cid) == config.resetStatus.limite) then
doPlayerSendTextMessage(cid, 22, "Você ja atingiu o Limite de Resets.")
   return TRUE

elseif(config.withe == false) and (getCreatureSkullType(cid) == 3) then
    doPlayerSendTextMessage(cid,22,"Você ta PK White, por isso não pode resetar.")
   return TRUE

   elseif(config.red == false) and (getCreatureSkullType(cid) == 4) then
    doPlayerSendTextMessage(cid,22,"Você ta PK Red, por isso não pode resetar.")
    return TRUE

   elseif(config.needPa == true) and not isPremium(cid) then
    doPlayerSendTextMessage(cid,22,"Você Precisa ser Premium Account para Resetar.")
    return TRUE

   elseif(config.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
    doPlayerSendTextMessage(cid,22,"Você Precisa estar sem Battle para Resetar.")    
   return TRUE    

elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == true) and (config.setClasse == true) then
  addEvent(Reseting, config.resetStatus.tempo* 1000, cid)

elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == false) and (config.setClasse == false) then 
 addEvent(noAll, config.resetStatus.tempo* 1000, cid)

elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == true) and (config.setClasse == true) then
  addEvent(noTeleporting, config.resetStatus.tempo* 1000, cid)

elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == false) and (config.setClasse == true) then
  addEvent(noLook, config.resetStatus.tempo* 1000, cid)

elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == true) and (config.setClasse == false) then
   addEvent(noClasse, config.resetStatus.tempo* 1000, cid)

elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == false) and (config.setClasse == true) then
   addEvent(setClasse, config.resetStatus.tempo* 1000, cid)

elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == true) and (config.setClasse == false) then
   addEvent(look, config.resetStatus.tempo* 1000, cid)

elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == false) and (config.setClasse == false) then
   addEvent(teleporting, config.resetStatus.tempo* 1000, cid)

   elseif doPlayerSendCancel(cid, needLvl) then
      doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
   return TRUE
   end

if doPlayerPopupFYI(cid, msg) then

end
return TRUE

end

--[by: MarcelloMkez]__

 

Link para o post
Compartilhar em outros sites
Em 05/09/2019 em 19:25, ZoR disse:

@iury alves potter me passa seu look

 

Spoiler

local NPCBattle = {
["Brock"] = {artig = "He is", cidbat = "Pewter"},
["Misty"] = {artig = "She is", cidbat = "Cerulean"}, 
["Blaine"] = {artig = "He is", cidbat = "Cinnabar"},
["Sabrina"] = {artig = "She is", cidbat = "Saffron"},         --alterado v1.9 \/ peguem tudo!
["Kira"] = {artig = "She is", cidbat = "Viridian"},
["Koga"] = {artig = "He is", cidbat = "Fushcia"},
["Erika"] = {artig = "She is", cidbat = "Celadon"},
["Surge"] = {artig = "He is", cidbat = "Vermilion"},
}

function onLook(cid, thing, position, lookDistance)
                                                          
local str = {}
                                              
if not isCreature(thing.uid) then
   local iname = getItemInfo(thing.itemid)
   if isPokeball(thing.itemid) and getItemAttribute(thing.uid, "poke") then 
      
      unLock(thing.uid)
      local lock = getItemAttribute(thing.uid, "lock")        
      local pokename = getItemAttribute(thing.uid, "poke")
      table.insert(str, "Isto(Este) e "..iname.article.." "..iname.name..".")   
      if getItemAttribute(thing.uid, "unique") then               
         setItemAttribute(thing.uid, "unique", nil)
      end
      table.insert(str, "\nContem um "..getArticle(pokename).." "..pokename..".\n")  
      local boost = getItemAttribute(thing.uid, "boost") or 0
      if boost > 0 then
         table.insert(str, "Ele(a) Esta bostado: +"..boost..".\n")
      end
                  local createby = getItemAttribute(thing.uid, "createby") or nil
                  local createin = getItemAttribute(thing.uid, "createin") or nil
                  local pokeid = getItemAttribute(thing.uid, "pokeid") or "nothing"
            if createin ~= nil then
         table.insert(str, "Criado em: "..createin..".\n")
      end
                if createby ~= nil then
         table.insert(str, "Criado por: "..createby..".\n")
      end
                if pokeid ~= "nothing" then
         table.insert(str, "ID do Pokemon: "..pokeid..".\n")
      end
      if getItemAttribute(thing.uid, "nick") then
         table.insert(str, "O Apelido e: "..getItemAttribute(thing.uid, "nick")..".\n")
      end
      if getItemAttribute(thing.uid, "gender") == SEX_MALE then
         table.insert(str, "Ele e Masculino.")
      elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then
         table.insert(str, "Ela e Feminina.")
      else
         table.insert(str, "Ele(a) e Indefinido.")
      end
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
      return false
      
   elseif string.find(iname.name, "fainted") or string.find(iname.name, "defeated") then     

      table.insert(str, "Voce ve um "..string.lower(iname.name)..". ")     
      if isContainer(thing.uid) then
         table.insert(str, "(Vol: "..getContainerCap(thing.uid)..")")
      end
      table.insert(str, "\n")
      if getItemAttribute(thing.uid, "gender") == SEX_MALE then
         table.insert(str, "Ele e Masculino.")
      elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then
         table.insert(str, "Ela e Feminina.")
      else
         table.insert(str, "Ele(a) e Indefinido.")
      end
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
      return false

   elseif isContainer(thing.uid) then     --containers

      if iname.name == "dead human" and getItemAttribute(thing.uid, "pName") then
         table.insert(str, "Isto e um Corpo Humano (Vol:"..getContainerCap(thing.uid).."). ")
         table.insert(str, "Voce esta vendo o ".. getItemAttribute(thing.uid, "pName")..". ".. getItemAttribute(thing.uid, "article").." e Foi morto por ")
         table.insert(str, getItemAttribute(thing.uid, "attacker")..".")
      else   
         table.insert(str, "Este e "..iname.article.." "..iname.name..". (Vol:"..getContainerCap(thing.uid)..").")
      end
      if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then
         table.insert(str, "\nItemID: ["..thing.itemid.."]")     
         local pos = getThingPos(thing.uid)
         table.insert(str, "\nCoordenadas: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]")  
      end
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
      return false
      
   elseif getItemAttribute(thing.uid, "unique") then    
      local p = getThingPos(thing.uid)
   
      table.insert(str, "Este e ")
      if thing.type > 1 then
         table.insert(str, thing.type.." "..iname.plural..".")
      else
         table.insert(str, iname.article.." "..iname.name..".")
      end          
         setItemAttribute(thing.uid, "unique", nil)
      
      if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then
         table.insert(str, "\nItemID: ["..thing.itemid.."]")
         table.insert(str, "\nCoordenadas: ["..p.x.."]["..p.y.."]["..p.z.."]")
      end
   
      sendMsgToPlayer(cid, MESSAGE_INFO_DESCR, table.concat(str))
      return false
   else
      return true
   end
end

local npcname = getCreatureName(thing.uid)
if ehNPC(thing.uid) and NPCBattle[npcname] then    --npcs duel
   table.insert(str, "Este(a) e "..npcname..". "..NPCBattle[npcname].artig.." Lider de Ginasio de "..NPCBattle[npcname].cidbat..".")
   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
   return false
end
if getPlayerStorageValue(thing.uid, 697548) ~= -1 then    
   table.insert(str, getPlayerStorageValue(thing.uid, 697548))                                   
   local pos = getThingPos(thing.uid)
   if youAre[getPlayerGroupId(cid)] then
      table.insert(str, "\nCoordenadas: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]")
   end
   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))  
   return false
end

if not isPlayer(thing.uid) and not isMonster(thing.uid) then    --outros npcs
   table.insert(str, "Este e "..getCreatureName(thing.uid)..".")
   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
   return false
end

if isPlayer(thing.uid) then     --player
   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, getPlayerDesc(cid, thing.uid, false))  
return false
end

if getCreatureName(thing.uid) == "Evolution" then return false end

if not isSummon(thing.uid) then   --monstros
   
   table.insert(str, "Isto e um Pokemon Selvagem : "..string.lower(getCreatureName(thing.uid))..".\n")
   table.insert(str, "Vida: "..getCreatureHealth(thing.uid).." / "..getCreatureMaxHealth(thing.uid)..".\n")
   if getPokemonGender(thing.uid) == SEX_MALE then
      table.insert(str, "Ele e Masculino.")
   elseif getPokemonGender(thing.uid) == SEX_FEMALE then
      table.insert(str, "Ela e Feminina.")
   else
      table.insert(str, "Ele(a) e Indefinido.")
   end
   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
   return false

elseif isSummon(thing.uid) and not isPlayer(thing.uid) then  --summons

   local boostlevel = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "boost") or 0
   local createby = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "createby") or "nothing"
   local pokeid = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "pokeid") or "nothing"
   local createin = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "createin") or "nothing"
   if getCreatureMaster(thing.uid) == cid then
      local myball = getPlayerSlotItem(cid, 8).uid
      table.insert(str, "Voce ve o seu "..string.lower(getCreatureName(thing.uid))..".")
      if boostlevel > 0 then
         table.insert(str, "\nEsta Bostado: +"..boostlevel..".")
      end
      table.insert(str, "\nVida e Vida Maxima: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".")
      table.insert(str, "\n"..getPokemonHappinessDescription(thing.uid))
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
   else
     table.insert(str, "Voce ve um "..string.lower(getCreatureName(thing.uid))..".\nEle Pertence a "..getCreatureName(getCreatureMaster(thing.uid))..".")                  
      if createby ~= "nothing" then
      table.insert(str, "\nCriado por: " .. createby)
       end
      if pokeid ~= "nothing" then
      table.insert(str, "\nID do Pokemon: " .. pokeid)
       end
          if createin ~= "nothing" then
      table.insert(str, "\nCriado em: " .. createin)
       end
       
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
   end
   return false
end
return true
end

 

Link para o post
Compartilhar em outros sites
  • Solução

@iury alves potter 

Spoiler

local NPCBattle = {
["Brock"] = {artig = "He is", cidbat = "Pewter"},
["Misty"] = {artig = "She is", cidbat = "Cerulean"}, 
["Blaine"] = {artig = "He is", cidbat = "Cinnabar"},
["Sabrina"] = {artig = "She is", cidbat = "Saffron"},         --alterado v1.9 \/ peguem tudo!
["Kira"] = {artig = "She is", cidbat = "Viridian"},
["Koga"] = {artig = "He is", cidbat = "Fushcia"},
["Erika"] = {artig = "She is", cidbat = "Celadon"},
["Surge"] = {artig = "He is", cidbat = "Vermilion"},
}

function onLook(cid, thing, position, lookDistance)
                                                          
local str = {}
                                              
if not isCreature(thing.uid) then
   local iname = getItemInfo(thing.itemid)
   if isPokeball(thing.itemid) and getItemAttribute(thing.uid, "poke") then 
      
      unLock(thing.uid)
      local lock = getItemAttribute(thing.uid, "lock")        
      local pokename = getItemAttribute(thing.uid, "poke")
      table.insert(str, "Isto(Este) e "..iname.article.." "..iname.name..".")   
      if getItemAttribute(thing.uid, "unique") then               
         setItemAttribute(thing.uid, "unique", nil)
      end
      table.insert(str, "\nContem um "..getArticle(pokename).." "..pokename..".\n")  
      local boost = getItemAttribute(thing.uid, "boost") or 0
      if boost > 0 then
         table.insert(str, "Ele(a) Esta bostado: +"..boost..".\n")
      end
                  local createby = getItemAttribute(thing.uid, "createby") or nil
                  local createin = getItemAttribute(thing.uid, "createin") or nil
                  local pokeid = getItemAttribute(thing.uid, "pokeid") or "nothing"
            if createin ~= nil then
         table.insert(str, "Criado em: "..createin..".\n")
      end
                if createby ~= nil then
         table.insert(str, "Criado por: "..createby..".\n")
      end
                if pokeid ~= "nothing" then
         table.insert(str, "ID do Pokemon: "..pokeid..".\n")
      end
      if getItemAttribute(thing.uid, "nick") then
         table.insert(str, "O Apelido e: "..getItemAttribute(thing.uid, "nick")..".\n")
      end
      if getItemAttribute(thing.uid, "gender") == SEX_MALE then
         table.insert(str, "Ele e Masculino.")
      elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then
         table.insert(str, "Ela e Feminina.")
      else
         table.insert(str, "Ele(a) e Indefinido.")
      end
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
      return false
      
   elseif string.find(iname.name, "fainted") or string.find(iname.name, "defeated") then     

      table.insert(str, "Voce ve um "..string.lower(iname.name)..". ")     
      if isContainer(thing.uid) then
         table.insert(str, "(Vol: "..getContainerCap(thing.uid)..")")
      end
      table.insert(str, "\n")
      if getItemAttribute(thing.uid, "gender") == SEX_MALE then
         table.insert(str, "Ele e Masculino.")
      elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then
         table.insert(str, "Ela e Feminina.")
      else
         table.insert(str, "Ele(a) e Indefinido.")
      end
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
      return false

   elseif isContainer(thing.uid) then     --containers

      if iname.name == "dead human" and getItemAttribute(thing.uid, "pName") then
         table.insert(str, "Isto e um Corpo Humano (Vol:"..getContainerCap(thing.uid).."). ")
         table.insert(str, "Voce esta vendo o ".. getItemAttribute(thing.uid, "pName")..". ".. getItemAttribute(thing.uid, "article").." e Foi morto por ")
         table.insert(str, getItemAttribute(thing.uid, "attacker")..".")
      else   
         table.insert(str, "Este e "..iname.article.." "..iname.name..". (Vol:"..getContainerCap(thing.uid)..").")
      end
      if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then
         table.insert(str, "\nItemID: ["..thing.itemid.."]")     
         local pos = getThingPos(thing.uid)
         table.insert(str, "\nCoordenadas: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]")  
      end
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
      return false
      
   elseif getItemAttribute(thing.uid, "unique") then    
      local p = getThingPos(thing.uid)
   
      table.insert(str, "Este e ")
      if thing.type > 1 then
         table.insert(str, thing.type.." "..iname.plural..".")
      else
         table.insert(str, iname.article.." "..iname.name..".")
      end          
         setItemAttribute(thing.uid, "unique", nil)
      
      if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then
         table.insert(str, "\nItemID: ["..thing.itemid.."]")
         table.insert(str, "\nCoordenadas: ["..p.x.."]["..p.y.."]["..p.z.."]")
      end
   
      sendMsgToPlayer(cid, MESSAGE_INFO_DESCR, table.concat(str))
      return false
   else
      return true
   end
end

local npcname = getCreatureName(thing.uid)
if ehNPC(thing.uid) and NPCBattle[npcname] then    --npcs duel
   table.insert(str, "Este(a) e "..npcname..". "..NPCBattle[npcname].artig.." Lider de Ginasio de "..NPCBattle[npcname].cidbat..".")
   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
   return false
end
if getPlayerStorageValue(thing.uid, 697548) ~= -1 then    
   table.insert(str, getPlayerStorageValue(thing.uid, 697548))                                   
   local pos = getThingPos(thing.uid)
   if youAre[getPlayerGroupId(cid)] then
      table.insert(str, "\nCoordenadas: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]")
   end
   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))  
   return false
end

if not isPlayer(thing.uid) and not isMonster(thing.uid) then    --outros npcs
   table.insert(str, "Este e "..getCreatureName(thing.uid)..".")
   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
   return false
end

if isPlayer(thing.uid) then     --player
   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, getPlayerDesc(cid, thing.uid, false) .. "\n" .. "Reset: [" .. getResets(cid) .. "]" )  
return false
end

if getCreatureName(thing.uid) == "Evolution" then return false end

if not isSummon(thing.uid) then   --monstros
   
   table.insert(str, "Isto e um Pokemon Selvagem : "..string.lower(getCreatureName(thing.uid))..".\n")
   table.insert(str, "Vida: "..getCreatureHealth(thing.uid).." / "..getCreatureMaxHealth(thing.uid)..".\n")
   if getPokemonGender(thing.uid) == SEX_MALE then
      table.insert(str, "Ele e Masculino.")
   elseif getPokemonGender(thing.uid) == SEX_FEMALE then
      table.insert(str, "Ela e Feminina.")
   else
      table.insert(str, "Ele(a) e Indefinido.")
   end
   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
   return false

elseif isSummon(thing.uid) and not isPlayer(thing.uid) then  --summons

   local boostlevel = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "boost") or 0
   local createby = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "createby") or "nothing"
   local pokeid = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "pokeid") or "nothing"
   local createin = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "createin") or "nothing"
   if getCreatureMaster(thing.uid) == cid then
      local myball = getPlayerSlotItem(cid, 8).uid
      table.insert(str, "Voce ve o seu "..string.lower(getCreatureName(thing.uid))..".")
      if boostlevel > 0 then
         table.insert(str, "\nEsta Bostado: +"..boostlevel..".")
      end
      table.insert(str, "\nVida e Vida Maxima: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".")
      table.insert(str, "\n"..getPokemonHappinessDescription(thing.uid))
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
   else
     table.insert(str, "Voce ve um "..string.lower(getCreatureName(thing.uid))..".\nEle Pertence a "..getCreatureName(getCreatureMaster(thing.uid))..".")                  
      if createby ~= "nothing" then
      table.insert(str, "\nCriado por: " .. createby)
       end
      if pokeid ~= "nothing" then
      table.insert(str, "\nID do Pokemon: " .. pokeid)
       end
          if createin ~= "nothing" then
      table.insert(str, "\nCriado em: " .. createin)
       end
       
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
   end
   return false
end
return true
end

 

 

 

Download do arquivo Look.lua

 

Se Ajudei Rep+ :) 

 

O rei de seu proprio destino é aquele que luta pela gloria do amanhã!
Discord : ZoR#9373


 

Link para o post
Compartilhar em outros sites
  • 3 months later...
Em 06/09/2019 em 22:15, ZoR disse:

@iury alves potter 

  Ocultar conteúdo


local NPCBattle = {
["Brock"] = {artig = "He is", cidbat = "Pewter"},
["Misty"] = {artig = "She is", cidbat = "Cerulean"}, 
["Blaine"] = {artig = "He is", cidbat = "Cinnabar"},
["Sabrina"] = {artig = "She is", cidbat = "Saffron"},         --alterado v1.9 \/ peguem tudo!
["Kira"] = {artig = "She is", cidbat = "Viridian"},
["Koga"] = {artig = "He is", cidbat = "Fushcia"},
["Erika"] = {artig = "She is", cidbat = "Celadon"},
["Surge"] = {artig = "He is", cidbat = "Vermilion"},
}

function onLook(cid, thing, position, lookDistance)
                                                          
local str = {}
                                              
if not isCreature(thing.uid) then
   local iname = getItemInfo(thing.itemid)
   if isPokeball(thing.itemid) and getItemAttribute(thing.uid, "poke") then 
      
      unLock(thing.uid)
      local lock = getItemAttribute(thing.uid, "lock")        
      local pokename = getItemAttribute(thing.uid, "poke")
      table.insert(str, "Isto(Este) e "..iname.article.." "..iname.name..".")   
      if getItemAttribute(thing.uid, "unique") then               
         setItemAttribute(thing.uid, "unique", nil)
      end
      table.insert(str, "\nContem um "..getArticle(pokename).." "..pokename..".\n")  
      local boost = getItemAttribute(thing.uid, "boost") or 0
      if boost > 0 then
         table.insert(str, "Ele(a) Esta bostado: +"..boost..".\n")
      end
                  local createby = getItemAttribute(thing.uid, "createby") or nil
                  local createin = getItemAttribute(thing.uid, "createin") or nil
                  local pokeid = getItemAttribute(thing.uid, "pokeid") or "nothing"
            if createin ~= nil then
         table.insert(str, "Criado em: "..createin..".\n")
      end
                if createby ~= nil then
         table.insert(str, "Criado por: "..createby..".\n")
      end
                if pokeid ~= "nothing" then
         table.insert(str, "ID do Pokemon: "..pokeid..".\n")
      end
      if getItemAttribute(thing.uid, "nick") then
         table.insert(str, "O Apelido e: "..getItemAttribute(thing.uid, "nick")..".\n")
      end
      if getItemAttribute(thing.uid, "gender") == SEX_MALE then
         table.insert(str, "Ele e Masculino.")
      elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then
         table.insert(str, "Ela e Feminina.")
      else
         table.insert(str, "Ele(a) e Indefinido.")
      end
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
      return false
      
   elseif string.find(iname.name, "fainted") or string.find(iname.name, "defeated") then     

      table.insert(str, "Voce ve um "..string.lower(iname.name)..". ")     
      if isContainer(thing.uid) then
         table.insert(str, "(Vol: "..getContainerCap(thing.uid)..")")
      end
      table.insert(str, "\n")
      if getItemAttribute(thing.uid, "gender") == SEX_MALE then
         table.insert(str, "Ele e Masculino.")
      elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then
         table.insert(str, "Ela e Feminina.")
      else
         table.insert(str, "Ele(a) e Indefinido.")
      end
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
      return false

   elseif isContainer(thing.uid) then     --containers

      if iname.name == "dead human" and getItemAttribute(thing.uid, "pName") then
         table.insert(str, "Isto e um Corpo Humano (Vol:"..getContainerCap(thing.uid).."). ")
         table.insert(str, "Voce esta vendo o ".. getItemAttribute(thing.uid, "pName")..". ".. getItemAttribute(thing.uid, "article").." e Foi morto por ")
         table.insert(str, getItemAttribute(thing.uid, "attacker")..".")
      else   
         table.insert(str, "Este e "..iname.article.." "..iname.name..". (Vol:"..getContainerCap(thing.uid)..").")
      end
      if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then
         table.insert(str, "\nItemID: ["..thing.itemid.."]")     
         local pos = getThingPos(thing.uid)
         table.insert(str, "\nCoordenadas: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]")  
      end
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
      return false
      
   elseif getItemAttribute(thing.uid, "unique") then    
      local p = getThingPos(thing.uid)
   
      table.insert(str, "Este e ")
      if thing.type > 1 then
         table.insert(str, thing.type.." "..iname.plural..".")
      else
         table.insert(str, iname.article.." "..iname.name..".")
      end          
         setItemAttribute(thing.uid, "unique", nil)
      
      if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then
         table.insert(str, "\nItemID: ["..thing.itemid.."]")
         table.insert(str, "\nCoordenadas: ["..p.x.."]["..p.y.."]["..p.z.."]")
      end
   
      sendMsgToPlayer(cid, MESSAGE_INFO_DESCR, table.concat(str))
      return false
   else
      return true
   end
end

local npcname = getCreatureName(thing.uid)
if ehNPC(thing.uid) and NPCBattle[npcname] then    --npcs duel
   table.insert(str, "Este(a) e "..npcname..". "..NPCBattle[npcname].artig.." Lider de Ginasio de "..NPCBattle[npcname].cidbat..".")
   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
   return false
end
if getPlayerStorageValue(thing.uid, 697548) ~= -1 then    
   table.insert(str, getPlayerStorageValue(thing.uid, 697548))                                   
   local pos = getThingPos(thing.uid)
   if youAre[getPlayerGroupId(cid)] then
      table.insert(str, "\nCoordenadas: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]")
   end
   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))  
   return false
end

if not isPlayer(thing.uid) and not isMonster(thing.uid) then    --outros npcs
   table.insert(str, "Este e "..getCreatureName(thing.uid)..".")
   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
   return false
end

if isPlayer(thing.uid) then     --player
   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, getPlayerDesc(cid, thing.uid, false) .. "\n" .. "Reset: [" .. getResets(cid) .. "]" )  
return false
end

if getCreatureName(thing.uid) == "Evolution" then return false end

if not isSummon(thing.uid) then   --monstros
   
   table.insert(str, "Isto e um Pokemon Selvagem : "..string.lower(getCreatureName(thing.uid))..".\n")
   table.insert(str, "Vida: "..getCreatureHealth(thing.uid).." / "..getCreatureMaxHealth(thing.uid)..".\n")
   if getPokemonGender(thing.uid) == SEX_MALE then
      table.insert(str, "Ele e Masculino.")
   elseif getPokemonGender(thing.uid) == SEX_FEMALE then
      table.insert(str, "Ela e Feminina.")
   else
      table.insert(str, "Ele(a) e Indefinido.")
   end
   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
   return false

elseif isSummon(thing.uid) and not isPlayer(thing.uid) then  --summons

   local boostlevel = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "boost") or 0
   local createby = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "createby") or "nothing"
   local pokeid = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "pokeid") or "nothing"
   local createin = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "createin") or "nothing"
   if getCreatureMaster(thing.uid) == cid then
      local myball = getPlayerSlotItem(cid, 8).uid
      table.insert(str, "Voce ve o seu "..string.lower(getCreatureName(thing.uid))..".")
      if boostlevel > 0 then
         table.insert(str, "\nEsta Bostado: +"..boostlevel..".")
      end
      table.insert(str, "\nVida e Vida Maxima: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".")
      table.insert(str, "\n"..getPokemonHappinessDescription(thing.uid))
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
   else
     table.insert(str, "Voce ve um "..string.lower(getCreatureName(thing.uid))..".\nEle Pertence a "..getCreatureName(getCreatureMaster(thing.uid))..".")                  
      if createby ~= "nothing" then
      table.insert(str, "\nCriado por: " .. createby)
       end
      if pokeid ~= "nothing" then
      table.insert(str, "\nID do Pokemon: " .. pokeid)
       end
          if createin ~= "nothing" then
      table.insert(str, "\nCriado em: " .. createin)
       end
       
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
   end
   return false
end
return true
end

 

 

 

Download do arquivo Look.lua

 


Se Ajudei Rep+ :) 

 

 

obg

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo