wreymar 30 Postado Novembro 24, 2013 Share Postado Novembro 24, 2013 Pessoal Tou aqui de Novo com Mas Duvida Queria fazer uma box apara meu server de Pokemon BASE PDA queria que alguem aew Mim ajudasse mim dizendo ou fazendor tutorial para mim adiconar um Box no meu Server de Pokemon Link para o comentário https://xtibia.com/forum/topic/224446-encerrado-como-fazer-uma-box/ Compartilhar em outros sites More sharing options...
BlackZik 7 Postado Novembro 24, 2013 Share Postado Novembro 24, 2013 mano seria melhor vc copia o script da que tem no teu server é so modificar as coisas que vc quer parceiro Link para o comentário https://xtibia.com/forum/topic/224446-encerrado-como-fazer-uma-box/#findComment-1585513 Compartilhar em outros sites More sharing options...
wreymar 30 Postado Novembro 25, 2013 Autor Share Postado Novembro 25, 2013 Não ajudou Link para o comentário https://xtibia.com/forum/topic/224446-encerrado-como-fazer-uma-box/#findComment-1585524 Compartilhar em outros sites More sharing options...
EddyHavaiano 13 Postado Novembro 25, 2013 Share Postado Novembro 25, 2013 Passa a seu arquivo box.lua do seu servidor para mim ver e um ID para que seja uma box que vejo oque eu posso fazer =) Link para o comentário https://xtibia.com/forum/topic/224446-encerrado-como-fazer-uma-box/#findComment-1585540 Compartilhar em outros sites More sharing options...
GuhPk 111 Postado Novembro 25, 2013 Share Postado Novembro 25, 2013 (editado) Em data/actions/scripts crie um arquivo chamado boxnova.lua e coloque isto dentro: local a = { [11638] = {level = {5, 10}, balltype = "normal", ballid = 11826, pokemons = {"Slowpoke", "Magnemite", "Doduo", "Seel", "Grimer", "Gastly", "Drowzee", "Voltorb", "Cubone", "Koffing", "Goldeen", "Vulpix", "Tentacool", "Bulbasaur", "Charmander", "Squirtle", "Butterfree", "Beedrill", "Metapod", "Kakuna", "Raticate", "Spearow", "Ekans", "Abra", "Mankey", "Psyduck", "Pikachu", "Sandshrew", "Nidoran Female", "Nidoran Male", "Zubat", "Diglett", "Venonat", "Meowth", "Poliwag", "Growlithe", "Machop", "Ponyta", "Geodude"}}, } local extrastrength = 1.1 function onUse(cid, item, frompos, item2, topos) local b = a[item.itemid] if not b then return true end local pokemon = b.pokemons[math.random(#b.pokemons)] local pokeinfo = getPokemonStatus(pokemon) if not pokeinfo then return true end local btype = b.balltype if not pokeballs[btype] then return true end local gender = getRandomGenderByName(pokemon) local level = math.random(b.level[1], b.level[2]) local offense = pokeinfo.off * level * extrastrength local defense = pokeinfo.def * level * extrastrength local agility = pokeinfo.agi * level * extrastrength local spatk = pokeinfo.spatk * level * extrastrength local vit = pokeinfo.vit * level * extrastrength local happy = 180 local leveltable = getPokemonExperienceTable(pokemon) local ball = 0 local sendToDepot = false --alterado v2.6 if getCreatureMana(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then sendToDepot = true ball = doCreateItemEx(b.ballid) --alterado v1.5 else ball = item.uid end doItemSetAttribute(ball, "poke", pokemon) doItemSetAttribute(ball, "hp", 1) doItemSetAttribute(ball, "level", level) doItemSetAttribute(ball, "exp", leveltable[level]) doItemSetAttribute(ball, "nextlevelexp", leveltable[level+1] - leveltable[level]) doItemSetAttribute(ball, "offense", offense) doItemSetAttribute(ball, "defense", defense) doItemSetAttribute(ball, "speed", agility) doItemSetAttribute(ball, "vitality", vit) doItemSetAttribute(ball, "specialattack", spatk) doItemSetAttribute(ball, "happy", happy) doItemSetAttribute(ball, "gender", gender) if pokemon == "Hitmonchan" or pokemon == "Shiny Hitmonchan" then doItemSetAttribute(ball, "hands", 0) end doItemSetAttribute(ball, "description", "Contains a "..pokemon..".") doItemSetAttribute(ball, "fakedesc", "Contains a "..pokemon..".") doPlayerSendTextMessage(cid, 27, "You opened a pokemon prize box +"..item.itemid - (11637).."!") doPlayerSendTextMessage(cid, 27, "The prize pokemon was a "..pokemon.." (level "..level.."), congratulations!") if sendToDepot then --alterado v1.5 doPlayerSendMailByName(getCreatureName(cid), ball, 1) doPlayerSendTextMessage(cid, 27, "You are already holding six pokemons, so your new pokemon was sent to your depot.") doRemoveItem(item.uid) else doTransformItem(ball, pokeballs[btype].on) end doSendMagicEffect(getThingPos(cid), 29) return true end Vermelho - Pokemons que podem vir na box. Azul - Level mínimo que o pokemon pode vir. Verde - Level máximo que o pokemon pode vir. Roxo - Nome da ball que o pokemon virá. Cinza - ID dá ball quando tem um pokemon vivo. (Para pegar o ID dela, crie um pokemon ou capture, de look na ball, e veja lá o ID) Rosa - ID da box. Após em data/actions/actions.xml adicione está tag: <action itemid="11638" event="script" value="boxnova.lua"/> Laranja = ID da box. (Mesmo ID que a cor Rosa no script anterior) Marrom = Nome do script da box que você colocou na pasta script. PS: Este é para server que os pokemons têm level, caso o seu seja sem me avise que eu edito! uashuashuas' Editado Novembro 25, 2013 por GuhPk Link para o comentário https://xtibia.com/forum/topic/224446-encerrado-como-fazer-uma-box/#findComment-1585562 Compartilhar em outros sites More sharing options...
wreymar 30 Postado Novembro 25, 2013 Autor Share Postado Novembro 25, 2013 Em data/actions/scripts crie um arquivo chamado boxnova.lua e coloque isto dentro: local a = { [11638] = {level = {5, 10}, balltype = "normal", ballid = 11826, pokemons = {"Slowpoke", "Magnemite", "Doduo", "Seel", "Grimer", "Gastly", "Drowzee", "Voltorb", "Cubone", "Koffing", "Goldeen", "Vulpix", "Tentacool", "Bulbasaur", "Charmander", "Squirtle", "Butterfree", "Beedrill", "Metapod", "Kakuna", "Raticate", "Spearow", "Ekans", "Abra", "Mankey", "Psyduck", "Pikachu", "Sandshrew", "Nidoran Female", "Nidoran Male", "Zubat", "Diglett", "Venonat", "Meowth", "Poliwag", "Growlithe", "Machop", "Ponyta", "Geodude"}}, } local extrastrength = 1.1 function onUse(cid, item, frompos, item2, topos) local b = a[item.itemid] if not b then return true end local pokemon = b.pokemons[math.random(#b.pokemons)] local pokeinfo = getPokemonStatus(pokemon) if not pokeinfo then return true end local btype = b.balltype if not pokeballs[btype] then return true end local gender = getRandomGenderByName(pokemon) local level = math.random(b.level[1], b.level[2]) local offense = pokeinfo.off * level * extrastrength local defense = pokeinfo.def * level * extrastrength local agility = pokeinfo.agi * level * extrastrength local spatk = pokeinfo.spatk * level * extrastrength local vit = pokeinfo.vit * level * extrastrength local happy = 180 local leveltable = getPokemonExperienceTable(pokemon) local ball = 0 local sendToDepot = false --alterado v2.6 if getCreatureMana(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then sendToDepot = true ball = doCreateItemEx(b.ballid) --alterado v1.5 else ball = item.uid end doItemSetAttribute(ball, "poke", pokemon) doItemSetAttribute(ball, "hp", 1) doItemSetAttribute(ball, "level", level) doItemSetAttribute(ball, "exp", leveltable[level]) doItemSetAttribute(ball, "nextlevelexp", leveltable[level+1] - leveltable[level]) doItemSetAttribute(ball, "offense", offense) doItemSetAttribute(ball, "defense", defense) doItemSetAttribute(ball, "speed", agility) doItemSetAttribute(ball, "vitality", vit) doItemSetAttribute(ball, "specialattack", spatk) doItemSetAttribute(ball, "happy", happy) doItemSetAttribute(ball, "gender", gender) if pokemon == "Hitmonchan" or pokemon == "Shiny Hitmonchan" then doItemSetAttribute(ball, "hands", 0) end doItemSetAttribute(ball, "description", "Contains a "..pokemon..".") doItemSetAttribute(ball, "fakedesc", "Contains a "..pokemon..".") doPlayerSendTextMessage(cid, 27, "You opened a pokemon prize box +"..item.itemid - (11637).."!") doPlayerSendTextMessage(cid, 27, "The prize pokemon was a "..pokemon.." (level "..level.."), congratulations!") if sendToDepot then --alterado v1.5 doPlayerSendMailByName(getCreatureName(cid), ball, 1) doPlayerSendTextMessage(cid, 27, "You are already holding six pokemons, so your new pokemon was sent to your depot.") doRemoveItem(item.uid) else doTransformItem(ball, pokeballs[btype].on) end doSendMagicEffect(getThingPos(cid), 29) return true end Vermelho - Pokemons que podem vir na box. Azul - Level mínimo que o pokemon pode vir. Verde - Level máximo que o pokemon pode vir. Roxo - Nome da ball que o pokemon virá. Cinza - ID dá ball quando tem um pokemon vivo. (Para pegar o ID dela, crie um pokemon ou capture, de look na ball, e veja lá o ID) Rosa - ID da box. Após em data/actions/actions.xml adicione está tag: <action itemid="11638" event="script" value="boxnova.lua"/> Laranja = ID da box. (Mesmo ID que a cor Rosa no script anterior) Marrom = Nome do script da box que você colocou na pasta script. PS: Este é para server que os pokemons têm level, caso o seu seja sem me avise que eu edito! uashuashuas' Guhpk Assim meu server é base o server do Bolz tem uma boz sombrando ai queria adicionar nela ajudar ae base sem level Link para o comentário https://xtibia.com/forum/topic/224446-encerrado-como-fazer-uma-box/#findComment-1585574 Compartilhar em outros sites More sharing options...
GuhPk 111 Postado Novembro 25, 2013 Share Postado Novembro 25, 2013 Se puder me mandar o ID dela no OtItemEditor e os pokemons que você quer nela eu posso fazer pra você... Porém, se não tiver ela no OtItemEditor, você terá que adicionar, aqui no fórum mesmo tem vários tutoriais de como configurar itens no Items.otb. Obs: No OtItemEditor a única caixinha que tem que estar marcada é a "Pickable". Obs²: No Dat Editor tem que estar também só a caixinha "Pickable". Link para o comentário https://xtibia.com/forum/topic/224446-encerrado-como-fazer-uma-box/#findComment-1585616 Compartilhar em outros sites More sharing options...
Omega 377 Postado Novembro 25, 2013 Share Postado Novembro 25, 2013 Tópico na seção errada, favor prestar mais atenção da próxima vez.Movido para pedidos e dúvidas - servidores derivados. Link para o comentário https://xtibia.com/forum/topic/224446-encerrado-como-fazer-uma-box/#findComment-1585636 Compartilhar em outros sites More sharing options...
wreymar 30 Postado Novembro 25, 2013 Autor Share Postado Novembro 25, 2013 Se puder me mandar o ID dela no OtItemEditor e os pokemons que você quer nela eu posso fazer pra você... Porém, se não tiver ela no OtItemEditor, você terá que adicionar, aqui no fórum mesmo tem vários tutoriais de como configurar itens no Items.otb. Obs: No OtItemEditor a única caixinha que tem que estar marcada é a "Pickable". Obs²: No Dat Editor tem que estar também só a caixinha "Pickable". GuhPk o Id Dela >>> 13078 os pokemons que quero >>>> Moltres,articuno,zapdos,entei,raikou,suicune,mew,mewtwo,lugia,ho-oh,celebi,ancient blastoise Link para o comentário https://xtibia.com/forum/topic/224446-encerrado-como-fazer-uma-box/#findComment-1585687 Compartilhar em outros sites More sharing options...
GuhPk 111 Postado Novembro 25, 2013 Share Postado Novembro 25, 2013 Em data/actions/scripts/boxnova.lua coloque: local a = { [11638] = {level = {5, 10}, balltype = "normal", ballid = 11826, pokemons = {"Moltres", "Articuno", "Zapdos", "Entei", "Raikou", "Mew", "Mewtwo", "Lugia", "Ho-oh", "Celebi", "Ancient Blastoise"}}, } local extrastrength = 1.1 function onUse(cid, item, frompos, item2, topos) local b = a[item.itemid] if not b then return true end local pokemon = b.pokemons[math.random(#b.pokemons)] local pokeinfo = getPokemonStatus(pokemon) if not pokeinfo then return true end local btype = b.balltype if not pokeballs[btype] then return true end local gender = getRandomGenderByName(pokemon) local level = math.random(b.level[1], b.level[2]) local offense = pokeinfo.off * level * extrastrength local defense = pokeinfo.def * level * extrastrength local agility = pokeinfo.agi * level * extrastrength local spatk = pokeinfo.spatk * level * extrastrength local vit = pokeinfo.vit * level * extrastrength local happy = 180 local leveltable = getPokemonExperienceTable(pokemon) local ball = 0 local sendToDepot = false --alterado v2.6 if getCreatureMana(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then sendToDepot = true ball = doCreateItemEx(b.ballid) --alterado v1.5 else ball = item.uid end doItemSetAttribute(ball, "poke", pokemon) doItemSetAttribute(ball, "hp", 1) doItemSetAttribute(ball, "level", level) doItemSetAttribute(ball, "exp", leveltable[level]) doItemSetAttribute(ball, "nextlevelexp", leveltable[level+1] - leveltable[level]) doItemSetAttribute(ball, "offense", offense) doItemSetAttribute(ball, "defense", defense) doItemSetAttribute(ball, "speed", agility) doItemSetAttribute(ball, "vitality", vit) doItemSetAttribute(ball, "specialattack", spatk) doItemSetAttribute(ball, "happy", happy) doItemSetAttribute(ball, "gender", gender) doItemSetAttribute(ball, "description", "Contains a "..pokemon..".") doItemSetAttribute(ball, "fakedesc", "Contains a "..pokemon..".") doPlayerSendTextMessage(cid, 27, "You opened a pokemon prize box +"..item.itemid - (11637).."!") doPlayerSendTextMessage(cid, 27, "The prize pokemon was a "..pokemon.." (level "..level.."), congratulations!") if sendToDepot then --alterado v1.5 doPlayerSendMailByName(getCreatureName(cid), ball, 1) doPlayerSendTextMessage(cid, 27, "You are already holding six pokemons, so your new pokemon was sent to your depot.") doRemoveItem(item.uid) else doTransformItem(ball, pokeballs[btype].on) end doSendMagicEffect(getThingPos(cid), 29) return true end Em data/actions/actions.xml coloque: <action itemid="13078" event="script" value="boxnova.lua"/> Link para o comentário https://xtibia.com/forum/topic/224446-encerrado-como-fazer-uma-box/#findComment-1585701 Compartilhar em outros sites More sharing options...
zipter98 1102 Postado Novembro 25, 2013 Share Postado Novembro 25, 2013 (editado) Se o pda by bolz for sem lv nos pokémons, tenta assim: (primeiramente, veja se seu servidor possue a função addPokeToPlayer) local box = {balltype = "normal", ballid = 11826, pokemons = {"Moltres", "Articuno", "Zapdos", "Entei", "Raikou", "Mew", "Mewtwo", "Lugia", "Ho-oh", "Celebi", "Ancient Blastoise"}} local happy = 220 function onUse(cid, item, frompos, item2, topos) local pokemon = box.pokemons[math.random(#box.pokemons)] local btype = box.balltype doPlayerSendTextMessage(cid, 27, "Você abriu uma PokeBox e recebeu um "..pokemon..".") doSendMagicEffect(getThingPos(cid), 29) addPokeToPlayer(cid, pokemon, 0, nil, btype) doRemoveItem(item.uid, 1) return true end Editado Novembro 25, 2013 por zipter98 Link para o comentário https://xtibia.com/forum/topic/224446-encerrado-como-fazer-uma-box/#findComment-1585711 Compartilhar em outros sites More sharing options...
wreymar 30 Postado Novembro 25, 2013 Autor Share Postado Novembro 25, 2013 (editado) Desculpa ae vcs ajudaram de mais quando meu rep+ voltar do para vc Guhpk Vlw manin Topico resolvido Em data/actions/scripts/boxnova.lua coloque: local a = { [11638] = {level = {5, 10}, balltype = "normal", ballid = 11826, pokemons = {"Moltres", "Articuno", "Zapdos", "Entei", "Raikou", "Mew", "Mewtwo", "Lugia", "Ho-oh", "Celebi", "Ancient Blastoise"}}, } local extrastrength = 1.1 function onUse(cid, item, frompos, item2, topos) local b = a[item.itemid] if not b then return true end local pokemon = b.pokemons[math.random(#b.pokemons)] local pokeinfo = getPokemonStatus(pokemon) if not pokeinfo then return true end local btype = b.balltype if not pokeballs[btype] then return true end local gender = getRandomGenderByName(pokemon) local level = math.random(b.level[1], b.level[2]) local offense = pokeinfo.off * level * extrastrength local defense = pokeinfo.def * level * extrastrength local agility = pokeinfo.agi * level * extrastrength local spatk = pokeinfo.spatk * level * extrastrength local vit = pokeinfo.vit * level * extrastrength local happy = 180 local leveltable = getPokemonExperienceTable(pokemon) local ball = 0 local sendToDepot = false --alterado v2.6 if getCreatureMana(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then sendToDepot = true ball = doCreateItemEx(b.ballid) --alterado v1.5 else ball = item.uid end doItemSetAttribute(ball, "poke", pokemon) doItemSetAttribute(ball, "hp", 1) doItemSetAttribute(ball, "level", level) doItemSetAttribute(ball, "exp", leveltable[level]) doItemSetAttribute(ball, "nextlevelexp", leveltable[level+1] - leveltable[level]) doItemSetAttribute(ball, "offense", offense) doItemSetAttribute(ball, "defense", defense) doItemSetAttribute(ball, "speed", agility) doItemSetAttribute(ball, "vitality", vit) doItemSetAttribute(ball, "specialattack", spatk) doItemSetAttribute(ball, "happy", happy) doItemSetAttribute(ball, "gender", gender) doItemSetAttribute(ball, "description", "Contains a "..pokemon..".") doItemSetAttribute(ball, "fakedesc", "Contains a "..pokemon..".") doPlayerSendTextMessage(cid, 27, "You opened a pokemon prize box +"..item.itemid - (11637).."!") doPlayerSendTextMessage(cid, 27, "The prize pokemon was a "..pokemon.." (level "..level.."), congratulations!") if sendToDepot then --alterado v1.5 doPlayerSendMailByName(getCreatureName(cid), ball, 1) doPlayerSendTextMessage(cid, 27, "You are already holding six pokemons, so your new pokemon was sent to your depot.") doRemoveItem(item.uid) else doTransformItem(ball, pokeballs[btype].on) end doSendMagicEffect(getThingPos(cid), 29) return true end Em data/actions/actions.xml coloque: <action itemid="13078" event="script" value="boxnova.lua"/> GuhPk Outra duvida ali Onde ta la em cima local a = {[11638] = {level = {5, 10}, balltype = "normal", ballid = 11826,pokemons = {"Moltres", "Articuno", "Zapdos", "Entei", "Raikou", "Mew", "Mewtwo", "Lugia", "Ho-oh", "Celebi", "Ancient Blastoise"}}, onde ta aquele numero verde não era para ta o id da box não? Editado Novembro 25, 2013 por wreymar Link para o comentário https://xtibia.com/forum/topic/224446-encerrado-como-fazer-uma-box/#findComment-1585731 Compartilhar em outros sites More sharing options...
GuhPk 111 Postado Novembro 25, 2013 Share Postado Novembro 25, 2013 Opa, desculpa o meu erro! >.< É sim! suahasuhasus' Link para o comentário https://xtibia.com/forum/topic/224446-encerrado-como-fazer-uma-box/#findComment-1585745 Compartilhar em outros sites More sharing options...
wreymar 30 Postado Novembro 25, 2013 Autor Share Postado Novembro 25, 2013 Mas eu fiz isso mas quando eu fasso ela que aperto com o botão direito do mouse não vai pq? Link para o comentário https://xtibia.com/forum/topic/224446-encerrado-como-fazer-uma-box/#findComment-1585746 Compartilhar em outros sites More sharing options...
zipter98 1102 Postado Novembro 25, 2013 Share Postado Novembro 25, 2013 (editado) Seu servidor é sem lv nos pokémons? Tentou o meu? obs: não se esqueça de verificar se no seu servidor têm a função addPokeToPlayer (ela se encontra em data/lib/some functions.lua). Editado Novembro 25, 2013 por zipter98 Link para o comentário https://xtibia.com/forum/topic/224446-encerrado-como-fazer-uma-box/#findComment-1585770 Compartilhar em outros sites More sharing options...
Posts Recomendados