Postado Julho 16, 2015 9 anos Faz o Seguinte usa o Script abaixo , e da look na ball no trade e Verifica no Console qual Print "Testando" esta aparecendo no Console para eu procurar aonde é que tem que adicionar o look do atributo 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 aki \/ 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", } -- tabela adicionado ao configuration só procura por price = ..-- function onLook(cid, thing, position, lookDistance) local str = {} local iname = getItemInfo(thing.itemid) if not isCreature(thing.uid) then if not iname or not iname.name then return true end if isPokeball(thing.itemid) and getItemAttribute(thing.uid, "poke") then --alterado aki local owner = getItemAttribute(thing.uid, "firstpoke") local pokename = getItemAttribute(thing.uid, "poke") if shinys[pokename] then pokename = shinys[pokename] end local ballName = iname.name if getItemAttribute(thing.uid, 'ball') then ballName = getItemAttribute(thing.uid, 'ball').. " ball" end table.insert(str, "See "..iname.article.." "..ballName..".") print("Testando1") if getItemAttribute(thing.uid, "nick") then table.insert(str, " ("..getItemAttribute(thing.uid, "nick")..")") end if getItemAttribute(thing.uid, "unique") then end table.insert(str, " "..string.lower(pokename)..".") print("Testando2") local boost = getItemAttribute(thing.uid, "boost") or 0 if boost > 0 then table.insert(str, " V.F: +"..boost) end table.insert(str, ".") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif string.find(iname.name, "fainted") or string.find(iname.name, "defeated") then local name = iname.name name = string.gsub(name, "fainted ", "") name = string.gsub(name, "defeated ", "") name = doCorrectPokemonName(name) if shinys[name] then name = shinys[name] end name = "fainted "..name:lower() table.insert(str, "You see "..iname.article.." "..name..". ") if isContainer(thing.uid) then table.insert(str, "(Peso: "..getContainerCap(thing.uid)..")") end table.insert(str, "\n") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif isContainer(thing.uid) then --containers if iname.name == "dead human" and getItemAttribute(thing.uid, "pName") then table.insert(str, "Você está vendo um corpo (Peso:"..getContainerCap(thing.uid).."). ") table.insert(str, "You recognize ".. getItemAttribute(thing.uid, "pName")..". ".. getItemAttribute(thing.uid, "article").." was killed by a ") table.insert(str, getItemAttribute(thing.uid, "attacker")..".") else table.insert(str, "You see "..iname.article.." "..iname.name..". (Peso:"..getContainerCap(thing.uid)..").") end if boost > 0 then str = str.."BOOST: +"..boost..".\n" 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 else local p = getThingPos(thing.uid) table.insert(str, "You see ") if thing.type > 1 then table.insert(str, thing.type.." "..iname.plural..".") print("Testando4") else table.insert(str, iname.article.." "..iname.name..".") print("Testando5") end if getItemAttribute(thing.uid, "unique") then table.insert(str, " It's an unique item.") end table.insert(str, "\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 true end end if not isMonster(thing.uid) then return true end if isPlayer(getCreatureMaster(thing.uid)) then nome = getCreatureName(getCreatureMaster(thing.uid)) poke = string.lower(getCreatureName(thing.uid)) else return true end if not isPlayer(thing.uid) and not isMonster(thing.uid) then --outros npcs table.insert(str, "Jogador "..getCreatureName(thing.uid)..".") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false end if getCreatureName(thing.uid) == "Evolution" then return false end if not isSummon(thing.uid) then --monstros local pokename = getCreatureName(thing.uid) if shinys[pokename] then pokename = shinys[pokename] end table.insert(str, "Você está vendo um "..string.lower(pokename).." selvagem.\n") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif isSummon(thing.uid) and not isPlayer(thing.uid) then local pokename = getCreatureName(thing.uid) if shinys[pokename] then pokename = shinys[pokename] end if isPlayer(getCreatureMaster(thing.uid)) then nome = getCreatureName(getCreatureMaster(thing.uid)) poke = string.lower(getCreatureName(thing.uid)) else return true end local boostlevel = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "boost") or 0 if getCreatureMaster(thing.uid) == cid then local myball = getPlayerSlotItem(cid, 8).uid table.insert(str, "Você está vendo um "..string.lower(pokename)..".") if boostlevel > 0 then table.insert(str, "\nV.F: +"..boostlevel..".") end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você está vendo um "..string.lower(pokename)..".\nPertence ao: "..getCreatureName(getCreatureMaster(thing.uid))..".") end return false end return true end
Postado Julho 16, 2015 9 anos Autor Diretor ok olha ai Editado Julho 16, 2015 9 anos por alexxxxxxx (veja o histórico de edições) Eu sou um entusiasta da programação apaixonado por ajudar a comunidade open source a crescer. Sempre em busca de novos desafios e oportunidades para contribuir com meu código. #OpenSource #Programação #Contribuição
Postado Julho 16, 2015 9 anos Por favor peço que edite a tag do seu tópico, não é servidor "Normal", e sim "Derivado"! _ .-'` `} _./) / } .'o \ | } '.___.'`.\ {` /`\_/ , `. } ME DA UMA NOZ! \=' .-' _`\ { `'`;/ `, } _\ @ ; } /__`;-...'--' Cluck!
Postado Julho 16, 2015 9 anos Console = Executavel , Verifica no seu Executavel a print que esta aparecendo "Testando"
Postado Julho 16, 2015 9 anos Autor Diretor Console = Executavel , Verifica no seu Executavel a print que esta aparecendo "Testando" não tem erro na minha distro outra coisa não é o look.lua pois mesmo tirando ele fica a mesma coisa no trade, deve ser programação "códigos" preciso de ajuda plixxx tente fazer um trade system pra mim. Lib function isPokeball(item) if not item then return false end if item >= 2222 and item <= 2224 then return true end if item >= 2220 and item <= 2221 then return true end if item >= 2227 and item <= 2227 then return true end if item >= 2653 and item <= 2654 then return true end if item >= 2658 and item <= 2658 then return true end if item >= 2651 and item <= 2652 then return true end if item >= 2657 and item <= 2657 then return true end return false end trade system function onTradeRequest(cid, target, item) for a, b in pairs (pokeballs) do if b.use == item.itemid then doPlayerSendCancel(cid, "You can't trade this item.") return false end end if isContainer(item.uid) then local bagItems = getItensUniquesInContainer(item.uid) if #bagItems >= 1 then doPlayerSendCancel(cid, "Has a Unique Item in this bag, you can't trade this item.") --alterado v2.6 return false end elseif getItemAttribute(item.uid, "unique") then --alterado v2.6 doPlayerSendCancel(cid, "It is a Unique Item, you can't trade this item.") return false end if getPlayerStorageValue(cid, 52480) >= 1 then --alterado v2.6.1 doPlayerSendTextMessage(cid, 20, "You can't do that while be in a duel!") return false end if isPokeball(item.itemid) then local name = getItemAttribute(item.uid, "poke") --alterado v2.8 \/ local boost = getItemAttribute(item.uid, "boost") or 0 local nick = getItemAttribute(item.uid, "nick") or "" local level = getItemAttribute(item.uid, "level") local str = "Pokemon in trade: " str = str.."•Name: "..name.." •Level: "..level.." •Boost: "..boost.." " if nick ~= "" then str = str.."•Nick: "..nick.."" end end if isContainer(item.uid) then --alterado v2.8 \/ local itens = getPokeballsInContainer(item.uid) if #itens >= 1 then for i = 1, #itens do if isPokeball(getThing(itens).itemid) then local name = getItemAttribute(itens, "poke") local boost = getItemAttribute(itens, "boost") or 0 local nick = getItemAttribute(itens, "nick") or "" local level = getItemAttribute(itens, "level") local str = "Pokemon in trade: " str = str.."•Name: "..name.." •Level: "..level.." •Boost: "..boost.." " if nick ~= "" then str = str.."•Nick: "..nick.."" end end end end end return true end local function noCap(cid, sid) if isCreature(cid) then doPlayerSendCancel(cid, "You can't carry more than six pokemons, trade cancelled.") end if isCreature(sid) then doPlayerSendCancel(sid, "You can't carry more than six pokemons, trade cancelled.") end end function onTradeAccept(cid, target, item, targetItem) local pbs = #getPokeballsInContainer(item.uid) local cancel = false local p1 = 0 local p2 = 0 local itemPokeball = isPokeball(item.itemid) and 1 or 0 local targetItemPokeball = isPokeball(targetItem.itemid) and 1 or 0 if getPlayerMana(cid) + itemPokeball > 6 then --alterado v2.6 cancel = true p1 = cid end if getPlayerMana(target) + targetItemPokeball > 6 then --alterado v2.6 cancel = true p2 = target end if pbs > 0 and getCreatureMana(target) + pbs > 6 + targetItemPokeball then cancel = true p1 = target end pbs = #getPokeballsInContainer(targetItem.uid) if pbs > 0 and getCreatureMana(cid) + pbs > 6 + itemPokeball then cancel = true p2 = cid end if cancel then addEvent(noCap, 20, p1, p2) return false end if itemPokeball == 1 and targetItemPokeball == 1 then setPlayerStorageValue(cid, 8900, 1) setPlayerStorageValue(target, 8900, 1) end return true end POKÉMON SEM LEVEL esse trade system tá com level Editado Julho 16, 2015 9 anos por alexxxxxxx (veja o histórico de edições) Eu sou um entusiasta da programação apaixonado por ajudar a comunidade open source a crescer. Sempre em busca de novos desafios e oportunidades para contribuir com meu código. #OpenSource #Programação #Contribuição
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.