Ir para conteúdo
  • 0

[Duvida]-Script Evolution Poketibia


geovanedias

Pergunta

bem eu tou com um script de evoluçao de poketibia que eu mudei para digimon. Oque eu queria é que quando eu usa-se o item x de Evoluçao o personagem do player fala uma frase: por exemplo "Digivolua Monstername para Monstername"

eu tentei usar o "doSendAnimatedText" mais tem um limite de caracteres

 

aki vai o meu script:

 

local pokes = {

["Biyomon"] = {level = 50, evolution = "Birdramon", maxh = 1400, count = 1, stoneid = 2279, stoneid2 = 0},

["Birdramon"] = {level = 20, evolution = "Biyomon", maxh = 1400, count = 1, stoneid = 1988, stoneid2 = 0},

["Gabumon"] = {level = 40, evolution = "Garurumon", maxh = 2900, count = 1, stoneid = 2279, stoneid2 = 0},

["Garurumon"] = {level = 40, evolution = "Gabumon", maxh = 2900, count = 1, stoneid = 1988, stoneid2 = 0},

["Bulbasaur"] = {level = 40, evolution = "Ivysaur", maxh = 2900, count = 1, stoneid = 2276, stoneid2 = 0},

["Ivysaur"] = {level = 85, evolution = "Venusaur", maxh = 5200, count = 2, stoneid = 2276, stoneid2 = 0},

["Charmander"] = {level = 40, evolution = "Charmeleon", maxh = 2900, count = 1, stoneid = 2283, stoneid2 = 0},

["Charmeleon"] = {level = 85, evolution = "Charizard", maxh = 5200, count = 2, stoneid = 2283, stoneid2 = 0},

["Squirtle"] = {level = 40, evolution = "Wartortle", maxh = 2900, count = 1, stoneid = 2277, stoneid2 = 0},

["Wartortle"] = {level = 85, evolution = "Blastoise", maxh = 5200, count = 2, stoneid = 2277, stoneid2 = 0},

["Caterpie"] = {level = 15, evolution = "Metapod", maxh = 1400, count = 1, stoneid = 2284, stoneid2 = 0},

["Metapod"] = {level = 30, evolution = "Butterfree", maxh = 1400, count = 2, stoneid = 2284, stoneid2 = 0},

["Weedle"] = {level = 15, evolution = "Kakuna", maxh = 1400, count = 1, stoneid = 2284, stoneid2 = 0},

["Kakuna"] = {level = 25, evolution = "Beedrill", maxh = 1400, count = 2, stoneid = 2284, stoneid2 = 0},

["Pidgey"] = {level = 20, evolution = "Pidgeotto", maxh = 1400, count = 1, stoneid = 2289, stoneid2 = 0},

["Pidgeotto"] = {level = 65, evolution = "Pidgeot", maxh = 1400, count = 2, stoneid = 2289, stoneid2 = 0},

["Rattata"] = {level = 25, evolution = "Raticate", maxh = 1400, count = 1, stoneid = 2289, stoneid2 = 0},

["Spearow"] = {level = 50, evolution = "Fearow", maxh = 1400, count = 2, stoneid = 2289, stoneid2 = 0},

["Ekans"] = {level = 35, evolution = "Arbok", maxh = 1400, count = 1, stoneid = 2278, stoneid2 = 0},

["Pikachu"] = {level = 50, evolution = "Raichu", maxh = 1400, count = 2, stoneid = 2279, stoneid2 = 0},

["Sandshrew"] = {level = 55, evolution = "Sandslash", maxh = 1400, count = 2, stoneid = 2287, stoneid2 = 0},

["Nidoran Female"] = {level = 30, evolution = "Nidorina", maxh = 1400, count = 1, stoneid = 2278, stoneid2 = 0},

["Nidorina"] = {level = 65, evolution = "Nidoqueen", maxh = 1400, count = 1, stoneid = 2278, stoneid2 = 2287},

["Nidoran Male"] = {level = 30, evolution = "Nidorino", maxh = 1400, count = 1, stoneid = 2278, stoneid2 = 0},

["Nidorino"] = {level = 65, evolution = "Nidoking", maxh = 1400, count = 1, stoneid = 2278, stoneid2 = 2287},

["Clefairy"] = {level = 45, evolution = "Clefable", maxh = 1400, count = 1, stoneid = 2289, stoneid2 = 0},

["Vulpix"] = {level = 70, evolution = "Ninetales", maxh = 1400, count = 2, stoneid = 2283, stoneid2 = 0},

["Jigglypuff"] = {level = 45, evolution = "Wigglytuff", maxh = 1400, count = 1, stoneid = 2289, stoneid2 = 0},

["Zubat"] = {level = 35, evolution = "Golbat", maxh = 1400, count = 1, stoneid = 2278, stoneid2 = 0},

["Oddish"] = {level = 25, evolution = "Gloom", maxh = 1400, count = 1, stoneid = 2276, stoneid2 = 0},

["Gloom"] = {level = 50, evolution = "Vileplume", maxh = 1400, count = 1, stoneid = 2276, stoneid2 = 2278},

["Paras"] = {level = 50, evolution = "Parasect", maxh = 1400, count = 2, stoneid = 2284, stoneid2 = 0},

["Venonat"] = {level = 50, evolution = "Venomoth", maxh = 1400, count = 1, stoneid = 2284, stoneid2 = 2278},

["Diglett"] = {level = 35, evolution = "Dugtrio", maxh = 1400, count = 1, stoneid = 2287, stoneid2 = 0},

["Meowth"] = {level = 30, evolution = "Persian", maxh = 1400, count = 1, stoneid = 2289, stoneid2 = 0},

["Psyduck"] = {level = 55, evolution = "Golduck", maxh = 1400, count = 1, stoneid = 2277, stoneid2 = 2288},

["Mankey"] = {level = 50, evolution = "Primeape", maxh = 1400, count = 1, stoneid = 2281, stoneid2 = 0},

["Growlithe"] = {level = 80, evolution = "Arcanine", maxh = 1400, count = 2, stoneid = 2283, stoneid2 = 0},

["Poliwag"] = {level = 25, evolution = "Poliwhirl", maxh = 1400, count = 1, stoneid = 2277, stoneid2 = 0},

["Poliwhirl"] = {level = 65, evolution = "Poliwrath", maxh = 1400, count = 1, stoneid = 2277, stoneid2 = 2281},

["Abra"] = {level = 45, evolution = "Kadabra", maxh = 1400, count = 1, stoneid = 2288, stoneid2 = 0},

["Kadabra"] = {level = 80, evolution = "Alakazam", maxh = 1400, count = 2, stoneid = 2288, stoneid2 = 0},

["Machop"] = {level = 45, evolution = "Machoke", maxh = 1400, count = 1, stoneid = 2281, stoneid2 = 0},

["Machoke"] = {level = 70, evolution = "Machamp", maxh = 1400, count = 2, stoneid = 2281, stoneid2 = 0},

["Bellsprout"] = {level = 25, evolution = "Weepinbell", maxh = 1400, count = 1, stoneid = 2276, stoneid2 = 0},

["Weepinbell"] = {level = 50, evolution = "Victreebel", maxh = 1400, count = 2, stoneid = 2276, stoneid2 = 0},

["Tentacool"] = {level = 75, evolution = "Tentacruel", maxh = 1400, count = 1, stoneid = 2277, stoneid2 = 2278},

["Geodude"] = {level = 40, evolution = "Graveler", maxh = 1400, count = 1, stoneid = 2280, stoneid2 = 0},

["Graveler"] = {level = 70, evolution = "Golem", maxh = 1400, count = 2, stoneid = 2280, stoneid2 = 0},

["Ponyta"] = {level = 55, evolution = "Rapidash", maxh = 1400, count = 1, stoneid = 2283, stoneid2 = 0},

["Slowpoke"] = {level = 45, evolution = "Slowbro", maxh = 1400, count = 1, stoneid = 2277, stoneid2 = 2288},

["Magnemite"] = {level = 40, evolution = "Magneton", maxh = 1400, count = 1, stoneid = 2279, stoneid2 = 0},

["Doduo"] = {level = 45, evolution = "Dodrio", maxh = 1400, count = 1, stoneid = 2289, stoneid2 = 0},

["Seel"] = {level = 65, evolution = "Dewgong", maxh = 1400, count = 1, stoneid = 2277, stoneid2 = 2290},

["Grimer"] = {level = 45, evolution = "Muk", maxh = 1400, count = 1, stoneid = 2278, stoneid2 = 0},

["Shellder"] = {level = 60, evolution = "Cloyster", maxh = 1400, count = 2, stoneid = 2290, stoneid2 = 0},

["Gastly"] = {level = 45, evolution = "Haunter", maxh = 1400, count = 1, stoneid = 2286, stoneid2 = 0},

["Haunter"] = {level = 80, evolution = "Gengar", maxh = 1400, count = 2, stoneid = 2286, stoneid2 = 0},

["Drowzee"] = {level = 55, evolution = "Hypno", maxh = 1400, count = 2, stoneid = 2288, stoneid2 = 0},

["Krabby"] = {level = 40, evolution = "Kingler", maxh = 1400, count = 1, stoneid = 2277, stoneid2 = 0},

["Voltorb"] = {level = 35, evolution = "Electrode", maxh = 1400, count = 1, stoneid = 2279, stoneid2 = 0},

["Exeggcute"] = {level = 55, evolution = "Exeggutor", maxh = 1400, count = 1, stoneid = 2276, stoneid2 = 2288},

["Cubone"] = {level = 55, evolution = "Marowak", maxh = 1400, count = 2, stoneid = 2287, stoneid2 = 0},

["Koffing"] = {level = 35, evolution = "Weezing", maxh = 1400, count = 1, stoneid = 2278, stoneid2 = 0},

["Rhyhorn"] = {level = 75, evolution = "Rhydon", maxh = 1400, count = 2, stoneid = 2280, stoneid2 = 0},

["Horsea"] = {level = 45, evolution = "Seadra", maxh = 1400, count = 1, stoneid = 2277, stoneid2 = 0},

["Goldeen"] = {level = 35, evolution = "Seaking", maxh = 1400, count = 1, stoneid = 2277, stoneid2 = 0},

["Staryu"] = {level = 15, evolution = "Starmie", maxh = 1400, count = 1, stoneid = 2277, stoneid2 = 0},

["Magikarp"] = {level = 85, evolution = "Gyarados", maxh = 1400, count = 1, stoneid = 2277, stoneid2 = 2285},

["Omanyte"] = {level = 80, evolution = "Omastar", maxh = 1400, count = 1, stoneid = 2277, stoneid2 = 2285},

["Kabuto"] = {level = 80, evolution = "Kabutops", maxh = 1400, count = 1, stoneid = 2280, stoneid2 = 2285},

["Dratini"] = {level = 60, evolution = "Dragonair", maxh = 1400, count = 1, stoneid = 2285, stoneid2 = 0},

["Dragonair"] = {level = 60, evolution = "Dragonite", maxh = 1400, count = 2, stoneid = 2285, stoneid2 = 0},

["Hitmonchan"] = {level = 80, evolution = "Elite Hitmonchan", maxh = 9000, count = 10, stoneid = 2281, stoneid2 = 0},

["Hitmonlee"] = {level = 80, evolution = "Elite Hitmonlee", maxh = 9000, count = 10, stoneid = 2281, stoneid2 = 0},

["Totodile"] = {level = 40, evolution = "Croconaw", maxh = 2000, count = 1, stoneid = 2277, stoneid2 = 0},

["Croconaw"] = {level = 80, evolution = "Feraligatr", maxh = 3000, count = 2, stoneid = 2277, stoneid2 = 0},

["Chikorita"] = {level = 40, evolution = "Bayleef", maxh = 2000, count = 1, stoneid = 2276, stoneid2 = 0},

["Bayleef"] = {level = 80, evolution = "Meganium", maxh = 3000, count = 2, stoneid = 2276, stoneid2 = 0},

["Cyndaquil"] = {level = 40, evolution = "Quilava", maxh = 2000, count = 1, stoneid = 2283, stoneid2 = 0},

["Quilava"] = {level = 80, evolution = "Typhlosion", maxh = 3000, count = 2, stoneid = 2283, stoneid2 = 0},

["Golbat"] = {level = 50, evolution = "Crobat", maxh = 5500, count = 2, stoneid = 2278, stoneid2 = 2289},

["Cleffa"] = {level = 10, evolution = "Clefairy", maxh = 3000, count = 1, stoneid = 2289, stoneid2 = 0},

["Chansey"] = {level = 80, evolution = "Blissey", maxh = 9000, count = 3, stoneid = 2289, stoneid2 = 0},

["Pineco"] = {level = 35, evolution = "Forretress", maxh = 6000, count = 1, stoneid = 2284, stoneid2 = 2280},

["Porygon"] = {level = 60, evolution = "Porygon2", maxh = 3000, count = 2, stoneid = 2288, stoneid2 = 0},

["Onix"] = {level = 80, evolution = "Steelix", maxh = 9600, count = 2, stoneid = 2280, stoneid2 = 0},

["Scyther"] = {level = 100, evolution = "Scizor", maxh = 10000, count = 5, stoneid = 2284, stoneid2 = 0},

["Seadra"] = {level = 60, evolution = "Kingdra", maxh = 5000, count = 2, stoneid = 2277, stoneid2 = 0},

["Mareep"] = {level = 40, evolution = "Flaaffy", maxh = 6000, count = 1, stoneid = 2279, stoneid2 = 0},

["Flaaffy"] = {level = 80, evolution = "Ampharos", maxh = 9000, count = 2, stoneid = 2279, stoneid2 = 0},

["Houndor"] = {level = 50, evolution = "Houndoom", maxh = 9000, count = 2, stoneid = 2283, stoneid2 = 0},

["Marill"] = {level = 50, evolution = "Azumarill", maxh = 9000, count = 2, stoneid = 2277, stoneid2 = 0},

["Chinchou"] = {level = 40, evolution = "Lanturn", maxh = 9000, count = 1, stoneid = 2277, stoneid2 = 2279},

["Hoothoot"] = {level = 40, evolution = "Noctowl", maxh = 9000, count = 2, stoneid = 2289, stoneid2 = 0},

["Hoppip"] = {level = 30, evolution = "Skiploom", maxh = 9000, count = 1, stoneid = 2276, stoneid2 = 0},

["Skiploom"] = {level = 50, evolution = "Jumpluff", maxh = 9000, count = 2, stoneid = 2276, stoneid2 = 0},

["Igglybuff"] = {level = 10, evolution = "Jigglypuff", maxh = 9000, count = 1, stoneid = 2289, stoneid2 = 0},

["Ledyba"] = {level = 25, evolution = "Ledian", maxh = 9000, count = 2, stoneid = 2284, stoneid2 = 0},

["Pichu"] = {level = 20, evolution = "Pikachu", maxh = 9000, count = 1, stoneid = 2279, stoneid2 = 0},

["Pineco"] = {level = 40, evolution = "Forretress", maxh = 9000, count = 1, stoneid = 2284, stoneid2 = 2280},

["Spinarak"] = {level = 40, evolution = "Ariados", maxh = 9000, count = 2, stoneid = 2284, stoneid2 = 0},

["Chansey"] = {level = 50, evolution = "Blissey", maxh = 9000, count = 2, stoneid = 2289, stoneid2 = 0},

["Larvitar"] = {level = 40, evolution = "Pupitar", maxh = 9000, count = 1, stoneid = 2280, stoneid2 = 0},

["Phanpy"] = {level = 40, evolution = "Donphan", maxh = 9000, count = 2, stoneid = 2287, stoneid2 = 0},

["Sentret"] = {level = 30, evolution = "Furret", maxh = 9000, count = 2, stoneid = 2287, stoneid2 = 0},

["Slugma"] = {level = 45, evolution = "Magcarbo", maxh = 9000, count = 2, stoneid = 2283, stoneid2 = 0},

["Smoochum"] = {level = 60, evolution = "Jynx", maxh = 9000, count = 2, stoneid = 2290, stoneid2 = 0},

["Snubbull"] = {level = 40, evolution = "Granbull", maxh = 9000, count = 2, stoneid = 2289, stoneid2 = 0},

}

 

local types = {

["Leaf"] = {itemid = 2276, "Bulbasaur", "Ivysaur", "Oddish", "Gloom", "Bellsprout", "Weepinbell", "Exeggcute", "Chikorita", "Bayleef", "Hoppip", "Skiploom"},

["Water"] = {itemid = 2277, "Squirtle", "Wartortle", "Horsea", "Goldeen", "Magikarp", "Psyduck", "Poliwag", "Poliwhirl", "Tentacool", "Krabby", "Staryu", "Omanyte", "Eevee", "Totodile", "Croconaw", "Seadra", "Marill", "Chinchou"},

["Venom"] = {itemid = 2278, "Zubat", "Ekans", "Nidoran male", "Nidoran female", "Nidorino", "Nidorina", "Gloom", "Venonat", "Tentacool", "Grimer", "Koffing", "Golbat"},

["Thunder"] = {itemid = 2279, "Magnemite", "Pikachu", "Voltorb", "Eevee", "Elekid", "Flaaffy", "Mareep", "Pichu", "Gabumon", "Biyomon"},

["Rock"] = {itemid = 2280, "Geodude", "Graveler", "Rhyhorn", "Kabuto", "Pineco", "Onix", "Larvitar"},

["Punch"] = {itemid = 2281, "Machop", "Machoke", "Mankey", "Poliwhirl", "Hitmonchan", "Hitmonlee", "Pinsir"},

["Fire"] = {itemid = 2283, "Charmander", "Charmeleon", "Vulpix", "Growlithe", "Ponyta", "Eevee", "Cyndaquil", "Quilava" ,"Houndor","Slugma"},

["Coccon"] = {itemid = 2284, "Caterpie", "Metapod", "Weedle", "Kakuna", "Paras", "Venonat", "Dragon Lord", "Pineco", "Scyther", "Pinsir", "Ledyba", "Pineco", "Spinarak"},

["Crystal"] = {itemid = 2285, "Dratini", "Dragonair", "Magikarp", "Omanyte", "Kabuto"},

["Darkness"] = {itemid = 2286, "Gastly", "Haunter"},

["Earth"] = {itemid = 2287, "Cubone", "Sandshrew", "Nidorino", "Nidorina", "Diglett", "Phanpy", "Sentret"},

["Enigma"] = {itemid = 2288, "Abra", "Kadabra", "Psyduck", "Slowpoke", "Drowzee", "Eevee", "Porygon"},

["Heart"] = {itemid = 2289, "Rattata", "Pidgey", "Pidgeotto", "Spearow", "Clefairy", "Jigglypuff", "Meowth", "Doduo", "Golbat", "Cleffa", "Scyther", "Hoothoot", "Igglybuff", "Chansey", "Snubbull", "Biyomon"},

["Ice"] = {itemid = 2290, "Seel", "Shellder", "Smoochum"},

["Revert"] = {itemid = 1988, "Garurumon", "Birdramon"},

}

 

