Ir para conteúdo

Líderes

Conteúdo Popular

Mostrando conteúdo com a maior reputação desde 04/12/24 em todas áreas

  1. ok, vamos lá 1.Erro no script youdead.lua: [16/04/2024 03:41:17] [Error - CreatureScript Interface] [16/04/2024 03:41:17] data/creaturescripts/scripts/youdead.lua:onPrepareDeath [16/04/2024 03:41:17] Description: [16/04/2024 03:41:18] (luaGetCreatureMaster) Creature not found [16/04/2024 03:41:18] [Error - CreatureScript Interface] [16/04/2024 03:41:18] data/creaturescripts/scripts/youdead.lua:onPrepareDeath [16/04/2024 03:41:19] Description: [16/04/2024 03:41:19] (luaGetCreatureName) Creature not found [16/04/2024 03:41:19] > Broadcasted message: "O Jogador Fogao [level: 699553] Acaba de Morrer Para false.". Parece que há uma tentativa de obter o nome da criatura que matou o jogador (lastHitKiller). No entanto, o sistema não conseguiu encontrar essa criatura. Isso pode acontecer se o jogador for morto por um evento ou condição do jogo em vez de uma criatura específica. Você pode precisar adicionar verificações adicionais para garantir que lastHitKiller seja uma criatura válida antes de tentar obter seu nome e mestre. 2.Erro no script deathchannel.lua: [16/04/2024 03:41:23] [Error - CreatureScript Interface] [16/04/2024 03:41:23] data/creaturescripts/scripts/deathchannel.lua:onDeath [16/04/2024 03:41:23] Description: [16/04/2024 03:41:24] data/creaturescripts/scripts/deathchannel.lua:7: attempt to perform arithmetic on a boolean value [16/04/2024 03:41:24] stack traceback: [16/04/2024 03:41:24] data/creaturescripts/scripts/deathchannel.lua:7: in function <data/creaturescripts/scripts/deathchannel.lua:5> Parece que há um erro na linha 7 do script deathchannel.lua, onde uma operação aritmética está sendo tentada em um valor booleano. Isso geralmente ocorre quando você tenta realizar uma operação matemática em uma variável que não contém um valor numérico. Você precisará verificar o código na linha 7 do deathchannel.lua e garantir que todas as variáveis estejam definidas corretamente antes de tentar realizar operações matemáticas. 3.Erro XML: XML: [16/04/2024 06:52:01] [Error - CreatureEvent::executeCombat] Call stack overflow. Parece que houve um estouro de pilha (stack overflow) em um evento de combate. Isso geralmente acontece quando há muitas chamadas recursivas ou aninhadas que excedem a capacidade da pilha de execução. Você precisará investigar o evento de combate especificado e verificar se há alguma lógica recursiva ou aninhada que precisa ser otimizada para evitar estouro de pilha. 1. Para o script youdead.lua, vamos adicionar verificações adicionais para garantir que lastHitKiller seja uma criatura válida antes de tentar obter seu nome e mestre. Também vamos corrigir a mensagem de broadcast para exibir o nome do jogador que matou corretamente. function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if isPlayer(cid) then if lastHitKiller and isCreature(lastHitKiller) then local killerName = getCreatureName(lastHitKiller) if not isPlayer(lastHitKiller) and not isPlayer(getCreatureMaster(lastHitKiller)) then doBroadcastMessage("O jogador " .. getCreatureName(cid) .. " [level: " .. getPlayerLevel(cid) .. "] acabou de morrer para " .. tostring(killerName) .. ".", MESSAGE_STATUS_CONSOLE_RED) end end end return true end 2.Para o script deathchannel.lua, vamos corrigir a operação aritmética na linha 7 para garantir que todas as variáveis estejam definidas corretamente antes de tentar realizar operações matemáticas. function onDeath(cid, corpse, deathList) local target = deathList[1] if target and isCreature(target) then local targetStorage = getCreatureStorage(target, storage) if targetStorage then doCreatureSetStorage(target, storage, targetStorage + 1) for _, pid in ipairs(getPlayersOnline()) do doPlayerSendChannelMessage(pid, '', info:format(getCreatureName(cid), getPlayerLevel(cid), getCreatureStorage(cid, storage), getPlayerSex(cid) == 1 and "o" or "a", isPlayer(target) and "player" or "monstro", getCreatureName(target), isPlayer(target) and " [Level: "..getPlayerLevel(target).."]." or "."), TALKTYPE_CHANNEL_O, 0xF) for _, frag in ipairs(frags) do if targetStorage == frag then doPlayerSendChannelMessage(pid, '', win:format(getCreatureName(target), frag, getCreatureName(cid)), TALKTYPE_CHANNEL_W, 0xF) end local cidStorage = getCreatureStorage(cid, storage) if cidStorage and cidStorage >= frag then doPlayerSendChannelMessage(pid, '', lose:format(getCreatureName(target), getCreatureName(cid), cidStorage + 1), TALKTYPE_CHANNEL_RN, 0xF) end end end doCreatureSetStorage(cid, storage, 0) return true end end return false end
    1 ponto
  2. function onUse(cid, item, frompos, item2, topos) if item.uid == 1624 then if getPlayerStorageValue(cid, 1624) == -1 then if getPlayerLevel(cid) >= 0 then local espacoSuficiente = true -- Adiciona as mochilas de ID 10518 ao inventário do jogador for i = 1, 42 do if not doPlayerAddItem(cid, 10518, 1) then espacoSuficiente = false break end end -- Se houver espaço suficiente, adiciona as moedas às mochilas if espacoSuficiente then for i = 1, 42 do local backpack = doCreateItemEx(10518, 1) if backpack ~= 0 then for j = 1, 100 do doAddContainerItem(backpack, 2159, 1000) end doPlayerAddItemEx(cid, backpack, false) else espacoSuficiente = false break end end -- Se tudo ocorreu bem, informa ao jogador que ele recebeu o prêmio if espacoSuficiente then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabéns! Você ganhou um prêmio.") setPlayerStorageValue(cid, 1624, 1) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não tem espaço suficiente para as mochilas.") end else -- Se o jogador não tiver espaço suficiente, envia uma mensagem em green doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce nao tem espaço suficiente.") end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa ser level 0 para usar.") end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já pegou o bônus.") end end return true end
    1 ponto
  3. function onUse(cid, item, fromPosition, itemEx, toPosition) if item.itemid == 1624 then if getPlayerStorageValue(cid, 1624) == -1 then if getPlayerLevel(cid) >= 717217 then local espacoSuficiente = true for i = 1, 42 do local backpack = doCreateItemEx(10518, 1) if backpack ~= 0 then for j = 1, 100 do doAddContainerItem(backpack, 2159, 1000) end if not doPlayerAddItemEx(cid, backpack, false) then espacoSuficiente = false doRemoveItem(backpack) break end else espacoSuficiente = false break end end if espacoSuficiente then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabéns! Você ganhou um prêmio.") setPlayerStorageValue(cid, 1624, 1) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não tem espaço suficiente para as mochilas.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você precisa ser nível 717217 para usar.") end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já recebeu o bônus.") end end return true end
    1 ponto
  4. poderia falar qual erro aparece no console? function onUse(cid, item, frompos, item2, topos) if item.uid == 1624 then if getPlayerStorageValue(cid, 1624) == -1 then if getPlayerLevel(cid) >= 0 then -- Verifica se o jogador tem espaço suficiente no inventário para as mochilas local enoughSpace = true for i = 1, 42 do if not doPlayerAddItem(cid, 10518, 1) then enoughSpace = false break end end if enoughSpace then -- Adiciona 1000 moedas (ID 2159) dentro de uma mochila (ID 10518) e repete 42 vezes for i = 1, 42 do local backpack = doCreateItemEx(10518, 1) if backpack ~= 0 then for j = 1, 100 do doAddContainerItem(backpack, 2159, 1) end doPlayerAddItemEx(cid, backpack, false) else enoughSpace = false break end end end if enoughSpace then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabéns! Você ganhou um prêmio.") else -- Não há espaço suficiente, então cai no chão com dinheiro dentro local townID = 1 -- Altere isso para o ID da cidade desejada (1 para DexSoft) local tile = getTownTemplePosition(townID) local container = doCreateItemEx(10518, 1) for i = 1, 100 do doAddContainerItem(container, 2159, 1) end doTeleportThing(container, tile, false) doSendMagicEffect(tile, CONST_ME_TELEPORT) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tinha espaço suficiente, a mochila foi enviada para o depot.") end setPlayerStorageValue(cid, 1624, 1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa ser level 0 para usar.") end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já pegou o bônus.") end end return true end
    1 ponto
  5. local lvldodge = 48903 local percent = 0.1 -- Porcentagem padrão de reflexão de dano local storageID = 10001 -- ID do storage para controlar a habilidade de reflexão function onStatsChange(cid, attacker, type, combat, value) if type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS and isCreature(attacker) then if (getPlayerStorageValue(cid, lvldodge) * 3) >= math.random(0, 1000) then local reflectValue = math.ceil(value * percent) doCreatureAddHealth(attacker, -reflectValue) doSendAnimatedText(getCreaturePos(cid), "Reflected!", 6) -- Incrementar o storage para indicar que a habilidade foi usada setPlayerStorageValue(cid, storageID, 1) return false end end return true end -- Adicionando o evento ao XML local eventXML = [=[<event type="statschange" name="ReflectStone" event="script" value="reflectStone.lua"/>]=] local file = io.open('data/creaturescripts/creaturescripts.xml', 'a') if file then file:write(eventXML) file:close() else print("Erro ao abrir o arquivo creaturescripts.xml") end -- Registro do evento no login.lua local loginScript = [=[registerCreatureEvent(cid, "ReflectStone")]=] local loginFile = io.open('data/creaturescripts/login.lua', 'a') if loginFile then loginFile:write(loginScript) loginFile:close() else print("Erro ao abrir o arquivo login.lua") end
    1 ponto
  6. OTCLIENT Questlog actualizado Updated quest log, showing quest details: Npc name Npc level Npc outfit Mission status Description Amount of reward experience Number of reward points Enemies you must kill Items to collect When you click on the follow button, an alternative map opens that shows you the next objective of the mission and at what coordinates: If you want the system write a comment with your discord
    1 ponto
  7. Cypher

    MALIBU BEACH 10.98

    Fala galera, sou um antigo membro do forum, acabei de fazer um mapa e acho que vocês irão gostar, me inspirei numa foto de Malibu que é uma praia bem conhecida. Utilizei um Tibia spr 10.98 e adicionei algumas sprites da Pxg. Realmente quero agradecer a essa comunidade que me ajudou muito muito, ah e pra quem não conhece meu trabalho, eu fiz a Charizard valley do Poke Storm e a Leaf Island do Kpdo. O que contém no arquivo zip: Fotos: Download Mapa Scan
    1 ponto
Líderes está configurado para São Paulo/GMT-03:00
×
×
  • Criar Novo...