• TibiaFace

    Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...

    .
    demo menumenu

    Afiliados



    Votar:

    [Spells] Error en un scripts

    Compartir:

    Ver el tema anterior Ver el tema siguiente Ir abajo  Mensaje (Página 1 de 1.)

    1default [Spells] Error en un scripts Miér Dic 09, 2020 7:56 pm

    SoyFabi

    SoyFabi
    Miembro
    Miembro
    Descripcion escribió:Tengo un error en el scripts y no encuentro la razon por la cual me esta dando error en la consola:
    [Spells] Error en un scripts O2ZrSFU

    Me faltaria anadirle un End o quitarle no tengo ni idea intente de 2 formas y aun asi no se me soluciona:

    Este es el scripts:
    Código:
    local portoes = {
    --[numero do portao] = {lk = {lookType = id da roupa}, skills = quanto de skills aumenta cada portao, txt = texto do portão, tempPort = quanto tempo vai durar cada portao.},
    [1] = {lk = {lookType = 911}, skills = 20, level = 75, txt = "1 portão, o Portao de Abertura. Abraa!", tempPort = 4, effect = 423},
    [2] = {lk = {lookType = 911}, skills = 33, level = 100, txt = "2 porto, o Portao da Cura. Abraa!", tempPort = 4, effect = 423},
    [3] = {lk = {lookType = 907}, skills = 40, level = 150, txt = "3 portao, o Portao da Vida. Abraa!", tempPort = 4, effect = 423},
    [4] = {lk = {lookType = 907}, skills = 49, level = 200, txt = "4 portao, o Portao da Dor. Abraa!", tempPort = 4, effect = 424},
    [5] = {lk = {lookType = 911}, skills = 55, level = 300, txt = "5 portao, o Portao do Limite. Abraa!", tempPort = 4, effect = 424},
    [6] = {lk = {lookType = 960}, skills = 60, level = 350, txt = "6 portao, o Portao da Vis㯮 Abraa!", tempPort = 4, effect = 325},
    [7] = {lk = {lookType = 959}, skills = 65, level = 600, txt = "7 portao, o Portao da Insanidade. Abraa!", tempPort = 4, effect = 323},
    [8] = {lk = {lookType = 961}, skills = 76, level = 800, txt = "8 portao, o Portao da Morte. Abraa!", tempPort = 48, effect = 324}
    }
    local t = {
       storage = 92834, -- storage do buff
       stoPort = 92835, -- storage dos portões
       tempoBuff = 60, -- tempo que o buff vai durar
    }

    local attr = {}
    for i = 1, #portoes do
       local value = portoes[i]
       attr[i] = createConditionObject(CONDITION_ATTRIBUTES, value.tempPort*1000, true, 2)
       setConditionParam(attr[i], CONDITION_PARAM_SKILL_FIST, value.skills)
       setConditionParam(attr[i], CONDITION_PARAM_SKILL_CLUB, value.skills)
       setConditionParam(attr[i], CONDITION_PARAM_SKILL_SWORD, value.skills)
       setConditionParam(attr[i], CONDITION_PARAM_SKILL_AXE, value.skills)
       setConditionParam(attr[i], CONDITION_PARAM_SKILL_DISTANCE, value.skills)
    end

    local function openGates(uid)
       if isPlayer(uid) then
          if getPlayerStorageValue(uid, t.storage) > os.time() then
             if getCreatureStorage(uid, t.stoPort) <= 8 then
             local posbuff = {x=getPlayerPosition(uid).x, y=getPlayerPosition(uid).y, z=getPlayerPosition(uid).z}
             local eff = portoes[getPlayerStorageValue(uid, t.stoPort)]
             doSendMagicEffect(posbuff, eff.effect) 
             end
             if (not getCreatureCondition(uid, CONDITION_ATTRIBUTES, 2)) and getCreatureStorage(uid, t.stoPort) <= 8 then
                addEvent(function()
                      doCreatureSay(uid, 'Voc꠮㯠possui level suficiente', TALKTYPE_MONSTER)
                      local value = portoes[getPlayerStorageValue(uid, t.stoPort)]
                      local outfit = getCreatureOutfit(uid)
                      doSetCreatureOutfit(uid, value.lk, value.tempPort*1000)
                      doAddCondition(uid, attr[getPlayerStorageValue(uid, t.stoPort)])
                      doCreatureSay(uid, value.txt, TALKTYPE_MONSTER)
                      doCreatureSetStorage(uid, t.stoPort, getCreatureStorage(uid, t.stoPort)+1)
                       end
                   end
                end, 300)
             end
             addEvent(openGates, 200, uid)
          end
       end
    end

    function onCastSpell(cid, var)
       if getPlayerStorageValue(cid, t.storage) < os.time() and (not getCreatureCondition(cid, CONDITION_ATTRIBUTES, 2)) then
          doCreatureSetStorage(cid, t.storage, t.tempoBuff+os.time())
          doCreatureSetStorage(cid, t.stoPort, 1)
          if isPlayer(cid) then
             addEvent(openGates, 100, cid)
          else
           doPlayerSendCancel(cid, "Voc꠪ᠥstᠣom o Buff.")
             return false
          end
       return true
    end
    end
    Captura del Error escribió:Imagen del error: [Spells] Error en un scripts Empty
    El error radica en: Spells

    2 participantes

    2default Re: [Spells] Error en un scripts Miér Dic 09, 2020 8:28 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    doPlayerSendCancel(cid, "Voc꠪ᠥstᠣom o Buff.")

    tienes muchos simbolos raro en los mensajes tendras que revisar tu scritps



    [Spells] Error en un scripts YNU5B25
    2 participantes
    https://www.tibiaface.com

    3default Re: [Spells] Error en un scripts Jue Dic 10, 2020 12:55 pm

    SoyFabi

    SoyFabi
    Miembro
    Miembro
    Código:
    local portoes = {
    --[numero do portao] = {lk = {lookType = id da roupa}, skills = quanto de skills aumenta cada portao, txt = texto do portão, tempPort = quanto tempo vai durar cada portao.},
    [1] = {lk = {lookType = 911}, skills = 20, level = 75, txt = "1 portão, o Portao de Abertura. Abraa!", tempPort = 4, effect = 423},
    [2] = {lk = {lookType = 911}, skills = 33, level = 100, txt = "2 porto, o Portao da Cura. Abraa!", tempPort = 4, effect = 423},
    [3] = {lk = {lookType = 907}, skills = 40, level = 150, txt = "3 portao, o Portao da Vida. Abraa!", tempPort = 4, effect = 423},
    [4] = {lk = {lookType = 907}, skills = 49, level = 200, txt = "4 portao, o Portao da Dor. Abraa!", tempPort = 4, effect = 424},
    [5] = {lk = {lookType = 911}, skills = 55, level = 300, txt = "5 portao, o Portao do Limite. Abraa!", tempPort = 4, effect = 424},
    [6] = {lk = {lookType = 960}, skills = 60, level = 350, txt = "6 portao, o Portao da Vis㯮 Abraa!", tempPort = 4, effect = 325},
    [7] = {lk = {lookType = 959}, skills = 65, level = 600, txt = "7 portao, o Portao da Insanidade. Abraa!", tempPort = 4, effect = 323},
    [8] = {lk = {lookType = 961}, skills = 76, level = 800, txt = "8 portao, o Portao da Morte. Abraa!", tempPort = 48, effect = 324}
    }
    local t = {
      storage = 92834, -- storage do buff
      stoPort = 92835, -- storage dos portões
      tempoBuff = 60, -- tempo que o buff vai durar
    }

    local attr = {}
    for i = 1, #portoes do
      local value = portoes[i]
      attr[i] = createConditionObject(CONDITION_ATTRIBUTES, value.tempPort*1000, true, 2)
      setConditionParam(attr[i], CONDITION_PARAM_SKILL_FIST, value.skills)
      setConditionParam(attr[i], CONDITION_PARAM_SKILL_CLUB, value.skills)
      setConditionParam(attr[i], CONDITION_PARAM_SKILL_SWORD, value.skills)
      setConditionParam(attr[i], CONDITION_PARAM_SKILL_AXE, value.skills)
      setConditionParam(attr[i], CONDITION_PARAM_SKILL_DISTANCE, value.skills)
    end

    local function openGates(uid)
      if isPlayer(uid) then
          if getPlayerStorageValue(uid, t.storage) > os.time() then
            if getCreatureStorage(uid, t.stoPort) <= 8 then
            local posbuff = {x=getPlayerPosition(uid).x, y=getPlayerPosition(uid).y, z=getPlayerPosition(uid).z}
            local eff = portoes[getPlayerStorageValue(uid, t.stoPort)]
            doSendMagicEffect(posbuff, eff.effect) 
            end
            if (not getCreatureCondition(uid, CONDITION_ATTRIBUTES, 2)) and getCreatureStorage(uid, t.stoPort) <= 8 then
                addEvent(function()
                      doCreatureSay(uid, 'Usted activo el buff', TALKTYPE_MONSTER)
                      local value = portoes[getPlayerStorageValue(uid, t.stoPort)]
                      local outfit = getCreatureOutfit(uid)
                      doSetCreatureOutfit(uid, value.lk, value.tempPort*1000)
                      doAddCondition(uid, attr[getPlayerStorageValue(uid, t.stoPort)])
                      doCreatureSay(uid, value.txt, TALKTYPE_MONSTER)
                      doCreatureSetStorage(uid, t.stoPort, getCreatureStorage(uid, t.stoPort)+1)
                        end
                  end
                end, 300)
            end
            addEvent(openGates, 200, uid)
          end
      end
    end

    function onCastSpell(cid, var)
      if getPlayerStorageValue(cid, t.storage) < os.time() and (not getCreatureCondition(cid, CONDITION_ATTRIBUTES, 2)) then
          doCreatureSetStorage(cid, t.storage, t.tempoBuff+os.time())
          doCreatureSetStorage(cid, t.stoPort, 1)
          if isPlayer(cid) then
            addEvent(openGates, 100, cid)
          else
          doPlayerSendCancel(cid, "Usted esta con Buff.")
            return false
          end
      return true
    end
    end

    Si pero aunque yo arregle eso me sigue dando el mismo error.

    2 participantes

    4default Re: [Spells] Error en un scripts Jue Dic 10, 2020 1:58 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    tenias muchos end en la la funcion opengates

    Código:

            local portoes = {
            --[numero do portao] = {lk = {lookType = id da roupa}, skills = quanto de skills aumenta cada portao, txt = texto do portão, tempPort = quanto tempo vai durar cada portao.},
            [1] = {lk = {lookType = 911}, skills = 20, level = 75, txt = "1 portão, o Portao de Abertura. Abraa!", tempPort = 4, effect = 423},
            [2] = {lk = {lookType = 911}, skills = 33, level = 100, txt = "2 porto, o Portao da Cura. Abraa!", tempPort = 4, effect = 423},
            [3] = {lk = {lookType = 907}, skills = 40, level = 150, txt = "3 portao, o Portao da Vida. Abraa!", tempPort = 4, effect = 423},
            [4] = {lk = {lookType = 907}, skills = 49, level = 200, txt = "4 portao, o Portao da Dor. Abraa!", tempPort = 4, effect = 424},
            [5] = {lk = {lookType = 911}, skills = 55, level = 300, txt = "5 portao, o Portao do Limite. Abraa!", tempPort = 4, effect = 424},
            [6] = {lk = {lookType = 960}, skills = 60, level = 350, txt = "6 portao, o Portao da Vis㯮 Abraa!", tempPort = 4, effect = 325},
            [7] = {lk = {lookType = 959}, skills = 65, level = 600, txt = "7 portao, o Portao da Insanidade. Abraa!", tempPort = 4, effect = 323},
            [8] = {lk = {lookType = 961}, skills = 76, level = 800, txt = "8 portao, o Portao da Morte. Abraa!", tempPort = 48, effect = 324}
            }
            local t = {
              storage = 92834, -- storage do buff
              stoPort = 92835, -- storage dos portões
              tempoBuff = 60, -- tempo que o buff vai durar
            }

            local attr = {}
            for i = 1, #portoes do
              local value = portoes[i]
              attr[i] = createConditionObject(CONDITION_ATTRIBUTES, value.tempPort*1000, true, 2)
              setConditionParam(attr[i], CONDITION_PARAM_SKILL_FIST, value.skills)
              setConditionParam(attr[i], CONDITION_PARAM_SKILL_CLUB, value.skills)
              setConditionParam(attr[i], CONDITION_PARAM_SKILL_SWORD, value.skills)
              setConditionParam(attr[i], CONDITION_PARAM_SKILL_AXE, value.skills)
              setConditionParam(attr[i], CONDITION_PARAM_SKILL_DISTANCE, value.skills)
            end

            local function openGates(uid)
              if isPlayer(uid) then
                  if getPlayerStorageValue(uid, t.storage) > os.time() then
                    if getCreatureStorage(uid, t.stoPort) <= 8 then
                    local posbuff = {x=getPlayerPosition(uid).x, y=getPlayerPosition(uid).y, z=getPlayerPosition(uid).z}
                    local eff = portoes[getPlayerStorageValue(uid, t.stoPort)]
                    doSendMagicEffect(posbuff, eff.effect) 
                    end
                    if (not getCreatureCondition(uid, CONDITION_ATTRIBUTES, 2)) and getCreatureStorage(uid, t.stoPort) <= 8 then
                        addEvent(function()
                              doCreatureSay(uid, 'Voc꠮㯠possui level suficiente', TALKTYPE_MONSTER)
                              local value = portoes[getPlayerStorageValue(uid, t.stoPort)]
                              local outfit = getCreatureOutfit(uid)
                              doSetCreatureOutfit(uid, value.lk, value.tempPort*1000)
                              doAddCondition(uid, attr[getPlayerStorageValue(uid, t.stoPort)])
                              doCreatureSay(uid, value.txt, TALKTYPE_MONSTER)
                              doCreatureSetStorage(uid, t.stoPort, getCreatureStorage(uid, t.stoPort)+1)
                               
                         
                        end, 300)
                    end
                    addEvent(openGates, 200, uid)
                  end
              end
            end

            function onCastSpell(cid, var)
              if getPlayerStorageValue(cid, t.storage) < os.time() and (not getCreatureCondition(cid, CONDITION_ATTRIBUTES, 2)) then
                  doCreatureSetStorage(cid, t.storage, t.tempoBuff+os.time())
                  doCreatureSetStorage(cid, t.stoPort, 1)
                  if isPlayer(cid) then
                    addEvent(openGates, 100, cid)
                  else
                  doPlayerSendCancel(cid, "Voc꠪ᠥstᠣom o Buff.")
                    return false
                  end
              return true
            end
            end



    [Spells] Error en un scripts YNU5B25
    2 participantes
    https://www.tibiaface.com

    5default Re: [Spells] Error en un scripts Jue Dic 10, 2020 2:20 pm

    SoyFabi

    SoyFabi
    Miembro
    Miembro
    Very Happy Resuelto Gracias Very Happy

    2 participantes

    6default Re: [Spells] Error en un scripts Jue Dic 10, 2020 5:24 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    Tema Resuelto



    [Spells] Error en un scripts YNU5B25
    2 participantes
    https://www.tibiaface.com

    Contenido patrocinado


    2 participantes

    Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje (Página 1 de 1.)

    Permisos de este foro:
    No puedes responder a temas en este foro.

     

    BienvenidosTibiaFace es una comunidad de Open Tibia. Para participar debes estar registrado (click para Regístrate).