Ir para conteúdo

Featured Replies

Postado

Olá pessoal, alguém poderia me da suporte nessa scripter ficaria grato é deixarei +rep claro

Bom não não curar todos os Pokémons!

 

local posis = {   --[storage da city] = {pos da nurse na city},
[897530] = {x = 1037, y = 1032, z = 7},   --saffron                   --alterado v1.9 \/
[897531] = {x = 1044, y = 879, z = 7},    --cerulean
[897532] = {x = 1189, y = 1021, z = 7},    --lavender
[897533] = {x = 1195, y = 1475, z = 7},    --fuchsia
[897534] = {x = 847, y = 1011, z = 6},    --celadon
[897535] = {x = 689, y = 1065, z = 7},    --viridian
[897536] = {x = 1030, y = 1215, z = 7},    --vermilion
[897537] = {x = 703, y = 834, z = 6},    --pewter
[897538] = {x = 743, y = 1326, z = 7},    --cinnabar
[897539] = {x = 2442, y = 1739, z = 6},    --Singer
[897540] = {x = 1631, y = 1664, z = 7},    --Hunter Village
[897541] = {x = 732, y = 1165, z = 7},   --Pallet  
[897542] = {x = 1514, y = 1009, z = 7},   --Battle City
[897543] = {x = 2431, y = 1507, z = 7},   --Orre
[897544] = {x = 1493, y = 1819, z = 7},   --Sunshine  
[897545] = {x = 2453, y = 1642, z = 7},   --LaRosse
[897546] = {x = 2442, y = 1739, z = 6},   --Carnavale
[897547] = {x = 1280, y = 718, z = 9},   --Pvp  
[897548] = {x = 1165, y = 1462, z = 7},   -- Safari
[897549] = {x = 1280, y = 716, z = 10},   -- Staff    
} 

function onThingMove(creature, thing, oldpos, oldstackpos)
end

function onCreatureAppear(creature)
end

function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Ate mais treinador!')
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, 'oi') or msgcontains(msg, 'ajuda')) and (getDistanceToCreature(cid) <= 3)) then

     if exhaustion.get(cid, 9211) then
    selfSay('Por favor, aguarde um momento pouco antes de pedir me para curar de seus pokemon novamente!')
    return true
       end

    if not getTileInfo(getThingPos(cid)).protection and nurseHealsOnlyInPZ then
        selfSay("Por favor, entre no centro Pokemon para curar seus pokemons!")
    return true
    end
    
    if getPlayerStorageValue(cid, 52480) >= 1 then
       selfSay("You can't do that while in a Duel!")   --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), 12)

    local mypb = getPlayerSlotItem(cid, 8)

    if #getCreatureSummons(cid) >= 1 then

        if not nurseHealsPokemonOut then
            selfSay("Por favor, devolva o seu pokemon Para Pokeball")
        return true
        end

        local s = getCreatureSummons(cid)[1]
        doCreatureAddHealth(s, getCreatureMaxHealth(s))
        doSendMagicEffect(getThingPos(s), 12)
        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('Pronto! Você e seus pokemons são saudaveis novamente.')
    if useKpdoDlls then  --alterado v1.7
       doUpdateMoves(cid)
    end
end
end

 

Editado por Killua Fran (veja o histórico de edições)

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo