Egg System com NPC
+5
ageu
095455
leinad
[PS]Killer
Xisto
9 participantes
Poketibia Script :: OPTS - Open Poketibia Server :: Zona do Scripter :: Actions, Talkactions & Moveevents
Página 1 de 1
Egg System com NPC
Fiz esse topico apos o pedido do Bullet. Então vamos deixar de papo e vamos logo ao que importa.
O sistema que tenho e por NPC. Se voce souber mecher vai dar pra editar na boa. Se tiver duvidas posta ai !
Nada a editar aqui.
Cole dentro e salve.
Edit@
Script do EGG:
Va na pasta: Onde esta seu server\data\actions\scripts
Crie um arquivo .LUA com nome: eggsystem
Agora coloque esse SCRIPT:
Agora va em: Seu server\data\actions
Abra o: actions.xml
E coloque dentro:
Na parte onde tem:
<!-- Weapons enchanting (Gems) -->
( Se no seu nao tiver os nome ai /\ coloque na 1° parte do "Actions.Xml")
<action itemid="12304-12324" event="script" value="eggsystem.lua"/>
Pronto.
Pronto esta ai meu sistema.
Duvidas poste.
Nao permito postar em outros Foruns ou Blogs.
Script Exclusivo da "PTS" PokeTibiaScript.
Creditos: Xisto
O sistema que tenho e por NPC. Se voce souber mecher vai dar pra editar na boa. Se tiver duvidas posta ai !
- MINI TUTORIAL::
Abra: Pasta onde esta seu server\data\npc
Crie um arquivo XML com o nome de: Vendor Egg
---------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Vendor Pokemon Egg" script="default.lua" walkinterval="350000" floorchange="0" speed="0">
<health now="150" max="150"/>
<look type="522" head="91" body="114" legs="86" feet="0"/>
<parameters>
<parameter key="message_greet" value="vendo Pokemon Egg {trade}!"/>
<parameter key="message_farewell" value="Good bye!"/>
<parameter key="message_idletimeout" value="Good bye!"/>
<parameter key="message_walkaway" value="Good bye!"/>
<parameter key="module_shop" value="1"/>
<parameter key="shop_buyable" value="pokemon
egg,12304,100000;pokemon egg,12305,100000;pokemon
egg,12306,100000;pokemon egg,12307,100000;pokemon
egg,12308,100000;pokemon egg,12309,100000;pokemon
egg,12310,100000;pokemon egg,12311,100000;pokemon
egg,12312,100000;pokemon egg,12313,100000;pokemon
egg,12314,100000;pokemon egg,12315,100000;pokemon
egg,12316,100000;pokemon egg,12317,100000;pokemon
egg,12318,100000;pokemon egg,12319,100000;pokemon
egg,12320,100000;pokemon egg,12321,100000;pokemon
egg,12322,100000;pokemon egg,12323,100000;pokemon egg,12324,100000;"/>
</parameters>
</npc> -------------------------------------------------------------
Partes em VERMELHO sao os locais onde pode editar
Fexe e salve.
Agora va em: Pasta onde esta seu server\data\npc\scripts
Crie um arquivo .LUA com nome de: Default ( Se tiver nao crie )
- Script Default::
----------------------------------------------------------------------
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
npcHandler:addModule(FocusModule:new()) -----------------------------------------------------------
Nada a editar aqui.
Cole dentro e salve.
Edit@
Script do EGG:
Va na pasta: Onde esta seu server\data\actions\scripts
Crie um arquivo .LUA com nome: eggsystem
Agora coloque esse SCRIPT:
- eggsystem::
---------------------------------------------------
local a = {
[12304] = {level = {10,25}, balltype = "normal",
pokemons = {"Bulbasaur"}},
[12305] = {level = {10,25}, balltype = "normal",
pokemons = {"Caterpie"}},
[12306] = {level = {10,25}, balltype = "normal",
pokemons = {"Clefairy"}},
[12307] = {level = {10,25}, balltype = "normal",
pokemons = {"Charmander"}},
[12308] = {level = {10,25}, balltype = "normal",
pokemons = {"Eevee"}},
[12309] = {level = {10,25}, balltype = "normal",
pokemons = {"Ekans"}},
[12310] = {level = {10,25}, balltype = "normal",
pokemons = {"Exeggcute"}},
[12311] = {level = {10,25}, balltype = "normal",
pokemons = {"Goldeen"}},
[12312] = {level = {10,25}, balltype = "normal",
pokemons = {"Horsea"}},
[12313] = {level = {10,25}, balltype = "normal",
pokemons = {"Kabuto"}},
[12314] = {level = {10,25}, balltype = "normal",
pokemons = {"Krabby"}},
[12315] = {level = {10,25}, balltype = "normal",
pokemons = {"Magikarp"}},
[12316] = {level = {10,25}, balltype = "normal",
pokemons = {"Oddish"}},
[12317] = {level = {10,25}, balltype = "normal",
pokemons = {"Pidgey"}},
[12318] = {level = {10,25}, balltype = "normal",
pokemons = {"Poliwag"}},
[12319] = {level = {10,25}, balltype = "normal",
pokemons = {"Psyduck"}},
[12320] = {level = {10,25}, balltype = "normal",
pokemons = {"Shellder"}},
[12321] = {level = {10,25}, balltype = "normal",
pokemons = {"remoraid"}},
[12322] = {level = {10,25}, balltype = "normal",
pokemons = {"Squirtle"}},
[12323] = {level = {10,25}, balltype = "normal",
pokemons = {"Vulpix"}},
[12324] = {level = {10,25}, balltype = "normal",
pokemons = {"azumarill"}}
}
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
if getCreatureMana(cid) >= 6 then
sendToDepot = true
ball = doCreateItemEx(2219)
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, "Voce Chockou Seu OVO"..item.itemid - (12304).."!")
doPlayerSendTextMessage(cid, 27, "The prize pokemon was a "..pokemon.." (level "..level.."), congratulations!")
if sendToDepot then
doPlayerSendMailByName(getCreatureName(cid), ball, 1)
doTransformItem(ball, pokeballs[btype].on)
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 va em: Seu server\data\actions
Abra o: actions.xml
E coloque dentro:
Na parte onde tem:
<!-- Weapons enchanting (Gems) -->
( Se no seu nao tiver os nome ai /\ coloque na 1° parte do "Actions.Xml")
<action itemid="12304-12324" event="script" value="eggsystem.lua"/>
Pronto.
Pronto esta ai meu sistema.
Duvidas poste.
Nao permito postar em outros Foruns ou Blogs.
Script Exclusivo da "PTS" PokeTibiaScript.
Creditos: Xisto
Re: Egg System com NPC
Diga como funciona o system e de mais detalhes de como o ultilizar
-Quero que diga como choca o egg
-Quero que diga como choca o egg
Re: Egg System com NPC
Xist da este erro aqui
[20/06/2012 19:19:51] [Error - LuaScriptInterface::loadFile] data/actions/scripts/eggsystem.lua:97: '=' expected near 'pokemons'
[20/06/2012 19:19:51] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/eggsystem.lua)
[20/06/2012 19:19:51] data/actions/scripts/eggsystem.lua:97: '=' expected near 'pokemons'
[20/06/2012 19:19:51] [Error - LuaScriptInterface::loadFile] data/actions/scripts/eggsystem.lua:97: '=' expected near 'pokemons'
[20/06/2012 19:19:51] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/eggsystem.lua)
[20/06/2012 19:19:51] data/actions/scripts/eggsystem.lua:97: '=' expected near 'pokemons'
Re: Egg System com NPC
[PS]Killer escreveu:Centurion 2.0
Cara esse sistema so funfa no Dash, centurion excluiu esse sistema.
Mais vou tentar ver aqui. Vou baixar o centurion e testar. Se funcionar eu posto a solução pra voce !
como arruma o npf fla aew pf
[PS]Killer escreveu:Xisto ja arrumei soxinho aki VLW
fla aew o script pf
leinad- Novato
- Mensagens : 3
Placar : 3
Data de inscrição : 02/07/2012
Re: Egg System com NPC
posta a solução aew vei meu é centurion 2.0 tb e n funciona o eggsystem
ning vai resp pelo jeito
ning vai resp pelo jeito
095455- Novato
- Mensagens : 6
Placar : 6
Data de inscrição : 03/07/2012
fodah
095455 escreveu:posta a solução aew vei meu é centurion 2.0 tb e n funciona o eggsystem
ning vai resp pelo jeito
e foda mnw///axei ja em varios sites mais o system mais nenuhm pra centurion 2.0
leinad- Novato
- Mensagens : 3
Placar : 3
Data de inscrição : 02/07/2012
Re: Egg System com NPC
passa aew leinad os sites q vc axo quem sabe eu editando funcione ;x
edit@ Xisto se pude onpc elite lee n funfa, eu tenhu 1 ot Lunusot, se vc pude baxa e fz a correção do npc pa funfa no meu eu agradeço ^^
leinad se sabe algum npc q fais elite e funfe no nosso servidor?
edit@ Xisto se pude onpc elite lee n funfa, eu tenhu 1 ot Lunusot, se vc pude baxa e fz a correção do npc pa funfa no meu eu agradeço ^^
leinad se sabe algum npc q fais elite e funfe no nosso servidor?
095455- Novato
- Mensagens : 6
Placar : 6
Data de inscrição : 03/07/2012
mals aew por n ter respondido
095455 escreveu:passa aew leinad os sites q vc axo quem sabe eu editando funcione ;x
edit@ Xisto se pude onpc elite lee n funfa, eu tenhu 1 ot Lunusot, se vc pude baxa e fz a correção do npc pa funfa no meu eu agradeço ^^
leinad se sabe algum npc q fais elite e funfe no nosso servidor?
olh acara tds q eu axei foi no Xtibia mais n axei nenhum pra centurion o maldito npc n aparece
@edit:mnw eu axei um script de elite lee antes do egg mais n pego tbm
leinad- Novato
- Mensagens : 3
Placar : 3
Data de inscrição : 02/07/2012
Re: Egg System com NPC
ae leinad noticia boa o npc pega sim, problema é q retirei ele de 1 pokemon dash advanced, procura google por pokemon dash advanced.
é o link do 4shared ai vai ta:pokemon dash advanced.rar-f algo assim.
ai vc baxa pega o eggsystem do actions e cola no seu assim q funfo o meu vo posta aki a script caso n de certo
local a = {
[12304] = {level = {10,25}, balltype = "normal",
pokemons = {"Bulbasaur"}},
[12305] = {level = {10,25}, balltype = "normal",
pokemons = {"Caterpie"}},
[12306] = {level = {10,25}, balltype = "normal",
pokemons = {"Clefairy"}},
[12307] = {level = {10,25}, balltype = "normal",
pokemons = {"Charmander"}},
[12308] = {level = {10,25}, balltype = "normal",
pokemons = {"Eevee"}},
[12309] = {level = {10,25}, balltype = "normal",
pokemons = {"Ekans"}},
[12310] = {level = {10,25}, balltype = "normal",
pokemons = {"Exeggcute"}},
[12311] = {level = {10,25}, balltype = "normal",
pokemons = {"Goldeen"}},
[12312] = {level = {10,25}, balltype = "normal",
pokemons = {"Horsea"}},
[12313] = {level = {10,25}, balltype = "normal",
pokemons = {"Kabuto"}},
[12314] = {level = {10,25}, balltype = "normal",
pokemons = {"Krabby"}},
[12315] = {level = {10,25}, balltype = "normal",
pokemons = {"Magikarp"}},
[12316] = {level = {10,25}, balltype = "normal",
pokemons = {"Oddish"}},
[12317] = {level = {10,25}, balltype = "normal",
pokemons = {"Pidgey"}},
[12318] = {level = {10,25}, balltype = "normal",
pokemons = {"Poliwag"}},
[12319] = {level = {10,25}, balltype = "normal",
pokemons = {"Psyduck"}},
[12320] = {level = {10,25}, balltype = "normal",
pokemons = {"Shellder"}},
[12321] = {level = {10,25}, balltype = "normal",
pokemons = {"Spearow"}},
[12322] = {level = {10,25}, balltype = "normal",
pokemons = {"Squirtle"}},
[12323] = {level = {10,25}, balltype = "normal",
pokemons = {"Vulpix"}},
[12324] = {level = {10,25}, balltype = "normal",
pokemons = {"Weedle"}}
}
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
if getCreatureMana(cid) >= 6 then
sendToDepot = true
ball = doCreateItemEx(2219)
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, "Voce Chockou Seu OVO"..item.itemid - (12304).."!")
doPlayerSendTextMessage(cid, 27, "The prize pokemon was a "..pokemon.." (level "..level.."), congratulations!")
if sendToDepot then
doPlayerSendMailByName(getCreatureName(cid), ball, 1)
doTransformItem(ball, pokeballs[btype].on)
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
tenta me ajuda aew com npc q pede lee+20 e 200k pra fz elite, ou algum tuto de como criar vocaçoes com dmg extra de elementos ;x
é o link do 4shared ai vai ta:pokemon dash advanced.rar-f algo assim.
ai vc baxa pega o eggsystem do actions e cola no seu assim q funfo o meu vo posta aki a script caso n de certo
local a = {
[12304] = {level = {10,25}, balltype = "normal",
pokemons = {"Bulbasaur"}},
[12305] = {level = {10,25}, balltype = "normal",
pokemons = {"Caterpie"}},
[12306] = {level = {10,25}, balltype = "normal",
pokemons = {"Clefairy"}},
[12307] = {level = {10,25}, balltype = "normal",
pokemons = {"Charmander"}},
[12308] = {level = {10,25}, balltype = "normal",
pokemons = {"Eevee"}},
[12309] = {level = {10,25}, balltype = "normal",
pokemons = {"Ekans"}},
[12310] = {level = {10,25}, balltype = "normal",
pokemons = {"Exeggcute"}},
[12311] = {level = {10,25}, balltype = "normal",
pokemons = {"Goldeen"}},
[12312] = {level = {10,25}, balltype = "normal",
pokemons = {"Horsea"}},
[12313] = {level = {10,25}, balltype = "normal",
pokemons = {"Kabuto"}},
[12314] = {level = {10,25}, balltype = "normal",
pokemons = {"Krabby"}},
[12315] = {level = {10,25}, balltype = "normal",
pokemons = {"Magikarp"}},
[12316] = {level = {10,25}, balltype = "normal",
pokemons = {"Oddish"}},
[12317] = {level = {10,25}, balltype = "normal",
pokemons = {"Pidgey"}},
[12318] = {level = {10,25}, balltype = "normal",
pokemons = {"Poliwag"}},
[12319] = {level = {10,25}, balltype = "normal",
pokemons = {"Psyduck"}},
[12320] = {level = {10,25}, balltype = "normal",
pokemons = {"Shellder"}},
[12321] = {level = {10,25}, balltype = "normal",
pokemons = {"Spearow"}},
[12322] = {level = {10,25}, balltype = "normal",
pokemons = {"Squirtle"}},
[12323] = {level = {10,25}, balltype = "normal",
pokemons = {"Vulpix"}},
[12324] = {level = {10,25}, balltype = "normal",
pokemons = {"Weedle"}}
}
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
if getCreatureMana(cid) >= 6 then
sendToDepot = true
ball = doCreateItemEx(2219)
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, "Voce Chockou Seu OVO"..item.itemid - (12304).."!")
doPlayerSendTextMessage(cid, 27, "The prize pokemon was a "..pokemon.." (level "..level.."), congratulations!")
if sendToDepot then
doPlayerSendMailByName(getCreatureName(cid), ball, 1)
doTransformItem(ball, pokeballs[btype].on)
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
tenta me ajuda aew com npc q pede lee+20 e 200k pra fz elite, ou algum tuto de como criar vocaçoes com dmg extra de elementos ;x
095455- Novato
- Mensagens : 6
Placar : 6
Data de inscrição : 03/07/2012
Re: Egg System com NPC
ai gnt vcs sabe me informa se é td 1 egg igual o sao varios diferentes?
rafaaw- Novato
- Mensagens : 3
Placar : 5
Data de inscrição : 16/08/2012
Re: Egg System com NPC
rafaaw escreveu:ai gnt vcs sabe me informa se é td 1 egg igual o sao varios diferentes?
rafaaw- Novato
- Mensagens : 3
Placar : 5
Data de inscrição : 16/08/2012
Re: Egg System com NPC
Poderia me informar se tem um Sistema de acasalamento, Tipo pega dois pokemons Do mesmo tipo, Exemplo: Chiarizard Male E Charizard femele Bota em um npc q cude dele por um tempo e dps sai e As vezes vem egg deles e as vezes nao depende da sorte
Grato.
Grato.
Slashes123- Novato
- Mensagens : 1
Placar : 1
Data de inscrição : 28/01/2013
deu errou -.-
[22/02/2013 20:09:29] [Error - LuaScriptInterface::loadFile] data/actions/scripts/eggsystem.lua:96: unfinished string near '"You are already holding'
[22/02/2013 20:09:29] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/eggsystem.lua)
[22/02/2013 20:09:29] data/actions/scripts/eggsystem.lua:96: unfinished string near '"You are already holding'
[22/02/2013 20:09:29] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/eggsystem.lua)
[22/02/2013 20:09:29] data/actions/scripts/eggsystem.lua:96: unfinished string near '"You are already holding'
Alcides011- Novato
- Mensagens : 1
Placar : 1
Data de inscrição : 20/02/2013
Re: Egg System com NPC
Como faz pro Pokemon sair do ovo ?
Carlos Dwar- Novato
- Mensagens : 1
Placar : 1
Data de inscrição : 28/02/2014
Tópicos semelhantes
» [Talkaction] Advanced reset System
» [Talkaction] Love system para Poketibia
» [Action] Order system
» Tirar level System
» (PEDIDO) - Addons System.
» [Talkaction] Love system para Poketibia
» [Action] Order system
» Tirar level System
» (PEDIDO) - Addons System.
Poketibia Script :: OPTS - Open Poketibia Server :: Zona do Scripter :: Actions, Talkactions & Moveevents
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|