local eevee = {'2277', '2279', '2283', '2288'}

function onUse(cid, item, frompos, item2, topos)

if not isMonster(item2.uid) then

return true

end

if not isPlayer(getCreatureMaster(item2.uid)) or getCreatureMaster(item2.uid) ~= cid then

doPlayerSendCancel(cid, "You can only use stones on pokemons you own.")

return true

end

for i,x in pairs(types) do

if getPlayerSlotItem(cid, 7).itemid ~= fotos[getCreatureName(item2.uid)].fotopoke then

return doPlayerSendCancel(cid, "Please, keep your pokemon's ball at the right place during evolution!")

end

if item.itemid == x.itemid then

if isPlayerSummon(cid, item2.uid) then

if table.find(x, getCreatureName(item2.uid)) then

if getCreatureName(item2.uid) == "Eevee" then

if item.itemid == 2279 then

if getPlayerLevel(cid) < 55 then

return doPlayerSendCancel(cid, "Sorry, you don't have the required level to evolve this pokemon (55).")

end

local pokeball = getPlayerSlotItem(cid, 8)

doItemSetAttribute(pokeball.uid, "poke", "This is Jolteon's pokeball. HP = [5500/5500]")

doItemSetAttribute(pokeball.uid, "description", "Contains a Jolteon.")

