Egg System By DinoAdmin

DinoAdmin
em Actions e Talkactions

DinoAdmin

Ex Estagiário de Scripting
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 27/07/12Posts: 757Char no Tibia: [ADM] Bhoris

Vá em data/action/script e crie um arquivo chamado "egg system.lua" e cole isto dentro:

 

 

 

local a = {

[12304] = {level = {10, 15}, balltype = "normal",

pokemons = {"Bulbasaur"}}, ---- Bulbasaur Egg

[12305] = {level = {10, 15}, balltype = "normal",

pokemons = {"Caterpie"}}, ---- Caterpie Egg

[12306] = {level = {2, 8}, balltype = "normal",

pokemons = {"Cleffa"}}, ---- Cleffa Egg

[12307] = {level = {10, 15}, balltype = "normal",

pokemons = {"Charmander"}}, ---- Charmander Egg

[12308] = {level = {12, 15}, balltype = "normal",

pokemons = {"Eevee"}}, ---- Eevee Egg

[12309] = {level = {12, 15}, balltype = "normal",

pokemons = {"Ekans"}}, ---- Ekans Egg

[12310] = {level = {12, 20}, balltype = "normal",

pokemons = {"Exeggcute"}}, ---- Exeggcute Egg

[12311] = {level = {12, 20}, balltype = "normal",

pokemons = {"Goldeen"}}, ---- Goldeen Egg

[12312] = {level = {12, 20}, balltype = "normal",

pokemons = {"Horsea"}}, ---- Horsea Egg

[12313] = {level = {42, 50}, balltype = "normal",

pokemons = {"Kabuto"}}, ---- Kabuto Egg

[12314] = {level = {12, 20}, balltype = "normal",

pokemons = {"Krabby"}} ,--- Krabby Egg

[12315] = {level = {2, 8}, balltype = "normal",

pokemons = {"Magikarp"}}, ---- Magikarp Egg

[12316] = {level = {2, 8}, balltype = "normal",

pokemons = {"Oddish"}}, ---- Oddish Egg

[12317] = {level = {2, 8}, balltype = "normal",

pokemons = {"Pidgey"}}, ---- Pidgey Egg

[12318] = {level = {2, 8}, balltype = "normal",

pokemons = {"Poliwag"}}, ---- Poliwag Egg

[12319] = {level = {12, 20}, balltype = "normal",

pokemons = {"Psyduck"}}, ---- Psyduck Egg

[12320] = {level = {12, 20}, balltype = "normal",

pokemons = {"Shellder"}}, ---- Shellder Egg

[12321] = {level = {12, 20}, balltype = "normal",

pokemons = {"Spearow"}}, ---- Spearow Egg

[12322] = {level = {12, 20}, balltype = "normal",

pokemons = {"Squirtle"}}, ---- Squirtle Egg

[12323] = {level = {12, 20}, balltype = "normal",

pokemons = {"Vulpix"}}, ---- Vulpix Egg

[12324] = {level = {2, 8}, balltype = "normal",

pokemons = {"Weedle"}} ---- Weedle Egg

}

local extrastrength = 1.3

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

if getCreatureMana(cid) >= 6 then

sendToDepot = true

ball = doCreateItemEx(11826)

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, MESSAGE_STATUS_DEFAULT, "Your egg was born!")

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "You recieved a "..pokemon.." ["..level.."], congratulations, you now are dad!")

 

if sendToDepot then

doPlayerSendMailByName(getCreatureName(cid), ball, 1)

doTransformItem(ball, pokeballs[btype].on)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "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

return true

end

 

 

 

Agora em data/action/action.xml cole esta tag:

<action itemid="12304-12324" event="script" value="egg system.lua"/>

 

OBS: O ID Vai variar de acordo com o seu egg que esta em seu client, digamos que o que esteje em seu client seja 14000,14001,14002,1400

3,14004 ... 14028.

 

Voce vai colocar no lugar do 12304-12324 os numeros 14000-14028.

 

Entenderam? é para colocar o Primeiro egg - e o ultimo egg.

 

Agora dentro do script:

 

[12304] = {level = {10, 15}, balltype = "normal",

pokemons = {"Bulbasaur"}}, ---- Bulbasaur Egg

 

[12304] = ID Do Egg

level = Level minimo e maximo que pode sair do pokemon.

balltype= Tipo da pokebola que vai ter o Filhote do seu pokemon

pokemons = {"Nome do Pokemon"}}

 

Espero que todos gostem.

OBS: Script não foi testado em servidor "sem" lvl system, por isso não recomendo por em servers sem lvl system.

Em breve eu farei o sistema para o server sem lvl system.

Qualquer duvida pergunte aqui.

 

Creditos:

Equipe PADventures

DinoAdmin

Pmcd

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 14/09/12Posts: 104

Já vi esse script em vários lugares , coloque os créditos , pois isso pode ser considerado RIPP!

Sing

 

ir1RW.png

 

 

Fanbars

 

Btbrf.gif

SkyDangerous

Deus Kalec
avatar
Lorde
Lorde

INFOS

Grupo: LordeRegistrado: 17/01/09Posts: 2098Char no Tibia: Adra Sata

Também acho que nem foi ele.

 

Script ta totalmente inglês, geralmente algumas variáveis coloca em português, sei não ..

Me segui lá (:

 

b906.png

http://ageofwar.servegame.com/

IP: ageofwar.servegame.com

TIBIA: 10.78

GLOBAL PERFECT CUSTOM

DinoAdmin

Ex Estagiário de Scripting
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 27/07/12Posts: 757Char no Tibia: [ADM] Bhoris

Já vi esse script em vários lugares , coloque os créditos , pois isso pode ser considerado RIPP!

voce deve ter visto umparecido ou sla, pois igul não é com certeza.

Por via das duvidas ja coloquei os devidos creditos

 

Também acho que nem foi ele.

 

Script ta totalmente inglês, geralmente algumas variáveis coloca em português, sei não ..

 

Já foi adicionado os creditos

Slicer

Insanity
avatar
Príncipe
Príncipe

INFOS

Grupo: PríncipeRegistrado: 19/08/10Posts: 4014Gênero: Masculino

duvido q tenha em outro lugar... ja q n passa de uma ediçao da box uahuah

"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬

"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein

 

Gears

avatar
Banidos
Banidos

INFOS

Grupo: BanidosRegistrado: 11/01/13Posts: 576Char no Tibia: Darashia del Shee

Tem um quase identico, a unica diferença é a quantidade de variaveis, :)

 

Link

Estagiário 24/01/2013

pedido para sair : 23/02/2013

Volta como estagiário: 11/04/2013

Pedido para sair: 10/05/2013

Slicer

Insanity
avatar
Príncipe
Príncipe

INFOS

Grupo: PríncipeRegistrado: 19/08/10Posts: 4014Gênero: Masculino

/\ kkk pior q eh.. esse dino n cria vergonha na cara ta loko mano.. quem foi q desbaniu ele? --'

"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬

"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein

 

Demonbholder

avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 13/10/08Posts: 1551Char no Tibia: Demonbholder

Eu avisei que estaria fechando esse tipo de tópico.

 

Portanto, fechado.

Oie :D