Postado Agosto 17, 2016 8 anos Aparece esse seguinte erro na distro : [17/08/2016 08:57:37] [Error - Npc interface] [17/08/2016 08:57:37] data/npc/scripts/heal.lua:onCreatureSay [17/08/2016 08:57:37] Description: [17/08/2016 08:57:37] (luaGetThing) Thing not found acontece depois que eu falo Hi, ai da uma trava de 3 seg Obstaculo Impossível? Impossível é existir algo Impossível Confira os Meus Conteúdos ! Te ajudei ? REP + E Ficamos KIT
Postado Agosto 18, 2016 8 anos Script..? Não dou suporte via PM, crie um tópico caso tenha dúvidas. Isso previne que outras pessoas com a mesma dúvida criem tópicos desnecessários.
Postado Agosto 19, 2016 8 anos Esperimente este NPC. Vá em Npc/Scripts/Heal.lua e apague tudo que tem dentro do .lua e coloque este aqui. Spoiler local posis = { --[storage da city] = {pos da nurse na city}, [897530] = {x = 1038, y = 1033, z = 7}, --saffron --alterado v1.9 \/ [897531] = {x = 1044, y = 879, z = 7}, --cerulean [897532] = {x = 1189, y = 1021, z = 7}, --lavender [897533] = {x = 1199, y = 1475, z = 7}, --fuchsia [897534] = {x = 847, y = 1011, z = 6}, --celadon [897535] = {x = 689, y = 1065, z = 7}, --viridian [897536] = {x = 1029, y = 1224, z = 7}, --vermilion [897537] = {x = 703, y = 834, z = 6}, --pewter [897538] = {x = 744, y = 1325, z = 7}, --cinnabar [897539] = {x = 1429, y = 1597, z = 6}, --snow [897540] = {x = 542, y = 675, z = 7}, --golden } 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('Please wait a few moment before asking me to heal your pokemons again!') return true end if not getTileInfo(getThingPos(cid)).protection and nurseHealsOnlyInPZ then selfSay("Please, get inside the pokémon center to heal your pokemons!") return true end for e, f in pairs(posis) do local pos = getThingPos(getNpcCid()) if isPosEqual(pos, f) then if getPlayerStorageValue(cid, e) <= -1 then setPlayerStorageValue(cid, e, 1) end end 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 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) local balls = getPokeballsInContainer(bp.uid) if #balls >= 1 then for _, uid in ipairs(balls) do doItemSetAttribute(uid, "hp", 1) for c = 1, 15 do local str = "move"..c setCD(uid, str, 0) 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 local this = getThing(uid) for a, b in pairs (pokeballs) do if isInArray(b.all, this.itemid) then doTransformItem(uid, b.on) end end end end selfSay('There you go! You and your pokemons are healthy again.') if useKpdoDlls then doUpdateMoves(cid) end end end ali onde tem ... Citar [897530] = {x = 1038, y = 1033, z = 7}, --saffron --alterado v1.9 \/ [897531] = {x = 1044, y = 879, z = 7}, --cerulean [897532] = {x = 1189, y = 1021, z = 7}, --lavender [897533] = {x = 1199, y = 1475, z = 7}, --fuchsia [897534] = {x = 847, y = 1011, z = 6}, --celadon [897535] = {x = 689, y = 1065, z = 7}, --viridian [897536] = {x = 1029, y = 1224, z = 7}, --vermilion [897537] = {x = 703, y = 834, z = 6}, --pewter [897538] = {x = 744, y = 1325, z = 7}, --cinnabar [897539] = {x = 1429, y = 1597, z = 6}, --snow [897540] = {x = 542, y = 675, z = 7}, --golden Voce edita para as posiçoes que sua nurse Joy está em cada cidade. Agora vá em Npc/Nurse Joy.xml, apague tudo e cole isto dentro Spoiler <?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> Espero que funcione com voce. Obs: Nao sei quem é o autor da script, então não deixarei os devidos créditos.
Postado Setembro 15, 2016 8 anos Em 19/08/2016 ás 14:03, IceDream disse: Esperimente este NPC. Vá em Npc/Scripts/Heal.lua e apague tudo que tem dentro do .lua e coloque este aqui. Ocultar conteúdo local posis = { --[storage da city] = {pos da nurse na city}, [897530] = {x = 1038, y = 1033, z = 7}, --saffron --alterado v1.9 \/ [897531] = {x = 1044, y = 879, z = 7}, --cerulean [897532] = {x = 1189, y = 1021, z = 7}, --lavender [897533] = {x = 1199, y = 1475, z = 7}, --fuchsia [897534] = {x = 847, y = 1011, z = 6}, --celadon [897535] = {x = 689, y = 1065, z = 7}, --viridian [897536] = {x = 1029, y = 1224, z = 7}, --vermilion [897537] = {x = 703, y = 834, z = 6}, --pewter [897538] = {x = 744, y = 1325, z = 7}, --cinnabar [897539] = {x = 1429, y = 1597, z = 6}, --snow [897540] = {x = 542, y = 675, z = 7}, --golden } 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('Please wait a few moment before asking me to heal your pokemons again!') return true end if not getTileInfo(getThingPos(cid)).protection and nurseHealsOnlyInPZ then selfSay("Please, get inside the pokémon center to heal your pokemons!") return true end for e, f in pairs(posis) do local pos = getThingPos(getNpcCid()) if isPosEqual(pos, f) then if getPlayerStorageValue(cid, e) <= -1 then setPlayerStorageValue(cid, e, 1) end end 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 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) local balls = getPokeballsInContainer(bp.uid) if #balls >= 1 then for _, uid in ipairs(balls) do doItemSetAttribute(uid, "hp", 1) for c = 1, 15 do local str = "move"..c setCD(uid, str, 0) 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 local this = getThing(uid) for a, b in pairs (pokeballs) do if isInArray(b.all, this.itemid) then doTransformItem(uid, b.on) end end end end selfSay('There you go! You and your pokemons are healthy again.') if useKpdoDlls then doUpdateMoves(cid) end end end ali onde tem ... Voce edita para as posiçoes que sua nurse Joy está em cada cidade. Agora vá em Npc/Nurse Joy.xml, apague tudo e cole isto dentro Ocultar conteúdo <?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> Espero que funcione com voce. Obs: Nao sei quem é o autor da script, então não deixarei os devidos créditos. Ainda mantem o Erro. To com o mesmo erro no meu server...
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.