doPlayerSendTextMessage(cid, 27, "Congratulations! Your "..getCreatureName(item2.uid).." evolved into a Jolteon!")

doSendMagicEffect(topos, 232)

doTransformItem(getPlayerSlotItem(cid, 7).uid, 2511)

doSendMagicEffect(getThingPos(cid), 173)

local oldpos = getThingPos(item2.uid)

doRemoveCreature(item2.uid)

doSummonMonster(cid, "Jolteon")

local pk = getCreatureSummons(cid)[1]

registerCreatureEvent(pk, "DiePoke")

registerCreatureEvent(pk, "Exp")

doTeleportThing(pk, oldpos, false)

doCreatureSetLookDir(pk, 2)

setCreatureMaxHealth(pk, getCreatureMaxHealth(pk) + (poken[getCreatureName(pk)].cons * getPlayerLevel(cid)))

doCreatureAddHealth(pk, getCreatureMaxHealth(pk))

setPlayerStorageValue(cid, 2, 0)

elseif item.itemid == 2277 then

if getPlayerLevel(cid) < 55 then

return doPlayerSendCancel(cid, "Sorry, you don't have the required level to evolve this pokemon (55).")

end

local pokeball = getPlayerSlotItem(cid, 8)

doItemSetAttribute(pokeball.uid, "poke", "This is Vaporeon's pokeball. HP = [5500/5500]")

doItemSetAttribute(pokeball.uid, "description", "Contains a Vaporeon.")

doPlayerSendTextMessage(cid, 27, "Congratulations! Your "..getCreatureName(item2.uid).." evolved into a Vaporeon!")

doSendMagicEffect(topos, 232)

doTransformItem(getPlayerSlotItem(cid, 7).uid, 2510)

doSendMagicEffect(getThingPos(cid), 173)

local oldpos = getThingPos(item2.uid)

doRemoveCreature(item2.uid)

doSummonMonster(cid, "Vaporeon")

local pk = getCreatureSummons(cid)[1]

registerCreatureEvent(pk, "DiePoke")

registerCreatureEvent(pk, "Exp")

doTeleportThing(pk, oldpos, false)

doCreatureSetLookDir(pk, 2)

setCreatureMaxHealth(pk, getCreatureMaxHealth(pk) + (poken[getCreatureName(pk)].cons * getPlayerLevel(cid)))

doCreatureAddHealth(pk, getCreatureMaxHealth(pk))

setPlayerStorageValue(cid, 2, 0)

elseif item.itemid == 2288 then

if getPlayerLevel(cid) < 55 then

return doPlayerSendCancel(cid, "Sorry, you don't have the required level to evolve this pokemon (55).")

end

local pokeball = getPlayerSlotItem(cid, 8)

doItemSetAttribute(pokeball.uid, "poke", "This is Espeon's pokeball. HP = [5500/5500]")

doItemSetAttribute(pokeball.uid, "description", "Contains a Espeon.")

doPlayerSendTextMessage(cid, 27, "Congratulations! Your "..getCreatureName(item2.uid).." evolved into a Espeon!")

doSendMagicEffect(topos, 232)

doTransformItem(getPlayerSlotItem(cid, 7).uid, 11537)

doSendMagicEffect(getThingPos(cid), 173)

local oldpos = getThingPos(item2.uid)

doRemoveCreature(item2.uid)

doSummonMonster(cid, "Espeon")

local pk = getCreatureSummons(cid)[1]

registerCreatureEvent(pk, "DiePoke")

registerCreatureEvent(pk, "Exp")

doTeleportThing(pk, oldpos, false)

doCreatureSetLookDir(pk, 2)

setCreatureMaxHealth(pk, getCreatureMaxHealth(pk) + (poken[getCreatureName(pk)].cons * getPlayerLevel(cid)))

doCreatureAddHealth(pk, getCreatureMaxHealth(pk))

setPlayerStorageValue(cid, 2, 0)

elseif item.itemid == 2283 then

if getPlayerLevel(cid) < 55 then

return doPlayerSendCancel(cid, "Sorry, you don't have the required level to evolve this pokemon (55).")

