Bodak Reborn 28 Postado Agosto 25, 2016 Share Postado Agosto 25, 2016 (editado) Yo boyz! Eu estava atrás desse sistema há um tempo e não achava em lugar nenhum. Estudei bastante sobre lua e depois de um tempo eu consegui fazer eu mesmo, então vou disponibilizá-lo para vocês. Eu testei o sistema em PDA (PokeXCyan) TFS 1.0, mas deve funcionar para outras bases. O script em si não é complexo, é apenas chato de adicionar os itens na tabela. Eu vou deixar a tabela que eu fiz com os itens que tem no servidor para qual eu fiz o script aqui embaixo como spoiler, para caso você queira poupar tempo. Spoiler local NPCPrice = { ["seed"] = {price = 30}, ["electric box"] = {price = 150}, ["sandbag"] = {price = 150}, ["comb"] = {price = 150}, ["fur"] = {price = 150}, ["ruby"] = {price = 300}, ["essence of fire"] = {price = 30}, ["small stone"] = {price = 30}, ["pot of moss bug"] = {price = 150}, ["screw"] = {price = 30}, ["straw"] = {price = 100}, ["water gem"] = {price = 30}, ["remains of magikarp"] = {price = 100}, ["teeth"] = {price = 150}, ["bottle of poison"] = {price = 30}, ["water pendant"] = {price = 100}, ["feather"] = {price = 150}, ["pair of leaves"] = {price = 150}, ["apple bite"] = {price = 60}, ["bat wing"] = {price = 150}, ["pot of lava"] = {price = 150}, ["fire pendant"] = {price = 100}, ["bug venom"] = {price = 100}, ["bug antenna"] = {price = 150}, ["venom pendant"] = {price = 100}, ["pot of venom"] = {price = 150}, ["iron bracelet"] = {price = 150}, ["ice orb"] = {price = 150}, ["gosme"] = {price = 150}, ["darkness gem,"] = {price = 30}, ["bug gosme"] = {price = 80}, ["enchanted gem,"] = {price = 30}, ["horn"] = {price = 150}, ["venom piece"] = {price = 150}, ["big wing"] = {price = 500}, ["dragon tail"] = {price = 500}, ["purple tail"] = {price = 500}, ["majesty wing"] = {price = 500}, ["alligator skin"] = {price = 500}, ["big egg"] = {price = 500}, ["teel feather"] = {price = 50000}, ["red feather"] = {price = 50000}, ["yellow feather"] = {price = 50000}, ["registeel orb"] = {price = 50000}, ["white rune"] = {price = 500}, ["foxtail"] = {price = 500}, ["pot with fire"] = {price = 350}, ["water orb"] = {price = 350}, ["iron piece"] = {price = 350}, ["gyarados tail"] = {price = 500}, ["bulb"] = {price = 350}, ["long fang"] = {price = 400}, ["turtle hull"] = {price = 350}, ["dragon tooth"] = {price = 1000}, ["iron pin"] = {price = 400}, ["mimic clothes"] = {price = 1000}, ["scythe"] = {price = 1000}, ["buzz tail"] = {price = 1000}, ["bird beak"] = {price = 200}, ["rat tail"] = {price = 200}, ["longhorn"] = {price = 350}, ["luck medalion"] = {price = 350}, ["wool ball"] = {price = 400}, ["psyduck mug"] = {price = 350}, ["punch toy"] = {price = 500}, ["twisted spoon"] = {price = 350}, ["future orb"] = {price = 250}, ["champion belt"] = {price = 400}, ["slowpoke tail"] = {price = 300}, ["imam"] = {price = 250}, ["stick slash"] = {price = 300}, ["traces of ghost"] = {price = 350}, ["onix tail"] = {price = 300}, ["bone"] = {price = 250}, ["big tongue"] = {price = 500}, ["power orb"] = {price = 250}, ["bracelet"] = {price = 250}, ["star"] = {price = 200}, ["magma orb"] = {price = 250}, ["shell"] = {price = 200}, ["iron bar"] = {price = 250}, ["bag of poison dust"] = {price = 250}, ["steel wing"] = {price = 500}, ["green orb"] = {price = 250}, ["steel ore"] = {price = 400}, ["charizard wing"] = {price = 600}, ["magma box"] = {price = 400}, ["giant turtle hull"] = {price = 600}, ["red gyarados tail"] = {price = 10000}, ["crystal tail"] = {price = 1000}, ["Helix Fossil"] = {price = 150000}, ["Dome Fossil"] = {price = 150000}, ["Old Amber"] = {price = 500000}, ["green apple bite"] = {price = 400}, ["leaf pendant"] = {price = 350}, ["bone mask"] = {price = 400}, ["pikachu tail"] = {price = 300}, ["raichu tail"] = {price = 500}, ["blue vines"] = {price = 350}, ["stone orb"] = {price = 250}, ["locksmith of shell"] = {price = 200}, ["crab claw"] = {price = 200}, ["noctowl own"] = {price = 500}, ["togepi egg"] = {price = 400}, ["pinsir horn"] = {price = 350}, ["ice bra"] = {price = 500}, ["xatu wing"] = {price = 500}, ["snake tail"] = {price = 350}, ["seahorse tail"] = {price = 300}, ["strange sting"] = {price = 300}, ["tentacle"] = {price = 300}, ["strange rock"] = {price = 250}, ["skarmory wing"] = {price = 600}, ["scizor claw"] = {price = 600}, ["star gem"] = {price = 500}, ["tyranitar tail"] = {price = 600}, ["small tail"] = {price = 300}, ["magmar foot"] = {price = 1000}, ["red wing"] = {price = 500}, ["gligar claw"] = {price = 350}, ["insect foot"] = {price = 350}, ["strange wing"] = {price = 400}, ["mantine tail"] = {price = 400}, ["small tusk"] = {price = 350}, ["nidoran male ear"] = {price = 250}, ["skin tail"] = {price = 200}, ["sting hand"] = {price = 200}, ["aipom hand"] = {price = 250}, ["ledyba wing"] = {price = 200}, ["strange antenna"] = {price = 250}, ["squirry tail"] = {price = 250}, ["point of light"] = {price = 300}, ["kangaskhan ear"] = {price = 500}, ["strange flower"] = {price = 350}, ["great petal"] = {price = 350}, ["great flower"] = {price = 500}, ["fire tail"] = {price = 400}, ["strange horn"] = {price = 350}, ["piece of coral"] = {price = 350}, ["shuckle armor"] = {price = 350}, ["plant tail"] = {price = 250}, ["sea tail"] = {price = 250}, ["helicopter leaves"] = {price = 200}, ["strange spike"] = {price = 200}, ["bag of pollem"] = {price = 200}, ["Heart Stone"] = {price = 5000}, ["Leaf Stone"] = {price = 5000}, ["Water Stone"] = {price = 5000}, ["Fire Stone"] = {price = 5000}, ["Metal Stone"] = {price = 10000}, ["Crystal Stone"] = {price = 10000}, ["Ancient Stone"] = {price = 10000}, ["Venom Stone"] = {price = 5000}, ["Thunder Stone"] = {price = 5000}, ["Rock Stone"] = {price = 5000}, ["Punch Stone"] = {price = 5000}, ["Coccon Stone"] = {price = 5000}, ["Darkness Stone"] = {price = 5000}, ["Earth Stone"] = {price = 5000}, ["Enigma Stone"] = {price = 5000}, ["Ice Stone"] = {price = 5000}, ["Boost Stone"] = {price = 20000}, ["Mega Stone"] = {price = 50000}, } Essa tabela deve ser adicionada no começo do código em creaturescripts/look.lua. Caso queira adicionar o sistema para pokémon também, basta você pegar a tabela que está localizada em npc/pokemon seller.lua. Ao código: Em look.lua, procure por: elseif getItemAttribute(thing.uid, "unique") then substitue o else return trueend que está "linkado" a esse IF por elseif NPCPrice[iname.name] then local qnt = 0 if thing.type == 0 then qnt = 1 else qnt = thing.type end local p = getThingPos(thing.uid) local calculo = NPCPrice[iname.name].price * qnt 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, "\n"..iname.description.." Price: $"..calculo..".") 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 Ficando assim: Spoiler 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 elseif NPCPrice[iname.name] then local qnt = 0 if thing.type == 0 then qnt = 1 else qnt = thing.type end local p = getThingPos(thing.uid) local calculo = NPCPrice[iname.name].price * qnt 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, "\n"..iname.description.." Price: $"..calculo..".") 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 Caso queira que o preço no look funcione para pokémon também, procure por table.insert(str, "It is genderless.") tem 3 linhas iguais a esse no look.lua. A linha na qual eu me refiro é a primeira encontrada no arquivo. Depois do end, adicione: local boosts = getItemAttribute(thing.uid, "boost") or 0 local precocertos = 0 if boosts > 50 then precocertos = ((gastostones[50] * 5) * 400) + ((boosts - 50) * 100000) else precocertos = ((gastostones[boosts] * 5) * 400) end if getItemAttribute (thing.uid, "ehditto") then pokename = "Ditto" end local pokeCost = pokePrice[pokename] or math.floor(pokes[pokename].level * 150) if pokename == "Ditto" then table.insert (str, " Not sellable.") elseif pokes[pokename] then if boosts == 0 then table.insert (str, " Price: $"..pokeCost) else table.insert (str, " Price: $"..pokeCost.. " + $"..precocertos.. " (BOOST)") end end E pronto, o preço no look está adicionado ao seu servidor. @EDIT: Vou postar também o script do Pokémon Seller, porque ele estava bugado no meu servidor, provavelmente estará no servidor de vocês também. npcs/scripts pokemon seller.lua Spoiler local focus = 0local talk_start = 0local conv = 0local cost = 0local pname = ""local baseprice = 0local pokePrice = {["Charmeleon"] = 10000, -- 1TD["Charizard"] = 50000, -- 5TD["Ivysaur"] = 10000, -- 1TD["Venusaur"] = 50000, -- 5TD["Wartortle"] = 10000, -- 1TD["Blastoise"] = 50000, -- 5TD["Caterpie"] = 200, -- 2HD["Metapod"] = 3000, -- 30 HD["Butterfree"] = 9000, -- 90 HD["Weedle"] = 200, -- 2 HD["Kakuna"] = 3000, -- 30 HD["Beedrill"] = 9000, -- 90 HD["Pidgey"] = 200, -- 2HD["Pidgeotto"] = 6000, -- 60HD["Pidgeot"] = 30000, -- 3TD["Rattata"] = 50, -- 50DL["Raticate"] = 2200, -- 22HD["Spearow"] = 200, -- 2HD["Fearow"] = 10000, -- 1TD["Ekans"] = 1000, -- 10HD["Arbok"] = 8000, -- 80HD["Pikachu"] = 5000, -- 50HD["Raichu"] = 12000, -- 1TD E 20HD["Sandshrew"] = 1000, -- 10HD["Sandslash"] = 10000, -- 1TD["Nidoran Female"] = 800, -- 8HD["Nidorina"] = 4000, -- 40HD["Nidoqueen"] = 15000, -- 1TD E 50HD["Nidoran Male"] = 800, -- 8HD["Nidorino"] = 4000, -- 40HD["Nidoqueen"] = 15000, -- 1TD E 50HD["Clefairy"] = 6000, -- 60HD["Clefable"] = 15000, -- 1TD E 50HD["Vulpix"] = 1000, -- 10HD["Ninetales"] = 9000, -- 90HD["Jigglypuff"] = 6000, -- 60HD["Wigglytuff"] = 15000, -- 1TD E 50 HD["Zubat"] = 900, -- 9HD["Golbat"] = 6000, -- 60HD["Oddish"] = 800, -- 8HD["Gloom"] = 8000, -- 80HD["Vileplume"] = 13000, -- 1TD E 30HD["Paras"] = 600, -- 6HD["Parasect"] = 8000, -- 80HD["Venonat"] = 600, -- 6HD["Venomoth"] = 10000, -- 1TD["Diglett"] = 200,["Dugtrio"] = 3000,["Meowth"] = 300,["Persian"] = 3000,["Psyduck"] = 500,["Golduck"] = 8500,["Mankey"] = 300,["Primeape"] = 7000,["Growlithe"] = 3500,["Arcanine"] = 10000,["Poliwag"] = 80,["Poliwhirl"] = 2500,["Poliwrath"] = 8000,["Abra"] = 600,["Kadabra"] = 3800,["Alakazam"] = 9000,["Machop"] = 500,["Machoke"] = 2500,["Machamp"] = 8000,["Bellsprout"] = 80,["Wepinbell"] = 1600,["Victreebel"] = 7000,["Tentacool"] = 300,["Tentacruel"] = 10000,["Geodude"] = 300,["Graveler"] = 3500,["Golem"] = 8000,["Ponyta"] = 500,["Rapidash"] = 6500,["Slowpoke"] = 400,["Slowbro"] = 3700,["Magnemite"] = 400,["Magneton"] = 3800,["Farfetch'd"] = 4500,["Doduo"] = 600,["Dodrio"] = 5000,["Seel"] = 400,["Dewgong"] = 6800,["Grimer"] = 300,["Muk"] = 7000,["Shellder"] = 200,["Cloyster"] = 7000,["Gastly"] = 300,["Haunter"] = 1800,["Gengar"] = 8000,["Onix"] = 800,["Drowzee"] = 400,["Hypno"] = 6000,["Krabby"] = 200,["Kingler"] = 5200,["Voltorb"] = 250,["Electrode"] = 4200,["Exeggute"] = 200,["Exeggutor"] = 8000,["Cubone"] = 400,["Marowak"] = 7000,["Hitmonlee"] = 10000,["Hitmonchan"] = 10000,["Lickitung"] = 10000,["Koffing"] = 300,["Weezing"] = 3500,["Rhyhorn"] = 700,["Rhydon"] = 7000,["Chansey"] = 7000,["Tangela"] = 2000,["Kangaskhan"] = 10000,["Horsea"] = 200,["Seadra"] = 2500,["Goldeen"] = 200,["Seaking"] = 3000,["Staryu"] = 400,["Starmie"] = 5000,["Mr. Mime"] = 10000,["Scyther"] = 15000,["Jynx"] = 15000,["Xmas Jynx"] = 50000,["Electabuzz"] = 10000,["Magmar"] = 10000,["Pinsir"] = 5000,["Tauros"] = 5000,["Magikarp"] = 5,["Gyarados"] = 9000,["Lapras"] = 10000,["Ditto"] = 50000,["Eevee"] = 3000,["Vaporeon"] = 6000,["Jolteon"] = 6000,["Flareon"] = 6000,["Porygon"] = 6000,["Omanyte"] = 2000,["Omastar"] = 7500,["Kabuto"] = 2000,["Kabutops"] = 7500,["Aerodactyl"] = 20000,["Snorlax"] = 20000,["Dratini"] = 800,["Dragonair"] = 5500,["Dragonite"] = 15000, -- Segunda Geração["Bayleef"] = 4000,["Meganium"] = 8000,["Quilava"] = 4000,["Typhlosion"] = 8000,["Croconaw"] = 4000,["Feraligatr"] = 8000,["Sentret"] = 250,["Furret"] = 3500,["Hoothoot"] = 500,["Noctowl"] = 7000,["Ledyba"] = 250,["Ledian"] = 3800,["Spinarak"] = 250,["Ariados"] = 4500,["Crobat"] = 8000,["Chinchou"] = 700,["Lanturn"] = 5500,["Pichu"] = 500,["Cleffa"] = 500,["Igglybuff"] = 500,["Togepi"] = 500,["Togetic"] = 6000,["Natu"] = 500,["Xatu"] = 7000,["Mareep"] = 300,["Flaaffy"] = 3200,["Ampharos"] = 8000,["Bellossom"] = 7000,["Marill"] = 3000,["Azumarill"] = 7000,["Sudowoodo"] = 10000,["Politoed"] = 8000,["Hoppip"] = 80,["Skiploom"] = 2200,["Jumpluff"] = 7500,["Aipom"] = 1500,["Sunkern"] = 50,["Sunflora"] = 3400,["Yanma"] = 3000,["Wooper"] = 2000,["Quagsire"] = 6000,["Espeon"] = 6000,["Umbreon"] = 6000,["Murkrow"] = 600,["Slowking"] = 10000,["Misdreavus"] = 7500,["Wobbuffet"] = 15000,["Girafarig"] = 7500,["Pineco"] = 300,["Forretress"] = 6200,["Dunsparce"] = 2500,["Gligar"] = 3000,["Steelix"] = 15000,["Snubbull"] = 500,["Granbull"] = 6000,["Qwilfish"] = 4000,["Scizor"] = 20000,["Shuckle"] = 3000,["Heracross"] = 10000,["Sneasel"] = 2000,["Teddiursa"] = 1000,["Ursaring"] = 10000,["Slugma"] = 900,["Magcargo"] = 7000,["Swinub"] = 700,["Piloswine"] = 7500,["Corsola"] = 4000,["Remoraid"] = 200,["Octillery"] = 6000,["Delibird"] = 5000,["Mantine"] = 12000,["Skarmory"] = 12000,["Houndour"] = 800,["Houndoom"] = 7500,["kingdra"] = 10000,["Phanpy"] = 600,["Donphan"] = 7800,["Porygon2"] = 8000,["Stantler"] = 4500,["Tyrogue"] = 2000,["Hitmontop"] = 10000,["Smoochum"] = 450,["Elekid"] = 600,["Magby"] = 600,["Miltank"] = 9000,["Blissey"] = 10000,["Larvitar"] = 1000,["Pupitar"] = 5800,["Tyranitar"] = 12000,-- Especiais["Snowman Snorlax"] = 50000,["Christmas Raichu"] = 20000,-- Megas["Mega Alakazam"] = 50000,["Mega Gengar"] = 50000,["Mega Charizard"] = 50000,["Mega Blastoise"] = 50000,["Mega Venusaur"] = 50000,["Mega Tyranitar"] = 50000,["Mega Aerodactyl"] = 50000,["Mega Blaziken"] = 50000,["Mega Gyarados"] = 50000,}local gastostones = {[0] = 0,[1] = 1,[2] = 2,[3] = 3,[4] = 4,[5] = 6,[6] = 8,[7] = 10,[8] = 12,[9] = 15,[10] = 18,[11] = 21,[12] = 24,[13] = 28,[14] = 32,[15] = 36,[16] = 40,[17] = 45,[18] = 50,[19] = 55,[20] = 60,[21] = 66,[22] = 72,[23] = 78,[24] = 84,[25] = 91,[26] = 98,[27] = 105,[28] = 112,[29] = 120,[30] = 128,[31] = 136,[32] = 144,[33] = 153,[34] = 162,[35] = 171,[36] = 180,[37] = 190,[38] = 200,[39] = 210,[40] = 220,[41] = 231,[42] = 242,[43] = 253,[44] = 264,[45] = 276,[46] = 288,[47] = 300,[48] = 312,[49] = 325,[50] = 338,}function sellPokemon(cid, name, price) local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK) if #getCreatureSummons(cid) >= 1 then selfSay("Back your pokemon to do that!") focus = 0 --alterado v1.8 return true end local storages = {17000, 63215, 17001, 13008, 5700} --alterado v1.8 for s = 1, #storages do if getPlayerStorageValue(cid, storages[s]) >= 1 then selfSay("You can't do that while is Flying, Riding, Surfing, Diving or mount a bike!") focus = 0 return true end end if getPlayerSlotItem(cid, 8).uid ~= 0 then local boosts = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "boost") or 0 local pricemsgss = 0 if boosts > 50 then pricemsgss = price + ((gastostones[50] * 5) * 400) + ((boosts - 50) * 100000) else pricemsgss = price + ((gastostones[boosts] * 5) * 400) end if string.lower(getItemAttribute(getPlayerSlotItem(cid, 8).uid, "poke")) == string.lower(name) then if not getItemAttribute(getPlayerSlotItem(cid, 8).uid, "unique") then --alterado v1.6 selfSay("Wow! Thanks for this wonderful "..name.."! Take yours "..pricemsgss.." dollars. Would you like to sell another pokemon?") doPlayerAddMoney(cid, pricemsgss*100) doRemoveItem(getPlayerSlotItem(cid, 8).uid, 1) --alterado v1.6 doTransformItem(getPlayerSlotItem(cid, CONST_SLOT_LEGS).uid, 2395) return true end end end for a, b in pairs(pokeballs) do local balls = getItemsInContainerById(bp.uid, b.on) for _, ball in pairs (balls) do local boost = getItemAttribute(ball, "boost") or 0 local pricemsg = 0 if boost > 50 then pricemsg = price + ((gastostones[50] * 5) * 400) + ((boost - 50) * 100000) else pricemsg = price + ((gastostones[boost] * 5) * 400) end if string.lower(getItemAttribute(ball, "poke")) == string.lower(name) then if not getItemAttribute(ball, "unique") then --alterado v1.6 selfSay("Wow! Thanks for this wonderful "..getItemAttribute(ball, "poke").."! Take yours "..pricemsg.." dollars. Would you like to sell another pokemon?") doPlayerAddMoney(cid, pricemsg*100) doRemoveItem(ball, 1) return true end end end end selfSay("You don't have a "..name..", make sure it is in your backpack and it is not fainted and it is not in a Unique Ball!") --alterado v1.6return falseendfunction onCreatureSay(cid, type, msg) local msg = string.lower(msg) if string.find(msg, "!") or string.find(msg, ",") then return true end if focus == cid then talk_start = os.clock() end if msgcontains(msg, 'hi') and focus == 0 and getDistanceToCreature(cid) <= 3 then selfSay('Welcome to my store! I buy pokemons of all species, just tell me the name of the pokemon you want to sell.') focus = cid conv = 1 talk_start = os.clock() cost = 0 pname = "" return true end if msgcontains(msg, 'bye') and focus == cid then selfSay('See you around then!') focus = 0 return true end if msgcontains(msg, 'yes') and focus == cid and conv == 4 then selfSay('Tell me the name of the pokemon you would like to sell.') conv = 1 return true end if msgcontains(msg, 'no') and conv == 4 and focus == cid then selfSay('Ok, see you around then!') focus = 0 return true end local common = {"rattata", "caterpie", "weedle", "magikarp"} if conv == 1 and focus == cid then for a = 1, #common do if msgcontains(msg, common[a]) then selfSay('I dont buy such a common pokemon!') return true end end end if msgcontains(msg, 'no') and conv == 3 and focus == cid then selfSay('Well, then what pokemon would you like to sell?') conv = 1 return true end if (conv == 1 or conv == 4) and focus == cid then local name = doCorrectPokemonName(msg) local pokemon = pokes[name] if not pokemon then selfSay("Sorry, I don't know what pokemon you're talking about! Are you sure you spelled it correctly?") return true end if conv == 1 and focus == cid then if string.lower(name) == "ditto" then selfSay('I dont buy that pokemon!') return true end end local boosts = 0 local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK) for a, b in pairs(pokeballs) do local balls = getItemsInContainerById(bp.uid, b.on) for _, ball in pairs (balls) do boosts = getItemAttribute(ball, "boost") or 0 if getItemAttribute (ball, "ehditto") then selfSay ("Are you trying to confuse me? I'll not buy anything of you while you are with that Ditto!") return true end end if getPlayerSlotItem(cid, 8).uid ~= 0 and getItemAttribute (getPlayerSlotItem(cid, 8).uid, "poke") == name then boosts = getItemAttribute(getPlayerSlotItem (cid, 8).uid, "boost") or 0 end if getPlayerSlotItem (cid, 8).uid ~= 0 then if getItemAttribute (getPlayerSlotItem(cid, 8).uid, "ehditto") then selfSay ("Are you trying to confuse me? I'll not buy anything of you while you are with that Ditto!") return true end end end local pricemsgs = 0 if boosts > 50 then pricemsgs = ((gastostones[50] * 5) * 400) + ((boosts - 50) * 100000) else pricemsgs = ((gastostones[boosts] * 5) * 400) end baseprice = pokePrice[name] or math.floor(pokemon.level * 150) --alterado v1.6 cost = baseprice pname = name selfSay("Are you sure you want to sell a "..name.." for "..cost.." dollars + "..pricemsgs.." dollars (boost)?") conv = 3 end if isConfirmMsg(msg) and focus == cid and conv == 3 then if sellPokemon(cid, pname, cost) then conv = 4 else conv = 1 end return true endendlocal intervalmin = 38local intervalmax = 70local delay = 25local number = 1local messages = {"Buying some beautiful pokemons! Come here to sell them!", "Wanna sell a pokemon? Came to the right place!", "Buy pokemon! Excellent offers!", "Tired of a pokemon? Why don't you sell it to me then?", }function onThink() if focus == 0 then selfTurn(1) delay = delay - 0.5 if delay <= 0 then selfSay(messages[number]) number = number + 1 if number > #messages then number = 1 end delay = math.random(intervalmin, intervalmax) end return true else if not isCreature(focus) then focus = 0 return true end local npcpos = getThingPos(getThis()) local focpos = getThingPos(focus) if npcpos.z ~= focpos.z then focus = 0 return true end if (os.clock() - talk_start) > 70 then focus = 0 selfSay("I have other clients too, talk to me when you feel like selling a pokemon.") end if getDistanceToCreature(focus) > 3 then selfSay("Good bye then and thanks!") focus = 0 return true end local dir = doDirectPos(npcpos, focpos) selfTurn(dir) endreturn trueend Editado Agosto 26, 2016 por Bodak Reborn Link para o comentário Compartilhar em outros sites More sharing options...
Gabriel Netto 100 Postado Agosto 25, 2016 Share Postado Agosto 25, 2016 É interessante, mas continua sendo manual a troca de preços do look, sacas? A não ser que seja feito um script pra pegar os valores no xml e lua do NPC, fica meio inútil. Mais prático alterar no look do items.xml ;x Mas ficou bem feito, e se tu é iniciante, tá mt bem feito Link para o comentário Compartilhar em outros sites More sharing options...
Bodak Reborn 28 Postado Agosto 25, 2016 Autor Share Postado Agosto 25, 2016 12 minutos atrás, Gabriel Netto disse: É interessante, mas continua sendo manual a troca de preços do look, sacas? A não ser que seja feito um script pra pegar os valores no xml e lua do NPC, fica meio inútil. Mais prático alterar no look do items.xml ;x Mas ficou bem feito, e se tu é iniciante, tá mt bem feito Eu até pensei em fazer de um jeito "automático", abrindo o arquivo e pegando o preço, o nome do item e tal (é io.open, eu acho), mas meus conhecimentos sobre essa parte são bem limitados, sei o básico apenas por causa do PHP. Chega a ser tosco ter que adicionar os itens/pokémon na tabela, mas é melhor que nada. Comecei a estudar lua há pouco tempo, por isso o jeito "manual e bobo", sorry IOAJAOIAJ Link para o comentário Compartilhar em outros sites More sharing options...
Josegvb 87 Postado Agosto 25, 2016 Share Postado Agosto 25, 2016 Agora, Bodak Reborn disse: Eu até pensei em fazer de um jeito "automático", abrindo o arquivo e pegando o preço, o nome do item e tal (é io.open, eu acho), mas meus conhecimentos sobre essa parte são bem limitados, sei o básico apenas por causa do PHP. Chega a ser tosco ter que adicionar os itens/pokémon na tabela, mas é melhor que nada. Comecei a estudar lua há pouco tempo, por isso o jeito "manual e bobo", sorry IOAJAOIAJ dahora bodak! testei aki no DxP e funfou em parte 18:16 You see 100 remains of magikarp. This is the tail of a defeated magikarp. Price: $10000. porem, nao esta funfando no pokemon eu nao entendo o pq, eu copiei a tabela gastostones e pokeprice do npc pokemon seller e coloquei la no look.lua mas esta dando 1 erro quando voce da look no icone [25/08/2016 18:12:40] [Error - CreatureScript Interface] [25/08/2016 18:12:40] data/creaturescripts/scripts/look.lua:onLook [25/08/2016 18:12:40] Description: [25/08/2016 18:12:40] data/creaturescripts/scripts/look.lua:541: attempt to compare number with nil [25/08/2016 18:12:40] stack traceback: [25/08/2016 18:12:40] data/creaturescripts/scripts/look.lua:541: in function <data/creaturescripts/scripts/look.lua:501> linha 541: if boosts > 50 then precocertos = ((gastostones[50] * 5) * 400) + ((boosts - 50) * 100000) else precocertos = ((gastostones[boosts] * 5) * 400) end e um recordatorio aki pra voce passar la no meu topico do outfit mergulho s2 Link para o comentário Compartilhar em outros sites More sharing options...
Gabriel Netto 100 Postado Agosto 25, 2016 Share Postado Agosto 25, 2016 8 minutos atrás, Bodak Reborn disse: Eu até pensei em fazer de um jeito "automático", abrindo o arquivo e pegando o preço, o nome do item e tal (é io.open, eu acho), mas meus conhecimentos sobre essa parte são bem limitados, sei o básico apenas por causa do PHP. Chega a ser tosco ter que adicionar os itens/pokémon na tabela, mas é melhor que nada. Comecei a estudar lua há pouco tempo, por isso o jeito "manual e bobo", sorry IOAJAOIAJ Não sei se tem alguma lib exclusiva pra XML, mas o que eu vi sobre a biblioteca io sobre esse assunto é isso: Aqui tem as funções da lib io de manusear arquivos: https://lplua.wordpress.com/sintaxe/api/biblioteca-io/ E tem esse vídeo aq q explica um pouco sobre: Link para o comentário Compartilhar em outros sites More sharing options...
Bodak Reborn 28 Postado Agosto 25, 2016 Autor Share Postado Agosto 25, 2016 2 minutos atrás, Josegvb disse: dahora bodak! testei aki no DxP e funfou em parte 18:16 You see 100 remains of magikarp. This is the tail of a defeated magikarp. Price: $10000. porem, nao esta funfando no pokemon eu nao entendo o pq, eu copiei a tabela gastostones e pokeprice do npc pokemon seller e coloquei la no look.lua mas esta dando 1 erro quando voce da look no icone [25/08/2016 18:12:40] [Error - CreatureScript Interface] [25/08/2016 18:12:40] data/creaturescripts/scripts/look.lua:onLook [25/08/2016 18:12:40] Description: [25/08/2016 18:12:40] data/creaturescripts/scripts/look.lua:541: attempt to compare number with nil [25/08/2016 18:12:40] stack traceback: [25/08/2016 18:12:40] data/creaturescripts/scripts/look.lua:541: in function <data/creaturescripts/scripts/look.lua:501> linha 541: if boosts > 50 then precocertos = ((gastostones[50] * 5) * 400) + ((boosts - 50) * 100000) else precocertos = ((gastostones[boosts] * 5) * 400) end e um recordatorio aki pra voce passar la no meu topico do outfit mergulho s2 Talvez o boost no DxP acabe no 50, então faça o seguinte apaga essas linhas e atualize o local precocertos = 0 para local precocertos = ((gastostones[boosts] * 5) * 400) e veja se funciona. Sobre a script da outfit de mergulho, eu já tentei tudo que podia, realmente não sei como te ajudar, sorry. Link para o comentário Compartilhar em outros sites More sharing options...
Josegvb 87 Postado Agosto 25, 2016 Share Postado Agosto 25, 2016 3 minutos atrás, Bodak Reborn disse: Talvez o boost no DxP acabe no 50, então faça o seguinte apaga essas linhas e atualize o local precocertos = 0 para local precocertos = ((gastostones[boosts] * 5) * 400) e veja se funciona. Sobre a script da outfit de mergulho, eu já tentei tudo que podia, realmente não sei como te ajudar, sorry. o script nao da error ao carregar agr porem qndo vc da look na ball [25/08/2016 18:27:20] [Error - CreatureScript Interface] [25/08/2016 18:27:20] data/creaturescripts/scripts/look.lua:onLook [25/08/2016 18:27:20] Description: [25/08/2016 18:27:20] data/creaturescripts/scripts/look.lua:539: attempt to perform arithmetic on field '?' (a nil value) [25/08/2016 18:27:20] stack traceback: [25/08/2016 18:27:20] data/creaturescripts/scripts/look.lua:539: in function <data/creaturescripts/scripts/look.lua:501> local precocertos = ((gastostones[boosts] * 5) * 400) if boosts > 50 then precocertos = ((gastostones[50] * 5) * 400) + ((boosts - 50) * 100000) else precocertos = ((gastostones[boosts] * 5) * 400) end enquanto o mergulho, bom q eu mudei pra ser na neve kk viu q eu fiz uma fusão do teu script +1 postado pelo nociam? ja que no scrpit dele daba pra verificar o type do pokemon, bom o script tava funfando mas eles tavam ficando do msm jeito gelados mas da nada eles pararam de ficar gelados e agr simplemente nao ganham + velocidade, se tiver como me ajudar testando isso eu agradeceria ^^ Link para o comentário Compartilhar em outros sites More sharing options...
Bodak Reborn 28 Postado Agosto 25, 2016 Autor Share Postado Agosto 25, 2016 8 minutos atrás, Josegvb disse: o script nao da error ao carregar agr porem qndo vc da look na ball [25/08/2016 18:27:20] [Error - CreatureScript Interface] [25/08/2016 18:27:20] data/creaturescripts/scripts/look.lua:onLook [25/08/2016 18:27:20] Description: [25/08/2016 18:27:20] data/creaturescripts/scripts/look.lua:539: attempt to perform arithmetic on field '?' (a nil value) [25/08/2016 18:27:20] stack traceback: [25/08/2016 18:27:20] data/creaturescripts/scripts/look.lua:539: in function <data/creaturescripts/scripts/look.lua:501> local precocertos = ((gastostones[boosts] * 5) * 400) if boosts > 50 then precocertos = ((gastostones[50] * 5) * 400) + ((boosts - 50) * 100000) else precocertos = ((gastostones[boosts] * 5) * 400) end enquanto o mergulho, bom q eu mudei pra ser na neve kk viu q eu fiz uma fusão do teu script +1 postado pelo nociam? ja que no scrpit dele daba pra verificar o type do pokemon, bom o script tava funfando mas eles tavam ficando do msm jeito gelados mas da nada eles pararam de ficar gelados e agr simplemente nao ganham + velocidade, se tiver como me ajudar testando isso eu agradeceria ^^ Qual é a linha 539? (apenas ela) Sobre o script do mergulho, depois eu dou uma olhada. Link para o comentário Compartilhar em outros sites More sharing options...
Josegvb 87 Postado Agosto 25, 2016 Share Postado Agosto 25, 2016 Agora, Bodak Reborn disse: Qual é a linha 539? (apenas ela) Sobre o script do mergulho, depois eu dou uma olhada. a primeira rsrs local precocertos = ((gastostones[boosts] * 5) * 400) Link para o comentário Compartilhar em outros sites More sharing options...
Bodak Reborn 28 Postado Agosto 25, 2016 Autor Share Postado Agosto 25, 2016 1 minuto atrás, Josegvb disse: a primeira rsrs local precocertos = ((gastostones[boosts] * 5) * 400) Envia o look.lua em spoiler, please. Link para o comentário Compartilhar em outros sites More sharing options...
Josegvb 87 Postado Agosto 25, 2016 Share Postado Agosto 25, 2016 Agora, Bodak Reborn disse: Envia o look.lua em spoiler, please. Spoiler local pokePrice = { ["Charmander"] = 3000, ["Charmeleon"] = 8000, ["Charizard"] = 18000, ["Bulbasaur"] = 3000, ["Ivysaur"] = 8000, ["Venusaur"] = 18000, ["Squirtle"] = 3000, ["Wartortle"] = 8000, ["Blastoise"] = 18000, ["Caterpie"] = 50, ["Metapod"] = 250, ["Butterfree"] = 2000, ["Weedle"] = 50, ["Kakuna"] = 250, ["Beedrill"] = 2000, ["Pidgey"] = 60, ["Pidgeotto"] = 1500, ["Pidgeot"] = 11500, ["Rattata"] = 5, ["Raticate"] = 2000, ["Spearow"] = 100, ["Fearow"] = 5100, ["Ekans"] = 300, ["Arbok"] = 3000, ["Pikachu"] = 8000, ["Raichu"] = 18000, ["Sandshrew"] = 1000, ["Sandslash"] = 11000, ["Nidoran Female"] = 125, ["Nidorina"] = 2250, ["Nidoqueen"] = 12250, ["Nidoran Male"] = 125, ["Nidorino"] = 2250, ["Nidoqueen"] = 12250, ["Clefairy"] = 8000, ["Clefable"] = 18000, ["Vulpix"] = 1000, ["Ninetales"] = 11000, ["Jigglypuff"] = 8000, ["Wigglytuff"] = 18000, ["Zubat"] = 120, ["Golbat"] = 3000, ["Oddish"] = 80, ["Gloom"] = 2250, ["Vileplume"] = 12000, ["Paras"] = 60, ["Parasect"] = 7250, ["Venonat"] = 1500, ["Venomoth"] = 7250, ["Diglett"] = 200, ["Dugtrio"] = 3000, ["Meowth"] = 300, ["Persian"] = 3000, ["Psyduck"] = 1500, ["Golduck"] = 11500, ["Mankey"] = 300, ["Primeape"] = 7250, ["Growlithe"] = 3500, ["Arcanine"] = 60000, ["Poliwag"] = 80, ["Poliwhirl"] = 3000, ["Poliwrath"] = 13000, ["Abra"] = 800, ["Kadabra"] = 5800, ["Alakazam"] = 16000, ["Machop"] = 2000, ["Machoke"] = 7000, ["Machamp"] = 17000, ["Bellsprout"] = 80, ["Wepinbell"] = 2250, ["Victreebel"] = 12000, ["Tentacool"] = 300, ["Tentacruel"] = 10000, ["Geodude"] = 300, ["Graveler"] = 5000, ["Golem"] = 15000, ["Ponyta"] = 1500, ["Rapidash"] = 6500, ["Slowpoke"] = 400, ["Slowbro"] = 8000, ["Magnemite"] = 400, ["Magneton"] = 5400, ["Farfetch'd"] = 7000, ["Doduo"] = 600, ["Dodrio"] = 5600, ["Seel"] = 2000, ["Dewgong"] = 12000, ["Grimer"] = 300, ["Muk"] = 11000, ["Shellder"] = 200, ["Cloyster"] = 10200, ["Gastly"] = 3000, ["Haunter"] = 8000, ["Gengar"] = 18000, ["Onix"] = 6000, ["Drowzee"] = 1000, ["Hypno"] = 6000, ["Krabby"] = 200, ["Kingler"] = 5200, ["Voltorb"] = 250, ["Electrode"] = 3000, ["Exeggute"] = 200, ["Exeggutor"] = 10000, ["Cubone"] = 1000, ["Marowak"] = 11000, ["Hitmonlee"] = 20000, ["Hitmonchan"] = 20000, ["Lickitung"] = 60000, ["Koffing"] = 300, ["Weezing"] = 3000, ["Rhyhorn"] = 3000, ["Rhydon"] = 13000, ["Chansey"] = 40000, ["Tangela"] = 10000, ["Kangaskhan"] = 120000, ["Horsea"] = 200, ["Seadra"] = 5500, ["Goldeen"] = 200, ["Seaking"] = 3000, ["Staryu"] = 400, ["Starmie"] = 3000, ["Mr. Mime"] = 120000, ["Scyther"] = 120000, ["Jynx"] = 120000, ["Electabuzz"] = 120000, ["Magmar"] = 120000, ["Pinsir"] = 9000, ["Tauros"] = 5000, ["Magikarp"] = 5, ["Gyarados"] = 5000, ["Lapras"] = 120000, ["Ditto"] = 70000, ["Eevee"] = 45000, ["Vaporeon"] = 50000, ["Jolteon"] = 50000, ["Flareon"] = 50000, ["Porygon"] = 60000, ["Omanyte"] = 20000, ["Omastar"] = 75000, ["Kabuto"] = 2000, ["Kabutops"] = 75000, ["Aerodactyl"] = 2000000, ["Snorlax"] = 200000, ["Dratini"] = 15000, ["Dragonair"] = 65000, ["Dragonite"] = 125000, -- Segunda Geração ["Chikorita"] = 3000, ["Bayleef"] = 8000, ["Meganium"] = 18000, ["Cydaquil"] = 3000, ["Quilava"] = 8000, ["Typhlosion"] = 18000, ["Totodile"] = 3000, ["Croconaw"] = 8000, ["Feraligatr"] = 18000, ["Sentret"] = 250, ["Furret"] = 3000, ["Hoothoot"] = 1500, ["Noctowl"] = 11500, ["Ledyba"] = 250, ["Ledian"] = 3000, ["Spinarak"] = 250, ["Ariados"] = 3000, ["Crobat"] = 58000, ["Chinchou"] = 1000, ["Lanturn"] = 6000, ["Pichu"] = 3000, ["Cleffa"] = 3000, ["Igglybuff"] = 3000, ["Togepi"] = 15000, ["Togetic"] = 25000, ["Natu"] = 3000, ["Xatu"] = 130000, ["Mareep"] = 3000, ["Flaaffy"] = 8000, ["Ampharos"] = 18000, ["Bellossom"] = 12000, ["Marill"] = 3000, ["Azumarill"] = 13000, ["Sudowoodo"] = 120000, ["Politoed"] = 8000, ["Hoppip"] = 80, ["Skiploom"] = 2250, ["Jumpluff"] = 12000, ["Aipom"] = 8000, ["Sunkern"] = 50, ["Sunflora"] = 5000, ["Yanma"] = 9000, ["Wooper"] = 2000, ["Quagsire"] = 12000, ["Espeon"] = 50000, ["Umbreon"] = 50000, ["Murkrow"] = 10000, ["Slowking"] = 11000, ["Misdreavus"] = 100000, ["Wobbuffet"] = 200000, ["Girafarig"] = 120000, ["Pineco"] = 300, ["Forretress"] = 10000, ["Dunsparce"] = 3000, ["Gligar"] = 8000, ["Steelix"] = 110000, ["Snubbull"] = 22500, ["Granbull"] = 12500, ["Qwilfish"] = 10000, ["Scizor"] = 220000, ["Shuckle"] = 3500, ["Heracross"] = 120000, ["Sneasel"] = 10000, ["Teddiursa"] = 80000, ["Ursaring"] = 150000, ["Slugma"] = 1000, ["Magcargo"] = 11000, ["Swinub"] = 1000, ["Piloswine"] = 11000, ["Corsola"] = 9000, ["Remoraid"] = 200, ["Octillery"] = 10000, ["Delibird"] = 10000, ["Mantine"] = 120000, ["Skarmory"] = 120000, ["Houndour"] = 35000, ["Houndoom"] = 13500, ["kingdra"] = 70000, ["Phanpy"] = 3000, ["Donphan"] = 13000, ["Porygon2"] = 120000, ["Stantler"] = 10000, ["Tyrogue"] = 150000, ["Hitmontop"] = 50000, ["Smoochum"] = 45000, ["Elikid"] = 45000, ["Magby"] = 45000, ["Miltank"] = 120000, ["Blissey"] = 140000, ["Larvitar"] = 15000, ["Pupitar"] = 65000, ["Electivire"] = 125000, ["Magmortar"] = 125000, ["Tyranitar"] = 125000, -- shiny -- ["Shiny Fearow"] = 1500000, ["Shiny Vileplume"] = 1500000, ["Shiny Golem"] = 1500000, ["Shiny Nidoking"] = 1500000, ["Shiny Hypno"] = 1500000, ["Shiny Vaporeon"] = 1500000, ["Shiny Jolteon"] = 1500000, ["Shiny Flareon"] = 1500000, ["Shiny Hitmontop"] = 1500000, } local gastostones = { [0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 6, [6] = 8, [7] = 10, [8] = 12, [9] = 15, [10] = 18, [11] = 21, [12] = 24, [13] = 28, [14] = 32, [15] = 36, [16] = 40, [17] = 45, [18] = 50, [19] = 55, [20] = 60, [21] = 66, [22] = 72, [23] = 78, [24] = 84, [25] = 91, [26] = 98, [27] = 105, [28] = 112, [29] = 120, [30] = 128, [31] = 136, [32] = 144, [33] = 153, [34] = 162, [35] = 171, [36] = 180, [37] = 190, [38] = 200, [39] = 210, [40] = 220, [41] = 231, [42] = 242, [43] = 253, [44] = 264, [45] = 276, [46] = 288, [47] = 300, [48] = 312, [49] = 325, [50] = 338, } local NPCPrice = { ["seed"] = {price = 30}, ["electric box"] = {price = 150}, ["sandbag"] = {price = 150}, ["comb"] = {price = 150}, ["fur"] = {price = 150}, ["ruby"] = {price = 300}, ["essence of fire"] = {price = 30}, ["small stone"] = {price = 30}, ["pot of moss bug"] = {price = 150}, ["screw"] = {price = 30}, ["straw"] = {price = 100}, ["water gem"] = {price = 30}, ["remains of magikarp"] = {price = 100}, ["teeth"] = {price = 150}, ["bottle of poison"] = {price = 30}, ["water pendant"] = {price = 100}, ["feather"] = {price = 150}, ["pair of leaves"] = {price = 150}, ["apple bite"] = {price = 60}, ["bat wing"] = {price = 150}, ["pot of lava"] = {price = 150}, ["fire pendant"] = {price = 100}, ["bug venom"] = {price = 100}, ["bug antenna"] = {price = 150}, ["venom pendant"] = {price = 100}, ["pot of venom"] = {price = 150}, ["iron bracelet"] = {price = 150}, ["ice orb"] = {price = 150}, ["gosme"] = {price = 150}, ["darkness gem,"] = {price = 30}, ["bug gosme"] = {price = 80}, ["enchanted gem,"] = {price = 30}, ["horn"] = {price = 150}, ["venom piece"] = {price = 150}, ["big wing"] = {price = 500}, ["dragon tail"] = {price = 500}, ["purple tail"] = {price = 500}, ["majesty wing"] = {price = 500}, ["alligator skin"] = {price = 500}, ["big egg"] = {price = 500}, ["teel feather"] = {price = 50000}, ["red feather"] = {price = 50000}, ["yellow feather"] = {price = 50000}, ["registeel orb"] = {price = 50000}, ["white rune"] = {price = 500}, ["foxtail"] = {price = 500}, ["pot with fire"] = {price = 350}, ["water orb"] = {price = 350}, ["iron piece"] = {price = 350}, ["gyarados tail"] = {price = 500}, ["bulb"] = {price = 350}, ["long fang"] = {price = 400}, ["turtle hull"] = {price = 350}, ["dragon tooth"] = {price = 1000}, ["iron pin"] = {price = 400}, ["mimic clothes"] = {price = 1000}, ["scythe"] = {price = 1000}, ["buzz tail"] = {price = 1000}, ["bird beak"] = {price = 200}, ["rat tail"] = {price = 200}, ["longhorn"] = {price = 350}, ["luck medalion"] = {price = 350}, ["wool ball"] = {price = 400}, ["psyduck mug"] = {price = 350}, ["punch toy"] = {price = 500}, ["twisted spoon"] = {price = 350}, ["future orb"] = {price = 250}, ["champion belt"] = {price = 400}, ["slowpoke tail"] = {price = 300}, ["imam"] = {price = 250}, ["stick slash"] = {price = 300}, ["traces of ghost"] = {price = 350}, ["onix tail"] = {price = 300}, ["bone"] = {price = 250}, ["big tongue"] = {price = 500}, ["power orb"] = {price = 250}, ["bracelet"] = {price = 250}, ["star"] = {price = 200}, ["magma orb"] = {price = 250}, ["shell"] = {price = 200}, ["iron bar"] = {price = 250}, ["bag of poison dust"] = {price = 250}, ["steel wing"] = {price = 500}, ["green orb"] = {price = 250}, ["steel ore"] = {price = 400}, ["charizard wing"] = {price = 600}, ["magma box"] = {price = 400}, ["giant turtle hull"] = {price = 600}, ["red gyarados tail"] = {price = 10000}, ["crystal tail"] = {price = 1000}, ["Helix Fossil"] = {price = 150000}, ["Dome Fossil"] = {price = 150000}, ["Old Amber"] = {price = 500000}, ["green apple bite"] = {price = 400}, ["leaf pendant"] = {price = 350}, ["bone mask"] = {price = 400}, ["pikachu tail"] = {price = 300}, ["raichu tail"] = {price = 500}, ["blue vines"] = {price = 350}, ["stone orb"] = {price = 250}, ["locksmith of shell"] = {price = 200}, ["crab claw"] = {price = 200}, ["noctowl own"] = {price = 500}, ["togepi egg"] = {price = 400}, ["pinsir horn"] = {price = 350}, ["ice bra"] = {price = 500}, ["xatu wing"] = {price = 500}, ["snake tail"] = {price = 350}, ["seahorse tail"] = {price = 300}, ["strange sting"] = {price = 300}, ["tentacle"] = {price = 300}, ["strange rock"] = {price = 250}, ["skarmory wing"] = {price = 600}, ["scizor claw"] = {price = 600}, ["star gem"] = {price = 500}, ["tyranitar tail"] = {price = 600}, ["small tail"] = {price = 300}, ["magmar foot"] = {price = 1000}, ["red wing"] = {price = 500}, ["gligar claw"] = {price = 350}, ["insect foot"] = {price = 350}, ["strange wing"] = {price = 400}, ["mantine tail"] = {price = 400}, ["small tusk"] = {price = 350}, ["nidoran male ear"] = {price = 250}, ["skin tail"] = {price = 200}, ["sting hand"] = {price = 200}, ["aipom hand"] = {price = 250}, ["ledyba wing"] = {price = 200}, ["strange antenna"] = {price = 250}, ["squirry tail"] = {price = 250}, ["point of light"] = {price = 300}, ["kangaskhan ear"] = {price = 500}, ["strange flower"] = {price = 350}, ["great petal"] = {price = 350}, ["great flower"] = {price = 500}, ["fire tail"] = {price = 400}, ["strange horn"] = {price = 350}, ["piece of coral"] = {price = 350}, ["shuckle armor"] = {price = 350}, ["plant tail"] = {price = 250}, ["sea tail"] = {price = 250}, ["helicopter leaves"] = {price = 200}, ["strange spike"] = {price = 200}, ["bag of pollem"] = {price = 200}, ["Heart Stone"] = {price = 5000}, ["Leaf Stone"] = {price = 5000}, ["Water Stone"] = {price = 5000}, ["Fire Stone"] = {price = 5000}, ["Metal Stone"] = {price = 10000}, ["Crystal Stone"] = {price = 10000}, ["Ancient Stone"] = {price = 10000}, ["Venom Stone"] = {price = 5000}, ["Thunder Stone"] = {price = 5000}, ["Rock Stone"] = {price = 5000}, ["Punch Stone"] = {price = 5000}, ["Coccon Stone"] = {price = 5000}, ["Darkness Stone"] = {price = 5000}, ["Earth Stone"] = {price = 5000}, ["Enigma Stone"] = {price = 5000}, ["Ice Stone"] = {price = 5000}, ["Boost Stone"] = {price = 20000}, ["Mega Stone"] = {price = 50000}, } 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 shinys = { ["Shiny Abra"] = "Dark Abra", ["Shiny Onix"] = "Crystal Onix", ["Shiny Gyarados"] = "Red Gyarados", ["Shiny Charizard"] = "Elder Charizard", ["Shiny Venusaur"] = "Ancient Venusaur", ["Shiny Blastoise"] = "Ancient Blastoise", ["Shiny Farfetch'd"] = "Elite Farfetch'd", ["Shiny Hitmonlee"] = "Elite Hitmonlee", ["Shiny Himonchan"] = "Elite Hitmonchan", ["Shiny Snorlax"] = "Big Snorlax", } function onLook(cid, thing, position, lookDistance) local str = {} local isTrade = false if lookDistance == 0 then isTrade = true end -- trade lookDistanc end if not isCreature(thing.uid) then local iname = getItemInfo(thing.itemid) if isPokeball(thing.itemid) and getItemAttribute(thing.uid, "poke") then local isDittoBall = isInArray({"Ditto", "Shiny Ditto"}, getItemAttribute(thing.uid, "poke")) and true or false unLock(thing.uid) local lock = getItemAttribute(thing.uid, "lock") local pokename = isDittoBall and getItemAttribute(thing.uid, "copyName") or getItemAttribute(thing.uid, "poke") local heldx = getItemAttribute(thing.uid, "xHeldItem") local heldy = getItemAttribute(thing.uid, "yHeldItem") local megaID = getItemAttribute(thing.uid, "megaID") local pokeBallName = getItemAttribute(thing.uid, "ball") if not pokeBallName then doItemSetAttribute(thing.uid, "ball", "poke") pokeBallName = "Poke" end if isGod(cid) then table.insert(str, "ItemID[".. thing.itemid .."].\n") end table.insert(str, "You see ".. doCorrectString(pokeBallName) .."ball.") if getItemAttribute(thing.uid, "unique") then table.insert(str, " It's an unique item.") end local article = getArticle(pokename) local freeSpaces = 0 local smeargle = false if pokename:find("Smeargle") then pokename = pokename .. " " .. getItemAttribute(thing.uid, "SmeargleID") freeSpaces = getFreeSpacesSmeargleBall(thing.uid, getItemAttribute(thing.uid, "SmeargleID")) smeargle = true end table.insert(str, "\nIt contains "..article.." "..pokename.. (isDittoBall and " (Ditto)" or "") .. (freeSpaces > 0 and ".\n [" .. freeSpaces .. "] Skatchs vazios" or (smeargle and ".\n Skatchs completos") or "") .. ".\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 local precocertos = ((gastostones[boosts] * 5) * 400) if boosts > 50 then precocertos = ((gastostones[50] * 5) * 400) + ((boosts - 50) * 100000) else precocertos = ((gastostones[boosts] * 5) * 400) end if getItemAttribute (thing.uid, "ehditto") then pokename = "Ditto" end local pokeCost = pokePrice[pokename] or math.floor(pokes[pokename].level * 150) if pokename == "Ditto" then table.insert (str, " Not sellable.") elseif pokes[pokename] then if boosts == 0 then table.insert (str, " Price: $"..pokeCost) else table.insert (str, " Price: $"..pokeCost.. " + $"..precocertos.. " (BOOST)") end end 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 local heldName, heldTier = "", "" local heldYName, heldYTier = "", "" if heldx or heldy then if heldx then heldName, heldTier = string.explode(heldx, "|")[1], string.explode(heldx, "|")[2] end if heldy then heldYName, heldYTier = string.explode(heldy, "|")[1], string.explode(heldy, "|")[2] end local heldString = heldName .. " (tier: " .. heldTier .. ")" local heldYString = heldYName .. (not isInArray({"Mega", "GHOST"}, heldYTier) and " (tier: " .. heldYTier .. ")" or "") if heldx and heldy then table.insert(str, "Holding: " .. heldString .. " and " .. heldYString .. ". ") elseif heldx then table.insert(str, "Holding: "..heldString..". ") elseif heldy then table.insert(str, "Holding: "..heldYString ..". ") end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif getItemAttribute(thing.uid, "pokeName") and string.find(getItemAttribute(thing.uid, "pokeName"), "fainted") then local lootName = getItemAttribute(thing.uid, "pokeName") if isGod(cid) then table.insert(str, "ItemID[".. thing.itemid .."].\n") end table.insert(str, "You see a "..string.lower(lootName)..". ") if isContainer(thing.uid) then table.insert(str, "(Vol: "..getContainerCap(thing.uid)..")") end if getItemAttribute(thing.uid, "corpseowner") then if getItemAttribute(thing.uid, "corpseowner") == "asçdlkasçldkaçslkdçaskdçaslkdçlsakdçkaslç" then table.insert(str, "\nSuicidou-se.") else table.insert(str, "\nEle foi morto por: ("..getItemAttribute(thing.uid, "corpseowner")..")") end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif isContainer(thing.uid) then --containers if isGod(cid) then table.insert(str, "ItemID[".. thing.itemid .."].\n") end if getItemAttribute(thing.uid, "iname") then table.insert(str, "You see "..iname.article.." "..iname.name..". (Vol:"..getContainerCap(thing.uid)..").") table.insert(str, getItemAttribute(thing.uid, "iname")..".") 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 if isGod(cid) then table.insert(str, "ItemID[".. thing.itemid .."].\n") end 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 elseif NPCPrice[iname.name] then local qnt = 0 if thing.type == 0 then qnt = 1 else qnt = thing.type end local p = getThingPos(thing.uid) local calculo = NPCPrice[iname.name].price * qnt 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, "\n"..iname.description.." Price: $"..calculo..".") 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 local pname = getCreatureName(thing.uid) if pname:find("Smeargle") then pname = doCorrectString(getPlayerStorageValue(thing.uid, storages.SmeargleID)) end table.insert(str, "You see a wild "..string.lower(pname)..".\n") if isWildTrainerNPC(thing.uid) then table.insert(str, "Nivel (".. getNPCNivel(thing.uid) ..").\n") end if isGod(cid) then table.insert(str, "Hit Points: "..getCreatureHealth(thing.uid).." / "..getCreatureMaxHealth(thing.uid)..".\n") 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 isDittoBall = isInArray({"Ditto", "Shiny Ditto"}, getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "poke")) and true or false if getCreatureMaster(thing.uid) == cid then local myball = getPlayerSlotItem(cid, 8).uid table.insert(str, "You see your "..doCorrectString(getCreatureName(thing.uid)).. (isDittoBall and " (Ditto)" or "") ..".") if boostlevel > 0 then table.insert(str, "\nBoost level: +"..boostlevel..".") end table.insert(str, "\n"..getPokemonHappinessDescription(thing.uid)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) else local health = "\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid).."." doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..doCorrectString(getCreatureName(thing.uid)).. (isDittoBall and " (Ditto)" or "") ..".\nIt belongs to "..getCreatureName(getCreatureMaster(thing.uid)).."." .. (isGod(cid) and health or "") ) end return false end return true end Link para o comentário Compartilhar em outros sites More sharing options...
Bodak Reborn 28 Postado Agosto 25, 2016 Autor Share Postado Agosto 25, 2016 3 minutos atrás, Josegvb disse: Mostrar conteúdo oculto local pokePrice = { ["Charmander"] = 3000, ["Charmeleon"] = 8000, ["Charizard"] = 18000, ["Bulbasaur"] = 3000, ["Ivysaur"] = 8000, ["Venusaur"] = 18000, ["Squirtle"] = 3000, ["Wartortle"] = 8000, ["Blastoise"] = 18000, ["Caterpie"] = 50, ["Metapod"] = 250, ["Butterfree"] = 2000, ["Weedle"] = 50, ["Kakuna"] = 250, ["Beedrill"] = 2000, ["Pidgey"] = 60, ["Pidgeotto"] = 1500, ["Pidgeot"] = 11500, ["Rattata"] = 5, ["Raticate"] = 2000, ["Spearow"] = 100, ["Fearow"] = 5100, ["Ekans"] = 300, ["Arbok"] = 3000, ["Pikachu"] = 8000, ["Raichu"] = 18000, ["Sandshrew"] = 1000, ["Sandslash"] = 11000, ["Nidoran Female"] = 125, ["Nidorina"] = 2250, ["Nidoqueen"] = 12250, ["Nidoran Male"] = 125, ["Nidorino"] = 2250, ["Nidoqueen"] = 12250, ["Clefairy"] = 8000, ["Clefable"] = 18000, ["Vulpix"] = 1000, ["Ninetales"] = 11000, ["Jigglypuff"] = 8000, ["Wigglytuff"] = 18000, ["Zubat"] = 120, ["Golbat"] = 3000, ["Oddish"] = 80, ["Gloom"] = 2250, ["Vileplume"] = 12000, ["Paras"] = 60, ["Parasect"] = 7250, ["Venonat"] = 1500, ["Venomoth"] = 7250, ["Diglett"] = 200, ["Dugtrio"] = 3000, ["Meowth"] = 300, ["Persian"] = 3000, ["Psyduck"] = 1500, ["Golduck"] = 11500, ["Mankey"] = 300, ["Primeape"] = 7250, ["Growlithe"] = 3500, ["Arcanine"] = 60000, ["Poliwag"] = 80, ["Poliwhirl"] = 3000, ["Poliwrath"] = 13000, ["Abra"] = 800, ["Kadabra"] = 5800, ["Alakazam"] = 16000, ["Machop"] = 2000, ["Machoke"] = 7000, ["Machamp"] = 17000, ["Bellsprout"] = 80, ["Wepinbell"] = 2250, ["Victreebel"] = 12000, ["Tentacool"] = 300, ["Tentacruel"] = 10000, ["Geodude"] = 300, ["Graveler"] = 5000, ["Golem"] = 15000, ["Ponyta"] = 1500, ["Rapidash"] = 6500, ["Slowpoke"] = 400, ["Slowbro"] = 8000, ["Magnemite"] = 400, ["Magneton"] = 5400, ["Farfetch'd"] = 7000, ["Doduo"] = 600, ["Dodrio"] = 5600, ["Seel"] = 2000, ["Dewgong"] = 12000, ["Grimer"] = 300, ["Muk"] = 11000, ["Shellder"] = 200, ["Cloyster"] = 10200, ["Gastly"] = 3000, ["Haunter"] = 8000, ["Gengar"] = 18000, ["Onix"] = 6000, ["Drowzee"] = 1000, ["Hypno"] = 6000, ["Krabby"] = 200, ["Kingler"] = 5200, ["Voltorb"] = 250, ["Electrode"] = 3000, ["Exeggute"] = 200, ["Exeggutor"] = 10000, ["Cubone"] = 1000, ["Marowak"] = 11000, ["Hitmonlee"] = 20000, ["Hitmonchan"] = 20000, ["Lickitung"] = 60000, ["Koffing"] = 300, ["Weezing"] = 3000, ["Rhyhorn"] = 3000, ["Rhydon"] = 13000, ["Chansey"] = 40000, ["Tangela"] = 10000, ["Kangaskhan"] = 120000, ["Horsea"] = 200, ["Seadra"] = 5500, ["Goldeen"] = 200, ["Seaking"] = 3000, ["Staryu"] = 400, ["Starmie"] = 3000, ["Mr. Mime"] = 120000, ["Scyther"] = 120000, ["Jynx"] = 120000, ["Electabuzz"] = 120000, ["Magmar"] = 120000, ["Pinsir"] = 9000, ["Tauros"] = 5000, ["Magikarp"] = 5, ["Gyarados"] = 5000, ["Lapras"] = 120000, ["Ditto"] = 70000, ["Eevee"] = 45000, ["Vaporeon"] = 50000, ["Jolteon"] = 50000, ["Flareon"] = 50000, ["Porygon"] = 60000, ["Omanyte"] = 20000, ["Omastar"] = 75000, ["Kabuto"] = 2000, ["Kabutops"] = 75000, ["Aerodactyl"] = 2000000, ["Snorlax"] = 200000, ["Dratini"] = 15000, ["Dragonair"] = 65000, ["Dragonite"] = 125000, -- Segunda Geração ["Chikorita"] = 3000, ["Bayleef"] = 8000, ["Meganium"] = 18000, ["Cydaquil"] = 3000, ["Quilava"] = 8000, ["Typhlosion"] = 18000, ["Totodile"] = 3000, ["Croconaw"] = 8000, ["Feraligatr"] = 18000, ["Sentret"] = 250, ["Furret"] = 3000, ["Hoothoot"] = 1500, ["Noctowl"] = 11500, ["Ledyba"] = 250, ["Ledian"] = 3000, ["Spinarak"] = 250, ["Ariados"] = 3000, ["Crobat"] = 58000, ["Chinchou"] = 1000, ["Lanturn"] = 6000, ["Pichu"] = 3000, ["Cleffa"] = 3000, ["Igglybuff"] = 3000, ["Togepi"] = 15000, ["Togetic"] = 25000, ["Natu"] = 3000, ["Xatu"] = 130000, ["Mareep"] = 3000, ["Flaaffy"] = 8000, ["Ampharos"] = 18000, ["Bellossom"] = 12000, ["Marill"] = 3000, ["Azumarill"] = 13000, ["Sudowoodo"] = 120000, ["Politoed"] = 8000, ["Hoppip"] = 80, ["Skiploom"] = 2250, ["Jumpluff"] = 12000, ["Aipom"] = 8000, ["Sunkern"] = 50, ["Sunflora"] = 5000, ["Yanma"] = 9000, ["Wooper"] = 2000, ["Quagsire"] = 12000, ["Espeon"] = 50000, ["Umbreon"] = 50000, ["Murkrow"] = 10000, ["Slowking"] = 11000, ["Misdreavus"] = 100000, ["Wobbuffet"] = 200000, ["Girafarig"] = 120000, ["Pineco"] = 300, ["Forretress"] = 10000, ["Dunsparce"] = 3000, ["Gligar"] = 8000, ["Steelix"] = 110000, ["Snubbull"] = 22500, ["Granbull"] = 12500, ["Qwilfish"] = 10000, ["Scizor"] = 220000, ["Shuckle"] = 3500, ["Heracross"] = 120000, ["Sneasel"] = 10000, ["Teddiursa"] = 80000, ["Ursaring"] = 150000, ["Slugma"] = 1000, ["Magcargo"] = 11000, ["Swinub"] = 1000, ["Piloswine"] = 11000, ["Corsola"] = 9000, ["Remoraid"] = 200, ["Octillery"] = 10000, ["Delibird"] = 10000, ["Mantine"] = 120000, ["Skarmory"] = 120000, ["Houndour"] = 35000, ["Houndoom"] = 13500, ["kingdra"] = 70000, ["Phanpy"] = 3000, ["Donphan"] = 13000, ["Porygon2"] = 120000, ["Stantler"] = 10000, ["Tyrogue"] = 150000, ["Hitmontop"] = 50000, ["Smoochum"] = 45000, ["Elikid"] = 45000, ["Magby"] = 45000, ["Miltank"] = 120000, ["Blissey"] = 140000, ["Larvitar"] = 15000, ["Pupitar"] = 65000, ["Electivire"] = 125000, ["Magmortar"] = 125000, ["Tyranitar"] = 125000, -- shiny -- ["Shiny Fearow"] = 1500000, ["Shiny Vileplume"] = 1500000, ["Shiny Golem"] = 1500000, ["Shiny Nidoking"] = 1500000, ["Shiny Hypno"] = 1500000, ["Shiny Vaporeon"] = 1500000, ["Shiny Jolteon"] = 1500000, ["Shiny Flareon"] = 1500000, ["Shiny Hitmontop"] = 1500000, } local gastostones = { [0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 6, [6] = 8, [7] = 10, [8] = 12, [9] = 15, [10] = 18, [11] = 21, [12] = 24, [13] = 28, [14] = 32, [15] = 36, [16] = 40, [17] = 45, [18] = 50, [19] = 55, [20] = 60, [21] = 66, [22] = 72, [23] = 78, [24] = 84, [25] = 91, [26] = 98, [27] = 105, [28] = 112, [29] = 120, [30] = 128, [31] = 136, [32] = 144, [33] = 153, [34] = 162, [35] = 171, [36] = 180, [37] = 190, [38] = 200, [39] = 210, [40] = 220, [41] = 231, [42] = 242, [43] = 253, [44] = 264, [45] = 276, [46] = 288, [47] = 300, [48] = 312, [49] = 325, [50] = 338, } local NPCPrice = { ["seed"] = {price = 30}, ["electric box"] = {price = 150}, ["sandbag"] = {price = 150}, ["comb"] = {price = 150}, ["fur"] = {price = 150}, ["ruby"] = {price = 300}, ["essence of fire"] = {price = 30}, ["small stone"] = {price = 30}, ["pot of moss bug"] = {price = 150}, ["screw"] = {price = 30}, ["straw"] = {price = 100}, ["water gem"] = {price = 30}, ["remains of magikarp"] = {price = 100}, ["teeth"] = {price = 150}, ["bottle of poison"] = {price = 30}, ["water pendant"] = {price = 100}, ["feather"] = {price = 150}, ["pair of leaves"] = {price = 150}, ["apple bite"] = {price = 60}, ["bat wing"] = {price = 150}, ["pot of lava"] = {price = 150}, ["fire pendant"] = {price = 100}, ["bug venom"] = {price = 100}, ["bug antenna"] = {price = 150}, ["venom pendant"] = {price = 100}, ["pot of venom"] = {price = 150}, ["iron bracelet"] = {price = 150}, ["ice orb"] = {price = 150}, ["gosme"] = {price = 150}, ["darkness gem,"] = {price = 30}, ["bug gosme"] = {price = 80}, ["enchanted gem,"] = {price = 30}, ["horn"] = {price = 150}, ["venom piece"] = {price = 150}, ["big wing"] = {price = 500}, ["dragon tail"] = {price = 500}, ["purple tail"] = {price = 500}, ["majesty wing"] = {price = 500}, ["alligator skin"] = {price = 500}, ["big egg"] = {price = 500}, ["teel feather"] = {price = 50000}, ["red feather"] = {price = 50000}, ["yellow feather"] = {price = 50000}, ["registeel orb"] = {price = 50000}, ["white rune"] = {price = 500}, ["foxtail"] = {price = 500}, ["pot with fire"] = {price = 350}, ["water orb"] = {price = 350}, ["iron piece"] = {price = 350}, ["gyarados tail"] = {price = 500}, ["bulb"] = {price = 350}, ["long fang"] = {price = 400}, ["turtle hull"] = {price = 350}, ["dragon tooth"] = {price = 1000}, ["iron pin"] = {price = 400}, ["mimic clothes"] = {price = 1000}, ["scythe"] = {price = 1000}, ["buzz tail"] = {price = 1000}, ["bird beak"] = {price = 200}, ["rat tail"] = {price = 200}, ["longhorn"] = {price = 350}, ["luck medalion"] = {price = 350}, ["wool ball"] = {price = 400}, ["psyduck mug"] = {price = 350}, ["punch toy"] = {price = 500}, ["twisted spoon"] = {price = 350}, ["future orb"] = {price = 250}, ["champion belt"] = {price = 400}, ["slowpoke tail"] = {price = 300}, ["imam"] = {price = 250}, ["stick slash"] = {price = 300}, ["traces of ghost"] = {price = 350}, ["onix tail"] = {price = 300}, ["bone"] = {price = 250}, ["big tongue"] = {price = 500}, ["power orb"] = {price = 250}, ["bracelet"] = {price = 250}, ["star"] = {price = 200}, ["magma orb"] = {price = 250}, ["shell"] = {price = 200}, ["iron bar"] = {price = 250}, ["bag of poison dust"] = {price = 250}, ["steel wing"] = {price = 500}, ["green orb"] = {price = 250}, ["steel ore"] = {price = 400}, ["charizard wing"] = {price = 600}, ["magma box"] = {price = 400}, ["giant turtle hull"] = {price = 600}, ["red gyarados tail"] = {price = 10000}, ["crystal tail"] = {price = 1000}, ["Helix Fossil"] = {price = 150000}, ["Dome Fossil"] = {price = 150000}, ["Old Amber"] = {price = 500000}, ["green apple bite"] = {price = 400}, ["leaf pendant"] = {price = 350}, ["bone mask"] = {price = 400}, ["pikachu tail"] = {price = 300}, ["raichu tail"] = {price = 500}, ["blue vines"] = {price = 350}, ["stone orb"] = {price = 250}, ["locksmith of shell"] = {price = 200}, ["crab claw"] = {price = 200}, ["noctowl own"] = {price = 500}, ["togepi egg"] = {price = 400}, ["pinsir horn"] = {price = 350}, ["ice bra"] = {price = 500}, ["xatu wing"] = {price = 500}, ["snake tail"] = {price = 350}, ["seahorse tail"] = {price = 300}, ["strange sting"] = {price = 300}, ["tentacle"] = {price = 300}, ["strange rock"] = {price = 250}, ["skarmory wing"] = {price = 600}, ["scizor claw"] = {price = 600}, ["star gem"] = {price = 500}, ["tyranitar tail"] = {price = 600}, ["small tail"] = {price = 300}, ["magmar foot"] = {price = 1000}, ["red wing"] = {price = 500}, ["gligar claw"] = {price = 350}, ["insect foot"] = {price = 350}, ["strange wing"] = {price = 400}, ["mantine tail"] = {price = 400}, ["small tusk"] = {price = 350}, ["nidoran male ear"] = {price = 250}, ["skin tail"] = {price = 200}, ["sting hand"] = {price = 200}, ["aipom hand"] = {price = 250}, ["ledyba wing"] = {price = 200}, ["strange antenna"] = {price = 250}, ["squirry tail"] = {price = 250}, ["point of light"] = {price = 300}, ["kangaskhan ear"] = {price = 500}, ["strange flower"] = {price = 350}, ["great petal"] = {price = 350}, ["great flower"] = {price = 500}, ["fire tail"] = {price = 400}, ["strange horn"] = {price = 350}, ["piece of coral"] = {price = 350}, ["shuckle armor"] = {price = 350}, ["plant tail"] = {price = 250}, ["sea tail"] = {price = 250}, ["helicopter leaves"] = {price = 200}, ["strange spike"] = {price = 200}, ["bag of pollem"] = {price = 200}, ["Heart Stone"] = {price = 5000}, ["Leaf Stone"] = {price = 5000}, ["Water Stone"] = {price = 5000}, ["Fire Stone"] = {price = 5000}, ["Metal Stone"] = {price = 10000}, ["Crystal Stone"] = {price = 10000}, ["Ancient Stone"] = {price = 10000}, ["Venom Stone"] = {price = 5000}, ["Thunder Stone"] = {price = 5000}, ["Rock Stone"] = {price = 5000}, ["Punch Stone"] = {price = 5000}, ["Coccon Stone"] = {price = 5000}, ["Darkness Stone"] = {price = 5000}, ["Earth Stone"] = {price = 5000}, ["Enigma Stone"] = {price = 5000}, ["Ice Stone"] = {price = 5000}, ["Boost Stone"] = {price = 20000}, ["Mega Stone"] = {price = 50000}, } 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 shinys = { ["Shiny Abra"] = "Dark Abra", ["Shiny Onix"] = "Crystal Onix", ["Shiny Gyarados"] = "Red Gyarados", ["Shiny Charizard"] = "Elder Charizard", ["Shiny Venusaur"] = "Ancient Venusaur", ["Shiny Blastoise"] = "Ancient Blastoise", ["Shiny Farfetch'd"] = "Elite Farfetch'd", ["Shiny Hitmonlee"] = "Elite Hitmonlee", ["Shiny Himonchan"] = "Elite Hitmonchan", ["Shiny Snorlax"] = "Big Snorlax", } function onLook(cid, thing, position, lookDistance) local str = {} local isTrade = false if lookDistance == 0 then isTrade = true end -- trade lookDistanc end if not isCreature(thing.uid) then local iname = getItemInfo(thing.itemid) if isPokeball(thing.itemid) and getItemAttribute(thing.uid, "poke") then local isDittoBall = isInArray({"Ditto", "Shiny Ditto"}, getItemAttribute(thing.uid, "poke")) and true or false unLock(thing.uid) local lock = getItemAttribute(thing.uid, "lock") local pokename = isDittoBall and getItemAttribute(thing.uid, "copyName") or getItemAttribute(thing.uid, "poke") local heldx = getItemAttribute(thing.uid, "xHeldItem") local heldy = getItemAttribute(thing.uid, "yHeldItem") local megaID = getItemAttribute(thing.uid, "megaID") local pokeBallName = getItemAttribute(thing.uid, "ball") if not pokeBallName then doItemSetAttribute(thing.uid, "ball", "poke") pokeBallName = "Poke" end if isGod(cid) then table.insert(str, "ItemID[".. thing.itemid .."].\n") end table.insert(str, "You see ".. doCorrectString(pokeBallName) .."ball.") if getItemAttribute(thing.uid, "unique") then table.insert(str, " It's an unique item.") end local article = getArticle(pokename) local freeSpaces = 0 local smeargle = false if pokename:find("Smeargle") then pokename = pokename .. " " .. getItemAttribute(thing.uid, "SmeargleID") freeSpaces = getFreeSpacesSmeargleBall(thing.uid, getItemAttribute(thing.uid, "SmeargleID")) smeargle = true end table.insert(str, "\nIt contains "..article.." "..pokename.. (isDittoBall and " (Ditto)" or "") .. (freeSpaces > 0 and ".\n [" .. freeSpaces .. "] Skatchs vazios" or (smeargle and ".\n Skatchs completos") or "") .. ".\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 local precocertos = ((gastostones[boosts] * 5) * 400) if boosts > 50 then precocertos = ((gastostones[50] * 5) * 400) + ((boosts - 50) * 100000) else precocertos = ((gastostones[boosts] * 5) * 400) end if getItemAttribute (thing.uid, "ehditto") then pokename = "Ditto" end local pokeCost = pokePrice[pokename] or math.floor(pokes[pokename].level * 150) if pokename == "Ditto" then table.insert (str, " Not sellable.") elseif pokes[pokename] then if boosts == 0 then table.insert (str, " Price: $"..pokeCost) else table.insert (str, " Price: $"..pokeCost.. " + $"..precocertos.. " (BOOST)") end end 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 local heldName, heldTier = "", "" local heldYName, heldYTier = "", "" if heldx or heldy then if heldx then heldName, heldTier = string.explode(heldx, "|")[1], string.explode(heldx, "|")[2] end if heldy then heldYName, heldYTier = string.explode(heldy, "|")[1], string.explode(heldy, "|")[2] end local heldString = heldName .. " (tier: " .. heldTier .. ")" local heldYString = heldYName .. (not isInArray({"Mega", "GHOST"}, heldYTier) and " (tier: " .. heldYTier .. ")" or "") if heldx and heldy then table.insert(str, "Holding: " .. heldString .. " and " .. heldYString .. ". ") elseif heldx then table.insert(str, "Holding: "..heldString..". ") elseif heldy then table.insert(str, "Holding: "..heldYString ..". ") end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif getItemAttribute(thing.uid, "pokeName") and string.find(getItemAttribute(thing.uid, "pokeName"), "fainted") then local lootName = getItemAttribute(thing.uid, "pokeName") if isGod(cid) then table.insert(str, "ItemID[".. thing.itemid .."].\n") end table.insert(str, "You see a "..string.lower(lootName)..". ") if isContainer(thing.uid) then table.insert(str, "(Vol: "..getContainerCap(thing.uid)..")") end if getItemAttribute(thing.uid, "corpseowner") then if getItemAttribute(thing.uid, "corpseowner") == "asçdlkasçldkaçslkdçaskdçaslkdçlsakdçkaslç" then table.insert(str, "\nSuicidou-se.") else table.insert(str, "\nEle foi morto por: ("..getItemAttribute(thing.uid, "corpseowner")..")") end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif isContainer(thing.uid) then --containers if isGod(cid) then table.insert(str, "ItemID[".. thing.itemid .."].\n") end if getItemAttribute(thing.uid, "iname") then table.insert(str, "You see "..iname.article.." "..iname.name..". (Vol:"..getContainerCap(thing.uid)..").") table.insert(str, getItemAttribute(thing.uid, "iname")..".") 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 if isGod(cid) then table.insert(str, "ItemID[".. thing.itemid .."].\n") end 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 elseif NPCPrice[iname.name] then local qnt = 0 if thing.type == 0 then qnt = 1 else qnt = thing.type end local p = getThingPos(thing.uid) local calculo = NPCPrice[iname.name].price * qnt 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, "\n"..iname.description.." Price: $"..calculo..".") 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 local pname = getCreatureName(thing.uid) if pname:find("Smeargle") then pname = doCorrectString(getPlayerStorageValue(thing.uid, storages.SmeargleID)) end table.insert(str, "You see a wild "..string.lower(pname)..".\n") if isWildTrainerNPC(thing.uid) then table.insert(str, "Nivel (".. getNPCNivel(thing.uid) ..").\n") end if isGod(cid) then table.insert(str, "Hit Points: "..getCreatureHealth(thing.uid).." / "..getCreatureMaxHealth(thing.uid)..".\n") 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 isDittoBall = isInArray({"Ditto", "Shiny Ditto"}, getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "poke")) and true or false if getCreatureMaster(thing.uid) == cid then local myball = getPlayerSlotItem(cid, 8).uid table.insert(str, "You see your "..doCorrectString(getCreatureName(thing.uid)).. (isDittoBall and " (Ditto)" or "") ..".") if boostlevel > 0 then table.insert(str, "\nBoost level: +"..boostlevel..".") end table.insert(str, "\n"..getPokemonHappinessDescription(thing.uid)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) else local health = "\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid).."." doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..doCorrectString(getCreatureName(thing.uid)).. (isDittoBall and " (Ditto)" or "") ..".\nIt belongs to "..getCreatureName(getCreatureMaster(thing.uid)).."." .. (isGod(cid) and health or "") ) end return false end return true end Spoiler local pokePrice = {["Charmander"] = 3000,["Charmeleon"] = 8000, ["Charizard"] = 18000,["Bulbasaur"] = 3000,["Ivysaur"] = 8000,["Venusaur"] = 18000,["Squirtle"] = 3000,["Wartortle"] = 8000,["Blastoise"] = 18000,["Caterpie"] = 50,["Metapod"] = 250,["Butterfree"] = 2000,["Weedle"] = 50,["Kakuna"] = 250,["Beedrill"] = 2000,["Pidgey"] = 60,["Pidgeotto"] = 1500,["Pidgeot"] = 11500,["Rattata"] = 5,["Raticate"] = 2000,["Spearow"] = 100,["Fearow"] = 5100,["Ekans"] = 300,["Arbok"] = 3000,["Pikachu"] = 8000,["Raichu"] = 18000,["Sandshrew"] = 1000,["Sandslash"] = 11000,["Nidoran Female"] = 125,["Nidorina"] = 2250,["Nidoqueen"] = 12250,["Nidoran Male"] = 125,["Nidorino"] = 2250,["Nidoqueen"] = 12250,["Clefairy"] = 8000,["Clefable"] = 18000,["Vulpix"] = 1000,["Ninetales"] = 11000,["Jigglypuff"] = 8000,["Wigglytuff"] = 18000,["Zubat"] = 120,["Golbat"] = 3000,["Oddish"] = 80,["Gloom"] = 2250,["Vileplume"] = 12000,["Paras"] = 60,["Parasect"] = 7250, ["Venonat"] = 1500,["Venomoth"] = 7250,["Diglett"] = 200,["Dugtrio"] = 3000,["Meowth"] = 300,["Persian"] = 3000,["Psyduck"] = 1500,["Golduck"] = 11500,["Mankey"] = 300,["Primeape"] = 7250,["Growlithe"] = 3500,["Arcanine"] = 60000,["Poliwag"] = 80,["Poliwhirl"] = 3000,["Poliwrath"] = 13000,["Abra"] = 800,["Kadabra"] = 5800,["Alakazam"] = 16000,["Machop"] = 2000,["Machoke"] = 7000,["Machamp"] = 17000,["Bellsprout"] = 80,["Wepinbell"] = 2250,["Victreebel"] = 12000,["Tentacool"] = 300,["Tentacruel"] = 10000,["Geodude"] = 300,["Graveler"] = 5000,["Golem"] = 15000,["Ponyta"] = 1500,["Rapidash"] = 6500,["Slowpoke"] = 400,["Slowbro"] = 8000,["Magnemite"] = 400,["Magneton"] = 5400,["Farfetch'd"] = 7000,["Doduo"] = 600,["Dodrio"] = 5600,["Seel"] = 2000,["Dewgong"] = 12000,["Grimer"] = 300,["Muk"] = 11000,["Shellder"] = 200,["Cloyster"] = 10200,["Gastly"] = 3000,["Haunter"] = 8000,["Gengar"] = 18000,["Onix"] = 6000,["Drowzee"] = 1000,["Hypno"] = 6000,["Krabby"] = 200,["Kingler"] = 5200,["Voltorb"] = 250,["Electrode"] = 3000,["Exeggute"] = 200,["Exeggutor"] = 10000,["Cubone"] = 1000,["Marowak"] = 11000,["Hitmonlee"] = 20000,["Hitmonchan"] = 20000,["Lickitung"] = 60000,["Koffing"] = 300,["Weezing"] = 3000,["Rhyhorn"] = 3000,["Rhydon"] = 13000,["Chansey"] = 40000,["Tangela"] = 10000,["Kangaskhan"] = 120000,["Horsea"] = 200,["Seadra"] = 5500,["Goldeen"] = 200,["Seaking"] = 3000,["Staryu"] = 400,["Starmie"] = 3000,["Mr. Mime"] = 120000,["Scyther"] = 120000,["Jynx"] = 120000,["Electabuzz"] = 120000,["Magmar"] = 120000,["Pinsir"] = 9000,["Tauros"] = 5000,["Magikarp"] = 5,["Gyarados"] = 5000,["Lapras"] = 120000,["Ditto"] = 70000,["Eevee"] = 45000,["Vaporeon"] = 50000,["Jolteon"] = 50000,["Flareon"] = 50000,["Porygon"] = 60000,["Omanyte"] = 20000,["Omastar"] = 75000,["Kabuto"] = 2000,["Kabutops"] = 75000,["Aerodactyl"] = 2000000,["Snorlax"] = 200000,["Dratini"] = 15000,["Dragonair"] = 65000,["Dragonite"] = 125000, -- Segunda Geração["Chikorita"] = 3000,["Bayleef"] = 8000,["Meganium"] = 18000,["Cydaquil"] = 3000,["Quilava"] = 8000,["Typhlosion"] = 18000,["Totodile"] = 3000,["Croconaw"] = 8000,["Feraligatr"] = 18000,["Sentret"] = 250,["Furret"] = 3000,["Hoothoot"] = 1500,["Noctowl"] = 11500,["Ledyba"] = 250,["Ledian"] = 3000,["Spinarak"] = 250,["Ariados"] = 3000,["Crobat"] = 58000,["Chinchou"] = 1000,["Lanturn"] = 6000,["Pichu"] = 3000,["Cleffa"] = 3000,["Igglybuff"] = 3000,["Togepi"] = 15000,["Togetic"] = 25000,["Natu"] = 3000,["Xatu"] = 130000,["Mareep"] = 3000,["Flaaffy"] = 8000,["Ampharos"] = 18000,["Bellossom"] = 12000,["Marill"] = 3000,["Azumarill"] = 13000,["Sudowoodo"] = 120000,["Politoed"] = 8000,["Hoppip"] = 80,["Skiploom"] = 2250,["Jumpluff"] = 12000,["Aipom"] = 8000,["Sunkern"] = 50,["Sunflora"] = 5000,["Yanma"] = 9000,["Wooper"] = 2000,["Quagsire"] = 12000,["Espeon"] = 50000,["Umbreon"] = 50000,["Murkrow"] = 10000,["Slowking"] = 11000,["Misdreavus"] = 100000,["Wobbuffet"] = 200000,["Girafarig"] = 120000,["Pineco"] = 300,["Forretress"] = 10000,["Dunsparce"] = 3000,["Gligar"] = 8000,["Steelix"] = 110000,["Snubbull"] = 22500,["Granbull"] = 12500,["Qwilfish"] = 10000,["Scizor"] = 220000,["Shuckle"] = 3500,["Heracross"] = 120000,["Sneasel"] = 10000,["Teddiursa"] = 80000,["Ursaring"] = 150000,["Slugma"] = 1000,["Magcargo"] = 11000,["Swinub"] = 1000,["Piloswine"] = 11000,["Corsola"] = 9000,["Remoraid"] = 200,["Octillery"] = 10000,["Delibird"] = 10000,["Mantine"] = 120000,["Skarmory"] = 120000,["Houndour"] = 35000,["Houndoom"] = 13500,["kingdra"] = 70000,["Phanpy"] = 3000,["Donphan"] = 13000,["Porygon2"] = 120000,["Stantler"] = 10000,["Tyrogue"] = 150000,["Hitmontop"] = 50000,["Smoochum"] = 45000,["Elikid"] = 45000,["Magby"] = 45000,["Miltank"] = 120000,["Blissey"] = 140000,["Larvitar"] = 15000,["Pupitar"] = 65000,["Electivire"] = 125000,["Magmortar"] = 125000,["Tyranitar"] = 125000,-- shiny --["Shiny Fearow"] = 1500000,["Shiny Vileplume"] = 1500000,["Shiny Golem"] = 1500000,["Shiny Nidoking"] = 1500000,["Shiny Hypno"] = 1500000,["Shiny Vaporeon"] = 1500000,["Shiny Jolteon"] = 1500000,["Shiny Flareon"] = 1500000,["Shiny Hitmontop"] = 1500000,}local gastostones = {[0] = 0,[1] = 1,[2] = 2,[3] = 3,[4] = 4,[5] = 6,[6] = 8,[7] = 10,[8] = 12,[9] = 15,[10] = 18,[11] = 21,[12] = 24,[13] = 28,[14] = 32,[15] = 36,[16] = 40,[17] = 45,[18] = 50,[19] = 55,[20] = 60,[21] = 66,[22] = 72,[23] = 78,[24] = 84,[25] = 91,[26] = 98,[27] = 105,[28] = 112,[29] = 120,[30] = 128,[31] = 136,[32] = 144,[33] = 153,[34] = 162,[35] = 171,[36] = 180,[37] = 190,[38] = 200,[39] = 210,[40] = 220,[41] = 231,[42] = 242,[43] = 253,[44] = 264,[45] = 276,[46] = 288,[47] = 300,[48] = 312,[49] = 325,[50] = 338,}local NPCPrice = {["seed"] = {price = 30},["electric box"] = {price = 150},["sandbag"] = {price = 150},["comb"] = {price = 150},["fur"] = {price = 150},["ruby"] = {price = 300},["essence of fire"] = {price = 30},["small stone"] = {price = 30},["pot of moss bug"] = {price = 150},["screw"] = {price = 30},["straw"] = {price = 100},["water gem"] = {price = 30},["remains of magikarp"] = {price = 100},["teeth"] = {price = 150},["bottle of poison"] = {price = 30},["water pendant"] = {price = 100},["feather"] = {price = 150},["pair of leaves"] = {price = 150},["apple bite"] = {price = 60},["bat wing"] = {price = 150},["pot of lava"] = {price = 150},["fire pendant"] = {price = 100},["bug venom"] = {price = 100},["bug antenna"] = {price = 150},["venom pendant"] = {price = 100},["pot of venom"] = {price = 150},["iron bracelet"] = {price = 150},["ice orb"] = {price = 150},["gosme"] = {price = 150},["darkness gem,"] = {price = 30},["bug gosme"] = {price = 80},["enchanted gem,"] = {price = 30},["horn"] = {price = 150},["venom piece"] = {price = 150},["big wing"] = {price = 500},["dragon tail"] = {price = 500},["purple tail"] = {price = 500},["majesty wing"] = {price = 500},["alligator skin"] = {price = 500},["big egg"] = {price = 500},["teel feather"] = {price = 50000},["red feather"] = {price = 50000},["yellow feather"] = {price = 50000},["registeel orb"] = {price = 50000},["white rune"] = {price = 500},["foxtail"] = {price = 500},["pot with fire"] = {price = 350},["water orb"] = {price = 350},["iron piece"] = {price = 350},["gyarados tail"] = {price = 500},["bulb"] = {price = 350},["long fang"] = {price = 400},["turtle hull"] = {price = 350},["dragon tooth"] = {price = 1000},["iron pin"] = {price = 400},["mimic clothes"] = {price = 1000},["scythe"] = {price = 1000},["buzz tail"] = {price = 1000},["bird beak"] = {price = 200},["rat tail"] = {price = 200},["longhorn"] = {price = 350},["luck medalion"] = {price = 350},["wool ball"] = {price = 400},["psyduck mug"] = {price = 350},["punch toy"] = {price = 500},["twisted spoon"] = {price = 350},["future orb"] = {price = 250},["champion belt"] = {price = 400},["slowpoke tail"] = {price = 300},["imam"] = {price = 250},["stick slash"] = {price = 300},["traces of ghost"] = {price = 350},["onix tail"] = {price = 300},["bone"] = {price = 250},["big tongue"] = {price = 500},["power orb"] = {price = 250},["bracelet"] = {price = 250},["star"] = {price = 200},["magma orb"] = {price = 250},["shell"] = {price = 200},["iron bar"] = {price = 250},["bag of poison dust"] = {price = 250},["steel wing"] = {price = 500},["green orb"] = {price = 250},["steel ore"] = {price = 400},["charizard wing"] = {price = 600},["magma box"] = {price = 400},["giant turtle hull"] = {price = 600},["red gyarados tail"] = {price = 10000},["crystal tail"] = {price = 1000},["Helix Fossil"] = {price = 150000},["Dome Fossil"] = {price = 150000},["Old Amber"] = {price = 500000},["green apple bite"] = {price = 400},["leaf pendant"] = {price = 350},["bone mask"] = {price = 400},["pikachu tail"] = {price = 300},["raichu tail"] = {price = 500},["blue vines"] = {price = 350},["stone orb"] = {price = 250},["locksmith of shell"] = {price = 200},["crab claw"] = {price = 200},["noctowl own"] = {price = 500},["togepi egg"] = {price = 400},["pinsir horn"] = {price = 350},["ice bra"] = {price = 500},["xatu wing"] = {price = 500},["snake tail"] = {price = 350},["seahorse tail"] = {price = 300},["strange sting"] = {price = 300},["tentacle"] = {price = 300},["strange rock"] = {price = 250},["skarmory wing"] = {price = 600},["scizor claw"] = {price = 600},["star gem"] = {price = 500},["tyranitar tail"] = {price = 600},["small tail"] = {price = 300},["magmar foot"] = {price = 1000},["red wing"] = {price = 500},["gligar claw"] = {price = 350},["insect foot"] = {price = 350},["strange wing"] = {price = 400},["mantine tail"] = {price = 400},["small tusk"] = {price = 350},["nidoran male ear"] = {price = 250},["skin tail"] = {price = 200},["sting hand"] = {price = 200},["aipom hand"] = {price = 250},["ledyba wing"] = {price = 200},["strange antenna"] = {price = 250},["squirry tail"] = {price = 250},["point of light"] = {price = 300},["kangaskhan ear"] = {price = 500},["strange flower"] = {price = 350},["great petal"] = {price = 350},["great flower"] = {price = 500},["fire tail"] = {price = 400},["strange horn"] = {price = 350},["piece of coral"] = {price = 350},["shuckle armor"] = {price = 350},["plant tail"] = {price = 250},["sea tail"] = {price = 250},["helicopter leaves"] = {price = 200},["strange spike"] = {price = 200},["bag of pollem"] = {price = 200},["Heart Stone"] = {price = 5000},["Leaf Stone"] = {price = 5000},["Water Stone"] = {price = 5000},["Fire Stone"] = {price = 5000},["Metal Stone"] = {price = 10000},["Crystal Stone"] = {price = 10000},["Ancient Stone"] = {price = 10000},["Venom Stone"] = {price = 5000},["Thunder Stone"] = {price = 5000},["Rock Stone"] = {price = 5000},["Punch Stone"] = {price = 5000},["Coccon Stone"] = {price = 5000},["Darkness Stone"] = {price = 5000},["Earth Stone"] = {price = 5000},["Enigma Stone"] = {price = 5000},["Ice Stone"] = {price = 5000},["Boost Stone"] = {price = 20000},["Mega Stone"] = {price = 50000},}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 shinys = {["Shiny Abra"] = "Dark Abra",["Shiny Onix"] = "Crystal Onix",["Shiny Gyarados"] = "Red Gyarados",["Shiny Charizard"] = "Elder Charizard",["Shiny Venusaur"] = "Ancient Venusaur",["Shiny Blastoise"] = "Ancient Blastoise",["Shiny Farfetch'd"] = "Elite Farfetch'd",["Shiny Hitmonlee"] = "Elite Hitmonlee",["Shiny Himonchan"] = "Elite Hitmonchan",["Shiny Snorlax"] = "Big Snorlax",}function onLook(cid, thing, position, lookDistance) local str = {}local isTrade = falseif lookDistance == 0 then isTrade = true end -- trade lookDistanc end if not isCreature(thing.uid) then local iname = getItemInfo(thing.itemid) if isPokeball(thing.itemid) and getItemAttribute(thing.uid, "poke") then local isDittoBall = isInArray({"Ditto", "Shiny Ditto"}, getItemAttribute(thing.uid, "poke")) and true or false unLock(thing.uid) local lock = getItemAttribute(thing.uid, "lock") local pokename = isDittoBall and getItemAttribute(thing.uid, "copyName") or getItemAttribute(thing.uid, "poke") local heldx = getItemAttribute(thing.uid, "xHeldItem") local heldy = getItemAttribute(thing.uid, "yHeldItem") local megaID = getItemAttribute(thing.uid, "megaID") local pokeBallName = getItemAttribute(thing.uid, "ball") if not pokeBallName then doItemSetAttribute(thing.uid, "ball", "poke") pokeBallName = "Poke" end if isGod(cid) then table.insert(str, "ItemID[".. thing.itemid ..].\n") end table.insert(str, "You see ".. doCorrectString(pokeBallName) .."ball.") if getItemAttribute(thing.uid, "unique") then table.insert(str, " It's an unique item.") end local article = getArticle(pokename) local freeSpaces = 0 local smeargle = false if pokename:find("Smeargle") then pokename = pokename .. " " .. getItemAttribute(thing.uid, "SmeargleID") freeSpaces = getFreeSpacesSmeargleBall(thing.uid, getItemAttribute(thing.uid, "SmeargleID")) smeargle = true end table.insert(str, "\nIt contains "..article.." "..pokename.. (isDittoBall and " (Ditto)" or "") .. (freeSpaces > 0 and ".\n [" .. freeSpaces .. ] Skatchs vazios" or (smeargle and ".\n Skatchs completos") or "") .. ".\n") if lock and lock > 0 then table.insert(str, "It will unlock in ".. os.date("%d/%m/%y %X", lock)..".\n") end local boosts = getItemAttribute(thing.uid, "boost") or 0 local precocertos = 0 if boosts > 50 then precocertos = ((gastostones[50] * 5) * 400) + ((boosts - 50) * 100000) else precocertos = ((gastostones[boosts] * 5) * 400) end if getItemAttribute (thing.uid, "ehditto") then pokename = "Ditto" end local pokeCost = pokePrice[pokename] or math.floor(pokes[pokename].level * 150) if pokename == "Ditto" then table.insert (str, " Not sellable.") elseif pokes[pokename] then if boosts == 0 then table.insert (str, " Price: $"..pokeCost) else table.insert (str, " Price: $"..pokeCost.. " + $"..precocertos.. " (BOOST)") end end 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 local heldName, heldTier = "", "" local heldYName, heldYTier = "", "" if heldx or heldy then if heldx then heldName, heldTier = string.explode(heldx, "|")[1], string.explode(heldx, "|")[2] end if heldy then heldYName, heldYTier = string.explode(heldy, "|")[1], string.explode(heldy, "|")[2] end local heldString = heldName .. " (tier: " .. heldTier .. ")" local heldYString = heldYName .. (not isInArray({"Mega", "GHOST"}, heldYTier) and " (tier: " .. heldYTier .. ")" or "") if heldx and heldy then table.insert(str, "Holding: " .. heldString .. " and " .. heldYString .. ". ") elseif heldx then table.insert(str, "Holding: "..heldString..". ") elseif heldy then table.insert(str, "Holding: "..heldYString ..". ") end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif getItemAttribute(thing.uid, "pokeName") and string.find(getItemAttribute(thing.uid, "pokeName"), "fainted") then local lootName = getItemAttribute(thing.uid, "pokeName") if isGod(cid) then table.insert(str, "ItemID[".. thing.itemid ..].\n") end table.insert(str, "You see a "..string.lower(lootName)..". ") if isContainer(thing.uid) then table.insert(str, "(Vol: "..getContainerCap(thing.uid)..")") end if getItemAttribute(thing.uid, "corpseowner") then if getItemAttribute(thing.uid, "corpseowner") == "asçdlkasçldkaçslkdçaskdçaslkdçlsakdçkaslç" then table.insert(str, "\nSuicidou-se.") else table.insert(str, "\nEle foi morto por: ("..getItemAttribute(thing.uid, "corpseowner")..")") end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif isContainer(thing.uid) then --containers if isGod(cid) then table.insert(str, "ItemID[".. thing.itemid ..].\n") end if getItemAttribute(thing.uid, "iname") then table.insert(str, "You see "..iname.article.." "..iname.name..". (Vol:"..getContainerCap(thing.uid)..").") table.insert(str, getItemAttribute(thing.uid, "iname")..".") 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 if isGod(cid) then table.insert(str, "ItemID[".. thing.itemid ..].\n") end 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 falseelseif NPCPrice[iname.name] then local qnt = 0 if thing.type == 0 then qnt = 1 else qnt = thing.type end local p = getThingPos(thing.uid) local calculo = NPCPrice[iname.name].price * qnt 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, "\n"..iname.description.." Price: $"..calculo..".") 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 endendlocal 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 falseendif 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 falseendif 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 falseendif isPlayer(thing.uid) then --player doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, getPlayerDesc(cid, thing.uid, false)) return falseendif getCreatureName(thing.uid) == "Evolution" then return false endif not isSummon(thing.uid) then --monstros local pname = getCreatureName(thing.uid) if pname:find("Smeargle") then pname = doCorrectString(getPlayerStorageValue(thing.uid, storages.SmeargleID)) end table.insert(str, "You see a wild "..string.lower(pname)..".\n") if isWildTrainerNPC(thing.uid) then table.insert(str, "Nivel (".. getNPCNivel(thing.uid) ..").\n") end if isGod(cid) then table.insert(str, "Hit Points: "..getCreatureHealth(thing.uid).." / "..getCreatureMaxHealth(thing.uid)..".\n") end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return falseelseif isSummon(thing.uid) and not isPlayer(thing.uid) then --summons local boostlevel = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "boost") or 0 local isDittoBall = isInArray({"Ditto", "Shiny Ditto"}, getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "poke")) and true or false if getCreatureMaster(thing.uid) == cid then local myball = getPlayerSlotItem(cid, 8).uid table.insert(str, "You see your "..doCorrectString(getCreatureName(thing.uid)).. (isDittoBall and " (Ditto)" or "") ..".") if boostlevel > 0 then table.insert(str, "\nBoost level: +"..boostlevel..".") end table.insert(str, "\n"..getPokemonHappinessDescription(thing.uid)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) else local health = "\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid).."." doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..doCorrectString(getCreatureName(thing.uid)).. (isDittoBall and " (Ditto)" or "") ..".\nIt belongs to "..getCreatureName(getCreatureMaster(thing.uid)).."." .. (isGod(cid) and health or "") ) end return falseendreturn trueend 1º: eu tinha pedido pra ti excluir algumas linhas que tu não excluiu 2º: a linha que você citou (local precocertos = ..) é a 534, não a 539 ._. 3º: você excluiu um "s" em "boosts", causando o bug. o código acima está corrigido. Link para o comentário Compartilhar em outros sites More sharing options...
Josegvb 87 Postado Agosto 25, 2016 Share Postado Agosto 25, 2016 (editado) 3 minutos atrás, Bodak Reborn disse: Ocultar conteúdo local pokePrice = {["Charmander"] = 3000,["Charmeleon"] = 8000, ["Charizard"] = 18000,["Bulbasaur"] = 3000,["Ivysaur"] = 8000,["Venusaur"] = 18000,["Squirtle"] = 3000,["Wartortle"] = 8000,["Blastoise"] = 18000,["Caterpie"] = 50,["Metapod"] = 250,["Butterfree"] = 2000,["Weedle"] = 50,["Kakuna"] = 250,["Beedrill"] = 2000,["Pidgey"] = 60,["Pidgeotto"] = 1500,["Pidgeot"] = 11500,["Rattata"] = 5,["Raticate"] = 2000,["Spearow"] = 100,["Fearow"] = 5100,["Ekans"] = 300,["Arbok"] = 3000,["Pikachu"] = 8000,["Raichu"] = 18000,["Sandshrew"] = 1000,["Sandslash"] = 11000,["Nidoran Female"] = 125,["Nidorina"] = 2250,["Nidoqueen"] = 12250,["Nidoran Male"] = 125,["Nidorino"] = 2250,["Nidoqueen"] = 12250,["Clefairy"] = 8000,["Clefable"] = 18000,["Vulpix"] = 1000,["Ninetales"] = 11000,["Jigglypuff"] = 8000,["Wigglytuff"] = 18000,["Zubat"] = 120,["Golbat"] = 3000,["Oddish"] = 80,["Gloom"] = 2250,["Vileplume"] = 12000,["Paras"] = 60,["Parasect"] = 7250, ["Venonat"] = 1500,["Venomoth"] = 7250,["Diglett"] = 200,["Dugtrio"] = 3000,["Meowth"] = 300,["Persian"] = 3000,["Psyduck"] = 1500,["Golduck"] = 11500,["Mankey"] = 300,["Primeape"] = 7250,["Growlithe"] = 3500,["Arcanine"] = 60000,["Poliwag"] = 80,["Poliwhirl"] = 3000,["Poliwrath"] = 13000,["Abra"] = 800,["Kadabra"] = 5800,["Alakazam"] = 16000,["Machop"] = 2000,["Machoke"] = 7000,["Machamp"] = 17000,["Bellsprout"] = 80,["Wepinbell"] = 2250,["Victreebel"] = 12000,["Tentacool"] = 300,["Tentacruel"] = 10000,["Geodude"] = 300,["Graveler"] = 5000,["Golem"] = 15000,["Ponyta"] = 1500,["Rapidash"] = 6500,["Slowpoke"] = 400,["Slowbro"] = 8000,["Magnemite"] = 400,["Magneton"] = 5400,["Farfetch'd"] = 7000,["Doduo"] = 600,["Dodrio"] = 5600,["Seel"] = 2000,["Dewgong"] = 12000,["Grimer"] = 300,["Muk"] = 11000,["Shellder"] = 200,["Cloyster"] = 10200,["Gastly"] = 3000,["Haunter"] = 8000,["Gengar"] = 18000,["Onix"] = 6000,["Drowzee"] = 1000,["Hypno"] = 6000,["Krabby"] = 200,["Kingler"] = 5200,["Voltorb"] = 250,["Electrode"] = 3000,["Exeggute"] = 200,["Exeggutor"] = 10000,["Cubone"] = 1000,["Marowak"] = 11000,["Hitmonlee"] = 20000,["Hitmonchan"] = 20000,["Lickitung"] = 60000,["Koffing"] = 300,["Weezing"] = 3000,["Rhyhorn"] = 3000,["Rhydon"] = 13000,["Chansey"] = 40000,["Tangela"] = 10000,["Kangaskhan"] = 120000,["Horsea"] = 200,["Seadra"] = 5500,["Goldeen"] = 200,["Seaking"] = 3000,["Staryu"] = 400,["Starmie"] = 3000,["Mr. Mime"] = 120000,["Scyther"] = 120000,["Jynx"] = 120000,["Electabuzz"] = 120000,["Magmar"] = 120000,["Pinsir"] = 9000,["Tauros"] = 5000,["Magikarp"] = 5,["Gyarados"] = 5000,["Lapras"] = 120000,["Ditto"] = 70000,["Eevee"] = 45000,["Vaporeon"] = 50000,["Jolteon"] = 50000,["Flareon"] = 50000,["Porygon"] = 60000,["Omanyte"] = 20000,["Omastar"] = 75000,["Kabuto"] = 2000,["Kabutops"] = 75000,["Aerodactyl"] = 2000000,["Snorlax"] = 200000,["Dratini"] = 15000,["Dragonair"] = 65000,["Dragonite"] = 125000, -- Segunda Geração["Chikorita"] = 3000,["Bayleef"] = 8000,["Meganium"] = 18000,["Cydaquil"] = 3000,["Quilava"] = 8000,["Typhlosion"] = 18000,["Totodile"] = 3000,["Croconaw"] = 8000,["Feraligatr"] = 18000,["Sentret"] = 250,["Furret"] = 3000,["Hoothoot"] = 1500,["Noctowl"] = 11500,["Ledyba"] = 250,["Ledian"] = 3000,["Spinarak"] = 250,["Ariados"] = 3000,["Crobat"] = 58000,["Chinchou"] = 1000,["Lanturn"] = 6000,["Pichu"] = 3000,["Cleffa"] = 3000,["Igglybuff"] = 3000,["Togepi"] = 15000,["Togetic"] = 25000,["Natu"] = 3000,["Xatu"] = 130000,["Mareep"] = 3000,["Flaaffy"] = 8000,["Ampharos"] = 18000,["Bellossom"] = 12000,["Marill"] = 3000,["Azumarill"] = 13000,["Sudowoodo"] = 120000,["Politoed"] = 8000,["Hoppip"] = 80,["Skiploom"] = 2250,["Jumpluff"] = 12000,["Aipom"] = 8000,["Sunkern"] = 50,["Sunflora"] = 5000,["Yanma"] = 9000,["Wooper"] = 2000,["Quagsire"] = 12000,["Espeon"] = 50000,["Umbreon"] = 50000,["Murkrow"] = 10000,["Slowking"] = 11000,["Misdreavus"] = 100000,["Wobbuffet"] = 200000,["Girafarig"] = 120000,["Pineco"] = 300,["Forretress"] = 10000,["Dunsparce"] = 3000,["Gligar"] = 8000,["Steelix"] = 110000,["Snubbull"] = 22500,["Granbull"] = 12500,["Qwilfish"] = 10000,["Scizor"] = 220000,["Shuckle"] = 3500,["Heracross"] = 120000,["Sneasel"] = 10000,["Teddiursa"] = 80000,["Ursaring"] = 150000,["Slugma"] = 1000,["Magcargo"] = 11000,["Swinub"] = 1000,["Piloswine"] = 11000,["Corsola"] = 9000,["Remoraid"] = 200,["Octillery"] = 10000,["Delibird"] = 10000,["Mantine"] = 120000,["Skarmory"] = 120000,["Houndour"] = 35000,["Houndoom"] = 13500,["kingdra"] = 70000,["Phanpy"] = 3000,["Donphan"] = 13000,["Porygon2"] = 120000,["Stantler"] = 10000,["Tyrogue"] = 150000,["Hitmontop"] = 50000,["Smoochum"] = 45000,["Elikid"] = 45000,["Magby"] = 45000,["Miltank"] = 120000,["Blissey"] = 140000,["Larvitar"] = 15000,["Pupitar"] = 65000,["Electivire"] = 125000,["Magmortar"] = 125000,["Tyranitar"] = 125000,-- shiny --["Shiny Fearow"] = 1500000,["Shiny Vileplume"] = 1500000,["Shiny Golem"] = 1500000,["Shiny Nidoking"] = 1500000,["Shiny Hypno"] = 1500000,["Shiny Vaporeon"] = 1500000,["Shiny Jolteon"] = 1500000,["Shiny Flareon"] = 1500000,["Shiny Hitmontop"] = 1500000,}local gastostones = {[0] = 0,[1] = 1,[2] = 2,[3] = 3,[4] = 4,[5] = 6,[6] = 8,[7] = 10,[8] = 12,[9] = 15,[10] = 18,[11] = 21,[12] = 24,[13] = 28,[14] = 32,[15] = 36,[16] = 40,[17] = 45,[18] = 50,[19] = 55,[20] = 60,[21] = 66,[22] = 72,[23] = 78,[24] = 84,[25] = 91,[26] = 98,[27] = 105,[28] = 112,[29] = 120,[30] = 128,[31] = 136,[32] = 144,[33] = 153,[34] = 162,[35] = 171,[36] = 180,[37] = 190,[38] = 200,[39] = 210,[40] = 220,[41] = 231,[42] = 242,[43] = 253,[44] = 264,[45] = 276,[46] = 288,[47] = 300,[48] = 312,[49] = 325,[50] = 338,}local NPCPrice = {["seed"] = {price = 30},["electric box"] = {price = 150},["sandbag"] = {price = 150},["comb"] = {price = 150},["fur"] = {price = 150},["ruby"] = {price = 300},["essence of fire"] = {price = 30},["small stone"] = {price = 30},["pot of moss bug"] = {price = 150},["screw"] = {price = 30},["straw"] = {price = 100},["water gem"] = {price = 30},["remains of magikarp"] = {price = 100},["teeth"] = {price = 150},["bottle of poison"] = {price = 30},["water pendant"] = {price = 100},["feather"] = {price = 150},["pair of leaves"] = {price = 150},["apple bite"] = {price = 60},["bat wing"] = {price = 150},["pot of lava"] = {price = 150},["fire pendant"] = {price = 100},["bug venom"] = {price = 100},["bug antenna"] = {price = 150},["venom pendant"] = {price = 100},["pot of venom"] = {price = 150},["iron bracelet"] = {price = 150},["ice orb"] = {price = 150},["gosme"] = {price = 150},["darkness gem,"] = {price = 30},["bug gosme"] = {price = 80},["enchanted gem,"] = {price = 30},["horn"] = {price = 150},["venom piece"] = {price = 150},["big wing"] = {price = 500},["dragon tail"] = {price = 500},["purple tail"] = {price = 500},["majesty wing"] = {price = 500},["alligator skin"] = {price = 500},["big egg"] = {price = 500},["teel feather"] = {price = 50000},["red feather"] = {price = 50000},["yellow feather"] = {price = 50000},["registeel orb"] = {price = 50000},["white rune"] = {price = 500},["foxtail"] = {price = 500},["pot with fire"] = {price = 350},["water orb"] = {price = 350},["iron piece"] = {price = 350},["gyarados tail"] = {price = 500},["bulb"] = {price = 350},["long fang"] = {price = 400},["turtle hull"] = {price = 350},["dragon tooth"] = {price = 1000},["iron pin"] = {price = 400},["mimic clothes"] = {price = 1000},["scythe"] = {price = 1000},["buzz tail"] = {price = 1000},["bird beak"] = {price = 200},["rat tail"] = {price = 200},["longhorn"] = {price = 350},["luck medalion"] = {price = 350},["wool ball"] = {price = 400},["psyduck mug"] = {price = 350},["punch toy"] = {price = 500},["twisted spoon"] = {price = 350},["future orb"] = {price = 250},["champion belt"] = {price = 400},["slowpoke tail"] = {price = 300},["imam"] = {price = 250},["stick slash"] = {price = 300},["traces of ghost"] = {price = 350},["onix tail"] = {price = 300},["bone"] = {price = 250},["big tongue"] = {price = 500},["power orb"] = {price = 250},["bracelet"] = {price = 250},["star"] = {price = 200},["magma orb"] = {price = 250},["shell"] = {price = 200},["iron bar"] = {price = 250},["bag of poison dust"] = {price = 250},["steel wing"] = {price = 500},["green orb"] = {price = 250},["steel ore"] = {price = 400},["charizard wing"] = {price = 600},["magma box"] = {price = 400},["giant turtle hull"] = {price = 600},["red gyarados tail"] = {price = 10000},["crystal tail"] = {price = 1000},["Helix Fossil"] = {price = 150000},["Dome Fossil"] = {price = 150000},["Old Amber"] = {price = 500000},["green apple bite"] = {price = 400},["leaf pendant"] = {price = 350},["bone mask"] = {price = 400},["pikachu tail"] = {price = 300},["raichu tail"] = {price = 500},["blue vines"] = {price = 350},["stone orb"] = {price = 250},["locksmith of shell"] = {price = 200},["crab claw"] = {price = 200},["noctowl own"] = {price = 500},["togepi egg"] = {price = 400},["pinsir horn"] = {price = 350},["ice bra"] = {price = 500},["xatu wing"] = {price = 500},["snake tail"] = {price = 350},["seahorse tail"] = {price = 300},["strange sting"] = {price = 300},["tentacle"] = {price = 300},["strange rock"] = {price = 250},["skarmory wing"] = {price = 600},["scizor claw"] = {price = 600},["star gem"] = {price = 500},["tyranitar tail"] = {price = 600},["small tail"] = {price = 300},["magmar foot"] = {price = 1000},["red wing"] = {price = 500},["gligar claw"] = {price = 350},["insect foot"] = {price = 350},["strange wing"] = {price = 400},["mantine tail"] = {price = 400},["small tusk"] = {price = 350},["nidoran male ear"] = {price = 250},["skin tail"] = {price = 200},["sting hand"] = {price = 200},["aipom hand"] = {price = 250},["ledyba wing"] = {price = 200},["strange antenna"] = {price = 250},["squirry tail"] = {price = 250},["point of light"] = {price = 300},["kangaskhan ear"] = {price = 500},["strange flower"] = {price = 350},["great petal"] = {price = 350},["great flower"] = {price = 500},["fire tail"] = {price = 400},["strange horn"] = {price = 350},["piece of coral"] = {price = 350},["shuckle armor"] = {price = 350},["plant tail"] = {price = 250},["sea tail"] = {price = 250},["helicopter leaves"] = {price = 200},["strange spike"] = {price = 200},["bag of pollem"] = {price = 200},["Heart Stone"] = {price = 5000},["Leaf Stone"] = {price = 5000},["Water Stone"] = {price = 5000},["Fire Stone"] = {price = 5000},["Metal Stone"] = {price = 10000},["Crystal Stone"] = {price = 10000},["Ancient Stone"] = {price = 10000},["Venom Stone"] = {price = 5000},["Thunder Stone"] = {price = 5000},["Rock Stone"] = {price = 5000},["Punch Stone"] = {price = 5000},["Coccon Stone"] = {price = 5000},["Darkness Stone"] = {price = 5000},["Earth Stone"] = {price = 5000},["Enigma Stone"] = {price = 5000},["Ice Stone"] = {price = 5000},["Boost Stone"] = {price = 20000},["Mega Stone"] = {price = 50000},}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 shinys = {["Shiny Abra"] = "Dark Abra",["Shiny Onix"] = "Crystal Onix",["Shiny Gyarados"] = "Red Gyarados",["Shiny Charizard"] = "Elder Charizard",["Shiny Venusaur"] = "Ancient Venusaur",["Shiny Blastoise"] = "Ancient Blastoise",["Shiny Farfetch'd"] = "Elite Farfetch'd",["Shiny Hitmonlee"] = "Elite Hitmonlee",["Shiny Himonchan"] = "Elite Hitmonchan",["Shiny Snorlax"] = "Big Snorlax",}function onLook(cid, thing, position, lookDistance) local str = {}local isTrade = falseif lookDistance == 0 then isTrade = true end -- trade lookDistanc end if not isCreature(thing.uid) then local iname = getItemInfo(thing.itemid) if isPokeball(thing.itemid) and getItemAttribute(thing.uid, "poke") then local isDittoBall = isInArray({"Ditto", "Shiny Ditto"}, getItemAttribute(thing.uid, "poke")) and true or false unLock(thing.uid) local lock = getItemAttribute(thing.uid, "lock") local pokename = isDittoBall and getItemAttribute(thing.uid, "copyName") or getItemAttribute(thing.uid, "poke") local heldx = getItemAttribute(thing.uid, "xHeldItem") local heldy = getItemAttribute(thing.uid, "yHeldItem") local megaID = getItemAttribute(thing.uid, "megaID") local pokeBallName = getItemAttribute(thing.uid, "ball") if not pokeBallName then doItemSetAttribute(thing.uid, "ball", "poke") pokeBallName = "Poke" end if isGod(cid) then table.insert(str, "ItemID[".. thing.itemid ..].\n") end table.insert(str, "You see ".. doCorrectString(pokeBallName) .."ball.") if getItemAttribute(thing.uid, "unique") then table.insert(str, " It's an unique item.") end local article = getArticle(pokename) local freeSpaces = 0 local smeargle = false if pokename:find("Smeargle") then pokename = pokename .. " " .. getItemAttribute(thing.uid, "SmeargleID") freeSpaces = getFreeSpacesSmeargleBall(thing.uid, getItemAttribute(thing.uid, "SmeargleID")) smeargle = true end table.insert(str, "\nIt contains "..article.." "..pokename.. (isDittoBall and " (Ditto)" or "") .. (freeSpaces > 0 and ".\n [" .. freeSpaces .. ] Skatchs vazios" or (smeargle and ".\n Skatchs completos") or "") .. ".\n") if lock and lock > 0 then table.insert(str, "It will unlock in ".. os.date("%d/%m/%y %X", lock)..".\n") end local boosts = getItemAttribute(thing.uid, "boost") or 0 local precocertos = 0 if boosts > 50 then precocertos = ((gastostones[50] * 5) * 400) + ((boosts - 50) * 100000) else precocertos = ((gastostones[boosts] * 5) * 400) end if getItemAttribute (thing.uid, "ehditto") then pokename = "Ditto" end local pokeCost = pokePrice[pokename] or math.floor(pokes[pokename].level * 150) if pokename == "Ditto" then table.insert (str, " Not sellable.") elseif pokes[pokename] then if boosts == 0 then table.insert (str, " Price: $"..pokeCost) else table.insert (str, " Price: $"..pokeCost.. " + $"..precocertos.. " (BOOST)") end end 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 local heldName, heldTier = "", "" local heldYName, heldYTier = "", "" if heldx or heldy then if heldx then heldName, heldTier = string.explode(heldx, "|")[1], string.explode(heldx, "|")[2] end if heldy then heldYName, heldYTier = string.explode(heldy, "|")[1], string.explode(heldy, "|")[2] end local heldString = heldName .. " (tier: " .. heldTier .. ")" local heldYString = heldYName .. (not isInArray({"Mega", "GHOST"}, heldYTier) and " (tier: " .. heldYTier .. ")" or "") if heldx and heldy then table.insert(str, "Holding: " .. heldString .. " and " .. heldYString .. ". ") elseif heldx then table.insert(str, "Holding: "..heldString..". ") elseif heldy then table.insert(str, "Holding: "..heldYString ..". ") end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif getItemAttribute(thing.uid, "pokeName") and string.find(getItemAttribute(thing.uid, "pokeName"), "fainted") then local lootName = getItemAttribute(thing.uid, "pokeName") if isGod(cid) then table.insert(str, "ItemID[".. thing.itemid ..].\n") end table.insert(str, "You see a "..string.lower(lootName)..". ") if isContainer(thing.uid) then table.insert(str, "(Vol: "..getContainerCap(thing.uid)..")") end if getItemAttribute(thing.uid, "corpseowner") then if getItemAttribute(thing.uid, "corpseowner") == "asçdlkasçldkaçslkdçaskdçaslkdçlsakdçkaslç" then table.insert(str, "\nSuicidou-se.") else table.insert(str, "\nEle foi morto por: ("..getItemAttribute(thing.uid, "corpseowner")..")") end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif isContainer(thing.uid) then --containers if isGod(cid) then table.insert(str, "ItemID[".. thing.itemid ..].\n") end if getItemAttribute(thing.uid, "iname") then table.insert(str, "You see "..iname.article.." "..iname.name..". (Vol:"..getContainerCap(thing.uid)..").") table.insert(str, getItemAttribute(thing.uid, "iname")..".") 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 if isGod(cid) then table.insert(str, "ItemID[".. thing.itemid ..].\n") end 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 falseelseif NPCPrice[iname.name] then local qnt = 0 if thing.type == 0 then qnt = 1 else qnt = thing.type end local p = getThingPos(thing.uid) local calculo = NPCPrice[iname.name].price * qnt 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, "\n"..iname.description.." Price: $"..calculo..".") 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 endendlocal 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 falseendif 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 falseendif 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 falseendif isPlayer(thing.uid) then --player doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, getPlayerDesc(cid, thing.uid, false)) return falseendif getCreatureName(thing.uid) == "Evolution" then return false endif not isSummon(thing.uid) then --monstros local pname = getCreatureName(thing.uid) if pname:find("Smeargle") then pname = doCorrectString(getPlayerStorageValue(thing.uid, storages.SmeargleID)) end table.insert(str, "You see a wild "..string.lower(pname)..".\n") if isWildTrainerNPC(thing.uid) then table.insert(str, "Nivel (".. getNPCNivel(thing.uid) ..").\n") end if isGod(cid) then table.insert(str, "Hit Points: "..getCreatureHealth(thing.uid).." / "..getCreatureMaxHealth(thing.uid)..".\n") end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return falseelseif isSummon(thing.uid) and not isPlayer(thing.uid) then --summons local boostlevel = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "boost") or 0 local isDittoBall = isInArray({"Ditto", "Shiny Ditto"}, getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "poke")) and true or false if getCreatureMaster(thing.uid) == cid then local myball = getPlayerSlotItem(cid, 8).uid table.insert(str, "You see your "..doCorrectString(getCreatureName(thing.uid)).. (isDittoBall and " (Ditto)" or "") ..".") if boostlevel > 0 then table.insert(str, "\nBoost level: +"..boostlevel..".") end table.insert(str, "\n"..getPokemonHappinessDescription(thing.uid)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) else local health = "\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid).."." doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..doCorrectString(getCreatureName(thing.uid)).. (isDittoBall and " (Ditto)" or "") ..".\nIt belongs to "..getCreatureName(getCreatureMaster(thing.uid)).."." .. (isGod(cid) and health or "") ) end return falseendreturn trueend 1º: eu tinha pedido pra ti excluir algumas linhas que tu não excluiu 2º: a linha que você citou (local precocertos = ..) é a 534, não a 539 ._. 3º: você excluiu um "s" em "boosts", causando o bug. o código acima está corrigido. malz entendi errado entao ;x [25/08/2016 18:51:00] [Error - CreatureScript Interface] [25/08/2016 18:51:00] data/creaturescripts/scripts/look.lua:onLook [25/08/2016 18:51:00] Description: [25/08/2016 18:51:00] data/creaturescripts/scripts/look.lua:557: attempt to compare number with nil [25/08/2016 18:51:00] stack traceback: [25/08/2016 18:51:00] data/creaturescripts/scripts/look.lua:557: in function <data/creaturescripts/scripts/look.lua:496> com o corregido tirei o if boost > 0 then table.insert(str, "Boost level: +"..boost..".\n") end mas como eu sabia parou de aparescer os boosts dos pokemon Editado Agosto 25, 2016 por Josegvb Link para o comentário Compartilhar em outros sites More sharing options...
Bodak Reborn 28 Postado Agosto 25, 2016 Autor Share Postado Agosto 25, 2016 (editado) 17 minutos atrás, Josegvb disse: malz entendi errado entao ;x [25/08/2016 18:51:00] [Error - CreatureScript Interface] [25/08/2016 18:51:00] data/creaturescripts/scripts/look.lua:onLook [25/08/2016 18:51:00] Description: [25/08/2016 18:51:00] data/creaturescripts/scripts/look.lua:557: attempt to compare number with nil [25/08/2016 18:51:00] stack traceback: [25/08/2016 18:51:00] data/creaturescripts/scripts/look.lua:557: in function <data/creaturescripts/scripts/look.lua:496> com o corregido tirei o if boost > 0 then table.insert(str, "Boost level: +"..boost..".\n") end mas como eu sabia parou de aparescer os boosts dos pokemon a variável é boosts. boostS. Tem um "S" no final. Não vai funcionar se tu mudar o nome da variável. Seria: if boosts > 0 then table.insert(str, "Boost level: +"..boosts..".\n")end Mas ficaria incompleto. Então, apenas apague essas linhas que vai funcionar. Editado Agosto 25, 2016 por Bodak Reborn Link para o comentário Compartilhar em outros sites More sharing options...
Josegvb 87 Postado Agosto 25, 2016 Share Postado Agosto 25, 2016 Agora, Bodak Reborn disse: a variável é boosts. boostS. Tem um "S" no final. Não vai funcionar se tu mudar o nome da variável. if boosts > 0 then table.insert(str, "Boost level: +"..boosts..".\n")end juro que eu nao tinha mexido nada ali n oO kkkkkkkkkkkk funfando dahora Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados