Ir para conteúdo

Lucce

Membro
  • Registro em

  • Última visita

Tudo que Lucce postou

  1. Lucce postou uma resposta no tópico em Suporte Tibia OTServer
    Manda disc ai
  2. Lucce postou uma resposta no tópico em Suporte Tibia OTServer
    Deu certo? Tirou o 8090?? Não sei com o hostinger, mas todos os sites de venda de domínio são parecidos. Vá no gerenciamento do seu domínio, procure "Alterar DNS" ou algo parecido, se houver uma dns tipo A é só editar o valor dela para seu ip. Se não houver uma dns tipo A vc adiciona um novo registro tipo: A nome: seudominio.com classe: in TLL:14400 valor:seuip
  3. Lucce postou uma resposta no tópico em Suporte Tibia OTServer
    Sim, mesmo que você só esteja usando um deles, colocar os 2 (só por precaução) não vai fazer mal
  4. Lucce postou uma resposta no tópico em Suporte Tibia OTServer
    Abra o arquivo httpd-vhosts.conf (C:\xampp\apache\conf\extra). Edite as seguintes linhas: Altere para o seu domínio. Exemplos:
  5. Então gente, eu tentei trazer um código do tsf 1x (que é para scanear o mapa) e funcionou perfeitamente, porém fica dando debug em algumas vezes e não sei o porque. O codigo oficial 1x: local distanceBetweenPositionsX = 8 local distanceBetweenPositionsY = 8 local addEventDelay = 100 local teleportsPerEvent = 3 local maxEventExecutionTime = 1000 local function teleportToClosestPosition(player, x, y, z) -- direct to position local tile = Tile(x, y, z) if not tile or not tile:getGround() or tile:hasFlag(TILESTATE_TELEPORT) or not player:teleportTo(tile:getPosition()) then for distance = 1, 3 do -- try to find some close tile for changeX = -distance, distance, distance do for changeY = -distance, distance, distance do tile = Tile(x + changeX, y + changeY, z) if tile and tile:getGround() and not tile:hasFlag(TILESTATE_TELEPORT) and player:teleportTo(tile:getPosition()) then return true end end end end return false end return true end local function sendScanProgress(player, minX, maxX, minY, maxY, x, y, z, lastProgress) local progress = math.floor(((y - minY + (((x - minX) / (maxX - minX)) * distanceBetweenPositionsY)) / (maxY - minY)) * 100) if progress ~= lastProgress then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, 'Scan progress: ~' .. progress .. '%') end return progress end local function minimapScan(cid, minX, maxX, minY, maxY, x, y, z, lastProgress) local player = Player(cid) if not player then --print('Minimap scan stopped - player logged out', cid, minX, maxX, minY, maxY, x, y, z) return end local scanStartTime = os.mtime() local teleportsDone = 0 while true do if scanStartTime + maxEventExecutionTime < os.mtime() then lastProgress = sendScanProgress(player, minX, maxX, minY, maxY, x, y, z, lastProgress) addEvent(minimapScan, addEventDelay, cid, minX, maxX, minY, maxY, x, y, z, lastProgress) break end x = x + distanceBetweenPositionsX if x > maxX then x = minX y = y + distanceBetweenPositionsY if y > maxY then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, 'Scan finished: ' .. os.time()) --print('Minimap scan complete', player:getName(), minX, maxX, minY, maxY, x, y, z) break end end if teleportToClosestPosition(player, x, y, z) then teleportsDone = teleportsDone + 1 lastProgress = sendScanProgress(player, minX, maxX, minY, maxY, x, y, z, lastProgress) --print('Minimap scan teleport', player:getName(), minX, maxX, minY, maxY, x, y, z, progress, teleportsDone) if teleportsDone == teleportsPerEvent then addEvent(minimapScan, addEventDelay, cid, minX, maxX, minY, maxY, x, y, z, progress) break end end end end local function minimapStart(player, minX, maxX, minY, maxY, x, y, z) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, 'Scan started: ' .. os.time()) --print('Minimap scan start', player:getName(), minX, maxX, minY, maxY, x, y, z) minimapScan(player:getId(), minX, maxX, minY, maxY, minX - 5, minY, z) end function onSay(player, words, param) if player:getGroup():getId() <= 4 then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, 'Only GOD can scan map. Too low Player group.') return false end if player:getAccountType() < ACCOUNT_TYPE_GAMEMASTER then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, 'Only GOD can scan map.Too low Account type.') return false end local positions = param:split(',') if #positions ~= 5 then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, 'Command requires 5 parameters: /minimap minX, maxX, minY, maxY, z') return false end for key, position in pairs(positions) do local value = tonumber(position) if not value then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, 'Invalid parameter ' .. key .. ': ' .. position) return false end positions[key] = value end minimapStart(player, positions[1], positions[2], positions[3], positions[4], positions[1] - distanceBetweenPositionsX, positions[3], positions[5]) return false end Meu código 0.4x: local distanceBetweenPositionsX = 8 local distanceBetweenPositionsY = 8 local addEventDelay = 100 local teleportsPerEvent = 3 local maxEventExecutionTime = 1000 local function isWalkable(pos) -- by Nord / editado por Omega if tile and getTileThingByPos(tile) then if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false elseif isCreature(getTopCreature(pos).uid) then return false elseif getTileInfo(pos).protection then return false elseif hasProperty(getThingFromPos(pos).uid, 3) or hasProperty(getThingFromPos(pos).uid, 7) then return false end end return true end local function teleportToClosestPosition(cid, x, y, z) -- direct to position local tile = {x = x, y = y, z = z, stackpos=253} if not tile or not getTileThingByPos(tile) or not isWalkable(tile) or not doTeleportThing(cid, tile) then for distance = 1, 3 do -- try to find some close tile for changeX = -distance, distance, distance do for changeY = -distance, distance, distance do tile = {x = x + changeX, y = y + changeY, z = z} if tile and getTileThingByPos(tile) and isWalkable(tile) and doTeleportThing(cid, tile) then return true end end end end return false end return true end local function sendScanProgress(cid, minX, maxX, minY, maxY, x, y, z, lastProgress) local progress = math.floor(((y - minY + (((x - minX) / (maxX - minX)) * distanceBetweenPositionsY)) / (maxY - minY)) * 100) if progress ~= lastProgress then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, 'Scan progress: ~' .. progress .. '%') doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, 'X = ' .. x .. 'Y = ' .. y) end return progress end local function minimapScan(cid, minX, maxX, minY, maxY, x, y, z, lastProgress) local player = isPlayer(cid) if not player then print('Minimap scan stopped - player logged out', cid, minX, maxX, minY, maxY, x, y, z) return end local scanStartTime = os.mtime() local teleportsDone = 0 while true do if scanStartTime + maxEventExecutionTime < os.mtime() then lastProgress = sendScanProgress(cid, minX, maxX, minY, maxY, x, y, z, lastProgress) addEvent(minimapScan, addEventDelay, cid, minX, maxX, minY, maxY, x, y, z, lastProgress) break end x = x + distanceBetweenPositionsX if x > maxX then x = minX y = y + distanceBetweenPositionsY if y > maxY then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Scan finished: ' .. os.time()) --print('Minimap scan complete', player:getName(), minX, maxX, minY, maxY, x, y, z) break end end if teleportToClosestPosition(cid, x, y, z) then teleportsDone = teleportsDone + 1 lastProgress = sendScanProgress(cid, minX, maxX, minY, maxY, x, y, z, lastProgress) --print('Minimap scan teleport', player:getName(), minX, maxX, minY, maxY, x, y, z, progress, teleportsDone) if teleportsDone == teleportsPerEvent then addEvent(minimapScan, addEventDelay, cid, minX, maxX, minY, maxY, x, y, z, progress) break end end end end local function minimapStart(cid, minX, maxX, minY, maxY, x, y, z) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Scan started: ' .. os.time()) --print('Minimap scan start', player:getName(), minX, maxX, minY, maxY, x, y, z) minimapScan(cid, minX, maxX, minY, maxY, minX - 5, minY, z) end function onSay(cid, words, param) if getPlayerGroupId(cid) <= 4 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Only GOD can scan map. Too low Player group.') return false end local positions = string.explode(param, ",") if #positions ~= 5 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Command requires 5 parameters: /minimap minX, maxX, minY, maxY, z') return false end for key, position in pairs(positions) do local value = tonumber(position) if not value then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Invalid parameter ' .. key .. ': ' .. position) return false end positions[key] = value end minimapStart(cid, positions[1], positions[2], positions[3], positions[4], positions[1] - distanceBetweenPositionsX, positions[3], positions[5]) return false end Postei aqui, caso alguém possa ajudar a corrigir e postar em um local certo, mas fica ai pra quem quiser utiliza-lo. Créditos ao @Vodkart pela função isWalkable (mas se ele ver isso, será q ela é precisa? Pq continuou o debug :C) Tópico original: https://otland.net/threads/tfs-1-2-minimap-generator-map-scanner.262275/
  6. Tem como saber se é escada? tipo o piso que teleporta 1 andar para cima??
  7. Pessoal estou tentando fazer um código e vou precisar saber se o tile que vai ser teleportado (aleatório em uma área) é ground (que pode caminhar) ou water/montanhas (q n podem caminhar)... Pesquisei muito e nda. To pensando em usar o getTileInfo ou o hasproperty mas não sei oq eles retornam direito e não soube trabalhar com eles. Se alguem puder me ajudar com isso vai me ajudar muito. Pfv, algum link de conselho ou alguma resposta exata, ou até mesmo oq essas 2 funções retornam!
  8. Consegui, podem fechar o tópico.
  9. Vou testar, mas mesmo se n funcionar, por essa explicação ja merece Rep+ ? Deu muito certo!! Obg
  10. Estou tentando fazer com que o player só possa usar um item em determinada position, só que meu getCreaturePosition(cid) não está me retornando nada (coloquei para enviar uma msg com ele), enfim esse é o código: function onUse(cid, item, fromPosition, item2, toPosition) local potID = 13762 -- ID do item a ser sacrificado local tab = { -- Posição de usar a potion pos1 = {x=33, y=307, z=11, stackpos=253}, pos2 = {x=32, y = 307, z = 11, stackpos=253}, storage = 120020 } if item.itemid == potID and isPlayer(cid) then doPlayerSendTextMessage(cid, 27, getCreaturePosition(cid)) if (getGlobalStorageValue(tab.storage) ~= 0) then if getCreaturePosition(cid) == tab.pos1 or getCreaturePosition(cid) == tab.pos2 then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_EXPLOSIONHIT) --setGlobalStorageValue(storage) doPlayerRemoveItem(cid, potID, 1) else doPlayerSendTextMessage(cid, 27, "Nao ha nada aqui") end else doPlayerSendTextMessage(cid, 27, "O item ja foi colocado antes.") end end return true end Na parte que eu coloquei a msg com a position antes do if de checagem, aparece isso:
  11. Então, não sei se ficou confuso no título, mas eu gostaria de saber se é possível fazer com que quando o player atacar o monstro o mostro ganhe uma immunity especifica, e quando o player pare de atacar, o mostro perca essa immunity, sei que parece confuso e sem sentido mas é algo muito importante. Explicando um pouco mais, o meu mostro não detecta invisibilidade. Porém, se alguém ataca-lo, ele poderá atacar todos invisíveis... tentei fazer uma função ontarget fazendo com q ele remova a condition invisibillity, porém com o stealth ring n funciona e tb n funciona a removeitem O que eu busco mesmo é alguma forma do creature script adicionar um <imunnity> ou mudar esse imunnity no xml do monster Resolvido: Eu consegui resolver o problema fazendo com que, quando o monstro estiver em combate ou alguém atacar ele, ele vira outro monstro q tem essa immunity
  12. Eu preciso de um npc que faça a msm coisa do que troca major e minor token na gnomebase por itens, mas sem as quests dele para tsf1x Por exemplo: Trocar 3 itens por ("Bar of Gold" id:15515) Trocar 3 itens por ("Gold Nuggets" id:2157) Porfavor me ajudem, rep++
  13. Quando eu abro a store no cliente 10x ela funciona de boa Mas quando eu abro no cliente 12x ele crasha! Meu gamestore.lua e login.php https://github.com/Luciano0227/ot
  14. Snowball Event está dando um erro no globalevents quando vai começar, alguém pode me ajudar? Lua Script Error: [Main Interface] in a timer event called from: (Unknown scriptfile) data/globalevents/scripts/SnowBall_Event.lua:12: bad argument #2 to 'random' (interval is empty) stack traceback: [C]: in ? [C]: in function 'random' data/globalevents/scripts/SnowBall_Event.lua:12: in function <data/globalevents/scripts/SnowBall_Event.lua:1> data/globalevents/scripts/SnowBall_Event.lua:12: bad argument #2 to 'random' (interval is empty) stack traceback: SnowBall_Event.lua Eu tenho como trocar esse "math.random" por algum outro código?
  15. Me falaram que era possível usar o cliente 12 com o gesior, alguém poderia me ajudar nisso??
  16. Eu instalei esse zumbi event no meu servidor Mas ao tentar logar no servidor aparece esse erro O meu global.lua
  17. Não, não consegui :C aff O gamemaster entra, mas o tutor não, nem o senior tutor :C tentei mudar para account type normal, mas também não deu.
  18. Vai precisar mexer nas sources? :C
  19. A versão é a atual 11x 12x n sei dizer exatamente :S function onSay(player, words, param) if not player:getGroup():getAccess() then return true end if player:getAccountType() < ACCOUNT_TYPE_GOD then return false end if param == "shutdown" then Game.setGameState(GAME_STATE_SHUTDOWN) else Game.setGameState(GAME_STATE_CLOSED) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Server is now closed.") end return false end
  20. Então, o titulo já diz tudo! Eu queria que o meu enquanto meu server estivesse fechado, os tutores pudessem entrar, mas só quem pode são os gods Game.setGameState(GAME_STATE_CLOSED)player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Server is now closed.") Acho que eu preciso editar esse "GAME_STATE_CLOSED" alguém sabe como? Ou é possível liberar o IP de alguém para entrar?
  21. Gente, quando eu vou postar algo no meu site na parte de "News Archive" ele posta normalmente, mas se eu for editar ele só edita a primeira postagem feita (não importa qual eu selecione, sempre vai para a primeira postagem), e quando eu apago alguma publicação ele apaga todas. Porfavor me ajudem com isso, eu preciso muito! Rep++
  22. Porfavor, eu preciso de ajuda meu vps não recebe transferencia, nem deixa eu editar nada sempre aparece esses erros: Porfavor me ajudem, eu não tenho mais oq fazer!
  23. O título já diz tudo, eu gostaria de um talkaction que sumonasse 1 boss em um local. Quando ele fosse sumonado aparecesse 2 mensagens! Uso o tsf 1.2 Obrigado desde já
  24. O título já diz tudo, quando meus players deslogam eles voltam para o templo. Como arrumar isso?? Eu só mexi no login.lua

Informação Importante

Confirmação de Termo