Ir para conteúdo

Posts Recomendados

Faz igual eu te falei ali emcima.. coloca no starter aquilo e segue oq eu falei.. vai da certo...

mano soh adiciona novos pokes e posiçoes no starter.lua q vai da.. o problema podia ta pq tavas declarando 2 tags diferentes para um ms id...

faz q nem o cleba flo..

ok,Cara só + uma coisa aki na nurse joy de pewter não quer dar heal, As das outras citys dão e pq ela não da?

nuse.xml :

 

 

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

<npc name="Nurse Joy" script="heal.lua" walkinterval="350000" floorchange="0" speed="0">

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

<look type="532" head="91" body="102" legs="83" feet="0"/>

<parameters>

<parameter key="message_greet" value="Welcome to the pokemon center! We can {heal} your pokemons here!"/>

<parameter key="message_farewell" value="Always remember to treat well your pokemons!"/>

<parameter key="message_idletimeout" value="Have a nice day."/>

<parameter key="message_walkaway" value="Good bye young trainer!"/>

</parameters>

</npc>

 

 

Heal.Lua:

 

local pokeballs = {

[1] = {effect = 188, on = 11826, use = 11827, off = 11828, all = {11826, 11827, 11828}},

[2] = {effect = 191, on = 11829, use = 11830, off = 11831, all = {11829, 11830, 11831}},

[3] = {effect = 190, on = 11835, use = 11836, off = 11837, all = {11835, 11836, 11837}},

[4] = {effect = 189, on = 11832, use = 11833, off = 11834, all = {11832, 11833, 11834}},

[5] = {effect = 188, on = 11737, use = 11738, off = 11739, all = {11737, 11738, 11739}},

[6] = {effect = 189, on = 11740, use = 11741, off = 11742, all = {11740, 11741, 11742}},

[7] = {effect = 190, on = 11743, use = 11744, off = 11745, all = {11743, 11744, 11745}},

[8] = {effect = 191, on = 11746, use = 11747, off = 11748, all = {11746, 11747, 11748}},

}

function onThingMove(creature, thing, oldpos, oldstackpos)

end

function onCreatureAppear(creature)

end

function onCreatureDisappear(cid, pos)

if focus == cid then

selfSay('Good bye sir!')

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

function onCreatureSay(cid, type, msg)

local msg = string.lower(msg)

local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

for a, b in pairs(gobackmsgs) do

local gm = string.gsub(b.go, "doka!", "")

local bm = string.gsub(b.back, "doka!", "")

if string.find(string.lower(msg), string.lower(gm)) or string.find(string.lower(msg), string.lower(bm)) then

return true

end

end

if((msgcontains(msg, 'hi') or msgcontains(msg, 'heal') or msgcontains(msg, 'help')) and (getDistanceToCreature(cid) <= 3)) then

if exhaustion.get(cid, 9211) then

selfSay('Por favor, aguarde um momento pouco antes de me pedir para curar seu Pokemon novamente!')

return true

end

if not getTileInfo(getThingPos(cid)).protection and nurseHealsOnlyInPZ then

selfSay("Por favor, Coloque o Pokemon na Ball!")

return true

end

exhaustion.set(cid, 9211, 5)

doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid))

doCureStatus(cid, "all", true)

doSendMagicEffect(getThingPos(cid), 132)

local mypb = getPlayerSlotItem(cid, 8)

if #getCreatureSummons(cid) >= 1 then

if not nurseHealsPokemonOut then

selfSay("Please, return your pokemon to his ball!")

return true

end

local s = getCreatureSummons(cid)[1]

doCreatureAddHealth(s, getCreatureMaxHealth(s))

doSendMagicEffect(getThingPos(s), 13)

doCureStatus(s, "all", false)

if getPlayerStorageValue(s, 1008) < baseNurseryHappiness then

setPlayerStorageValue(s, 1008, baseNurseryHappiness)

end

if getPlayerStorageValue(s, 1009) > baseNurseryHunger then

setPlayerStorageValue(s, 1009, baseNurseryHunger)

end

else

if mypb.itemid ~= 0 and isPokeball(mypb.itemid) then --alterado v1.3

doItemSetAttribute(mypb.uid, "hp", 1)

if getItemAttribute(mypb.uid, "hunger") and getItemAttribute(mypb.uid, "hunger") > baseNurseryHunger then

doItemSetAttribute(mypb.uid, "hunger", baseNurseryHunger)

end

for c = 1, 15 do

local str = "move"..c

setCD(mypb.uid, str, 0)

end

if getItemAttribute(mypb.uid, "happy") and getItemAttribute(mypb.uid, "happy") < baseNurseryHappiness then

