Ir para conteúdo

[Encerrado] [Pokemon] Dúvidas? - Pda


lucashgas

Posts Recomendados

@Slicer

 

Uma duvida, porque voce nao utiliza o client ( DAT e SPR ) da PxG no server ? nao acha que ficaria mais facil modificar ?

 

So e uma duvida, então nao venham dar patadas.

Link para o comentário
Compartilhar em outros sites

@Slicer

 

Uma duvida, porque voce nao utiliza o client ( DAT e SPR ) da PxG no server ? nao acha que ficaria mais facil modificar ?

 

So e uma duvida, então nao venham dar patadas.

seria complicado demais

mudar tantos pokemons efeitos das magias e etc

Link para o comentário
Compartilhar em outros sites

@Lendreo

o nick.lua fica flando sozinhu.. e para fazer ele andar eh soh ir no .xml do npc e por..

<npc name="Frost Trainer" script=".Seavell Trainers.lua" walkinterval="3000" floorchange="0" access="5" level="1" maglevel="1">

Link para o comentário
Compartilhar em outros sites

@Lendreo

 

Testa ai

data/npc:

crie um arquivo .lua, e coloque isso dentro.

 

<?xml version="1.0" encoding="UTF-8"?>

 

<npc name="Nome do Npc" script=".falando.lua" walkinterval="3500" floorchange="0" speed="100">

 

<health now="150" max="150"/>

 

<look type="614" head="115" body="122" legs="0" feet="76"/>

 

<parameters>

</parameters>

 

</npc>

 

agora vai em data/npc/scripts e crie um arquivo chamado .falando.lua e coloque isso dentro

 

local focus = 0

local talk_start = 0

local conv = 0

local target = 0

local following = false

local attacking = false

local talkState = {}

local finalname = ""

local intervalmin = 38

local intervalmax = 70

local delay = 25

local number = 1

local messages = {"Viu deu certo.",

"Edit aki",

"Aki tambem",

"e Por final aki",

}

 

function onThink()

 

if focus == 0 then

selfTurn(1)

delay = delay - 0.5

if delay <= 0 then

selfSay(messages[number])

number = number + 1

if number > #messages then

number = 1

end

delay = math.random(intervalmin, intervalmax)

end

return true

else

 

if not isCreature(focus) then

focus = 0

return true

end

end

return true

end

 

Link para o comentário
Compartilhar em outros sites

@slicer tem msn ? isso pouparia vários posts inúteis aqui no xt.

 

@all alguem me passa um link de download do map editor e.e ta dando merda aqui no meu servidor com umas posicoes de templo

Editado por RicardoSohnn
Link para o comentário
Compartilhar em outros sites

Alguem me ajuda com esse NPC ?

 

Quero ADD Mais um pokemon ( Sunkern ) e configurar ele pro PDA

 

Estou com esse erro ao usar ele:

[06/10/2012 16:28:09] [Error - Npc interface]
[06/10/2012 16:28:09] data/npc/scripts/starter.lua:onCreatureSay
[06/10/2012 16:28:09] Description:
[06/10/2012 16:28:09] data/npc/scripts/starter.lua:165: attempt to call global 'getPokemonStatus' (a nil value)
[06/10/2012 16:28:09] stack traceback:
[06/10/2012 16:28:09]     data/npc/scripts/starter.lua:165: in function <data/npc/scripts/starter.lua:39>

 

Script do NPC:

 

 

 

 

focus = 0

talk_start = 0

target = 0

following = false

attacking = false

 

function onThingMove(creature, thing, oldpos, oldstackpos)

 

end

 

 

function onCreatureAppear(creature)

 

end

 

 

function onCreatureDisappear(cid, pos)

if focus == cid then

selfSay('See ya.')

focus = 0

talk_start = 0

end

end

 

 

function onCreatureTurn(creature)

 

end

 

function msgcontains(txt, str)

return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))

end

 

 

local extrastrength = 1.1

local pokestorage = 997623

local storagecity = 997624

 

function onCreatureSay(cid, type, msg)

msg = string.lower(msg)

 

 

 

if msgcontains(msg, 'hi') and focus == 0 and getDistanceToCreature(cid) <= 3 then

selfSay('Hello, Im Professor OAK. If are you the best trainer of Island i can let you go to your {journey}!',cid)

focus = cid

talk_start = os.clock()

conv = 0

end

 

 

 

if msgcontains(msg, 'journey') and conv == 0 and focus == cid then

selfSay('Okay. First, Choose you pokemon: {Caterpie}, {Weedle}, {Rattata}?',cid)

conv = 1

return true

end

 

if getPlayerStorageValue(cid, storagepoke) < 1 then

 

if msgcontains(msg, 'caterpie') and conv == 1 and focus == cid then

 

 

local pokemon = "Caterpie"

local pokeinfo = getPokemonStatus(pokemon)

if not pokeinfo then return true end

local btype = "normal"

if not pokeballs[btype] then return true end

local gender = getRandomGenderByName(pokemon)

local level = 5

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

ball = doCreateItemEx(2219)

 

 

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..".")

 

doPlayerAddItemEx(cid, ball, true)

doTransformItem(ball, pokeballs[btype].on)

 

 

 

 

selfSay("Chose your City. {Viridian}, {Pewter}, {Cerulean}, {Vermilion}, {Saffron}, {Celadon}, {Lavender}, {Fuchsia}, {Cinnabar}.",cid)

conv = 2

focus = cid

setPlayerStorageValue(cid, storagepoke, 1)

 

end

 

if msgcontains(msg, 'weedle') and conv == 1 and focus == cid then

 

 

local pokemon = "Weedle"

local pokeinfo = getPokemonStatus(pokemon)

if not pokeinfo then return true end

local btype = "normal"

if not pokeballs[btype] then return true end

local gender = getRandomGenderByName(pokemon)

local level = 5

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

ball = doCreateItemEx(2219)

 

 

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..".")

 

doPlayerAddItemEx(cid, ball, true)

doTransformItem(ball, pokeballs[btype].on)

 

 

 

selfSay("Chose your City. {Viridian}, {Pewter}, {Cerulean}, {Vermilion}, {Saffron}, {Celadon}, {Lavender}, {Fuchsia}, {Cinnabar}.",cid)

conv = 2

focus = cid

setPlayerStorageValue(cid, storagepoke, 1)

 

 

end

 

if msgcontains(msg, 'rattata') and conv == 1 and focus == cid then

 

 

local pokemon = "Rattata"

local pokeinfo = getPokemonStatus(pokemon)

if not pokeinfo then return true end

local btype = "normal"

if not pokeballs[btype] then return true end

local gender = getRandomGenderByName(pokemon)

local level = 5

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

ball = doCreateItemEx(2219)

 

 

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..".")

 

doPlayerAddItemEx(cid, ball, true)

doTransformItem(ball, pokeballs[btype].on)

 

 

selfSay("Chose your City. {Viridian}, {Pewter}, {Cerulean}, {Vermilion}, {Saffron}, {Celadon}, {Lavender}, {Fuchsia}, {Cinnabar}.",cid)

conv = 2

focus = cid

setPlayerStorageValue(cid, storagepoke, 1)

 

 

end

 

elseif getPlayerStorageValue(cid, storagecity) < 1 then

 

selfSay("Chose your City. {Viridian}, {Pewter}, {Cerulean}, {Vermilion}, {Saffron}, {Celadon}, {Lavender}, {Fuchsia}, {Cinnabar}.",cid)

conv = 2

focus = cid

end

 

 

 

if (msg == "viridian") and conv == 2 and focus == cid then

doPlayerSetTown(cid, 8)

setPlayerStorageValue(cid, storagecity, 1)

doTeleportThing(cid, getTownTemplePosition(8))

elseif msgcontains(msg, 'pewter') and conv == 2 and focus == cid then

doPlayerSetTown(cid, 10)

setPlayerStorageValue(cid, storagecity, 1)

doTeleportThing(cid, getTownTemplePosition(10))

elseif msgcontains(msg, 'cerulean') and conv == 2 and focus == cid then

doPlayerSetTown(cid, 4)

setPlayerStorageValue(cid, storagecity, 1)

doTeleportThing(cid, getTownTemplePosition(4))

elseif msgcontains(msg, 'vermilion') and conv == 2 and focus == cid then

doPlayerSetTown(cid, 9)

setPlayerStorageValue(cid, storagecity, 1)

doTeleportThing(cid, getTownTemplePosition(9))

elseif msgcontains(msg, 'saffron') and conv == 2 and focus == cid then

doPlayerSetTown(cid, 1)

setPlayerStorageValue(cid, storagecity, 1)

doTeleportThing(cid, getTownTemplePosition(1))

elseif msgcontains(msg, 'celadon') and conv == 2 and focus == cid then

doPlayerSetTown(cid, 7)

setPlayerStorageValue(cid, storagecity, 1)

doTeleportThing(cid, getTownTemplePosition(7))

elseif msgcontains(msg, 'lavender') and conv == 2 and focus == cid then

doPlayerSetTown(cid, 5)

setPlayerStorageValue(cid, storagecity, 1)

doTeleportThing(cid, getTownTemplePosition(5))

elseif msgcontains(msg, 'fuchsia') and conv == 2 and focus == cid then

doPlayerSetTown(cid, 6)

setPlayerStorageValue(cid, storagecity, 1)

doTeleportThing(cid, getTownTemplePosition(6))

elseif msgcontains(msg, 'cinnabar') and conv == 2 and focus == cid then

doPlayerSetTown(cid, 12)

setPlayerStorageValue(cid, storagecity, 1)

doTeleportThing(cid, getTownTemplePosition(12))

end

 

if msgcontains(msg, 'yes') and (focus ~= cid) and getDistanceToCreature(cid) < 3 then

selfSay('Sorry, Im busy at this moment.')

end

 

 

if msgcontains(msg, 'bye') and focus == cid and getDistanceToCreature(cid) < 3 then

selfSay('Good bye then.')

focus = 0

talk_start = 0

end

 

end

 

 

 

function onCreatureChangeOutfit(creature)

 

end

 

 

function onThink()

if (os.clock() - talk_start) > 30 then

if focus > 0 then

selfSay('See ya.')

end

focus = 0

end

end

 

 

 

@EDIT.

 

Creditos do NPC:

 

Halls ( No forum do Centurion )

 

Proibida a copia do npc ou postagem em outros lugares sem autorização.

Link para o comentário
Compartilhar em outros sites

@zeref

ae mano todo mundo no forum da pxg ta flando q os pokes pegos com a master ja vem boostados sim ;x

 

@off

alguem ja viu a nova quest da liga? kkk ate q o pessoal da pxg tem criatividade.... '---'

Link para o comentário
Compartilhar em outros sites

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