FI

[Encerrado] Shiny box

Por firewere, 13 de fev. de 2013 em Tópicos Sem Resposta

script
7
2.9k
firewereF
13 de fevereiro de 2013 às 17:22

nao sei se e este o lugar certo para fazer o topico

bom mais deixa eu falar

como se coloca um shiny box?como fazer,onde colocar o script ,quais pokemons colocar la,tudo isto

Editado Fevereiro 13 por firewere

DinoAdminD
13 de fevereiro de 2013 às 17:33

vá em data/action/script/box.lua

 

vai esta assim:

 

 

 

local a = {

[11638] = {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"}},

[11639] = {balltype = "great", ballid = 11832, --alterado v1.3

pokemons = {"Pidgeotto", "Weepinbell", "Clefairy", "Omanyte", "Kabuto", "Arbok", "Raichu", "Nidorino", "Nidorina",

"Dodrio", "Muk", "Golbat", "Gloom", "Parasect", "Venomoth", "Dugtrio", "Persian", "Poliwhirl", "Victreebel", "Machoke",

"Graveler", "Slowbro", "Magneton", "Farfetch'd", "Haunter", "Kingler", "Electrode", "Weezing", "Rhyhorn", "Seadra",

"Jigglypuff", "Seaking", "Tauros", "Starmie", "Eevee", "Sandslash", "Charmeleon", "Wartortle", "Ivysaur"}},

[11640] = {balltype = "super", ballid = 11835,

pokemons = {"Pidgeot", "Fearow", "Tyranitar", "Ninetales", "Vileplume", "Primeape", "Golduck", "Kadabra", "Rapidash",

"Clefable", "Wigglytuff", "Dewgong", "Onix", "Cloyster", "Hypno", "Exeggutor", "Marowak", "Hitmonchan", "Hitmonlee",

"Lickitung", "Chansey", "Tangela", "Mr. Mime", "Pinsir", "Vaporeon", "Jolteon", "Flareon", "Porygon", "Dragonair"}},

[11641] = {balltype = "ultra", ballid = 11829,

pokemons = {"Shiny Hitmonchan", "Shiny Hitmonlee", "Shiny Abra", "Dragonite", "Snorlax", "Kabutops", "Omastar",

"Ditto", "Lapras", "Gyarados", "Magmar", "Electabuzz", "Jynx", "Scyther", "Kangaskhan", "Golem", "Venusaur",

"Machamp", "Poliwrath", "Arcanine", "Nidoking", "Nidoqueen", "Charizard", "Blastoise", "Tentacruel", "Alakazam",

"Gengar", "Rhydon"}}

}

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 btype = b.balltype

if not pokeballs[btype] then return true end --alterado v1.3

local gender = getRandomGenderByName(pokemon)

local happy = 220

 

local ball = 0

local sendToDepot = false --alterado v1.6

if getCreatureMana(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then

sendToDepot = true

ball = doCreateItemEx(b.ballid) --alterado v1.3

else

ball = item.uid

end

 

doItemSetAttribute(ball, "poke", pokemon)

doItemSetAttribute(ball, "hp", 1)

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..", congratulations!")

 

if sendToDepot then

doPlayerSendMailByName(getCreatureName(cid), ball, 1) --alterado v1.3

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

 

 

 

 

Agora é simples voce vai pegar o id da shiny box que voce queira que seja a shiny box e vai adiciona-la ao script.

 

ex: Digamos que a minha shiny box tenha o ID De 12547 eu teria que criar a box assim:

 

 

 

[12547] = {balltype = "great", ballid = 11832,

pokemons = {"Shiny Weepinbell", "Shiny Clefairy", "Shiny Omanyte", "Shiny Kabuto", "Shiny Arbok", "Shiny Raichu"}},

 

 

 

[12547] = Aqui dentro voce coloca o ID Da sua shiny box

balltype = Coloque o tipo da ball (coloque "ultra")

{"Shiny Weepinbell", "Shiny Clefairy", "Shiny Omanyte", "Shiny Kabuto", "Shiny Arbok", "Shiny Raichu"}}, = Aqui são os Pokemons, é so voce adicionar o pokemon que voce quer que saia na shiny box.

 

 

 

Feito isso salve e feche o Box.lua

 

e vá em data/action/action.xml

procure pela tag:

 

<action itemid="11638-11641" event="script" value="box.lua"/>

 

Agora se o ID Da minha box é 12547 Eu vo fazer o seguinte:

 

<action itemid="11638-11641;12547" event="script" value="box.lua"/>

 

Viu? é so colocar o id da sua Shiny Box no lugar do "12547".

 

Boa sorte

 

Aaah Ficaria assim o script:

 

 

 

local a = {

[11638] = {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"}},

[11639] = {balltype = "great", ballid = 11832, --alterado v1.3

pokemons = {"Pidgeotto", "Weepinbell", "Clefairy", "Omanyte", "Kabuto", "Arbok", "Raichu", "Nidorino", "Nidorina",

"Dodrio", "Muk", "Golbat", "Gloom", "Parasect", "Venomoth", "Dugtrio", "Persian", "Poliwhirl", "Victreebel", "Machoke",

"Graveler", "Slowbro", "Magneton", "Farfetch'd", "Haunter", "Kingler", "Electrode", "Weezing", "Rhyhorn", "Seadra",

"Jigglypuff", "Seaking", "Tauros", "Starmie", "Eevee", "Sandslash", "Charmeleon", "Wartortle", "Ivysaur"}},

[11640] = {balltype = "super", ballid = 11835,

pokemons = {"Pidgeot", "Fearow", "Tyranitar", "Ninetales", "Vileplume", "Primeape", "Golduck", "Kadabra", "Rapidash",

"Clefable", "Wigglytuff", "Dewgong", "Onix", "Cloyster", "Hypno", "Exeggutor", "Marowak", "Hitmonchan", "Hitmonlee",

"Lickitung", "Chansey", "Tangela", "Mr. Mime", "Pinsir", "Vaporeon", "Jolteon", "Flareon", "Porygon", "Dragonair"}},

[11641] = {balltype = "ultra", ballid = 11829,

pokemons = {"Shiny Hitmonchan", "Shiny Hitmonlee", "Shiny Abra", "Dragonite", "Snorlax", "Kabutops", "Omastar",

"Ditto", "Lapras", "Gyarados", "Magmar", "Electabuzz", "Jynx", "Scyther", "Kangaskhan", "Golem", "Venusaur",

"Machamp", "Poliwrath", "Arcanine", "Nidoking", "Nidoqueen", "Charizard", "Blastoise", "Tentacruel", "Alakazam",

"Gengar", "Rhydon"}}

[12547] = {balltype = "great", ballid = 11832,

pokemons = {"Shiny Weepinbell", "Shiny Clefairy", "Shiny Omanyte", "Shiny Kabuto", "Shiny Arbok", "Shiny Raichu"}},

}

 

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 btype = b.balltype

if not pokeballs[btype] then return true end --alterado v1.3

local gender = getRandomGenderByName(pokemon)

local happy = 220

 

local ball = 0

local sendToDepot = false --alterado v1.6

if getCreatureMana(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then

sendToDepot = true

ball = doCreateItemEx(b.ballid) --alterado v1.3

else

ball = item.uid

end

 

doItemSetAttribute(ball, "poke", pokemon)

doItemSetAttribute(ball, "hp", 1)

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..", congratulations!")

 

if sendToDepot then

doPlayerSendMailByName(getCreatureName(cid), ball, 1) --alterado v1.3

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

 

 

 

Editado Fevereiro 13 por DinoAdmin

firewereF
13 de fevereiro de 2013 às 17:44

vlw

pela ajuda

 

o id da shiny box pode ser qualquer um ?

DinoAdminD
13 de fevereiro de 2013 às 17:44

Duvida senada

Topico Reportado

StigalS
13 de fevereiro de 2013 às 18:01

Topico Movido!

7 meses depois...
ricardopokeR
27 de setembro de 2013 às 15:51

alguem ai tem o mapa PDA com box funcionando? se tiver mandar ai pf.

4 anos depois...
StigalS
21 de abril de 2018 às 03:02
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.