doItemSetAttribute(mypb.uid, "happy", baseNurseryHappiness)

end

if getPlayerStorageValue(cid, 17000) <= 0 and getPlayerStorageValue(cid, 17001) <= 0 and getPlayerStorageValue(cid, 63215) <= 0 then

for a, b in pairs (pokeballs) do

if isInArray(b.all, mypb.itemid) then

doTransformItem(mypb.uid, b.on)

end

end

end

end

end

local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK)

for balls = 1, 8 do --editar a qntdade de balls da tabela ali decima...

for times = 1, 3 do

local items = getItemsInContainerById(bp.uid, pokeballs[balls].all[times])

if #items >= 1 then

for _, uid in pairs(items) do

doItemSetAttribute(uid, "hp", 1)

doTransformItem(uid, pokeballs[balls].on)

for c = 1, 15 do

local str = "move"..c

setCD(uid, str, 0) --alterado v1.3

end

if getItemAttribute(uid, "hunger") and getItemAttribute(uid, "hunger") > baseNurseryHunger then

doItemSetAttribute(uid, "hunger", baseNurseryHunger)

end

if getItemAttribute(uid, "happy") and getItemAttribute(uid, "happy") < baseNurseryHappiness then

doItemSetAttribute(uid, "happy", baseNurseryHappiness)

end

end

end

end

end

 

selfSay('Vai la voce novamente! Voce e se seus Pokemons estao curados.')

end

end

 

 

ai o hela.lua e a nurse.xml se precisa de + algum coisa só é me falar.

Cara, esse problema da Nurse Joy, tenta remove-la e coloca-la novamente no seu mapa com o remere's...

Se não funcionar ai é no script mesmo!! xD

 

 

PS: o spoiler do heal esta bugado!!

Editado por GuhPk

Heal.lua

 

 

local pokeballs = {

[1] = {effect = 188, on = 11826, use = 11827, off = 11828, all = {11826, 11827, 11828}},

[2] = {effect = 191, on = 11829, use = 11830, off = 11831, all = {11829, 11830, 11831}},

[3] = {effect = 190, on = 11835, use = 11836, off = 11837, all = {11835, 11836, 11837}},

[4] = {effect = 189, on = 11832, use = 11833, off = 11834, all = {11832, 11833, 11834}},

[5] = {effect = 188, on = 11737, use = 11738, off = 11739, all = {11737, 11738, 11739}},

[6] = {effect = 189, on = 11740, use = 11741, off = 11742, all = {11740, 11741, 11742}},

[7] = {effect = 190, on = 11743, use = 11744, off = 11745, all = {11743, 11744, 11745}},

[8] = {effect = 191, on = 11746, use = 11747, off = 11748, all = {11746, 11747, 11748}},

}

function onThingMove(creature, thing, oldpos, oldstackpos)

end

function onCreatureAppear(creature)

end

function onCreatureDisappear(cid, pos)

if focus == cid then

selfSay('Good bye sir!')

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

function onCreatureSay(cid, type, msg)

local msg = string.lower(msg)

local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

for a, b in pairs(gobackmsgs) do

local gm = string.gsub(b.go, "doka!", "")

local bm = string.gsub(b.back, "doka!", "")

if string.find(string.lower(msg), string.lower(gm)) or string.find(string.lower(msg), string.lower(bm)) then

return true

end

end

if((msgcontains(msg, 'hi') or msgcontains(msg, 'heal') or msgcontains(msg, 'help')) and (getDistanceToCreature(cid) <= 3)) then

if exhaustion.get(cid, 9211) then

selfSay('Por favor, aguarde um momento pouco antes de me pedir para curar seu Pokemon novamente!')

return true

end

if not getTileInfo(getThingPos(cid)).protection and nurseHealsOnlyInPZ then

selfSay("Por favor, Coloque o Pokemon na Ball!")

return true

end

exhaustion.set(cid, 9211, 5)

doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid))

doCureStatus(cid, "all", true)

doSendMagicEffect(getThingPos(cid), 132)

local mypb = getPlayerSlotItem(cid, 8)

if #getCreatureSummons(cid) >= 1 then

if not nurseHealsPokemonOut then

selfSay("Please, return your pokemon to his ball!")

return true

end

local s = getCreatureSummons(cid)[1]

doCreatureAddHealth(s, getCreatureMaxHealth(s))

doSendMagicEffect(getThingPos(s), 13)

doCureStatus(s, "all", false)

if getPlayerStorageValue(s, 1008) < baseNurseryHappiness then

setPlayerStorageValue(s, 1008, baseNurseryHappiness)

end

if getPlayerStorageValue(s, 1009) > baseNurseryHunger then

