Postado Janeiro 15, 2018 7 anos Estou com um bug na script do look.lua Bug Spoiler [15/01/2018 01:11:48] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/look.lua:180: 'end' expected (to close 'if' at line 140) near 'if' [15/01/2018 01:11:48] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/look.lua) [15/01/2018 01:11:48] data/creaturescripts/scripts/look.lua:180: 'end' expected (to close 'if' at line 140) near 'if' Script.lua Spoiler local addons = { [12892] = {pokemon= "Golem" , looktype = 1902, count = 1}, [13027] = {pokemon= "Aggron" , looktype = 1903, count = 1}, [12941] = {pokemon= "Aggron" , looktype = 1904, count = 1}, [13002] = {pokemon= "Snorlax" , looktype = 1905, count = 1}, [12865] = {pokemon= "Kangaskhan" , looktype = 1906, count = 1}, [12948] = {pokemon= "Shiny Electivire" , looktype = 1907, count = 1}, [12949] = {pokemon= "Shiny Electabuzz" , looktype = 1908, count = 1}, [12901] = {pokemon= "Mr. Mime" , looktype = 1909, count = 1}, [12942] = {pokemon= "Miltank" , looktype = 1910, count = 1}, [12909] = {pokemon= "Blissey" , looktype = 1912, count = 1}, [12943] = {pokemon= "Xatu" , looktype = 1913, count = 1}, [13014] = {pokemon= "Meganium" , looktype = 1914, count = 1}, [13016] = {pokemon= "Feraligatr" , looktype = 1916, count = 1}, [13021] = {pokemon= "Feraligatr" , looktype = 1918, count = 1}, [13013] = {pokemon= "Typhlosion" , looktype = 1919, count = 1}, [12913] = {pokemon= "Electivire" , looktype = 1920, count = 1}, [12961] = {pokemon= "Gengar" , looktype = 1921, count = 1}, [12959] = {pokemon= "Jinx" , looktype = 1922, count = 1}, [12945] = {pokemon= "Gardevoir" , looktype = 1923, count = 1}, [12877] = {pokemon= "Scyther" , looktype = 1924, count = 1}, [12960] = {pokemon= "Jinx" , looktype = 1926, count = 1}, [12988] = {pokemon= "Snorlax" , looktype = 1927, count = 1}, [12876] = {pokemon= "Scyther" , looktype = 1928, count = 1}, [12875] = {pokemon= "Scyther" , looktype = 1930, count = 1}, [12914] = {pokemon= "Omanyte" , looktype = 1932, count = 1}, [12989] = {pokemon= "Snorlax" , looktype = 1934, count = 1}, [13026] = {pokemon= "Hitmonchan" , looktype = 1950, count = 1}, [12923] = {pokemon= "Blaziken" , looktype = 1951, count = 1}, [12992] = {pokemon= "Scizor" , looktype = 1952, count = 1}, [13000] = {pokemon= "Miltank" , looktype = 1954, count = 1}, [12998] = {pokemon= "Gardevoir" , looktype = 1955, count = 1}, [12999] = {pokemon= "Miltank" , looktype = 1956, count = 1}, [12996] = {pokemon= "Swampert" , looktype = 1957, count = 1}, [12993] = {pokemon= "Electabuzz" , looktype = 1958, count = 1}, [12995] = {pokemon= "Magmar" , looktype = 1960, count = 1}, [12997] = {pokemon= "Tyranitar" , looktype = 1963, count = 1}, [13007] = {pokemon= "Gardevoir" , looktype = 1964, count = 1}, [13008] = {pokemon= "Gardevoir" , looktype = 1965, count = 1}, [13009] = {pokemon= "Gardevoir" , looktype = 1966, count = 1}, [13199] = {pokemon= "Gardevoir" , looktype = 1967, count = 1}, [13029] = {pokemon= "Typhlosion" , looktype = 1969, count = 1}, [13020] = {pokemon= "Feraligatr" , looktype = 1970, count = 1}, [13037] = {pokemon= "Hitmontop" , looktype = 1973, count = 1}, [12967] = {pokemon= "Crobat" , looktype = 1974, count = 1}, [13004] = {pokemon= "Aggron" , looktype = 1976, count = 1}, [12950] = {pokemon= "Shiny Charizard" , looktype = 1982, count = 1}, [13025] = {pokemon= "Shiny Vileplume" , looktype = 1983, count = 1}, [13038] = {pokemon= "Lapras" , looktype = 1989, count = 1}, [13039] = {pokemon= "Tentacruel" , looktype = 1991, count = 1}, [12921] = {pokemon= "Nidoking" , looktype = 1999, count = 1}, [13040] = {pokemon= "Lapras" , looktype = 1893, count = 1}, [12946] = {pokemon= "Gardevoir" , looktype = 1894, count = 1}, [13041] = {pokemon= "Arcanine" , looktype = 1895, count = 1}, [13042] = {pokemon= "Aggron" , looktype = 1896, count = 1}, [12990] = {pokemon= "Snorlax" , looktype = 1897, count = 1}, [13046] = {pokemon= "Charizard" , looktype = 1898, count = 1}, [13045] = {pokemon= "Charizard" , looktype = 2000, count = 1}, [13043] = {pokemon= "Charizard" , looktype = 2001, count = 1}, [13047] = {pokemon= "Gengar" , looktype = 2003, count = 1}, [13048] = {pokemon= "Gengar" , looktype = 2004, count = 1}, [13049] = {pokemon= "Gengar" , looktype = 2005, count = 1}, [12900] = {pokemon= "Alakazam" , looktype = 2006, count = 1}, [13050] = {pokemon= "Alakazam" , looktype = 2007, count = 1}, [12899] = {pokemon= "Alakazam" , looktype = 2008, count = 1}, [13051] = {pokemon= "Alakazam" , looktype = 2009, count = 1}, [12890] = {pokemon= "Shiny Gengar" , looktype = 2011, count = 1}, [12889] = {pokemon= "Shiny Gengar" , looktype = 2012, count = 1}, [13052] = {pokemon= "Shiny Raichu" , looktype = 2013, count = 1}, [13058] = {pokemon= "Shiny Raichu" , looktype = 2014, count = 1}, [12893] = {pokemon= "Golem" , looktype = 2025, count = 1}, [13053] = {pokemon= "Shiny Abra" , looktype = 2027, count = 1}, [13057] = {pokemon= "Shiny Alakazam" , looktype = 2028, count = 1}, [13054] = {pokemon= "Shiny Alakazam" , looktype = 2029, count = 1}, [13056] = {pokemon= "Shiny Alakazam" , looktype = 2030, count = 1}, [13055] = {pokemon= "Shiny Alakazam" , looktype = 2031, count = 1}, [12871] = {pokemon= "Shiny Electabuzz" , looktype = 2039, count = 1}, [12912] = {pokemon= "Shiny Electabuzz" , looktype = 2040, count = 1}, [13059] = {pokemon= "Shiny Jinx" , looktype = 2043, count = 1}, [13060] = {pokemon= "Shiny Jinx" , looktype = 2044, count = 1}, [12907] = {pokemon= "Shiny Pidgeot" , looktype = 2063, count = 1}, [12908] = {pokemon= "Shiny Pidgeot" , looktype = 2064, count = 1}, [12906] = {pokemon= "Shiny Pidgeot" , looktype = 2065, count = 1}, [12872] = {pokemon= "Machamp" , looktype = 2067, count = 1}, [12940] = {pokemon= "Shiny Charizard" , looktype = 2086, count = 1}, [13308] = {pokemon= "Shiny Charizard" , looktype = 2084, count = 1}, [12938] = {pokemon= "Ursaring" , looktype = 2088, count = 1}, [12937] = {pokemon= "Shiny Gengar" , looktype = 2078, count = 1}, [12939] = {pokemon= "Gengar" , looktype = 2080, count = 1}, [12883] = {pokemon= "Shiny Gengar" , looktype = 2081, count = 1}, } local function getAddonId (looktype) for index, value in pairs (addons) do if value.looktype == looktype then return index end 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 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 not isPokeball(thing.itemid) then if priceList[getItemInfo(thing.itemid).name] then price = priceList[getItemInfo(thing.itemid).name].price if thing.type > 1 then str = "You see "..thing.type.." "..getItemInfo(thing.itemid).plural.."." price = price * thing.type else str = "You see "..getItemInfo(thing.itemid).article.." "..getItemInfo(thing.itemid).name.."." end str = str.." Price: $"..price.."." if getItemAttribute(thing.uid, "description") then str = str.."\n"..getItemAttribute(thing.uid, "description").."." end if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then str = str.."\nItemID: ["..thing.itemid.."]." --alterado v1.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 end end 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, "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 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 if getItemAttribute(thing.uid, "addon") then if flysAddon[getItemAttribute (thing.uid, "addon")] or ridesAddon[getItemAttribute (thing.uid, "addon")] or surfsAddon[getItemAttribute (thing.uid, "addon")] then if getItemAttribute(thing.uid, "addon") > 1 then table.insert(str, " Has the addon "..getItemNameById (getAddonId (getItemAttribute (thing.uid, "addon")))..".") end end end 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 if getItemAttribute(thing.uid, "addon") then if flysAddon[getItemAttribute (thing.uid, "addon")] or ridesAddon[getItemAttribute (thing.uid, "addon")] or surfsAddon[getItemAttribute (thing.uid, "addon")] then if getItemAttribute(thing.uid, "addon") > 1 then table.insert(str, " Has the addon "..getItemNameById (getAddonId (getItemAttribute (thing.uid, "addon")))..".") end end end 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 Quem puder me ajudar =)
Postado Janeiro 15, 2018 7 anos Tenta usar assim: local addons = { [12892] = {pokemon= "Golem" , looktype = 1902, count = 1}, [13027] = {pokemon= "Aggron" , looktype = 1903, count = 1}, [12941] = {pokemon= "Aggron" , looktype = 1904, count = 1}, [13002] = {pokemon= "Snorlax" , looktype = 1905, count = 1}, [12865] = {pokemon= "Kangaskhan" , looktype = 1906, count = 1}, [12948] = {pokemon= "Shiny Electivire" , looktype = 1907, count = 1}, [12949] = {pokemon= "Shiny Electabuzz" , looktype = 1908, count = 1}, [12901] = {pokemon= "Mr. Mime" , looktype = 1909, count = 1}, [12942] = {pokemon= "Miltank" , looktype = 1910, count = 1}, [12909] = {pokemon= "Blissey" , looktype = 1912, count = 1}, [12943] = {pokemon= "Xatu" , looktype = 1913, count = 1}, [13014] = {pokemon= "Meganium" , looktype = 1914, count = 1}, [13016] = {pokemon= "Feraligatr" , looktype = 1916, count = 1}, [13021] = {pokemon= "Feraligatr" , looktype = 1918, count = 1}, [13013] = {pokemon= "Typhlosion" , looktype = 1919, count = 1}, [12913] = {pokemon= "Electivire" , looktype = 1920, count = 1}, [12961] = {pokemon= "Gengar" , looktype = 1921, count = 1}, [12959] = {pokemon= "Jinx" , looktype = 1922, count = 1}, [12945] = {pokemon= "Gardevoir" , looktype = 1923, count = 1}, [12877] = {pokemon= "Scyther" , looktype = 1924, count = 1}, [12960] = {pokemon= "Jinx" , looktype = 1926, count = 1}, [12988] = {pokemon= "Snorlax" , looktype = 1927, count = 1}, [12876] = {pokemon= "Scyther" , looktype = 1928, count = 1}, [12875] = {pokemon= "Scyther" , looktype = 1930, count = 1}, [12914] = {pokemon= "Omanyte" , looktype = 1932, count = 1}, [12989] = {pokemon= "Snorlax" , looktype = 1934, count = 1}, [13026] = {pokemon= "Hitmonchan" , looktype = 1950, count = 1}, [12923] = {pokemon= "Blaziken" , looktype = 1951, count = 1}, [12992] = {pokemon= "Scizor" , looktype = 1952, count = 1}, [13000] = {pokemon= "Miltank" , looktype = 1954, count = 1}, [12998] = {pokemon= "Gardevoir" , looktype = 1955, count = 1}, [12999] = {pokemon= "Miltank" , looktype = 1956, count = 1}, [12996] = {pokemon= "Swampert" , looktype = 1957, count = 1}, [12993] = {pokemon= "Electabuzz" , looktype = 1958, count = 1}, [12995] = {pokemon= "Magmar" , looktype = 1960, count = 1}, [12997] = {pokemon= "Tyranitar" , looktype = 1963, count = 1}, [13007] = {pokemon= "Gardevoir" , looktype = 1964, count = 1}, [13008] = {pokemon= "Gardevoir" , looktype = 1965, count = 1}, [13009] = {pokemon= "Gardevoir" , looktype = 1966, count = 1}, [13199] = {pokemon= "Gardevoir" , looktype = 1967, count = 1}, [13029] = {pokemon= "Typhlosion" , looktype = 1969, count = 1}, [13020] = {pokemon= "Feraligatr" , looktype = 1970, count = 1}, [13037] = {pokemon= "Hitmontop" , looktype = 1973, count = 1}, [12967] = {pokemon= "Crobat" , looktype = 1974, count = 1}, [13004] = {pokemon= "Aggron" , looktype = 1976, count = 1}, [12950] = {pokemon= "Shiny Charizard" , looktype = 1982, count = 1}, [13025] = {pokemon= "Shiny Vileplume" , looktype = 1983, count = 1}, [13038] = {pokemon= "Lapras" , looktype = 1989, count = 1}, [13039] = {pokemon= "Tentacruel" , looktype = 1991, count = 1}, [12921] = {pokemon= "Nidoking" , looktype = 1999, count = 1}, [13040] = {pokemon= "Lapras" , looktype = 1893, count = 1}, [12946] = {pokemon= "Gardevoir" , looktype = 1894, count = 1}, [13041] = {pokemon= "Arcanine" , looktype = 1895, count = 1}, [13042] = {pokemon= "Aggron" , looktype = 1896, count = 1}, [12990] = {pokemon= "Snorlax" , looktype = 1897, count = 1}, [13046] = {pokemon= "Charizard" , looktype = 1898, count = 1}, [13045] = {pokemon= "Charizard" , looktype = 2000, count = 1}, [13043] = {pokemon= "Charizard" , looktype = 2001, count = 1}, [13047] = {pokemon= "Gengar" , looktype = 2003, count = 1}, [13048] = {pokemon= "Gengar" , looktype = 2004, count = 1}, [13049] = {pokemon= "Gengar" , looktype = 2005, count = 1}, [12900] = {pokemon= "Alakazam" , looktype = 2006, count = 1}, [13050] = {pokemon= "Alakazam" , looktype = 2007, count = 1}, [12899] = {pokemon= "Alakazam" , looktype = 2008, count = 1}, [13051] = {pokemon= "Alakazam" , looktype = 2009, count = 1}, [12890] = {pokemon= "Shiny Gengar" , looktype = 2011, count = 1}, [12889] = {pokemon= "Shiny Gengar" , looktype = 2012, count = 1}, [13052] = {pokemon= "Shiny Raichu" , looktype = 2013, count = 1}, [13058] = {pokemon= "Shiny Raichu" , looktype = 2014, count = 1}, [12893] = {pokemon= "Golem" , looktype = 2025, count = 1}, [13053] = {pokemon= "Shiny Abra" , looktype = 2027, count = 1}, [13057] = {pokemon= "Shiny Alakazam" , looktype = 2028, count = 1}, [13054] = {pokemon= "Shiny Alakazam" , looktype = 2029, count = 1}, [13056] = {pokemon= "Shiny Alakazam" , looktype = 2030, count = 1}, [13055] = {pokemon= "Shiny Alakazam" , looktype = 2031, count = 1}, [12871] = {pokemon= "Shiny Electabuzz" , looktype = 2039, count = 1}, [12912] = {pokemon= "Shiny Electabuzz" , looktype = 2040, count = 1}, [13059] = {pokemon= "Shiny Jinx" , looktype = 2043, count = 1}, [13060] = {pokemon= "Shiny Jinx" , looktype = 2044, count = 1}, [12907] = {pokemon= "Shiny Pidgeot" , looktype = 2063, count = 1}, [12908] = {pokemon= "Shiny Pidgeot" , looktype = 2064, count = 1}, [12906] = {pokemon= "Shiny Pidgeot" , looktype = 2065, count = 1}, [12872] = {pokemon= "Machamp" , looktype = 2067, count = 1}, [12940] = {pokemon= "Shiny Charizard" , looktype = 2086, count = 1}, [13308] = {pokemon= "Shiny Charizard" , looktype = 2084, count = 1}, [12938] = {pokemon= "Ursaring" , looktype = 2088, count = 1}, [12937] = {pokemon= "Shiny Gengar" , looktype = 2078, count = 1}, [12939] = {pokemon= "Gengar" , looktype = 2080, count = 1}, [12883] = {pokemon= "Shiny Gengar" , looktype = 2081, count = 1}, } local function getAddonId (looktype) for index, value in pairs (addons) do if value.looktype == looktype then return index end 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 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 not isPokeball(thing.itemid) then if priceList[getItemInfo(thing.itemid).name] then price = priceList[getItemInfo(thing.itemid).name].price if thing.type > 1 then str = "You see "..thing.type.." "..getItemInfo(thing.itemid).plural.."." price = price * thing.type else str = "You see "..getItemInfo(thing.itemid).article.." "..getItemInfo(thing.itemid).name.."." end str = str.." Price: $"..price.."." if getItemAttribute(thing.uid, "description") then str = str.."\n"..getItemAttribute(thing.uid, "description").."." end if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then str = str.."\nItemID: ["..thing.itemid.."]." --alterado v1.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 end end 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, "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 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 if getItemAttribute(thing.uid, "addon") then if flysAddon[getItemAttribute (thing.uid, "addon")] or ridesAddon[getItemAttribute (thing.uid, "addon")] or surfsAddon[getItemAttribute (thing.uid, "addon")] then if getItemAttribute(thing.uid, "addon") > 1 then table.insert(str, " Has the addon "..getItemNameById (getAddonId (getItemAttribute (thing.uid, "addon")))..".") end end end end 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 if getItemAttribute(thing.uid, "addon") then if flysAddon[getItemAttribute (thing.uid, "addon")] or ridesAddon[getItemAttribute (thing.uid, "addon")] or surfsAddon[getItemAttribute (thing.uid, "addon")] then if getItemAttribute(thing.uid, "addon") > 1 then table.insert(str, " Has the addon "..getItemNameById (getAddonId (getItemAttribute (thing.uid, "addon")))..".") end end end 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 Programador PHP, Lua, Java, database administrator. "Nada é verdade, tudo é permitido." Requiescat in pace.
Postado Janeiro 15, 2018 7 anos Autor 13 horas atrás, Nazo disse: Tenta usar assim: Mostrar conteúdo oculto local addons = { [12892] = {pokemon= "Golem" , looktype = 1902, count = 1}, [13027] = {pokemon= "Aggron" , looktype = 1903, count = 1}, [12941] = {pokemon= "Aggron" , looktype = 1904, count = 1}, [13002] = {pokemon= "Snorlax" , looktype = 1905, count = 1}, [12865] = {pokemon= "Kangaskhan" , looktype = 1906, count = 1}, [12948] = {pokemon= "Shiny Electivire" , looktype = 1907, count = 1}, [12949] = {pokemon= "Shiny Electabuzz" , looktype = 1908, count = 1}, [12901] = {pokemon= "Mr. Mime" , looktype = 1909, count = 1}, [12942] = {pokemon= "Miltank" , looktype = 1910, count = 1}, [12909] = {pokemon= "Blissey" , looktype = 1912, count = 1}, [12943] = {pokemon= "Xatu" , looktype = 1913, count = 1}, [13014] = {pokemon= "Meganium" , looktype = 1914, count = 1}, [13016] = {pokemon= "Feraligatr" , looktype = 1916, count = 1}, [13021] = {pokemon= "Feraligatr" , looktype = 1918, count = 1}, [13013] = {pokemon= "Typhlosion" , looktype = 1919, count = 1}, [12913] = {pokemon= "Electivire" , looktype = 1920, count = 1}, [12961] = {pokemon= "Gengar" , looktype = 1921, count = 1}, [12959] = {pokemon= "Jinx" , looktype = 1922, count = 1}, [12945] = {pokemon= "Gardevoir" , looktype = 1923, count = 1}, [12877] = {pokemon= "Scyther" , looktype = 1924, count = 1}, [12960] = {pokemon= "Jinx" , looktype = 1926, count = 1}, [12988] = {pokemon= "Snorlax" , looktype = 1927, count = 1}, [12876] = {pokemon= "Scyther" , looktype = 1928, count = 1}, [12875] = {pokemon= "Scyther" , looktype = 1930, count = 1}, [12914] = {pokemon= "Omanyte" , looktype = 1932, count = 1}, [12989] = {pokemon= "Snorlax" , looktype = 1934, count = 1}, [13026] = {pokemon= "Hitmonchan" , looktype = 1950, count = 1}, [12923] = {pokemon= "Blaziken" , looktype = 1951, count = 1}, [12992] = {pokemon= "Scizor" , looktype = 1952, count = 1}, [13000] = {pokemon= "Miltank" , looktype = 1954, count = 1}, [12998] = {pokemon= "Gardevoir" , looktype = 1955, count = 1}, [12999] = {pokemon= "Miltank" , looktype = 1956, count = 1}, [12996] = {pokemon= "Swampert" , looktype = 1957, count = 1}, [12993] = {pokemon= "Electabuzz" , looktype = 1958, count = 1}, [12995] = {pokemon= "Magmar" , looktype = 1960, count = 1}, [12997] = {pokemon= "Tyranitar" , looktype = 1963, count = 1}, [13007] = {pokemon= "Gardevoir" , looktype = 1964, count = 1}, [13008] = {pokemon= "Gardevoir" , looktype = 1965, count = 1}, [13009] = {pokemon= "Gardevoir" , looktype = 1966, count = 1}, [13199] = {pokemon= "Gardevoir" , looktype = 1967, count = 1}, [13029] = {pokemon= "Typhlosion" , looktype = 1969, count = 1}, [13020] = {pokemon= "Feraligatr" , looktype = 1970, count = 1}, [13037] = {pokemon= "Hitmontop" , looktype = 1973, count = 1}, [12967] = {pokemon= "Crobat" , looktype = 1974, count = 1}, [13004] = {pokemon= "Aggron" , looktype = 1976, count = 1}, [12950] = {pokemon= "Shiny Charizard" , looktype = 1982, count = 1}, [13025] = {pokemon= "Shiny Vileplume" , looktype = 1983, count = 1}, [13038] = {pokemon= "Lapras" , looktype = 1989, count = 1}, [13039] = {pokemon= "Tentacruel" , looktype = 1991, count = 1}, [12921] = {pokemon= "Nidoking" , looktype = 1999, count = 1}, [13040] = {pokemon= "Lapras" , looktype = 1893, count = 1}, [12946] = {pokemon= "Gardevoir" , looktype = 1894, count = 1}, [13041] = {pokemon= "Arcanine" , looktype = 1895, count = 1}, [13042] = {pokemon= "Aggron" , looktype = 1896, count = 1}, [12990] = {pokemon= "Snorlax" , looktype = 1897, count = 1}, [13046] = {pokemon= "Charizard" , looktype = 1898, count = 1}, [13045] = {pokemon= "Charizard" , looktype = 2000, count = 1}, [13043] = {pokemon= "Charizard" , looktype = 2001, count = 1}, [13047] = {pokemon= "Gengar" , looktype = 2003, count = 1}, [13048] = {pokemon= "Gengar" , looktype = 2004, count = 1}, [13049] = {pokemon= "Gengar" , looktype = 2005, count = 1}, [12900] = {pokemon= "Alakazam" , looktype = 2006, count = 1}, [13050] = {pokemon= "Alakazam" , looktype = 2007, count = 1}, [12899] = {pokemon= "Alakazam" , looktype = 2008, count = 1}, [13051] = {pokemon= "Alakazam" , looktype = 2009, count = 1}, [12890] = {pokemon= "Shiny Gengar" , looktype = 2011, count = 1}, [12889] = {pokemon= "Shiny Gengar" , looktype = 2012, count = 1}, [13052] = {pokemon= "Shiny Raichu" , looktype = 2013, count = 1}, [13058] = {pokemon= "Shiny Raichu" , looktype = 2014, count = 1}, [12893] = {pokemon= "Golem" , looktype = 2025, count = 1}, [13053] = {pokemon= "Shiny Abra" , looktype = 2027, count = 1}, [13057] = {pokemon= "Shiny Alakazam" , looktype = 2028, count = 1}, [13054] = {pokemon= "Shiny Alakazam" , looktype = 2029, count = 1}, [13056] = {pokemon= "Shiny Alakazam" , looktype = 2030, count = 1}, [13055] = {pokemon= "Shiny Alakazam" , looktype = 2031, count = 1}, [12871] = {pokemon= "Shiny Electabuzz" , looktype = 2039, count = 1}, [12912] = {pokemon= "Shiny Electabuzz" , looktype = 2040, count = 1}, [13059] = {pokemon= "Shiny Jinx" , looktype = 2043, count = 1}, [13060] = {pokemon= "Shiny Jinx" , looktype = 2044, count = 1}, [12907] = {pokemon= "Shiny Pidgeot" , looktype = 2063, count = 1}, [12908] = {pokemon= "Shiny Pidgeot" , looktype = 2064, count = 1}, [12906] = {pokemon= "Shiny Pidgeot" , looktype = 2065, count = 1}, [12872] = {pokemon= "Machamp" , looktype = 2067, count = 1}, [12940] = {pokemon= "Shiny Charizard" , looktype = 2086, count = 1}, [13308] = {pokemon= "Shiny Charizard" , looktype = 2084, count = 1}, [12938] = {pokemon= "Ursaring" , looktype = 2088, count = 1}, [12937] = {pokemon= "Shiny Gengar" , looktype = 2078, count = 1}, [12939] = {pokemon= "Gengar" , looktype = 2080, count = 1}, [12883] = {pokemon= "Shiny Gengar" , looktype = 2081, count = 1}, } local function getAddonId (looktype) for index, value in pairs (addons) do if value.looktype == looktype then return index end 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 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 not isPokeball(thing.itemid) then if priceList[getItemInfo(thing.itemid).name] then price = priceList[getItemInfo(thing.itemid).name].price if thing.type > 1 then str = "You see "..thing.type.." "..getItemInfo(thing.itemid).plural.."." price = price * thing.type else str = "You see "..getItemInfo(thing.itemid).article.." "..getItemInfo(thing.itemid).name.."." end str = str.." Price: $"..price.."." if getItemAttribute(thing.uid, "description") then str = str.."\n"..getItemAttribute(thing.uid, "description").."." end if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then str = str.."\nItemID: ["..thing.itemid.."]." --alterado v1.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 end end 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, "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 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 if getItemAttribute(thing.uid, "addon") then if flysAddon[getItemAttribute (thing.uid, "addon")] or ridesAddon[getItemAttribute (thing.uid, "addon")] or surfsAddon[getItemAttribute (thing.uid, "addon")] then if getItemAttribute(thing.uid, "addon") > 1 then table.insert(str, " Has the addon "..getItemNameById (getAddonId (getItemAttribute (thing.uid, "addon")))..".") end end end end 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 if getItemAttribute(thing.uid, "addon") then if flysAddon[getItemAttribute (thing.uid, "addon")] or ridesAddon[getItemAttribute (thing.uid, "addon")] or surfsAddon[getItemAttribute (thing.uid, "addon")] then if getItemAttribute(thing.uid, "addon") > 1 then table.insert(str, " Has the addon "..getItemNameById (getAddonId (getItemAttribute (thing.uid, "addon")))..".") end end end 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 Agora o erro deu outro Spoiler [15/01/2018 17:42:03] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/look.lua:175: 'end' expected (to close 'if' at line 137) near 'if' [15/01/2018 17:42:03] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/look.lua) [15/01/2018 17:42:03] data/creaturescripts/scripts/look.lua:175: 'end' expected (to close 'if' at line 137) near 'if'
Postado Janeiro 15, 2018 7 anos Spoiler local addons = { [12892] = {pokemon= "Golem" , looktype = 1902, count = 1}, [13027] = {pokemon= "Aggron" , looktype = 1903, count = 1}, [12941] = {pokemon= "Aggron" , looktype = 1904, count = 1}, [13002] = {pokemon= "Snorlax" , looktype = 1905, count = 1}, [12865] = {pokemon= "Kangaskhan" , looktype = 1906, count = 1}, [12948] = {pokemon= "Shiny Electivire" , looktype = 1907, count = 1}, [12949] = {pokemon= "Shiny Electabuzz" , looktype = 1908, count = 1}, [12901] = {pokemon= "Mr. Mime" , looktype = 1909, count = 1}, [12942] = {pokemon= "Miltank" , looktype = 1910, count = 1}, [12909] = {pokemon= "Blissey" , looktype = 1912, count = 1}, [12943] = {pokemon= "Xatu" , looktype = 1913, count = 1}, [13014] = {pokemon= "Meganium" , looktype = 1914, count = 1}, [13016] = {pokemon= "Feraligatr" , looktype = 1916, count = 1}, [13021] = {pokemon= "Feraligatr" , looktype = 1918, count = 1}, [13013] = {pokemon= "Typhlosion" , looktype = 1919, count = 1}, [12913] = {pokemon= "Electivire" , looktype = 1920, count = 1}, [12961] = {pokemon= "Gengar" , looktype = 1921, count = 1}, [12959] = {pokemon= "Jinx" , looktype = 1922, count = 1}, [12945] = {pokemon= "Gardevoir" , looktype = 1923, count = 1}, [12877] = {pokemon= "Scyther" , looktype = 1924, count = 1}, [12960] = {pokemon= "Jinx" , looktype = 1926, count = 1}, [12988] = {pokemon= "Snorlax" , looktype = 1927, count = 1}, [12876] = {pokemon= "Scyther" , looktype = 1928, count = 1}, [12875] = {pokemon= "Scyther" , looktype = 1930, count = 1}, [12914] = {pokemon= "Omanyte" , looktype = 1932, count = 1}, [12989] = {pokemon= "Snorlax" , looktype = 1934, count = 1}, [13026] = {pokemon= "Hitmonchan" , looktype = 1950, count = 1}, [12923] = {pokemon= "Blaziken" , looktype = 1951, count = 1}, [12992] = {pokemon= "Scizor" , looktype = 1952, count = 1}, [13000] = {pokemon= "Miltank" , looktype = 1954, count = 1}, [12998] = {pokemon= "Gardevoir" , looktype = 1955, count = 1}, [12999] = {pokemon= "Miltank" , looktype = 1956, count = 1}, [12996] = {pokemon= "Swampert" , looktype = 1957, count = 1}, [12993] = {pokemon= "Electabuzz" , looktype = 1958, count = 1}, [12995] = {pokemon= "Magmar" , looktype = 1960, count = 1}, [12997] = {pokemon= "Tyranitar" , looktype = 1963, count = 1}, [13007] = {pokemon= "Gardevoir" , looktype = 1964, count = 1}, [13008] = {pokemon= "Gardevoir" , looktype = 1965, count = 1}, [13009] = {pokemon= "Gardevoir" , looktype = 1966, count = 1}, [13199] = {pokemon= "Gardevoir" , looktype = 1967, count = 1}, [13029] = {pokemon= "Typhlosion" , looktype = 1969, count = 1}, [13020] = {pokemon= "Feraligatr" , looktype = 1970, count = 1}, [13037] = {pokemon= "Hitmontop" , looktype = 1973, count = 1}, [12967] = {pokemon= "Crobat" , looktype = 1974, count = 1}, [13004] = {pokemon= "Aggron" , looktype = 1976, count = 1}, [12950] = {pokemon= "Shiny Charizard" , looktype = 1982, count = 1}, [13025] = {pokemon= "Shiny Vileplume" , looktype = 1983, count = 1}, [13038] = {pokemon= "Lapras" , looktype = 1989, count = 1}, [13039] = {pokemon= "Tentacruel" , looktype = 1991, count = 1}, [12921] = {pokemon= "Nidoking" , looktype = 1999, count = 1}, [13040] = {pokemon= "Lapras" , looktype = 1893, count = 1}, [12946] = {pokemon= "Gardevoir" , looktype = 1894, count = 1}, [13041] = {pokemon= "Arcanine" , looktype = 1895, count = 1}, [13042] = {pokemon= "Aggron" , looktype = 1896, count = 1}, [12990] = {pokemon= "Snorlax" , looktype = 1897, count = 1}, [13046] = {pokemon= "Charizard" , looktype = 1898, count = 1}, [13045] = {pokemon= "Charizard" , looktype = 2000, count = 1}, [13043] = {pokemon= "Charizard" , looktype = 2001, count = 1}, [13047] = {pokemon= "Gengar" , looktype = 2003, count = 1}, [13048] = {pokemon= "Gengar" , looktype = 2004, count = 1}, [13049] = {pokemon= "Gengar" , looktype = 2005, count = 1}, [12900] = {pokemon= "Alakazam" , looktype = 2006, count = 1}, [13050] = {pokemon= "Alakazam" , looktype = 2007, count = 1}, [12899] = {pokemon= "Alakazam" , looktype = 2008, count = 1}, [13051] = {pokemon= "Alakazam" , looktype = 2009, count = 1}, [12890] = {pokemon= "Shiny Gengar" , looktype = 2011, count = 1}, [12889] = {pokemon= "Shiny Gengar" , looktype = 2012, count = 1}, [13052] = {pokemon= "Shiny Raichu" , looktype = 2013, count = 1}, [13058] = {pokemon= "Shiny Raichu" , looktype = 2014, count = 1}, [12893] = {pokemon= "Golem" , looktype = 2025, count = 1}, [13053] = {pokemon= "Shiny Abra" , looktype = 2027, count = 1}, [13057] = {pokemon= "Shiny Alakazam" , looktype = 2028, count = 1}, [13054] = {pokemon= "Shiny Alakazam" , looktype = 2029, count = 1}, [13056] = {pokemon= "Shiny Alakazam" , looktype = 2030, count = 1}, [13055] = {pokemon= "Shiny Alakazam" , looktype = 2031, count = 1}, [12871] = {pokemon= "Shiny Electabuzz" , looktype = 2039, count = 1}, [12912] = {pokemon= "Shiny Electabuzz" , looktype = 2040, count = 1}, [13059] = {pokemon= "Shiny Jinx" , looktype = 2043, count = 1}, [13060] = {pokemon= "Shiny Jinx" , looktype = 2044, count = 1}, [12907] = {pokemon= "Shiny Pidgeot" , looktype = 2063, count = 1}, [12908] = {pokemon= "Shiny Pidgeot" , looktype = 2064, count = 1}, [12906] = {pokemon= "Shiny Pidgeot" , looktype = 2065, count = 1}, [12872] = {pokemon= "Machamp" , looktype = 2067, count = 1}, [12940] = {pokemon= "Shiny Charizard" , looktype = 2086, count = 1}, [13308] = {pokemon= "Shiny Charizard" , looktype = 2084, count = 1}, [12938] = {pokemon= "Ursaring" , looktype = 2088, count = 1}, [12937] = {pokemon= "Shiny Gengar" , looktype = 2078, count = 1}, [12939] = {pokemon= "Gengar" , looktype = 2080, count = 1}, [12883] = {pokemon= "Shiny Gengar" , looktype = 2081, count = 1}, } local function getAddonId (looktype) for index, value in pairs (addons) do if value.looktype == looktype then return index end 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 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 if not isPokeball(thing.itemid) then if priceList[getItemInfo(thing.itemid).name] then price = priceList[getItemInfo(thing.itemid).name].price if thing.type > 1 then str = "You see "..thing.type.." "..getItemInfo(thing.itemid).plural.."." price = price * thing.type else str = "You see "..getItemInfo(thing.itemid).article.." "..getItemInfo(thing.itemid).name.."." end str = str.." Price: $"..price.."." if getItemAttribute(thing.uid, "description") then str = str.."\n"..getItemAttribute(thing.uid, "description").."." end if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then str = str.."\nItemID: ["..thing.itemid.."]." --alterado v1.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 end end 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, "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 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 if getItemAttribute(thing.uid, "addon") then if flysAddon[getItemAttribute (thing.uid, "addon")] or ridesAddon[getItemAttribute (thing.uid, "addon")] or surfsAddon[getItemAttribute (thing.uid, "addon")] then if getItemAttribute(thing.uid, "addon") > 1 then table.insert(str, " Has the addon "..getItemNameById (getAddonId (getItemAttribute (thing.uid, "addon")))..".") end end 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 if getItemAttribute(thing.uid, "addon") then if flysAddon[getItemAttribute (thing.uid, "addon")] or ridesAddon[getItemAttribute (thing.uid, "addon")] or surfsAddon[getItemAttribute (thing.uid, "addon")] then if getItemAttribute(thing.uid, "addon") > 1 then table.insert(str, " Has the addon "..getItemNameById (getAddonId (getItemAttribute (thing.uid, "addon")))..".") end end 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 Caramba um código organizado é muito mais fácil de entender... E nem falo nada pra quem fez isto... Bruno Carvalho / Ex-Administrador TibiaKing [email protected] Em 26/12/2016 em 03:47, Spraypaint disse: A força da alienação vem dessa fragilidade dos indivíduos, quando apenas conseguem identificar o que os separa e não o que os une. -miltinho
Postado Janeiro 15, 2018 7 anos Autor 56 minutos atrás, Bruno Carvalho disse: local addons = { [12892] = {pokemon= "Golem" , looktype = 1902, count = 1}, [13027] = {pokemon= "Aggron" , looktype = 1903, count = 1}, [12941] = {pokemon= "Aggron" , looktype = 1904, count = 1}, [13002] = {pokemon= "Snorlax" , looktype = 1905, count = 1}, [12865] = {pokemon= "Kangaskhan" , looktype = 1906, count = 1}, [12948] = {pokemon= "Shiny Electivire" , looktype = 1907, count = 1}, [12949] = {pokemon= "Shiny Electabuzz" , looktype = 1908, count = 1}, [12901] = {pokemon= "Mr. Mime" , looktype = 1909, count = 1}, [12942] = {pokemon= "Miltank" , looktype = 1910, count = 1}, [12909] = {pokemon= "Blissey" , looktype = 1912, count = 1}, [12943] = {pokemon= "Xatu" , looktype = 1913, count = 1}, [13014] = {pokemon= "Meganium" , looktype = 1914, count = 1}, [13016] = {pokemon= "Feraligatr" , looktype = 1916, count = 1}, [13021] = {pokemon= "Feraligatr" , looktype = 1918, count = 1}, [13013] = {pokemon= "Typhlosion" , looktype = 1919, count = 1}, [12913] = {pokemon= "Electivire" , looktype = 1920, count = 1}, [12961] = {pokemon= "Gengar" , looktype = 1921, count = 1}, [12959] = {pokemon= "Jinx" , looktype = 1922, count = 1}, [12945] = {pokemon= "Gardevoir" , looktype = 1923, count = 1}, [12877] = {pokemon= "Scyther" , looktype = 1924, count = 1}, [12960] = {pokemon= "Jinx" , looktype = 1926, count = 1}, [12988] = {pokemon= "Snorlax" , looktype = 1927, count = 1}, [12876] = {pokemon= "Scyther" , looktype = 1928, count = 1}, [12875] = {pokemon= "Scyther" , looktype = 1930, count = 1}, [12914] = {pokemon= "Omanyte" , looktype = 1932, count = 1}, [12989] = {pokemon= "Snorlax" , looktype = 1934, count = 1}, [13026] = {pokemon= "Hitmonchan" , looktype = 1950, count = 1}, [12923] = {pokemon= "Blaziken" , looktype = 1951, count = 1}, [12992] = {pokemon= "Scizor" , looktype = 1952, count = 1}, [13000] = {pokemon= "Miltank" , looktype = 1954, count = 1}, [12998] = {pokemon= "Gardevoir" , looktype = 1955, count = 1}, [12999] = {pokemon= "Miltank" , looktype = 1956, count = 1}, [12996] = {pokemon= "Swampert" , looktype = 1957, count = 1}, [12993] = {pokemon= "Electabuzz" , looktype = 1958, count = 1}, [12995] = {pokemon= "Magmar" , looktype = 1960, count = 1}, [12997] = {pokemon= "Tyranitar" , looktype = 1963, count = 1}, [13007] = {pokemon= "Gardevoir" , looktype = 1964, count = 1}, [13008] = {pokemon= "Gardevoir" , looktype = 1965, count = 1}, [13009] = {pokemon= "Gardevoir" , looktype = 1966, count = 1}, [13199] = {pokemon= "Gardevoir" , looktype = 1967, count = 1}, [13029] = {pokemon= "Typhlosion" , looktype = 1969, count = 1}, [13020] = {pokemon= "Feraligatr" , looktype = 1970, count = 1}, [13037] = {pokemon= "Hitmontop" , looktype = 1973, count = 1}, [12967] = {pokemon= "Crobat" , looktype = 1974, count = 1}, [13004] = {pokemon= "Aggron" , looktype = 1976, count = 1}, [12950] = {pokemon= "Shiny Charizard" , looktype = 1982, count = 1}, [13025] = {pokemon= "Shiny Vileplume" , looktype = 1983, count = 1}, [13038] = {pokemon= "Lapras" , looktype = 1989, count = 1}, [13039] = {pokemon= "Tentacruel" , looktype = 1991, count = 1}, [12921] = {pokemon= "Nidoking" , looktype = 1999, count = 1}, [13040] = {pokemon= "Lapras" , looktype = 1893, count = 1}, [12946] = {pokemon= "Gardevoir" , looktype = 1894, count = 1}, [13041] = {pokemon= "Arcanine" , looktype = 1895, count = 1}, [13042] = {pokemon= "Aggron" , looktype = 1896, count = 1}, [12990] = {pokemon= "Snorlax" , looktype = 1897, count = 1}, [13046] = {pokemon= "Charizard" , looktype = 1898, count = 1}, [13045] = {pokemon= "Charizard" , looktype = 2000, count = 1}, [13043] = {pokemon= "Charizard" , looktype = 2001, count = 1}, [13047] = {pokemon= "Gengar" , looktype = 2003, count = 1}, [13048] = {pokemon= "Gengar" , looktype = 2004, count = 1}, [13049] = {pokemon= "Gengar" , looktype = 2005, count = 1}, [12900] = {pokemon= "Alakazam" , looktype = 2006, count = 1}, [13050] = {pokemon= "Alakazam" , looktype = 2007, count = 1}, [12899] = {pokemon= "Alakazam" , looktype = 2008, count = 1}, [13051] = {pokemon= "Alakazam" , looktype = 2009, count = 1}, [12890] = {pokemon= "Shiny Gengar" , looktype = 2011, count = 1}, [12889] = {pokemon= "Shiny Gengar" , looktype = 2012, count = 1}, [13052] = {pokemon= "Shiny Raichu" , looktype = 2013, count = 1}, [13058] = {pokemon= "Shiny Raichu" , looktype = 2014, count = 1}, [12893] = {pokemon= "Golem" , looktype = 2025, count = 1}, [13053] = {pokemon= "Shiny Abra" , looktype = 2027, count = 1}, [13057] = {pokemon= "Shiny Alakazam" , looktype = 2028, count = 1}, [13054] = {pokemon= "Shiny Alakazam" , looktype = 2029, count = 1}, [13056] = {pokemon= "Shiny Alakazam" , looktype = 2030, count = 1}, [13055] = {pokemon= "Shiny Alakazam" , looktype = 2031, count = 1}, [12871] = {pokemon= "Shiny Electabuzz" , looktype = 2039, count = 1}, [12912] = {pokemon= "Shiny Electabuzz" , looktype = 2040, count = 1}, [13059] = {pokemon= "Shiny Jinx" , looktype = 2043, count = 1}, [13060] = {pokemon= "Shiny Jinx" , looktype = 2044, count = 1}, [12907] = {pokemon= "Shiny Pidgeot" , looktype = 2063, count = 1}, [12908] = {pokemon= "Shiny Pidgeot" , looktype = 2064, count = 1}, [12906] = {pokemon= "Shiny Pidgeot" , looktype = 2065, count = 1}, [12872] = {pokemon= "Machamp" , looktype = 2067, count = 1}, [12940] = {pokemon= "Shiny Charizard" , looktype = 2086, count = 1}, [13308] = {pokemon= "Shiny Charizard" , looktype = 2084, count = 1}, [12938] = {pokemon= "Ursaring" , looktype = 2088, count = 1}, [12937] = {pokemon= "Shiny Gengar" , looktype = 2078, count = 1}, [12939] = {pokemon= "Gengar" , looktype = 2080, count = 1}, [12883] = {pokemon= "Shiny Gengar" , looktype = 2081, count = 1}, } local function getAddonId (looktype) for index, value in pairs (addons) do if value.looktype == looktype then return index end 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 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 if not isPokeball(thing.itemid) then if priceList[getItemInfo(thing.itemid).name] then price = priceList[getItemInfo(thing.itemid).name].price if thing.type > 1 then str = "You see "..thing.type.." "..getItemInfo(thing.itemid).plural.."." price = price * thing.type else str = "You see "..getItemInfo(thing.itemid).article.." "..getItemInfo(thing.itemid).name.."." end str = str.." Price: $"..price.."." if getItemAttribute(thing.uid, "description") then str = str.."\n"..getItemAttribute(thing.uid, "description").."." end if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then str = str.."\nItemID: ["..thing.itemid.."]." --alterado v1.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 end end 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, "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 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 if getItemAttribute(thing.uid, "addon") then if flysAddon[getItemAttribute (thing.uid, "addon")] or ridesAddon[getItemAttribute (thing.uid, "addon")] or surfsAddon[getItemAttribute (thing.uid, "addon")] then if getItemAttribute(thing.uid, "addon") > 1 then table.insert(str, " Has the addon "..getItemNameById (getAddonId (getItemAttribute (thing.uid, "addon")))..".") end end 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 if getItemAttribute(thing.uid, "addon") then if flysAddon[getItemAttribute (thing.uid, "addon")] or ridesAddon[getItemAttribute (thing.uid, "addon")] or surfsAddon[getItemAttribute (thing.uid, "addon")] then if getItemAttribute(thing.uid, "addon") > 1 then table.insert(str, " Has the addon "..getItemNameById (getAddonId (getItemAttribute (thing.uid, "addon")))..".") end end 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 Caramba um código organizado é muito mais fácil de entender... E nem falo nada pra quem fez isto... Na hora de carregar o server o bug foi limpo bom arrumado porem durante o game ta dando este bug Spoiler [15/01/2018 18:57:09] [Error - CreatureScript Interface] [15/01/2018 18:57:09] data/creaturescripts/scripts/look.lua:onLook [15/01/2018 18:57:09] Description: [15/01/2018 18:57:09] (luaGetItemAttribute) Item not found
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.