Postado Junho 16, 2018 6 anos Olá Pessoal Do Tibia King Hoje Venho Pedir um Suporte com o Held System. Meu Caso é um amigo passo o sistema de 3 Held do servidor dele invés de ser {Held X e Held Y} agora é {Held X , Held Y e Held Z} mais to com um problema quando era só 2 tipos de Helds dava pra colocar os 2 de boa agora quando coloco. exemplo: Mostrar conteúdo oculto Held X-Attack Tier 7 e Held Y-Regeneration Tier 7 Só aparece o Held tier X, mais pra fazer aparecer todos os helds eu tenho que colocar os 3 tipo de helds pra poder aparecer todos, mais eu não quero que fique assim quero que quando um jogodor colocar Held X e Y os 2 Apareça ou Held X e Z e quando colocar os 3 juntos continuar mostrando os 3. vou postar o meu look.lua , espero que me ajudem. Look.lua Mostrar conteúdo oculto 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"}, } local xhelds = { [8] = {name = "X-Attack(Tier : 1)"}, [9] = {name = "X-Attack(Tier : 2)"}, [10] = {name = "X-Attack(Tier: 3)"}, [11] = {name = "X-Attack(Tier: 4)"}, [12] = {name = "X-Attack(Tier: 5)"}, [13] = {name = "X-Attack(Tier: 6)"}, [14] = {name = "X-Attack(Tier: 7)"}, [15] = {name = "X-Attack(Tier: 8)"}, } local yhelds = { [1] = {name = "Y-Regeneration(Tier: 1)"}, [2] = {name = "Y-Regeneration(Tier: 2)"}, [3] = {name = "Y-Regeneration(Tier: 3)"}, [4] = {name = "Y-Regeneration(Tier: 4)"}, [5] = {name = "Y-Regeneration(Tier: 5)"}, [6] = {name = "Y-Regeneration(Tier: 6)"}, [7] = {name = "Y-Regeneration(Tier: 7)"}, [8] = {name = "Y-Cure(Tier: 1)"}, [9] = {name = "Y-Cure(Tier: 2)"}, [10] = {name = "Y-Cure(Tier: 3)"}, [11] = {name = "Y-Cure(Tier: 4)"}, [12] = {name = "Y-Cure(Tier: 5)"}, [13] = {name = "Y-Cure(Tier: 6)"}, [14] = {name = "Y-Cure(Tier: 7)"}, } local zhelds = { [1] = {name = "Z-Defense(Tier : 1)"}, [2] = {name = "Z-Defense(Tier: 2)"}, [3] = {name = "Z-Defense(Tier: 3)"}, [4] = {name = "Z-Defense(Tier: 4)"}, [5] = {name = "Z-Defense(Tier: 5)"}, [6] = {name = "Z-Defense(Tier: 6)"}, [7] = {name = "Z-Defense(Tier: 7)"}, [113] = {name = "Z-Cooldown(Tier: 3)"}, [114] = {name = "Z-Cooldown(Tier: 5)"}, [115] = {name = "Z-Cooldown(Tier: 7)"}, } 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") local pokename = getItemAttribute(thing.uid, "poke") local heldx = getItemAttribute(thing.uid, "heldx") local heldy = getItemAttribute(thing.uid, "heldy") local heldz = getItemAttribute(thing.uid, "heldz") table.insert(str, "Voce ve "..iname.article.." "..iname.name..".") if getItemAttribute(thing.uid, "unique") then table.insert(str, " It's an unique item.") end table.insert(str, "\nEssa pokeball contem um: "..getArticle(pokename).." "..pokename..".\n") if lock and lock > 0 then table.insert(str, "It will unlock in ".. os.date("%d/%m/%y %X", lock)..".\n") end local boost = getItemAttribute(thing.uid, "boost") or 0 if boost > 0 then table.insert(str, "[Boost]: +"..boost..".\n") end if getItemAttribute(thing.uid, "nick") then table.insert(str, "Nome: "..getItemAttribute(thing.uid, "nick")..".\n") end if heldx and heldy and heldz then table.insert(str, ""..(xhelds[heldx].name).." and "..(yhelds[heldy].name)..". ")table.insert(str, ""..(zhelds[heldz].name)..". ") elseif heldx then table.insert(str, ""..(xhelds[heldx].name)..". ") elseif heldy then table.insert(str, ""..(yhelds[heldy].name)..". ") elseif heldy then table.insert(str, ""..(zhelds[heldz].name)..". ") end if getItemAttribute(thing.uid, "gender") == SEX_MALE then table.insert(str, "Macho.") elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then table.insert(str, "Femea.") else table.insert(str, "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 "..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, "Macho.") elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then table.insert(str, "Femea.") else table.insert(str, "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, "You see a dead human (Vol:"..getContainerCap(thing.uid).."). ") table.insert(str, "You recognize ".. getItemAttribute(thing.uid, "pName")..". ".. getItemAttribute(thing.uid, "article").." was killed by a ") table.insert(str, getItemAttribute(thing.uid, "attacker")..".") else table.insert(str, "Voce ve "..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, "\nPosition: [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, "Voce ve") if thing.type > 1 then table.insert(str, thing.type.." "..iname.plural..".") else table.insert(str, iname.article.." "..iname.name..".") end table.insert(str, " It's an unique item.\n"..iname.description) if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then table.insert(str, "\nItemID: ["..thing.itemid.."]") table.insert(str, "\nPosition: ["..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, "Voce ve "..npcname..". "..NPCBattle[npcname].artig.." leader of the gym from "..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, "\nPosition: [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, "Voce ve "..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, "You see a wild "..string.lower(getCreatureName(thing.uid))..".\n") table.insert(str, "HP: "..getCreatureHealth(thing.uid).." / "..getCreatureMaxHealth(thing.uid)..".\n") if getPokemonGender(thing.uid) == SEX_MALE then table.insert(str, "Sexo: Macho.") elseif getPokemonGender(thing.uid) == SEX_FEMALE then table.insert(str, "Sexo: Fêmea.") else table.insert(str, "Sexo: 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 catchby = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "CatchBy") if getCreatureMaster(thing.uid) == cid then local myball = getPlayerSlotItem(cid, 8).uid local editto = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "ehditto") -- if editto ~= nil then -- dittoinf = "(Ditto)" -- else -- dittoinf = "." -- end table.insert(str, "Voce ve um "..string.lower(getCreatureName(thing.uid))..".") if boostlevel > 0 then table.insert(str, "\n[Boost]: +"..boostlevel..".") end if catchby ~= nil then table.insert(str, "\nDono: "..catchby.."") end table.insert(str, "\nHP: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".") table.insert(str, "\n"..getPokemonHappinessDescription(thing.uid)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) else if catchby ~= nil then strmsg = "Voce ve "..string.lower(getCreatureName(thing.uid))..".\n[Boost]: +"..boostlevel..".\nIt belongs to: "..getCreatureName(getCreatureMaster(thing.uid)).."\nDono: "..catchby.."" else strmsg = "Voce ve "..string.lower(getCreatureName(thing.uid))..".\n[Boost]: +"..boostlevel..".\nIt belongs to: "..getCreatureName(getCreatureMaster(thing.uid)).."" end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, strmsg) end return false end return true end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. Editado Junho 16, 2018 6 anos por padreesss correção (veja o histórico de edições)
Postado Junho 17, 2018 6 anos Eae padreesss Foi da minha base que postei essi look. Eu ainda esto arumano agumas coisa em lib assim que eu arruma o look.lua e o trade system mando pra você
Postado Agosto 12, 2021 3 anos Autor Em 17/06/2018 em 12:16, henriquesafadao disse: Eae padreesss Foi da minha base que postei essi look. Eu ainda esto arumano agumas coisa em lib assim que eu arruma o look.lua e o trade system mando pra você eae conseguiu arrumar?
Postado Agosto 13, 2021 3 anos Eu até poderia te dar uma resposta toda sobre isso, porém eu to com preguiça, vou postar meu look que tem os 3, mas não é só o arquivo look que tem que alterar, em fim, ta ai Mostrar conteúdo oculto 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"}, } local xhelds = { [8] = {name = "X-Attack(Tier : 1)"}, [9] = {name = "X-Attack(Tier : 2)"}, [10] = {name = "X-Attack(Tier: 3)"}, [11] = {name = "X-Attack(Tier: 4)"}, [12] = {name = "X-Attack(Tier: 5)"}, [13] = {name = "X-Attack(Tier: 6)"}, [14] = {name = "X-Attack(Tier: 7)"}, [15] = {name = "X-Return(Tier: 1)"}, [16] = {name = "X-Return(Tier: 2)"}, [17] = {name = "X-Return(Tier: 3)"}, [18] = {name = "X-Return(Tier: 4)"}, [19] = {name = "X-Return(Tier: 5)"}, [20] = {name = "X-Return(Tier: 6)"}, [21] = {name = "X-Return(Tier: 7)"}, } local yhelds = { [1] = {name = "Y-Defense(Tier: 1)"}, [2] = {name = "Y-Defense(Tier: 2)"}, [3] = {name = "Y-Defense(Tier: 3)"}, [4] = {name = "Y-Defense(Tier: 4)"}, [5] = {name = "Y-Defense(Tier: 5)"}, [6] = {name = "Y-Defense(Tier: 6)"}, [7] = {name = "Y-Defense(Tier: 7)"}, [22] = {name = "Y-Hellfire(Tier: 1)"}, [23] = {name = "Y-Hellfire(Tier: 2)"}, [24] = {name = "Y-Hellfire(Tier: 3)"}, [25] = {name = "Y-Hellfire(Tier: 4)"}, [26] = {name = "Y-Hellfire(Tier: 5)"}, [27] = {name = "Y-Hellfire(Tier: 6)"}, [28] = {name = "Y-Hellfire(Tier: 7)"}, [29] = {name = "Y-Poison(Tier: 1)"}, [30] = {name = "Y-Poison(Tier: 2)"}, [31] = {name = "Y-Poison(Tier: 3)"}, [32] = {name = "Y-Poison(Tier: 4)"}, [33] = {name = "Y-Poison(Tier: 5)"}, [34] = {name = "Y-Poison(Tier: 6)"}, [35] = {name = "Y-Poison(Tier: 7)"}, } local zhelds = { [1] = {name = "Z-Regeneration(Tier: 1)"}, [2] = {name = "Z-Regeneration(Tier: 2)"}, [3] = {name = "Z-Regeneration(Tier: 3)"}, [4] = {name = "Z-Regeneration(Tier: 4)"}, [5] = {name = "Z-Regeneration(Tier: 5)"}, [6] = {name = "Z-Regeneration(Tier: 6)"}, [7] = {name = "Z-Regeneration(Tier: 7)"}, [8] = {name = "Z-Cure(Tier: 1)"}, [9] = {name = "Z-Cure(Tier: 2)"}, [10] = {name = "Z-Cure(Tier: 3)"}, [11] = {name = "Z-Cure(Tier: 4)"}, [12] = {name = "Z-Cure(Tier: 5)"}, [13] = {name = "Z-Cure(Tier: 6)"}, [14] = {name = "Z-Cure(Tier: 7)"}, } 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") local heldx = getItemAttribute(thing.uid, "heldx") local heldy = getItemAttribute(thing.uid, "heldy") local heldz = getItemAttribute(thing.uid, "heldz") local Duration = getItemAttribute(thing.uid, "Duration") table.insert(str, "You see "..iname.article.." "..iname.name..".") if getItemAttribute(thing.uid, "unique") then table.insert(str, " It's an unique item.") end table.insert(str, "\nIt contains "..getArticle(pokename).." "..pokename..".\n") if lock and lock > 0 then table.insert(str, "It will unlock in ".. os.date("%d/%m/%y %X", lock)..".\n") end local boost = getItemAttribute(thing.uid, "boost") or 0 if boost > 0 then table.insert(str, "Boost level: +"..boost..".\n") end if getItemAttribute(thing.uid, "nick") then table.insert(str, "It's nickname is: "..getItemAttribute(thing.uid, "nick")..".\n") end if heldx then table.insert(str, ""..(xhelds[heldx].name)..".\n") end if heldy then table.insert(str, ""..(yhelds[heldy].name)..".\n") end if heldz then table.insert(str, ""..(zhelds[heldz].name)..".\n") end if Duration then table.insert(str, "[Expira em: ".. os.date("%d/%m/%Y at %H:%M:%S", Duration) .."].\n") end if getItemAttribute(thing.uid, "gender") == SEX_MALE then table.insert(str, "It is male.") elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then table.insert(str, "It is female.") else table.insert(str, "It is genderless.") 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, "You see a "..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, "It is male.") elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then table.insert(str, "It is female.") else table.insert(str, "It is genderless.") 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, "You see a dead human (Vol:"..getContainerCap(thing.uid).."). ") table.insert(str, "You recognize ".. getItemAttribute(thing.uid, "pName")..". ".. getItemAttribute(thing.uid, "article").." was killed by a ") table.insert(str, getItemAttribute(thing.uid, "attacker")..".") else table.insert(str, "You see "..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, "\nPosition: [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, "You see ") if thing.type > 1 then table.insert(str, thing.type.." "..iname.plural..".") else table.insert(str, iname.article.." "..iname.name..".") end table.insert(str, " It's an unique item.\n"..iname.description) if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then table.insert(str, "\nItemID: ["..thing.itemid.."]") table.insert(str, "\nPosition: ["..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, "You see "..npcname..". "..NPCBattle[npcname].artig.." leader of the gym from "..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, "\nPosition: [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, "You see "..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, "You see a wild "..string.lower(getCreatureName(thing.uid))..".\n") table.insert(str, "Hit Points: "..getCreatureHealth(thing.uid).." / "..getCreatureMaxHealth(thing.uid)..".\n") if getPokemonGender(thing.uid) == SEX_MALE then table.insert(str, "It is male.") elseif getPokemonGender(thing.uid) == SEX_FEMALE then table.insert(str, "It is female.") else table.insert(str, "It is genderless.") 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 if getCreatureMaster(thing.uid) == cid then local myball = getPlayerSlotItem(cid, 8).uid table.insert(str, "You see your "..string.lower(getCreatureName(thing.uid))..".") if boostlevel > 0 then table.insert(str, "\nBoost level: +"..boostlevel..".") end table.insert(str, "\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".") table.insert(str, "\n"..getPokemonHappinessDescription(thing.uid)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..string.lower(getCreatureName(thing.uid))..".\nIt belongs to "..getCreatureName(getCreatureMaster(thing.uid))..".") end return false end return true end
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.