end

local pokeball = getPlayerSlotItem(cid, 8)

doItemSetAttribute(pokeball.uid, "poke", "This is Flareon's pokeball. HP = [5500/5500]")

doItemSetAttribute(pokeball.uid, "description", "Contains a Flareon.")

doPlayerSendTextMessage(cid, 27, "Congratulations! Your "..getCreatureName(item2.uid).." evolved into a Flareon!")

doSendMagicEffect(topos, 232)

doTransformItem(getPlayerSlotItem(cid, 7).uid, 2512)

doSendMagicEffect(getThingPos(cid), 173)

local oldpos = getThingPos(item2.uid)

doRemoveCreature(item2.uid)

doSummonMonster(cid, "Flareon")

local pk = getCreatureSummons(cid)[1]

registerCreatureEvent(pk, "DiePoke")

registerCreatureEvent(pk, "Exp")

doTeleportThing(pk, oldpos, false)

doCreatureSetLookDir(pk, 2)

setCreatureMaxHealth(pk, getCreatureMaxHealth(pk) + (poken[getCreatureName(pk)].cons * getPlayerLevel(cid)))

doCreatureAddHealth(pk, getCreatureMaxHealth(pk))

setPlayerStorageValue(cid, 2, 0)

end

local i = getCreatureName(getCreatureSummons(cid)[1])

if not string.find(getPlayerStorageValue(cid, 54842), ""..i..",") then

doPlayerAddSoul(cid, 1)

setPlayerStorageValue(cid, 54842, getPlayerStorageValue(cid, 54842)..""..i..", ")

end

return true

end

 

local count = pokes[getCreatureName(item2.uid)].count

local stnid = pokes[getCreatureName(item2.uid)].stoneid

local stnid2 = pokes[getCreatureName(item2.uid)].stoneid2

local evo = pokes[getCreatureName(item2.uid)].evolution

local levell = pokes[getCreatureName(item2.uid)].level

if stnid2 > 1 and getPlayerItemCount(cid, stnid2) < count then

return doPlayerSendCancel(cid, "You need at least one "..getItemNameById(stnid).." and one "..getItemNameById(stnid2).." to evolve this pokemon!")

end

if stnid2 > 1 and getPlayerItemCount(cid, stnid) < count then

return doPlayerSendCancel(cid, "You need at least one "..getItemNameById(stnid).." and one "..getItemNameById(stnid2).." to evolve this pokemon!")

end

if getPlayerItemCount(cid, stnid) < count then

return doPlayerSendCancel(cid, "You need at least "..count.." "..getItemNameById(stnid).."s to evolve this pokemon!")

end

if getPlayerLevel(cid) < pokes[getCreatureName(item2.uid)].level then

