Ir para conteúdo

L3K0T

Diretor
  • Registro em

  • Última visita

Solutions

  1. L3K0T's post in [OTC] Diminuir tempo entre os frames das sprites was marked as the answer   
    isso?
     
     
  2. L3K0T's post in (Resolvido)-=[TFS]=- 0.3.6 - 8.60 CRITICAL STONE and BOOSTER ATTACK STONE DANDO ERRO [AJUDA] was marked as the answer   
    local lvlcrit = 48913 -- armazenamento para críticos normais local lvlcritDanger = 48904 -- armazenamento para críticos perigosos local multiplier = 1.5 -- multiplicador de dano function onCombat(cid, target) if isPlayer(cid) and isCreature(target) then local criticalChance = getPlayerStorageValue(cid, lvlcrit) or 0 local criticalDangerChance = getPlayerStorageValue(cid, lvlcritDanger) or 0 local chance = math.random(1, 1000) if chance <= (criticalDangerChance * 3) then local damageDanger = 100 -- Valor do dano crítico DANGER (ajuste conforme necessário) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -damageDanger, -damageDanger, 255) doSendAnimatedText(getCreaturePosition(target), "DANGER!", 190) doSendMagicEffect(getCreaturePosition(cid), 52) return true elseif chance <= (criticalChance * 4) then local damageBooster = 200 -- Valor do dano crítico BOOSTER (ajuste conforme necessário) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -damageBooster, -damageBooster, 255) doSendAnimatedText(getCreaturePosition(target), "+BOOSTER!", 31) doSendMagicEffect(getCreaturePosition(cid), 54) return true else return true end end return true end  
  3. L3K0T's post in (Resolvido)-=[TFS]=- 0.4 8.60 - Scripting Mostrar os segundos que faltam pro boss nascer was marked as the answer   
    local COLOR_RED = 180 -- Defina a cor que você está usando local tableBoss = { ["Amazon"] = {seconds = 10, newBoss = "Amazon"} } local function timer(position, duration) local t = duration addEvent(function() if t > 0 then doSendAnimatedText(position, tostring(t), COLOR_RED) t = t - 1 timer(position, t) else -- Respawn do boss após a contagem regressiva addEvent(doCreateMonster, 1000, tableBoss["Amazon"].newBoss, position) end end, 1000) end function onKill(cid, target, damage, flags) if isPlayer(target) then return true end local boss = tableBoss[getCreatureName(target)] if not boss then return true end local position = getCreaturePosition(target) local timeLeft = boss.seconds doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "O boss renascerá em " .. timeLeft .. " segundos na posição: " .. position.x .. ", " .. position.y .. ", " .. position.z) -- Exibe a posição no texto timer(position, boss.seconds) -- Inicia o contador regressivo para o respawn do boss addEvent(function() for i = 1, boss.seconds do addEvent(function() local remainingTime = timeLeft - i if remainingTime > 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "O boss renascerá em " .. remainingTime .. " segundos na posição: " .. position.x .. ", " .. position.y .. ", " .. position.z) -- Exibe a posição no texto end end, i * 1000) end end, 1) return true end  
  4. L3K0T's post in Storage Temporaria Em Spell was marked as the answer   
    function onCastSpell(cid, var) local waittime = 310 -- Tempo de exhaustion local storage = 55512 -- Storage para controlar a spell -- Verificar se o jogador já usou a spell if getPlayerStorageValue(cid, storage) > 0 then if exhaustion.check(cid, storage) then doPlayerSendCancel(cid, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.") end return false end if not isCreature(cid) then return false end exhaustion.set(cid, storage, waittime) setPlayerStorageValue(cid, storage, 1) if not (getCreatureCondition(cid, CONDITION_ATTRIBUTES, 50) or getCreatureCondition(cid, CONDITION_HASTE, 51) or getCreatureCondition(cid, CONDITION_REGENERATION, 52)) then OpenGate(cid, Select_Stages(getCreatureOutfit(cid).lookType), 1) -- Definir a storage de volta para -1 ou 0 após o término do efeito da spell addEvent(function() setPlayerStorageValue(cid, storage, -1) -- Pode ser -1 ou 0 aqui end, waittime * 1000) -- Convertendo segundos para milissegundos return true else doPlayerSendCancel(cid, "Você já está transformado.") return false end end  
  5. L3K0T's post in (Resolvido)-=[TFS]=- 0.4 8.60 - Aparece um item sozinho e muda pra outro item sozinho was marked as the answer   
    É um tutorial ou você precisa de suporte sobre o mesmo, eu nao entendi??
  6. Isso??
     
    local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) function damage(cid, level, maglevel, targetPosition) local min = 1000000000 local max = 1000000000 return -min, -max, getDirectionTo(targetPosition) -- Retorna também a direção para o alvo end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "damage") function onCastSpell(cid, var) local target = variantToPosition(var) local targetCreature = getTopCreature(target).uid local direction = getDirectionTo(getCreaturePosition(targetCreature)) local newVar = createCombatArea(getAreaAround(target, 1, 1)) -- Define a área de ataque em torno do alvo setCombatArea(combat, newVar) return doCombat(cid, combat, var), direction end -- Função auxiliar para obter a direção para uma posição alvo function getDirectionTo(targetPosition) local creaturePosition = getCreaturePosition(cid) local dx = targetPosition.x - creaturePosition.x local dy = targetPosition.y - creaturePosition.y if math.abs(dx) > math.abs(dy) then if dx > 0 then return DIRECTION_EAST else return DIRECTION_WEST end else if dy > 0 then return DIRECTION_SOUTH else return DIRECTION_NORTH end end end  
  7. L3K0T's post in (Resolvido)-=[TFS]=- 0.4 8.60 - Spells dando debug tem 17.000 linhas no spells.xml was marked as the answer   
    function onSay(cid, words, param, channel) local t = {} for i = 1, getPlayerInstantSpellCount(cid) do local spell = getPlayerInstantSpellInfo(cid, i - 1) if(spell.mlevel ~= 1) then if(spell.manapercent > 0) then spell.mana = spell.manapercent .. "%" end table.insert(t, spell) end end table.sort(t, function(a, b) return a.mlevel < b.mlevel end) local text, prevLevel = "", -1 for i, spell in ipairs(t) do local line = "" if(prevLevel ~= spell.mlevel) then if(i ~= 1) then line = "\n" end line = line .. "Spells for Magic Level " .. spell.mlevel .. "\n" prevLevel = spell.mlevel end text = text .. line .. " " .. spell.words .. " : " .. spell.mana .. "\n" end doShowTextDialog(cid, 2175, text) return true end  
  8. então, não adianta usar chat gpt, se não souber o que ele escreveu... precisa analisar os codigo e traduzir na sua mente, agora se não entende o que ele escreveu é  = tiro no escuro. e seu código não está em lua tbm oque mandou e sim em python
    mande o arquivo .lua do exp...
  9. L3K0T's post in (Resolvido)Duvida ao fazer item was marked as the answer   
    tentou? porque no seu so tem show atributes
     
    <attribute key="stopduration" value="1" />
    <attribute key="showduration" value="1" />
  10. L3K0T's post in [SQLite] -=[TFS]=- 0.4 8.60 Party share XP não esta funcionando was marked as the answer   
    no config nao tem isso ou algo... aperta ctrl+f dentro do config e digita party pelo enter e ve que aparece de party?
    EnableExtraPartyEXP = true
  11. L3K0T's post in (Resolvido)Item editor erro de versão não suportado como resolver? was marked as the answer   
    compile o spr e o dat editor pelo Object Builder, usando a mesma versão... mais com outra signature 8.60 v2 por exemplo "la tem 8.60 v1 e 8.60 v2"
  12. L3K0T's post in (Resolvido)Tela toda branca ao acessar a pagina principal do site... was marked as the answer   
    muda a versão do xampp pra mais antiga 
  13. L3K0T's post in (Resolvido)Script Boss Teleport was marked as the answer   
    function onCastSpell(cid, var) local target = getCreatureTarget(cid) if isCreature(target) and isPlayer(target) then local targetPos = getCreaturePosition(target) local creaturePos = getCreaturePosition(cid) local distance = math.max(math.abs(targetPos.x - creaturePos.x), math.abs(targetPos.y - creaturePos.y)) if distance > 1 then -- Defina a distância mínima para teleportar conforme sua preferência doTeleportThing(cid, targetPos, true) end end return true end @A.Mokk
  14. agora tanta assim fiz pros 2
     
    function onCombat(cid, target, damage, flags)
        if isPlayer(cid) and isCreature(target) then
            local criticalHitChance = getConfigValue('criticalHitChance') -- Obtém a chance de acerto crítico do config.lua
            if math.random(1, 100) <= criticalHitChance then
                local criticalMessage = "CRITICAL HIT!" -- Mensagem de acerto crítico
                
                -- Exibe a mensagem acima do jogador
                doSendAnimatedText(getCreaturePosition(cid), criticalMessage, TEXTCOLOR_RED)
                
                -- Exibe a mensagem no console do jogador
                local consoleMessage = "You strike a critical hit!"
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, consoleMessage)
            end
        end
        return true
    end
     
  15. -- Cassino System by LucasHere function onUse(cid, item, frompos, item2, topos) pos1 = {x=256, y=344, z=7, stackpos=1} -- posição que vai criar os itens pos2 = {x=257, y=344, z=7, stackpos=1} pos3 = {x=258, y=344, z=7, stackpos=1} local config = { moneyneed = 2000, -- amount of VIP coins needed to play } local premios = { [2189] = 1, [6529] = 1, [2546] = 1, [2352] = 1, [2545] = 1, [8851] = 1, [7424] = 1, [7735] = 1, [8293] = 1, [7450] = 1, [8931] = 1, [8856] = 1 } function additem(cid, premios) local playerName = getPlayerName(cid) -- Get the player's name for itemId, quantity in pairs(premios) do doPlayerAddItem(cid, itemId, quantity) end doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, playerName .. " apostou no cassino e ganhou todos os itens.") end if item.itemid == 1945 and getPlayerItemCount(cid, 11192) < config.moneyneed then doPlayerSendCancel(cid, "Desculpe, você não tem moedas VIP suficientes para jogar!") return true end if item.itemid == 1945 then doTransformItem(item.uid, 1946) doPlayerRemoveItem(cid, 11192, config.moneyneed) local premioItems = premios addEvent(doCreateItem, 0, premioItems, pos1) addEvent(doCreateItem, 1000, premioItems, pos2) addEvent(doCreateItem, 2000, premioItems, pos3) addEvent(additem, 2000, cid, premioItems) return true end local item0 = getThingfromPos(pos1) local item1 = getThingfromPos(pos2) local item2 = getThingfromPos(pos3) if item.itemid == 1946 then doTransformItem(item.uid, 1945) if item0.itemid ~= 0 then doRemoveItem(item0.uid, 1) end if item1.itemid ~= 0 then doRemoveItem(item1.uid, 1) end if item2.itemid ~= 0 then doRemoveItem(item2.uid, 1) end else doTransformItem(item.uid, 1945) end return true end  
  16. Remove os script 1 por 1 que contém onstatschange no xml do cresturescripts, inclusive de eventos, é um deles que está dando esse erro... e testa sem ele, depois mata  um monstro e vê se some. Aquele que vc excluir da tag xml sumir, ai vc manda aqui
  17. L3K0T's post in (Resolvido)Se consegue coloca esse efeito no attack desse script weapon was marked as the answer   
    Vc pode pegar esse mesmo script e botar em weapons e sentar o script pelo xml em weapons
  18. local LVL_CRIT_STORAGE = 48904 local MULTIPLIER = 1.001 function onStatsChange(cid, attacker, type, combat, value) if type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS then if isPlayer(attacker) and isCreature(cid) then local playerLvlCrit = getPlayerStorageValue(attacker, LVL_CRIT_STORAGE) local critThreshold = playerLvlCrit * 3 local randomValue = math.random(0, 1000) if critThreshold >= randomValue then local boostedDamage = math.ceil(value * (MULTIPLIER - 1)) -- Subtrair 1 para obter o valor percentual doTargetCombatHealth(attacker, cid, combat, -boostedDamage, -boostedDamage, boostedDamage) -- Verifique se o atacante é uma criatura antes de obter sua posição if isCreature(attacker) then doSendAnimatedText(getCreaturePos(attacker), "+BOOSTER", 1000) end return false end end end return true end  
  19. L3K0T's post in (Resolvido)Erro Deletar Guild Inativa was marked as the answer   
    function onStartup() local result_guilds = db.getResult("SELECT `id`, `creationdata` FROM `guilds` ORDER by `creationdata` ASC;") local days = 30 * 3600 * 24 local nowtime = os.time() if (result_guilds and result_guilds:getID() ~= -1) then while (true) do local id = result_guilds:getDataInt("id") local date = result_guilds:getDataInt("creationdata") local time = nowtime - date local duedate = time - days if duedate >= 0 then local columnExists = db.isColumn("players", "guild_id") if columnExists then local result_countplayersguild = db.getResult("SELECT COUNT(*) AS player_count FROM `players` WHERE `guild_id` = " .. id .. ";") if (result_countplayersguild) then local manyplayers = result_countplayersguild:getDataInt("player_count") result_countplayersguild:free() if manyplayers < 10 then db.executeQuery("DELETE FROM `guild_invite` WHERE `guild_id` = " .. id .. ";") db.executeQuery("DELETE FROM `guild_kills` WHERE `guild_id` = " .. id .. ";") db.executeQuery("DELETE FROM `guild_ranks` WHERE `guild_id` = " .. id .. ";") db.executeQuery("DELETE FROM `guild_storage` WHERE `guild_id` = " .. id .. ";") db.executeQuery("DELETE FROM `guild_wars` WHERE `guild_id` = " .. id .. ";") end end end end if not (result_guilds:next()) then break end end result_guilds:free() end end  
  20. L3K0T's post in (Resolvido)Player passando por dentro do outro em area pz was marked as the answer   
    bool Player::canWalkthrough(const Creature* creature) const { if (creature == this || hasCustomFlag(PlayerCustomFlag_CanWalkthrough) || creature->isWalkable() || (creature->getMaster() && creature->getMaster() != this && canWalkthrough(creature->getMaster()))) return true; const Player* player = creature->getPlayer(); if (!player) return false; // Verifica se o jogador atual e o outro jogador estão em uma área de proteção (PZ) e impede a passagem. bool thisPlayerInPZ = getTile()->hasFlag(TILESTATE_PROTECTIONZONE); bool otherPlayerInPZ = player->getTile()->hasFlag(TILESTATE_PROTECTIONZONE); if (thisPlayerInPZ && otherPlayerInPZ) return false; // Restante do código... // (Mantenha as outras verificações que você deseja manter para permitir a passagem em outras situações) return (player->isGhost() && getGhostAccess() < player->getGhostAccess()) || (isGhost() && getGhostAccess() > player->getGhostAccess()); }  
  21. L3K0T's post in (Resolvido)Player passando por dentro do outro em area pz was marked as the answer   
    bool Player::canWalkthrough(const Creature* creature) const { if (creature == this || hasCustomFlag(PlayerCustomFlag_CanWalkthrough) || creature->isWalkable() || (creature->getMaster() && creature->getMaster() != this && canWalkthrough(creature->getMaster()))) return true; const Player* player = creature->getPlayer(); if (!player) return false; // Verifica se o jogador atual e o outro jogador estão em uma área de proteção (PZ) e impede a passagem. bool thisPlayerInPZ = getTile()->hasFlag(TILESTATE_PROTECTIONZONE); bool otherPlayerInPZ = player->getTile()->hasFlag(TILESTATE_PROTECTIONZONE); if (thisPlayerInPZ && otherPlayerInPZ) return false; // Restante do código... // (Mantenha as outras verificações que você deseja manter para permitir a passagem em outras situações) return (player->isGhost() && getGhostAccess() < player->getGhostAccess()) || (isGhost() && getGhostAccess() > player->getGhostAccess()); }  
  22. L3K0T's post in (Resolvido)Player passando por dentro do outro em area pz was marked as the answer   
    bool Player::canWalkthrough(const Creature* creature) const { if (creature == this || hasCustomFlag(PlayerCustomFlag_CanWalkthrough) || creature->isWalkable() || (creature->getMaster() && creature->getMaster() != this && canWalkthrough(creature->getMaster()))) return true; const Player* player = creature->getPlayer(); if (!player) return false; // Verifica se o jogador atual e o outro jogador estão em uma área de proteção (PZ) e impede a passagem. bool thisPlayerInPZ = getTile()->hasFlag(TILESTATE_PROTECTIONZONE); bool otherPlayerInPZ = player->getTile()->hasFlag(TILESTATE_PROTECTIONZONE); if (thisPlayerInPZ && otherPlayerInPZ) return false; // Restante do código... // (Mantenha as outras verificações que você deseja manter para permitir a passagem em outras situações) return (player->isGhost() && getGhostAccess() < player->getGhostAccess()) || (isGhost() && getGhostAccess() > player->getGhostAccess()); }  
  23. L3K0T's post in PISO QUE REMOVE PAREDE was marked as the answer   
    function onUse(cid, item, fromPosition, itemEx, toPosition)
        local time = 30 -- em segundos
        local item_id = 1543 -- ID da parede
        local requiredItemCount = 100 -- Quantidade necessária do item ID 4848
        
        local wallPositions = {
            {x = 186, y = 54, z = 7},
            {x = 187, y = 54, z = 7},
            {x = 186, y = 55, z = 7},
            {x = 187, y = 55, z = 7},
            -- Adicione mais posições de paredes aqui conforme necessário
            {x = 188, y = 55, z = 7},
            {x = 189, y = 55, z = 7},
            -- Adicione mais posições de paredes aqui conforme necessário
            -- Continue adicionando mais 100 posições de paredes
        }
        
        -- Verifica se o jogador possui a quantidade necessária do item
        if getPlayerItemCount(cid, 4848) < requiredItemCount then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você precisa ter 100 itens do ID 4848 para usar esta alavanca.")
            return true
        end
        
        local removedCount = 0
        
        for i = 1, #wallPositions do
            local wallpos = wallPositions[i]
            local tile = getTileItemById(wallpos, item_id)
            
            if tile and tile.uid > 0 then
                doRemoveItem(tile.uid)
                doSendMagicEffect(wallpos, CONST_ME_POFF)
                addEvent(doCreateItem, time * 1000, item_id, 1, wallpos)
                removedCount = removedCount + 1
            end
        end
        
        if removedCount > 0 then
            -- Remove os 100 itens do ID 4848 do inventário do jogador
            doPlayerRemoveItem(cid, 4848, requiredItemCount)
            return true
        else
            return false
        end
    end
     
    Foi removido o erro que você citou e adicionado verificação do item que você pediu
     
  24. L3K0T's post in (Resolvido)quando abro um corpo no poketibia o jogo fecha was marked as the answer   
    É possível que o problema esteja relacionado a uma má configuração da sprite de um item. Por exemplo, se a sprite estiver configurada de uma maneira no item editor e de outra maneira no cliente, podem ocorrer erros. É importante garantir que as configurações sejam consistentes e correspondentes.Uma sugestão para solucionar o problema é testar a abertura de um corpo sem loot. Isso significa verificar se é possível abrir um corpo de um monstro ou contêiner no jogo que não tenha itens dentro. Ao realizar esse teste, é possível identificar se o problema está relacionado especificamente à configuração das sprites dos itens ou se existem outros fatores envolvidos. Caso os corpos sem loot possam ser abertos sem erros, será necessário revisar as configurações das sprites de itens, garantindo que elas estejam corretas tanto no item editor quanto no cliente. Certifique-se de que as sprites estejam nomeadas corretamente e que os caminhos das sprites estejam configurados de forma consistente em ambas as partes.
  25. local templePosition = {x = 100, y = 200, z = 7} -- Coordenadas do templo para onde o jogador será teleportado
    function onLogin(cid)
        local player = getPlayerByGUID(cid)
        
        if player then
            if not player:isPremium() and getPlayerStorageValue(cid, 18956) ~= 1 then
                setPlayerStorageValue(cid, 18956, 1) -- Define o valor de armazenamento para indicar que a conta premium expirou
                doTeleportThing(cid, templePosition)
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sua conta premium expirou. Você foi teleportado para o templo.")
            end
        end
        
        return true
    end
     

Informação Importante

Confirmação de Termo