setPlayerStorageValue(s, 1009, baseNurseryHunger)

end

else

if mypb.itemid ~= 0 and isPokeball(mypb.itemid) then --alterado v1.3

doItemSetAttribute(mypb.uid, "hp", 1)

if getItemAttribute(mypb.uid, "hunger") and getItemAttribute(mypb.uid, "hunger") > baseNurseryHunger then

doItemSetAttribute(mypb.uid, "hunger", baseNurseryHunger)

end

for c = 1, 15 do

local str = "move"..c

setCD(mypb.uid, str, 0)

end

if getItemAttribute(mypb.uid, "happy") and getItemAttribute(mypb.uid, "happy") < baseNurseryHappiness then

doItemSetAttribute(mypb.uid, "happy", baseNurseryHappiness)

end

if getPlayerStorageValue(cid, 17000) <= 0 and getPlayerStorageValue(cid, 17001) <= 0 and getPlayerStorageValue(cid, 63215) <= 0 then

for a, b in pairs (pokeballs) do

if isInArray(b.all, mypb.itemid) then

doTransformItem(mypb.uid, b.on)

end

end

end

end

end

local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK)

for balls = 1, 8 do --editar a qntdade de balls da tabela ali decima...

for times = 1, 3 do

local items = getItemsInContainerById(bp.uid, pokeballs[balls].all[times])

if #items >= 1 then

for _, uid in pairs(items) do

doItemSetAttribute(uid, "hp", 1)

doTransformItem(uid, pokeballs[balls].on)

for c = 1, 15 do

local str = "move"..c

setCD(uid, str, 0) --alterado v1.3

end

if getItemAttribute(uid, "hunger") and getItemAttribute(uid, "hunger") > baseNurseryHunger then

doItemSetAttribute(uid, "hunger", baseNurseryHunger)

end

if getItemAttribute(uid, "happy") and getItemAttribute(uid, "happy") < baseNurseryHappiness then

doItemSetAttribute(uid, "happy", baseNurseryHappiness)

end

end

end

end

end

 

selfSay('Vai la voce novamente! Voce e se seus Pokemons estao curados.')

end

end

 

 

e Agora ta pegando ?

 

Ah cara vou ver Mais tarde se pegou ou não falow

sobre a nursey não heala em pewter

é que não tem PZ no cp, ai só ta configurado para nursey heala em pz..

abre RMES, bota pz no cp e seja feliz.. (:

protect zone né ?

 

se for cara eu já tinha feito esso no remere's colocado protect zone, mas quando fui abrir server deu error na hora de carregar o mapa e ai fui no remere's e tirei a protec zone e o mapa o voltou ao norma.

 

e quando fui abrir o server dnv pegou

 

Protect zone o simbolo dela no remere's num é um escudo.

cara faz assim, usa o a atalizaçao v1.7 e o mapa q vem junto do slicer que não vai vim + esse poblema. fl'

Sorry,Pessoal Consegui tirar akele bug ,au acho que foi porque o respaw tava 10 que eu coloquei para nurse joy foi muito grande,tirei a nurse joy e o respaw coloquei a Pz e dps coloquei o o respaw 1 e s nuse jou e tudo pegou blz. desculpe pelo incoveniente.

  • 5 months later...

Como ta o actions.xml

 

-- BOXES (poke inicial)

<action itemid="1740" event="script" value="Starter.lua"/>

 

-- BOXES (Quets)

<action itemid="1740" event="script" value="Pokecial.lua"/>

 

-- POKEMON PRIZE BOXES / RARE CANDY

<action itemid="11638-11641" event="script" value="box.lua"/>

<action itemid="6569" event="script" value="rarecandy.lua" allowfaruse="1"/>

 

Ah e eu não copiei o Starter o @Cleberadm que fez se vc for lá emcima no do topico se vai ver

 

Olhemo oe error que acabou de aparecer quando fui abrir o server :

[28/10/2012 19:09:21] [Error - LuaScriptInterface::loadFile] data/actions/scripts/Pokecial.lua:44: unfinished string near '")'

[28/10/2012 19:09:21] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/Pokecial.lua)

[28/10/2012 19:09:21] data/actions/scripts/Pokecial.lua:44: unfinished string near '")'

resolvi , onde está esta parte = [starte.lua] if getPlayerLevel(cid) > 20 then -- o player precisa ser level MAIOR que 5 pra pegar

return true

end vc coloca o level do novo player tipo =

newPlayerSpawnPosZ = 7

newPlayerTownId = 1

newPlayerLevel = 20 que se encontra no config.lua ai pronto funfa mas o erro é na hora de ir pro templo , n vai :S

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