Postado Julho 16, 2015 9 anos Diretor alguém pode me ajudar a por os atribute que pareça no trade ? no caso o look normal tá de boa 08:40 See a poke ball. this is blastoise's pokeball. hp = [5900/5900]. V.F: +550. quando um player da trade no outro, ai se der look não aparece o atributo. 08:41 You see a poke ball. It weighs 0.99 oz. Contains a Blastoise. alguém pode ajudar ? 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 Posta o Look.lua e o trade.lua para eu pegar as informaçoes adicionais do Atributo e colocar no Look.lua
Postado Julho 16, 2015 9 anos Autor Diretor look.lua Mostrar conteúdo oculto local NPCBattle = { ["Brock"] = {artig = "He is", cidbat = "Pewter"}, ["Misty"] = {artig = "She is", cidbat = "Cerulean"}, ["Blaine"] = {artig = "He is", cidbat = "Cinnabar"}, ["Sabrina"] = {artig = "She is", cidbat = "Saffron"}, --alterado 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..".") 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)..".") 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..".") else table.insert(str, iname.article.." "..iname.name..".") 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 [trade sytem] Mostrar conteúdo oculto 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 str = "Pokemon in trade: " str = str.."•Name: "..name.." •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 str = "Pokemon in trade: " str = str.."•Name: "..name.." •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 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 Testa ae: Mostrar conteúdo oculto local NPCBattle = { ["Brock"] = {artig = "He is", cidbat = "Pewter"}, ["Misty"] = {artig = "She is", cidbat = "Cerulean"}, ["Blaine"] = {artig = "He is", cidbat = "Cinnabar"}, ["Sabrina"] = {artig = "She is", cidbat = "Saffron"}, --alterado 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..".") 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)..".") local boost = getItemAttribute(thing.uid, "boost") or 0 if boost > 0 then table.insert(str, " V.F: +"..boost) end table.insert(str, " V.F: +"..boost) 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..".") else table.insert(str, iname.article.." "..iname.name..".") 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 11:10 You see a poke ball. It weighs 0.99 oz. Contains a Blastoise. saca aquela janelinha do trade ? então quando tá ali não tem atribute tipo assim 11:11 See a poke ball. this is blastoise's pokeball. hp = [5900/5900]. V.F: +550 V.F: +550 vc arrumou o look depois de usar a ball poderia fazer um trade system com essas info ? 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.