• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    Problema con teleporttown

    Compartir:

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

    1Problema con teleporttown Empty Problema con teleporttown Miér Nov 29, 2017 2:41 pm

    Simon Marin

    Simon Marin
    Miembro
    Miembro
    Mi Problema:
    Hola amigos de TibiaFace hoy tengo un problema con teleporttown en talkactions.
    Cuando me meto con el God y escribo el comando /t me sale el que se muestra en la imagen.

    Ademas cuando escribo /c "Name Player" Me dice lo siguiente:

    -Town El Maldi does not exists or has invalid temple position.

    Espero que me puedan ayudar...//Server 8.60 Tfs 0.4

    Dejo ademas elteleporttown.lua

    Código:
    function onSay(cid, words, param, channel)
       local master = false
       if(words == '/t') then
          master = true
       elseif(param == '') then
          local str = ""
          for i, town in ipairs(getTownList()) do
             str = str .. town.name .. "\n"
          end

          doShowTextDialog(cid, 2160, str)
          return true
       end

       local tid, t = cid, string.explode(param, ",")
       if(t[(master and 1 or 2)]) then
          tid = getPlayerByNameWildcard(t[(master and 1 or 2)])
          if(not tid or (isPlayerGhost(tid) and getPlayerAccess(tid) > getPlayerAccess(cid))) then
             doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[(master and 1 or 2)] .. " not found.")
             return true
          end
       end

       local tmp = getPlayerTown(cid)
       if(not master) then
          tmp = t[1]
          if(not tonumber(tmp)) then
             tmp = getTownId(tmp)
             if(not tmp) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Town " .. t[1] .. " does not exists.")
                return true
             end
          end
       end

       local pos = getTownTemplePosition(tmp, false)
       if(type(pos) ~= 'table' or isInArray({pos.x, pos.y}, 0)) then
          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Town " .. t[1] .. " does not exists or has invalid temple position.")
          return true
       end

       pos = getClosestFreeTile(tid, pos)
       if(type(pos) ~= 'table' or isInArray({pos.x, pos.y}, 0)) then
          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.")
          return true
       end

       tmp = getCreaturePosition(tid)
       if(doTeleportThing(tid, pos) and not isPlayerGhost(tid)) then
          doSendMagicEffect(tmp, CONST_ME_POFF)
          doSendMagicEffect(pos, CONST_ME_TELEPORT)
       end

       return true
    end



    Imagen de mi error:
    Problema con teleporttown 1JAai5H

    Esta en:
    Consola

    2 participantes

    2Problema con teleporttown Empty Re: Problema con teleporttown Miér Nov 29, 2017 2:45 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    aqui tiene

    Código:
    function onSay(cid, words, param, channel)
       local master = false
       if(words == '/t') then
          master = true
       elseif(param == '') then
          local str = ""
          for i, town in ipairs(getTownList()) do
             str = str .. town.name .. "\n"
          end

          doShowTextDialog(cid, 2160, str)
          return true
       end

       local tid, t = cid, string.explode(param, ",")
       if(t[(master and 1 or 2)]) then
          tid = getPlayerByNameWildcard(t[(master and 1 or 2)])
          if(not tid or (isPlayerGhost(tid) and getPlayerAccess(tid) > getPlayerAccess(cid))) then
             doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[(master and 1 or 2)] .. " not found.")
             return true
          end
       end

       local tmp = getPlayerTown(cid)
       if(not master) then
          tmp = t[1]
          if(not tonumber(tmp)) then
             tmp = getTownId(tmp)
             if(not tmp) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Town " .. t[1] .. " does not exists.")
                return true
             end
          end
       end

       local pos = getTownTemplePosition(tmp)
       if(type(pos) ~= 'table' or isInArray({pos.x, pos.y}, 0)) then
          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Town " .. t[1] .. " does not exists or has invalid temple position.")
          return true
       end

       pos = getClosestFreeTile(tid, pos)
       if(type(pos) ~= 'table' or isInArray({pos.x, pos.y}, 0)) then
          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.")
          return true
       end

       tmp = getCreaturePosition(tid)
       if(doTeleportThing(tid, pos) and not isPlayerGhost(tid)) then
          doSendMagicEffect(tmp, CONST_ME_POFF)
          doSendMagicEffect(pos, CONST_ME_TELEPORT)
       end

       return true
    end



    Problema con teleporttown YNU5B25
    2 participantes
    http://www.tibiaface.com

    3Problema con teleporttown Empty Re: Problema con teleporttown Miér Nov 29, 2017 2:56 pm

    Simon Marin

    Simon Marin
    Miembro
    Miembro
    Muchas gracias God Maya. Very Happy

    2 participantes

    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).