return doPlayerSendCancel(cid, "Sorry, you don't have the required level to evolve this pokemon ("..levell..").")

end

local owner = getCreatureMaster(item2.uid)

local pokeball = getPlayerSlotItem(cid, 8)

local description = "Contains a "..evo.."."

 

local nas = {

["%%pokename"] = pokes[getCreatureName(item2.uid)].evolution

}

for i,x in pairs(nas) do

if description:find(i) then

description = description:gsub(i, x)

end

end

local slo = pokes[getCreatureName(item2.uid)].maxh

local sle = pokes[getCreatureName(item2.uid)].evolution

 

doItemSetAttribute(pokeball.uid, "poke", "This is "..evo.."'s pokeball. HP = ["..pokes[getCreatureName(item2.uid)].maxh.."/"..pokes[getCreatureName(item2.uid)].maxh.."]")

doItemSetAttribute(pokeball.uid, "description", description)

doPlayerSendTextMessage(cid, 27, "Congratulations! Your "..getCreatureName(item2.uid).." evolved into a "..evo.."!")

doSendMagicEffect(topos, 232)

doTransformItem(getPlayerSlotItem(cid, 7).uid, fotos[sle].fotopoke)

doSendMagicEffect(getThingPos(cid), 173)

local oldpos = getThingPos(item2.uid)

doRemoveCreature(item2.uid)

doSummonMonster(cid, sle)

doSendAnimatedText(getPlayerPosition(cid), "DIGIVOLVA", TEXTCOLOR_BLUE)

local pk = getCreatureSummons(cid)[1]

registerCreatureEvent(pk, "DiePoke")

registerCreatureEvent(pk, "Exp")

doTeleportThing(pk, oldpos, false)

doCreatureSetLookDir(pk, 2)

setCreatureMaxHealth(pk, slo)

doCreatureAddHealth(pk, slo)

setCreatureMaxHealth(pk, getCreatureMaxHealth(pk) + (poken[getCreatureName(pk)].cons * getPlayerLevel(cid)))

doCreatureAddHealth(pk, getCreatureMaxHealth(pk))

setPlayerStorageValue(cid, 2, 0)

local i = getCreatureName(getCreatureSummons(cid)[1])

if not string.find(getPlayerStorageValue(cid, 54842), ""..i..",") then

doPlayerAddSoul(cid, 1)

setPlayerStorageValue(cid, 54842, getPlayerStorageValue(cid, 54842)..""..i..", ")

end

break

else

return doPlayerSendCancel(cid, "Sorry, this is not the required stone to evolve this pokemon!")

end

end

end

end

return TRUE

end

 

 

 

 

 

*desculpe-me se eu estiver criado na area errado. (novo aki no xtibia)

Link para o comentário
Compartilhar em outros sites

6 respostass a esta questão

Posts Recomendados

  • 0

Coloca assim:

 

doCreatureSay(cid, "Digivolva!", TALKTYPE_MONSTER)

vlw deu certo, mas tem como personalizar tipo assim "Digivolua Monstername para Monstername"? Editado por geovanedias
Link para o comentário
Compartilhar em outros sites

  • 0

deu sim

 

[28/09/2012 22:05:56] [Error - Action Interface]

[28/09/2012 22:05:56] data/actions/scripts/evolution.lua:onUse

[28/09/2012 22:05:56] Description:

[28/09/2012 22:05:56] (luaGetCreatureName) Creature not found

 

[28/09/2012 22:05:56] [Error - Action Interface]

[28/09/2012 22:05:56] data/actions/scripts/evolution.lua:onUse

[28/09/2012 22:05:56] Description:

[28/09/2012 22:05:56] data/actions/scripts/evolution.lua:871: attempt to concatenate a boolean value

[28/09/2012 22:05:56] stack traceback:

[28/09/2012 22:05:56] data/actions/scripts/evolution.lua:871: in function <data/actions/scripts/evolution.lua:716>

 

 

 

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...