Postado Maio 22, 2015 10 anos Olá, estou com um problema em meu heal. que quando o player fala hi com fly ou ride, o player fica com a velocidade do fly/ride. local posis = { --[storage da city] = {pos da nurse na city}, [897530] = {x = 1024, y = 1013, z = 6}, --saffron --alterado v1.9 TUDO!! \/ [897531] = {x = 981, y = 855, z = 7}, --cerulean [897532] = {x = 1238, y = 1066, z = 5}, --lavender [897533] = {x = 1224, y = 1222, z = 6}, --fuchsia [897534] = {x = 829, y = 980, z = 6}, --celadon [897535] = {x = 697, y = 1157, z = 6}, --viridian [897536] = {x = 1014, y = 1099, z = 5}, --vermilion [897537] = {x = 739, y = 864, z = 6}, --pewter [897538] = {x = 1242, y = 986, z = 6}, --cinnabar [897539] = {x = 1429, y = 1597, z = 6}, --snow [897540] = {x = 423, y = 67, z = 7}, --golden [897541] = {x = 333, y = 962, z = 7}, --cian [897542] = {x = 589, y = 1109, z = 7}, --coliseu [897543] = {x = 1455, y = 1095, z = 6}, --murcott } function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Adeus!') 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 antes de pedir-me a curar os seus pokemons novamente!') return true end if not getTileInfo(getThingPos(cid)).protection and nurseHealsOnlyInPZ then selfSay("Por favor, entre no do Centro Pokémon para curar seus pokemons!") return true end if getPlayerStorageValue(cid, 52480) >= 1 then selfSay("Você não pode fazer isso enquanto esta duelando!") --alterado v1.6.1 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 --alterado v1.7 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 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 local btype = getPokeballType(getPlayerSlotItem(cid, 8).itemid) local effect = pokeballs[btype].effect if not effect then effect = 21 end doReturnPokemon(cid, s, getPlayerSlotItem(cid, 8), effect) else if getCreatureCondition(cid, CONDITION_OUTFIT) and (getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1) then local item = getPlayerSlotItem(cid, 8) local pokemon = getItemAttribute(item.uid, "poke") local x = pokes[pokemon] doRemoveCondition(cid, CONDITION_OUTFIT) setPlayerStorageValue(cid, 17000, -1) setPlayerStorageValue(cid, 17001, -1) doTransformItem(item.uid, item.itemid-1) end 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) 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('Pronto! Você e seus pokemons estão curados novamente.') if useKpdoDlls then --alterado v1.7 doUpdateMoves(cid) end end end if useOTClient then onPokeHealthChange(cid) --alterei aki end REP+
Postado Maio 23, 2015 10 anos Altere por esse local posis = { --[storage da city] = {pos da nurse na city}, [897530] = {x = 1024, y = 1013, z = 6}, --saffron --alterado v1.9 TUDO!! \/ [897531] = {x = 981, y = 855, z = 7}, --cerulean [897532] = {x = 1238, y = 1066, z = 5}, --lavender [897533] = {x = 1224, y = 1222, z = 6}, --fuchsia [897534] = {x = 829, y = 980, z = 6}, --celadon [897535] = {x = 697, y = 1157, z = 6}, --viridian [897536] = {x = 1014, y = 1099, z = 5}, --vermilion [897537] = {x = 739, y = 864, z = 6}, --pewter [897538] = {x = 1242, y = 986, z = 6}, --cinnabar [897539] = {x = 1429, y = 1597, z = 6}, --snow [897540] = {x = 423, y = 67, z = 7}, --golden [897541] = {x = 333, y = 962, z = 7}, --cian [897542] = {x = 589, y = 1109, z = 7}, --coliseu [897543] = {x = 1455, y = 1095, z = 6}, --murcott } function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Adeus!') 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 alguns instante antes de me pedir para curar seus pokemons novamente!') return true end if not getTileInfo(getThingPos(cid)).protection and nurseHealsOnlyInPZ then selfSay("Por favor, entrar no centro pokemon? para curar seus pokemons!") return true end if getPlayerStorageValue(cid, 52480) >= 1 then selfSay("Você não pode fazer isso enquanto estiver em um duelo!") --alterado v1.6.1 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 --alterado v1.7 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("Por favor, devolva o seu pokemon para sua 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) 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('Lá vai! Você e seus pokemons são saudáveis novamente.') if useKpdoDlls then --alterado v1.7 doUpdateMoves(cid) end end if useOTClient then onPokeHealthChange(cid) --alterei aki end end
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.