Ir para conteúdo

Featured Replies

Postado

Tente Usar esse Look.lua

function onLook(cid, thing, position, lookDistance)

local str = ""

if not isCreature(thing.uid) then

local iname = getItemInfo(thing.itemid)

if isPokeball(thing.itemid) then

local unique = getItemAttribute(thing.uid, "unique") --alterado v2.6

local pokename = getItemAttribute(thing.uid, "poke")

local item = getItemInfo(thing.itemid)

str = "You see "..item.article.." "..item.name.."." --alterado v2.6

if unique and unique == getCreatureName(cid) then

str = str.." It's an unique item." --alterado v2.6

end

str = str.."\nIt contains "..getArticle(pokename).." "..pokename.." [level "..getItemAttribute(thing.uid, "level").."].\n" --alterado v2.6

local boost = getItemAttribute(thing.uid, "boost") or 0

local boostshow = ""

if boost > 0 then

str = str.."Boost level: +"..boost..".\n"

end

if getItemAttribute(thing.uid, "nick") then

str = str.."It's nickname is: "..getItemAttribute(thing.uid, "nick")..".\n"

end

if getItemAttribute(thing.uid, "gender") == SEX_MALE then

str = str.."It is male."

elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then

str = str.."It is female."

else

str = str.."It is genderless."

end

str = str.."\n--- Status ---"

str = str.."\nOffense: "..math.floor(getItemAttribute(thing.uid, "offense")).." Defense: "..math.floor(getItemAttribute(thing.uid, "defense")).."\n"

str = str.."Agility: "..math.floor(getItemAttribute(thing.uid, "speed")).." Sp. Attack: "..math.floor(getItemAttribute(thing.uid, "specialattack")).."\n"

str = str.."Vitality: "..math.floor(getItemAttribute(thing.uid, "vitality"))..""

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)

return false

elseif string.find(iname.name, "fainted") or string.find(iname.name, "defeated") then

str = "You see a "..string.lower(iname.name).." ["..getItemAttribute(thing.uid, "level").."].\n"

if getItemAttribute(thing.uid, "gender") == SEX_MALE then

str = str.."It is male."

elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then

str = str.."It is female."

else

str = str.."It is genderless."

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)

return false

elseif isContainer(thing.uid) then --containers

local info = getItemInfo(thing.itemid) --alterado v2.7

if info.name == "dead human" and getItemAttribute(thing.uid, "pName") then

str = "You see a dead human (Vol:"..getContainerCap(thing.uid).."). "

str = str.."You recognize ".. getItemAttribute(thing.uid, "pName")..". ".. getItemAttribute(thing.uid, "article").." was killed by a "

str = str.."".. getItemAttribute(thing.uid, "attacker").."."

else

str = "You see "..info.article.." "..info.name..". (Vol:"..getContainerCap(thing.uid)..")."

end

if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then

str = str.."\nitemID: ["..thing.itemid.."]." --alterado v2.7

local pos = getThingPos(thing.uid)

str = str.."\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]."

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)

return false

else

return true

end

end

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 v2.7

["Kira"] = {artig = "She is", cidbat = "Viridian"},

["Koga"] = {artig = "He is", cidbat = "Fushcia"},

["Erika"] = {artig = "She is", cidbat = "Celadon"},

["Surge"] = {artig = "He is", cidbat = "Vermilion"},

}

local npcname = getCreatureName(thing.uid)

if ehNPC(thing.uid) and NPCBattle[npcname] then --npcs duel

str = "You see "..npcname..". "..NPCBattle[npcname].artig.." leader of the gym from "..NPCBattle[npcname].cidbat.."." --alterado v2.7

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)

return false

elseif ehNPC(thing.uid) and getPlayerStorageValue(thing.uid, 697548) ~= -1 then --npcs de TV

local str = getPlayerStorageValue(thing.uid, 697548) --alterado v2.7

local pos = getThingPos(thing.uid)

str = youAre[getPlayerGroupId(cid)] and str.."\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]." or str

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)

return false

end

if not isPlayer(thing.uid) and not isMonster(thing.uid) then

str = "You see "..getCreatureName(thing.uid).."."

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)

return false

end

if isPlayer(thing.uid) then --player

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, getPlayerDesc(cid, thing.uid, false)) --alterado v2.7

return false

end

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

if not isSummon(thing.uid) then

local str = "You see a wild "..string.lower(getCreatureName(thing.uid)).." [level "..getPokemonLevel(thing.uid).."].\n"

if getPokemonGender(thing.uid) == SEX_MALE then

str = str.."It is male."

elseif getPokemonGender(thing.uid) == SEX_FEMALE then

str = str.."It is female."

else

str = str.."It is genderless."

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)

return false

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

local boostlevel = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "boost") or 0

local boostshow = " + "..boostlevel.."]"

if showBoostSeparated then

boostshow = "] [+"..boostlevel.."]"

end

local levelinfo = "["..getPokemonLevel(thing.uid)..""..boostshow..""

if getCreatureMaster(thing.uid) == cid then

local myball = getPlayerSlotItem(cid, 8).uid

local nexp = getItemAttribute(myball, "nextlevelexp")

local string = "You see your "..string.lower(getCreatureName(thing.uid)).." "..levelinfo.."."

string = string.."\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid).."."

string = string.."\n"..getPokemonHappinessDescription(thing.uid)

if getItemAttribute(myball, "level") <= 99 then

string = string.."\nExperience needed to level up: "..nexp.."."

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string)

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..string.lower(getCreatureName(thing.uid)).." "..levelinfo..".\nIt belongs to "..getCreatureName(getCreatureMaster(thing.uid))..".")

end

return false

end

return true

end

Meu Ultimo projeto em desenvolvimento!

 

http://www.tibiaking.com/forum/topic/47753-show-off-ultimo-projeto-para-download/

 

 

Grupo do facebook para OtServidores! (Divulgação + Criação de Equipe)

 

https://www.facebook.com/groups/otservidores/

 

  • 1 year later...
  • Respostas 11
  • Visualizações 2k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

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.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo