evertoyi 0 Posted September 18, 2020 Share Posted September 18, 2020 (edited) Eu estou com um sistema de EGG pra Poketibia porem não estou conseguindo utilizar no meu servidor, pelo motivo que meu servidor usa Icon System alguém poderia alterar pra mim? quando eu uso o sistema ele vai normal porem quando nasce o Pokémon ele vem em uma Pokébola só que não da pra usar. Vou disponibilizar o script todo: data/actions/actions.xml Spoiler <action itemid="19001" event="script" value="ovo.lua" /> <!-- id egg --> <action itemid="19173" event="script" value="ovo1.lua" /> <!-- id incubadora --> data/actions/scripst/ovo Spoiler function onUse(cid, item, fromPosition, itemEx, toPosition) function getTime(s) local n = math.floor(s / 60) s = s - (60 * n) return n, s end local ovo = 19001 --egg tem que ser com mira local emcubadorav = 19172 -- nao em uso local emcubadora = 19173 -- em uso if itemEx.itemid == emcubadorav then doRemoveItem(itemEx.uid,1) doTransformItem(item.uid, emcubadora) doPlayerSendTextMessage(cid, 27, "você adicionou um egg na incubadora") setPlayerStorageValue(cid, 64233, os.time() + 1*60) end end data/actions/scripst/ovo1 Spoiler function onUse(cid, item, fromPosition, itemEx, toPosition) function getTime(s) local n = math.floor(s / 60) s = s - (60 * n) return n, s end local box = { [1] ={msg = "You Open a Box +3",np = "Contains a Ivysaur.",nm= 'Ivysaur'}, [2] ={msg = "You Open a Box +3",np = "Contains a Charmeleon.",nm= 'Charmeleon'}, [3] ={msg = "You Open a Box +3",np = 'Contains a Wartortle.',nm= 'Wartortle'}, [4] ={msg = "You Open a Box +3",np = 'Contains a Raichu.',nm= 'Raichu'}, [5] ={msg = "You Open a Box +3",np = 'Contains a Fearow.',nm= 'Fearow'}, [6] ={msg = "You Open a Box +3",np = 'Contains a Vileplume.',nm= 'Vileplume'}, [7] ={msg = "You Open a Box +3",np = 'Contains a Venomoth.',nm= 'Venomoth'}, [8] ={msg = "You Open a Box +3",np = 'Contains a Parasect.',nm= 'Parasect'}, [9] ={msg = "You Open a Box +3",np = 'Contains a Clefable.',nm= 'Clefable'}, [10] ={msg = "You Open a Box +3",np = 'Contains a Wigglytuff.',nm= 'Wigglytuff'}, [11] ={msg = "You Open a Box +3",np = 'Contains a Sandslash.',nm= 'Sandslash'}, [12] ={msg = "You Open a Box +3",np = 'Contains a Dugtrio.',nm= 'Dugtrio'}, [13] ={msg = "You Open a Box +3",np = 'Contains a Golduck.',nm= 'Golduck'}, [14] ={msg = "You Open a Box +3",np = 'Contains a Rapidash.',nm= 'Rapidash'}, [15] ={msg = "You Open a Box +3",np = 'Contains a Magneton.',nm= 'Magneton'}, [16] ={msg = "You Open a Box +3",np = 'Contains a Hypno.',nm= 'Hypno'}, [17] ={msg = "You Open a Box +3",np = 'Contains a Kingler.',nm= 'Kingler'}, [18] ={msg = "You Open a Box +3",np = 'Contains a Exeggutor.',nm= 'Exeggutor'}, [19] ={msg = "You Open a Box +3",np = 'Contains a Hitmonlee.',nm= 'Hitmonlee'}, [20] ={msg = "You Open a Box +3",np = 'Contains a Hitmonchan.',nm= 'Hitmonchan'}, [21] ={msg = "You Open a Box +3",np = 'Contains a Tangela.',nm= 'Tangela'}, [22] ={msg = "You Open a Box +3",np = 'Contains a Starmie.',nm= 'Starmie'}, [23] ={msg = "You Open a Box +3",np = 'Contains a Mr.Mime.',nm= 'Mr.Mime'}, [24] ={msg = "You Open a Box +3",np = 'Contains a Jolteon.',nm= 'Jolteon'}, [25] ={msg = "You Open a Box +3",np = 'Contains a Porygon.',nm= 'Porygon'} } local e = box[math.random(1,25)] local boxid = "normal" -- id da ball que vai ser dada ao jogador local pk = "This is "..e.nm.."'s pokeball. HP = [1/1]" local gender = math.random(1,3) local emcubadora = 19173 -- ID da emcubadora local time = 1 -- tempo usado if itemEx.itemid == emcubadora then if os.time()-getPlayerStorageValue(cid, 64233) <= 1*60 then setPlayerStorageValue(cid, 49514, 4) minutes,seconds = getTime(1*60-(os.time()-getPlayerStorageValue(cid, 64233))) return doPlayerSendCancel(cid, "Você precisa esperar " .. minutes .. " minutos e " .. seconds .. " segundos.") else if itemEx.itemid == emcubadora and getPlayerStorageValue(cid, 49514) == 4 and os.time()-getPlayerStorageValue(cid, 64233) then setPlayerStorageValue(cid, 46574, 4) setPlayerStorageValue(cid, 64233, -1) setPlayerStorageValue(cid, 49514, -1) doPlayerSendTextMessage(cid, 27, "seu egg está pronto para nascer") else if itemEx.itemid == emcubadora and getPlayerStorageValue(cid, 46574) == 4 and getPlayerFreeCap(cid) <= 0.99 then doPlayerSendTextMessage(cid, 27, "your egg is descubed") doRemoveItem(itemEx.uid,1) b = addPokeToPlayer(cid, boxid-1, 1) doItemSetAttribute(b, "poke", pk) doItemSetAttribute(b, "nome", "e.nm") doItemSetAttribute(b, "description", e.np) doSetItemText(b, gender) doPlayerSendMailByName(getCreatureName(cid), b,1) doPlayerSendTextMessage(cid,22,"You Open a emcubador,Good Luck You pokemon has been sent to your depot") else if itemEx.itemid == emcubadora and getPlayerStorageValue(cid, 46574) == 4 then doPlayerSendTextMessage(cid, 27, "your egg is descubed") doRemoveItem(itemEx.uid,1) doPlayerSendTextMessage(cid,22,"You Open a emcubador,You Won a "..e.nm.."") b = doPlayerAddItem(cid, boxid, 1) doItemSetAttribute(b, "poke", pk) doItemSetAttribute(b, "nome", "e.nm") doItemSetAttribute(b, "description", e.np) doSetItemText(b, gender) end end end end end end esse script é da base Pokémon Imperium Edited September 19, 2020 by evertoyi alteração Link to comment Share on other sites More sharing options...
raulcdj 3 Posted October 4, 2020 Share Posted October 4, 2020 Em 18/09/2020 em 17:20, evertoyi disse: Eu estou com um sistema de EGG pra Poketibia porem não estou conseguindo utilizar no meu servidor, pelo motivo que meu servidor usa Icon System alguém poderia alterar pra mim? quando eu uso o sistema ele vai normal porem quando nasce o Pokémon ele vem em uma Pokébola só que não da pra usar. Vou disponibilizar o script todo: data/actions/actions.xml Ocultar conteúdo <action itemid="19001" event="script" value="ovo.lua" /> <!-- id egg --> <action itemid="19173" event="script" value="ovo1.lua" /> <!-- id incubadora --> data/actions/scripst/ovo Ocultar conteúdo function onUse(cid, item, fromPosition, itemEx, toPosition) function getTime(s) local n = math.floor(s / 60) s = s - (60 * n) return n, s end local ovo = 19001 --egg tem que ser com mira local emcubadorav = 19172 -- nao em uso local emcubadora = 19173 -- em uso if itemEx.itemid == emcubadorav then doRemoveItem(itemEx.uid,1) doTransformItem(item.uid, emcubadora) doPlayerSendTextMessage(cid, 27, "você adicionou um egg na incubadora") setPlayerStorageValue(cid, 64233, os.time() + 1*60) end end data/actions/scripst/ovo1 Ocultar conteúdo function onUse(cid, item, fromPosition, itemEx, toPosition) function getTime(s) local n = math.floor(s / 60) s = s - (60 * n) return n, s end local box = { [1] ={msg = "You Open a Box +3",np = "Contains a Ivysaur.",nm= 'Ivysaur'}, [2] ={msg = "You Open a Box +3",np = "Contains a Charmeleon.",nm= 'Charmeleon'}, [3] ={msg = "You Open a Box +3",np = 'Contains a Wartortle.',nm= 'Wartortle'}, [4] ={msg = "You Open a Box +3",np = 'Contains a Raichu.',nm= 'Raichu'}, [5] ={msg = "You Open a Box +3",np = 'Contains a Fearow.',nm= 'Fearow'}, [6] ={msg = "You Open a Box +3",np = 'Contains a Vileplume.',nm= 'Vileplume'}, [7] ={msg = "You Open a Box +3",np = 'Contains a Venomoth.',nm= 'Venomoth'}, [8] ={msg = "You Open a Box +3",np = 'Contains a Parasect.',nm= 'Parasect'}, [9] ={msg = "You Open a Box +3",np = 'Contains a Clefable.',nm= 'Clefable'}, [10] ={msg = "You Open a Box +3",np = 'Contains a Wigglytuff.',nm= 'Wigglytuff'}, [11] ={msg = "You Open a Box +3",np = 'Contains a Sandslash.',nm= 'Sandslash'}, [12] ={msg = "You Open a Box +3",np = 'Contains a Dugtrio.',nm= 'Dugtrio'}, [13] ={msg = "You Open a Box +3",np = 'Contains a Golduck.',nm= 'Golduck'}, [14] ={msg = "You Open a Box +3",np = 'Contains a Rapidash.',nm= 'Rapidash'}, [15] ={msg = "You Open a Box +3",np = 'Contains a Magneton.',nm= 'Magneton'}, [16] ={msg = "You Open a Box +3",np = 'Contains a Hypno.',nm= 'Hypno'}, [17] ={msg = "You Open a Box +3",np = 'Contains a Kingler.',nm= 'Kingler'}, [18] ={msg = "You Open a Box +3",np = 'Contains a Exeggutor.',nm= 'Exeggutor'}, [19] ={msg = "You Open a Box +3",np = 'Contains a Hitmonlee.',nm= 'Hitmonlee'}, [20] ={msg = "You Open a Box +3",np = 'Contains a Hitmonchan.',nm= 'Hitmonchan'}, [21] ={msg = "You Open a Box +3",np = 'Contains a Tangela.',nm= 'Tangela'}, [22] ={msg = "You Open a Box +3",np = 'Contains a Starmie.',nm= 'Starmie'}, [23] ={msg = "You Open a Box +3",np = 'Contains a Mr.Mime.',nm= 'Mr.Mime'}, [24] ={msg = "You Open a Box +3",np = 'Contains a Jolteon.',nm= 'Jolteon'}, [25] ={msg = "You Open a Box +3",np = 'Contains a Porygon.',nm= 'Porygon'} } local e = box[math.random(1,25)] local boxid = "normal" -- id da ball que vai ser dada ao jogador local pk = "This is "..e.nm.."'s pokeball. HP = [1/1]" local gender = math.random(1,3) local emcubadora = 19173 -- ID da emcubadora local time = 1 -- tempo usado if itemEx.itemid == emcubadora then if os.time()-getPlayerStorageValue(cid, 64233) <= 1*60 then setPlayerStorageValue(cid, 49514, 4) minutes,seconds = getTime(1*60-(os.time()-getPlayerStorageValue(cid, 64233))) return doPlayerSendCancel(cid, "Você precisa esperar " .. minutes .. " minutos e " .. seconds .. " segundos.") else if itemEx.itemid == emcubadora and getPlayerStorageValue(cid, 49514) == 4 and os.time()-getPlayerStorageValue(cid, 64233) then setPlayerStorageValue(cid, 46574, 4) setPlayerStorageValue(cid, 64233, -1) setPlayerStorageValue(cid, 49514, -1) doPlayerSendTextMessage(cid, 27, "seu egg está pronto para nascer") else if itemEx.itemid == emcubadora and getPlayerStorageValue(cid, 46574) == 4 and getPlayerFreeCap(cid) <= 0.99 then doPlayerSendTextMessage(cid, 27, "your egg is descubed") doRemoveItem(itemEx.uid,1) b = addPokeToPlayer(cid, boxid-1, 1) doItemSetAttribute(b, "poke", pk) doItemSetAttribute(b, "nome", "e.nm") doItemSetAttribute(b, "description", e.np) doSetItemText(b, gender) doPlayerSendMailByName(getCreatureName(cid), b,1) doPlayerSendTextMessage(cid,22,"You Open a emcubador,Good Luck You pokemon has been sent to your depot") else if itemEx.itemid == emcubadora and getPlayerStorageValue(cid, 46574) == 4 then doPlayerSendTextMessage(cid, 27, "your egg is descubed") doRemoveItem(itemEx.uid,1) doPlayerSendTextMessage(cid,22,"You Open a emcubador,You Won a "..e.nm.."") b = doPlayerAddItem(cid, boxid, 1) doItemSetAttribute(b, "poke", pk) doItemSetAttribute(b, "nome", "e.nm") doItemSetAttribute(b, "description", e.np) doSetItemText(b, gender) end end end end end end esse script é da base Pokémon Imperium ussa esse mano mesmo e o mesmo que o seu e meu servidor também tem iconi sistem local config = { [12304] = {pokemon = "Bulbasaur", balltype = "normal"}, [12305] = {pokemon = "Caterpie", balltype = "normal"}, [12306] = {pokemon = "Clefairy", balltype = "normal"}, [12307] = {pokemon = "Charmander", balltype = "normal"}, [12308] = {pokemon = "Eevee", balltype = "normal"}, [12309] = {pokemon = "Ekans", balltype = "normal"}, [12310] = {pokemon = "Exeggcute", balltype = "normal"}, [12311] = {pokemon = "Goldeen", balltype = "normal"}, [12312] = {pokemon = "Horsea", balltype = "normal"}, [12313] = {pokemon = "Kabuto", balltype = "normal"}, [12314] = {pokemon = "Krabby", balltype = "normal"}, [12315] = {pokemon = "Magikarp", balltype = "normal"}, [12316] = {pokemon = "Oddish", balltype = "normal"}, [12317] = {pokemon = "Pidgey", balltype = "normal"}, [12318] = {pokemon = "Poliwag", balltype = "normal"}, [12319] = {pokemon = "Psyduck", balltype = "normal"}, [12320] = {pokemon = "Shellder", balltype = "normal"}, [12321] = {pokemon = "remoraid", balltype = "normal"}, [12322] = {pokemon = "Squirtle", balltype = "normal"}, [12323] = {pokemon = "Vulpix", balltype = "normal"}, [12324] = {pokemon = "azumarill", balltype = "normal"}, } function onUse(cid, item, frompos, item2, topos) local egg = config[item.itemid] if not egg then return true end local pokemon = egg.pokemon local btype = egg.balltype if not pokeballs[btype] then return true end doPlayerSendTextMessage(cid, 27, "Voce abriu um ovo de Pokemon!") doPlayerSendTextMessage(cid, 27, "O pokemon premiado era um "..pokemon..", Parabéns!") doSendMagicEffect(getThingPos(cid), 29) addPokeToPlayer(cid, pokemon, 0, nil, btype) doRemoveItem(item.uid, 1) return true end -- egg system <action itemid="12304;12305;12306;12307;12308;12309;12310;12311;12312;12313;12314;12315;12316;12317;12318;12319;12320;12321;12322;12323-12324" event="script" value="eggs.lua"/> evertoyi 1 Link to comment Share on other sites More sharing options...
evertoyi 0 Posted December 9, 2020 Author Share Posted December 9, 2020 Em 04/10/2020 em 10:08, raulcdj disse: ussa esse mano mesmo e o mesmo que o seu e meu servidor também tem iconi sistem local config = { [12304] = {pokemon = "Bulbasaur", balltype = "normal"}, [12305] = {pokemon = "Caterpie", balltype = "normal"}, [12306] = {pokemon = "Clefairy", balltype = "normal"}, [12307] = {pokemon = "Charmander", balltype = "normal"}, [12308] = {pokemon = "Eevee", balltype = "normal"}, [12309] = {pokemon = "Ekans", balltype = "normal"}, [12310] = {pokemon = "Exeggcute", balltype = "normal"}, [12311] = {pokemon = "Goldeen", balltype = "normal"}, [12312] = {pokemon = "Horsea", balltype = "normal"}, [12313] = {pokemon = "Kabuto", balltype = "normal"}, [12314] = {pokemon = "Krabby", balltype = "normal"}, [12315] = {pokemon = "Magikarp", balltype = "normal"}, [12316] = {pokemon = "Oddish", balltype = "normal"}, [12317] = {pokemon = "Pidgey", balltype = "normal"}, [12318] = {pokemon = "Poliwag", balltype = "normal"}, [12319] = {pokemon = "Psyduck", balltype = "normal"}, [12320] = {pokemon = "Shellder", balltype = "normal"}, [12321] = {pokemon = "remoraid", balltype = "normal"}, [12322] = {pokemon = "Squirtle", balltype = "normal"}, [12323] = {pokemon = "Vulpix", balltype = "normal"}, [12324] = {pokemon = "azumarill", balltype = "normal"}, } function onUse(cid, item, frompos, item2, topos) local egg = config[item.itemid] if not egg then return true end local pokemon = egg.pokemon local btype = egg.balltype if not pokeballs[btype] then return true end doPlayerSendTextMessage(cid, 27, "Voce abriu um ovo de Pokemon!") doPlayerSendTextMessage(cid, 27, "O pokemon premiado era um "..pokemon..", Parabéns!") doSendMagicEffect(getThingPos(cid), 29) addPokeToPlayer(cid, pokemon, 0, nil, btype) doRemoveItem(item.uid, 1) return true end -- egg system <action itemid="12304;12305;12306;12307;12308;12309;12310;12311;12312;12313;12314;12315;12316;12317;12318;12319;12320;12321;12322;12323-12324" event="script" value="eggs.lua"/> obrigado mano pela sua ajuda mais um scripter já me ajudou aqui ^^ Link to comment Share on other sites More sharing options...
Recommended Posts