
Solutions
-
L3K0T's post in (Resolvido)erro no script ao relogar was marked as the answerlocal tab = {
[4] = 10, -- [vocationID] = número da cor do texto animado
[5] = 30,
[6] = 50,
[7] = 70
}
function ariseText(cid)
if not isPlayer(cid) then -- Verifica se o jogador ainda é válido
return true
end
local texts = {"' . ,", ". ' ,", "' . ,", ", ' ."}
local playerVocation = getPlayerVocation(cid)
if playerVocation and tab[playerVocation] then
doSendAnimatedText(getCreaturePosition(cid), texts[math.random(1, #texts)], tab[playerVocation])
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN) -- Efeito mágico adicionado
end
addEvent(ariseText, 1000, cid)
return true
end
function onLogin(cid)
if tab[getPlayerVocation(cid)] then
ariseText(cid)
end
return true
end
-
L3K0T's post in (Resolvido)[AJUDA] ERRO REWARD CHEST was marked as the answerA parte que o Luciano disse, fiz alteração
local pontos = getPlayerStorageValue(players[i], boss.storage)
if pontos ~= nil then
if i == 1 then
addLoot(boss.comum, tabela_reward, false)
addLoot(boss.semi_raro, tabela_reward, false)
addLoot(boss.raro, tabela_reward, false)
addLoot(boss.sempre, tabela_reward, true)
elseif i >= 2 and pontos >= math.ceil((porcentagem * 0.8)) then
addLoot(boss.comum, tabela_reward, false)
addLoot(boss.semi_raro, tabela_reward, false)
addLoot(boss.raro, tabela_reward, false)
addLoot(boss.muito_raro, tabela_reward, false)
elseif pontos < math.ceil((porcentagem * 0.8)) and pontos >= math.ceil((porcentagem * 0.6)) then
addLoot(boss.comum, tabela_reward, false)
addLoot(boss.semi_raro, tabela_reward, false)
addLoot(boss.raro, tabela_reward, false)
elseif pontos < math.ceil((porcentagem * 0.6)) and pontos >= math.ceil((porcentagem * 0.4)) then
addLoot(boss.comum, tabela_reward, false)
addLoot(boss.semi_raro, tabela_reward, false)
elseif pontos < math.ceil((porcentagem * 0.4)) and pontos >= math.ceil((porcentagem * 0.1)) then
addLoot(boss.comum, tabela_reward, false)
end
addRewardLoot(players[i], bossName, tabela_reward)
end
Esse erro que vc citou é porque alguém ficou desconectado durante a batalha e deslogo causando o erro, vc disse que de vez enquando aparece, então é isso foi adicionado no script if pontos ~= nil then
-
L3K0T's post in [PEDIDO] Anti-Bot System was marked as the answerVe se te ajuda
data/creturescript/creaturescript.xnml.
<event type="advance" name="AntiBotAdvance" script="antibot_advance.lua"/> data/creturescript/antibot_advance.lua.
local creaturesToKill = math.random(300, 1000) local antiBotStorage = 25631 -- armazena quantas criaturas o jogador matou local antiBotTime = 30 -- tempo em segundos para o jogador matar o número de criaturas necessárias function onKill(cid, target, lastHit) if isPlayer(cid) and isCreature(target) then local storageValue = getPlayerStorageValue(cid, antiBotStorage) if storageValue < creaturesToKill then setPlayerStorageValue(cid, antiBotStorage, storageValue + 1) if storageValue + 1 == creaturesToKill then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você matou " .. creaturesToKill .. " criaturas! Por favor, resolva o anti-bot para continuar jogando.") setPlayerStorageValue(cid, antiBotStorage, -antiBotTime) -- inicia o tempo para o jogador resolver o anti-bot end end end end function onThink(interval, lastExecution) for _, playerId in ipairs(getPlayersOnline()) do local storageValue = getPlayerStorageValue(playerId, antiBotStorage) if storageValue > 0 then if storageValue < creaturesToKill then doPlayerSendTextMessage(playerId, MESSAGE_STATUS_CONSOLE_ORANGE, "Você matou " .. storageValue .. " criaturas. Continue matando para resolver o anti-bot.") elseif storageValue == creaturesToKill then local timeLeft = getPlayerStorageValue(playerId, antiBotStorage) + antiBotTime - os.time() if timeLeft <= 0 then doPlayerSendTextMessage(playerId, MESSAGE_STATUS_CONSOLE_ORANGE, "Tempo esgotado para resolver o anti-bot. Você será desconectado em breve.") doRemoveCreature(playerId) else doPlayerSendTextMessage(playerId, MESSAGE_STATUS_CONSOLE_ORANGE, "Por favor, resolva o anti-bot em " .. timeLeft .. " segundos para continuar jogando.") end end end end return true end
data/creturescript/creaturescript.xnml.
<event type="login" name="AntiBotLogin" script="antibot_login.lua"/> data/creturescript/antibot_login.lua.
function onLogin(cid) local storageValue = getPlayerStorageValue(cid, antiBotStorage) if storageValue > 0 then if storageValue < creaturesToKill then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você matou " .. storageValue .. " criaturas. Continue matando para resolver o anti-bot.") elseif storageValue == creaturesToKill then local timeLeft = getPlayerStorageValue(cid, antiBotStorage) + antiBotTime - os.time() if timeLeft <= 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Tempo esgotado para resolver o anti-bot. Você será desconectado em breve.") doRemoveCreature(cid) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Por favor, resolva o anti-bot em " .. timeLeft .. " segundos para continuar jogando.") end end end return true end
data/creturescript/creaturescript.xnml.
<event type="logout" name="AntiBotLogout" script="antibot_logout.lua"/> data/creturescript/antibot_logout.lua
function onLogout(cid) setPlayerStorageValue(cid, antiBotStorage, 0) return true end
-
L3K0T's post in (Resolvido)ITEM SÓ PODE SER CONSUMIDO 1X POR PLAYER. [BUG] was marked as the answerAgora é pra ser usado a casa 2 segundos
local config = {
lifeGain = 5.5,
lifeGainMax = 8,
manaGain = 5.5,
manaGainMax = 8,
exhaustionSeconds = 2,
effectChar = 212
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if exhaustion.check(cid, item.itemid) then
local timeLeft = exhaustion.get(cid, item.itemid)
if timeLeft > 0 then
doPlayerSendCancel(cid, "You are exhausted. You need to wait " .. timeLeft .. " seconds before using this item again.")
return true
end
end
doRemoveItem(item.uid, 1)
local health = getCreatureMaxHealth(cid) * (config.lifeGain/100)
local mana = getCreatureMaxMana(cid) * (config.manaGain/100)
local healthmax = getCreatureMaxHealth(cid) * (config.lifeGainMax/100)
local manamax = getCreatureMaxMana(cid) * (config.manaGainMax/100)
doCreatureAddHealth(cid, math.random(health, healthmax))
doCreatureAddMana(cid, math.random(mana, manamax))
doSendMagicEffect(getPlayerPosition(cid), config.effectChar)
exhaustion.set(cid, item.itemid, config.exhaustionSeconds)
return true
end
-
L3K0T's post in (Resolvido)Erro creature event.throw was marked as the answerTroque todos onTimer para onTime remova o R do final.
-
L3K0T's post in (Resolvido)Lag Linux 18.04 was marked as the answerA libstdc++.so.6 é uma biblioteca padrão do GNU C++ que é usada por muitos programas e sistemas operacionais Linux. É possível que algum programa esteja fazendo uso excessivo dessa biblioteca e causando problemas de desempenho no seu servidor.
Aqui estão algumas coisas que você pode tentar para resolver o problema:
Verifique se há processos que estão consumindo muita CPU ou memória no seu servidor. Você pode fazer isso usando o comando "top" no terminal do Linux. Ele irá mostrar todos os processos em execução, juntamente com o uso de CPU e memória. Se você encontrar algum processo que esteja usando muito CPU ou memória, tente matá-lo usando o comando "kill" no terminal. Verifique se há atualizações disponíveis para o seu sistema operacional e para os pacotes instalados no servidor. Atualizar o sistema pode corrigir problemas de desempenho relacionados a vulnerabilidades ou erros conhecidos. Tente reinstalar a biblioteca libstdc++.so.6 usando o gerenciador de pacotes do seu sistema operacional. Isso pode corrigir qualquer problema de corrupção na biblioteca. Verifique se o programa que está usando a biblioteca está configurado corretamente e não está usando mais recursos do que deveria. Verifique as configurações do programa e, se possível, ajuste-as para reduzir o uso de recursos. Considere adicionar mais recursos ao seu servidor, como CPU, memória ou armazenamento. Isso pode ajudar a lidar com cargas pesadas de trabalho e evitar problemas de desempenho. Se essas soluções não funcionarem, pode ser necessário investigar mais a fundo para determinar a causa raiz do problema.
Para reinstalar a biblioteca libstdc++.so.6, você pode usar o gerenciador de pacotes do seu sistema operacional.
No Ubuntu, você pode usar o seguinte comando no terminal:
sudo apt-get install --reinstall libstdc++6
No CentOS ou Red Hat, você pode usar o seguinte comando no terminal:
sudo yum reinstall libstdc++.so.6
Após reinstalar a biblioteca, reinicie o seu servidor para que as alterações entrem em vigor.
Se a reinstalação da biblioteca não resolver o problema de desempenho, você pode tentar outras soluções mencionadas anteriormente
-
L3K0T's post in (Resolvido)posição da spell was marked as the answerNão testei
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_LIGHTGREEN)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 494) -- adiciona o efeito 494
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -250.0, 0, -275.0, 0)
local function onCastSpell1(parameters)
local targetPos = getCreaturePosition(parameters.target)
if targetPos then
doSendMagicEffect(targetPos, 494) -- exibe o efeito 494 na posição do alvo
doCombat(parameters.cid, parameters.combat1, positionToVariant(targetPos))
end
end
function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, target = getCreatureTarget(cid) }
addEvent(onCastSpell1, 0, parameters)
return true
end
Versão otimizada:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_LIGHTGREEN)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 494)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -250, 0, -275, 0)
function onCastSpell(cid, var)
local target = getCreatureTarget(cid)
if not target then
return false
end
local targetPos = getCreaturePosition(target)
if not targetPos then
return false
end
doSendMagicEffect(targetPos, 494)
doCombat(cid, combat1, positionToVariant(targetPos))
return true
end
-
L3K0T's post in (Resolvido)Exausted em todas talkactions was marked as the answer-- Sistema de auto loot criado por V�tor Bertolucci - Killua function ExistItemByName(name) -- by vodka local items = io.open("data/items/items.xml", "r"):read("*all") local get = items:match('name="' .. name ..'"') if get == nil or get == "" then return false end return true end local function getPlayerList(cid) local tab = {} if getPlayerStorageValue(cid, 04420021) ~= -1 then table.insert(tab, getPlayerStorageValue(cid, 04420021)) end if getPlayerStorageValue(cid, 04420031) ~= -1 then table.insert(tab, getPlayerStorageValue(cid, 04420031)) end if getPlayerStorageValue(cid, 04420041) ~= -1 then table.insert(tab, getPlayerStorageValue(cid, 04420041)) end if getPlayerStorageValue(cid, 04420051) ~= -1 then table.insert(tab, getPlayerStorageValue(cid, 04420051)) end if #tab > 0 then return tab end return false end local function addToList(cid, name) local itemid = getItemIdByName(name) if getPlayerList(cid) and isInArray(getPlayerList(cid), itemid) then return false end if getPlayerStorageValue(cid, 04420021) == -1 then return doPlayerSetStorageValue(cid, 04420021, itemid) elseif getPlayerStorageValue(cid, 04420031) == -1 then return doPlayerSetStorageValue(cid, 04420031, itemid) elseif getPlayerStorageValue(cid, 04420041) == -1 then return doPlayerSetStorageValue(cid, 04420041, itemid) elseif getPlayerStorageValue(cid, 04420051) == -1 then return doPlayerSetStorageValue(cid, 04420051, itemid) end end local function removeFromList(cid, name) local itemid = getItemIdByName(name) if getPlayerStorageValue(cid, 04420021) == itemid then return doPlayerSetStorageValue(cid, 04420021, -1) elseif getPlayerStorageValue(cid, 04420031) == itemid then return doPlayerSetStorageValue(cid, 04420031, -1) elseif getPlayerStorageValue(cid, 04420041) == itemid then return doPlayerSetStorageValue(cid, 04420041, -1) elseif getPlayerStorageValue(cid, 04420051) == itemid then return doPlayerSetStorageValue(cid, 04420051, -1) end return false end local config = { storage = 22566, exhaust = 5 } function onSay(cid, words, param) if getCreatureStorage(cid, config.storage) > os.time() then doPlayerSendCancel(cid, "Aguarde " .. (config.exhaust) .. " segundos.") return true end if param == "" then local fi = getPlayerStorageValue(cid, 04420021) ~= -1 and getItemNameById(getPlayerStorageValue(cid, 04420021)) or "" local se = getPlayerStorageValue(cid, 04420031) ~= -1 and getItemNameById(getPlayerStorageValue(cid, 04420031)) or "" local th = getPlayerStorageValue(cid, 04420041) ~= -1 and getItemNameById(getPlayerStorageValue(cid, 04420041)) or "" local fo = getPlayerStorageValue(cid, 04420051) ~= -1 and getItemNameById(getPlayerStorageValue(cid, 04420051)) or "" local stt = getPlayerStorageValue(cid, 04421011) == 1 and "sim" or "nao" local str = getPlayerStorageValue(cid, 04421001) == 1 and "sim" or "nao" doPlayerPopupFYI(cid, "<--- Informacoes Do Auto Loot --->\n\n--Configurando o AutoLoot--\n\n1- Coletar Dinheiro: !autoloot gold\n2- Ligar coleta de items: !autoloot power\n3- Para adicionar um novo item no autoloot, digite: !autoloot add, nome do item\n4- Para retirar um item do autoloot, digite: !autoloot remove, nome do item\n5- Para limpar todos os slots, digite: !autoloot clear\n6- Para informacoes de quanto voce ja fez utilizando a coleta de dinheiro, use: !autoloot goldinfo\n7- Se seu autoloot bugar use !autoloot desbug\n\n\n[Coletar dinheiro] --- Ligado? ("..stt..").\n[Coletar itens] --- Ligado? ("..str..").\n\n----- Configuracao Dos Slots -----\n[AUTO-LOOT] ---Slot 1: "..fi.."\n[AUTO-LOOT] ---Slot 2: "..se.."\n[AUTO-LOOT] ---Slot 3: "..th.."\n[AUTO-LOOT] ---Slot 4: "..fo.."\n\n\n\n\nWars-Baiak\nwww.war-baiak.com") return true end local t = string.explode(param, ",") if t[1] == "power" then local check = getPlayerStorageValue(cid, 04421001) == -1 and "ligou" or "desligou" doPlayerSetStorageValue(cid, 04421001, getPlayerStorageValue(cid, 04421001) == -1 and 1 or -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce "..check.." o auto loot.") elseif t[1] == "gold" then local check = getPlayerStorageValue(cid, 04421011) == -1 and "ligou" or "desligou" doPlayerSetStorageValue(cid, 04421011, getPlayerStorageValue(cid, 04421011) == -1 and 1 or -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce "..check.." a coleta de dinheiro.") doPlayerSetStorageValue(cid, 04421021, 0) elseif t[1] == "goldinfo" then local str = getPlayerStorageValue(cid, 04421011) == -1 and "O sistema de coleta de dinheiro esta desligado" or "O sistema ja coletou "..getPlayerStorageZero(cid, 04421021).." gold coins" doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, str) elseif t[1] == "add" then if ExistItemByName(t[2]) then local item = getItemIdByName(t[2]) if isInArray({2160, 2148, 2152}, item) then return doPlayerSendCancel(cid, "Voce nao pode adicionar moedas no autoloot. Para coletar dinheiro use !autoloot gold") end if isPremium(cid) then if getPlayerStorageValue(cid, 04420011) < 3 then if addToList(cid, t[2]) then doPlayerSetStorageValue(cid, 04420011, getPlayerStorageValue(cid, 04420011) + 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, t[2].." adicionado a sua lista do auto loot! Para ver sua lista diga !autoloot list") else doPlayerSendCancel(cid, t[2].." ja esta em sua lista!") end else doPlayerSendCancel(cid, "Sua lista ja tem 4 itens! Voce deve remover algum antes de adicionar outro.") end else if getPlayerStorageValue(cid, 04420011) < 1 then if addToList(cid, t[2]) then doPlayerSetStorageValue(cid, 04420011, getPlayerStorageValue(cid, 04420011) + 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, t[2].." adicionado a sua lista do auto loot! Para ver sua lista diga !autoloot") else doPlayerSendCancel(cid, t[2].." ja esta em sua lista!") end else doPlayerSendCancel(cid, "Voce ja tem um item adicionado no auto loot! Para adicionar outro, voce deve remover o item atual.") end end else doPlayerSendCancel(cid, "Este item nao existe!") end elseif t[1] == "remove" then if ExistItemByName(t[2]) then if removeFromList(cid, t[2]) then doPlayerSetStorageValue(cid, 04420011, getPlayerStorageValue(cid, 04420011) - 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, t[2].." removido da sua lista do auto loot!") else doPlayerSendCancel(cid, "Este item nao esta na sua lista!") end else doPlayerSendCancel(cid, "Este item nao existe!") end elseif t[1] == "clear" then if getPlayerStorageValue(cid, 04420011) > -1 then doPlayerSetStorageValue(cid, 04420011, -1) doPlayerSetStorageValue(cid, 04420021, -1) doPlayerSetStorageValue(cid, 04420031, -1) doPlayerSetStorageValue(cid, 04420041, -1) doPlayerSetStorageValue(cid, 04420051, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Lista limpa!") else doPlayerSendCancel(cid, "Sua lista ja esta limpa!") end elseif t[1] == "desbug" or t[1] == "desbugar" then doPlayerSetStorageValue(cid, 04420011, -1) doPlayerSetStorageValue(cid, 04420021, -1) doPlayerSetStorageValue(cid, 04420031, -1) doPlayerSetStorageValue(cid, 04420041, -1) doPlayerSetStorageValue(cid, 04420051, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Desbugado!") elseif t[1] == "list" then local fi = getPlayerStorageValue(cid, 04420021) ~= -1 and ""..getItemNameById(getPlayerStorageValue(cid, 04420021)).."\n" or "" local se = getPlayerStorageValue(cid, 04420031) ~= -1 and ""..getItemNameById(getPlayerStorageValue(cid, 04420031)).."\n" or "" local th = getPlayerStorageValue(cid, 04420041) ~= -1 and ""..getItemNameById(getPlayerStorageValue(cid, 04420041)).."\n" or "" local fo = getPlayerStorageValue(cid, 04420051) ~= -1 and ""..getItemNameById(getPlayerStorageValue(cid, 04420051)).."\n" or "" doPlayerPopupFYI(cid, "O sistema auto loot esta coletando:\n "..fi..""..se..""..th..""..fo) end doPlayerSetStorageValue(cid, config.storage, os.time() + config.exhaust) return true end
-
L3K0T's post in (Resolvido)Actions was marked as the answeroi amigo demorou mais fiz kkk
local l3k0t = { colors = {16, 161, 149, 251, 211, 200}, itemganhar = { {2160, 30, 50}, {2160, 20, 30}, {2160, 10, 20} } } function onUse(cid, item, fromPosition, itemEx, toPosition) doRemoveItem(item.uid, 1) local rand = math.random(100) for i = 1, #l3k0t.itemganhar do if rand > l3k0t.itemganhar[i][3] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "ah que pena, não foi desta vez! ;(") doSendAnimatedText(getCreaturePosition(cid), "Bad!", l3k0t.colors[math.random(1, #l3k0t.colors)]) doSendMagicEffect(fromPosition, 2) return true end end local recompensal3k0t = l3k0t.itemganhar rand = math.random(#recompensal3k0t) doPlayerAddItem(cid, recompensal3k0t[rand][1], recompensal3k0t[rand][2], true) doSendAnimatedText(getCreaturePosition(cid), "Win!", l3k0t.colors[math.random(1, #l3k0t.colors)]) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "PARABÉNS: Você ganhou: " .. recompensal3k0t[rand][2] .. " crystal coins!") doSendMagicEffect(fromPosition, 27) return true end
<action itemid="id do item" event="script" value="recompensa.lua"/>
-
L3K0T's post in (Resolvido)Ajuda com spell kuchyose was marked as the answerfunction onCastSpell(cid, var) local from,to = {x=962, y=885, z=7},{x=973, y=892, z=7} local from2,to2 = {x=979, y=901, z=7},{x=991, y=905, z=7} local dir = getPlayerLookDir(cid) local ppos = getPlayerPosition(cid) if(dir==1)then ppos.x = ppos.x + 1 elseif(dir==2)then ppos.y = ppos.y + 1 elseif(dir==3)then ppos.x = ppos.x - 1 elseif(dir==0)then ppos.y = ppos.y - 1 end local summon = getCreatureSummons(cid) local MaximoSummon = 0 if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) then doPlayerSendCancel(cid, "Você não pode usar Summons Aqui!") return false end if (table.maxn(summon) > MaximoSummon) then doPlayerSendTextMessage(cid, 22, "Voce ainda tem summons em batalha!") return false end local clone1 = doConvinceCreature(cid, doCreateMonster("Suiton Hearth", ppos)) local clone2 = doConvinceCreature(cid, doCreateMonster("Fuuton Hearth", ppos)) local clone3 = doConvinceCreature(cid, doCreateMonster("Raiton Hearth", ppos)) local clone4 = doConvinceCreature(cid, doCreateMonster("Katon Hearth", ppos)) doPlayerSendTextMessage(cid, 22, "Voce summonou quatro criaturas!") end FIZ ISSO PRA VOCÊ, NÁO SEI SE VAI TE AJUDAR, MAIS SÓ PODE SUMONAR MAIS QUANDO NÃO TER MAIS SUMONS EM BATALHA SE TE AJUDEI NÃO ESQUEÇA DE REP+
-
L3K0T's post in (Resolvido)pz e ferramentas de zonas não ficam marcadas no rme. was marked as the answerabra seu RME e aperta a tecla E depois do mapa aberto.
-
L3K0T's post in (Resolvido)Player not found MoveEvents was marked as the answerlocal vocs = { [1] = {regenHp = 50, regenMana = 500, secsTo = 3, effectTo = 13}, [2] = {regenHp = 50, regenMana = 500, secsTo = 3, effectTo = 13}, [3] = {regenHp = 550, regenMana = 100, secsTo = 3, effectTo = 32}, [4] = {regenHp = 650, regenMana = 80, secsTo = 3, effectTo = 34}, [5] = {regenHp = 80, regenMana = 700, secsTo = 3, effectTo = 30}, [6] = {regenHp = 80, regenMana = 700, secsTo = 3, effectTo = 30}, [7] = {regenHp = 750, regenMana = 130, secsTo = 3, effectTo = 49}, [8] = {regenHp = 880, regenMana = 130, secsTo = 3, effectTo = 44}, } function onEquip(cid) if getPlayerStorageValue(cid, 10001) > os.time() then doPlayerSendTextMessage(cid, 20, "Voce deve aguardar "..getPlayerStorageValue(cid, 10001) - os.time().." segundos para utilizar este recurso novamente.") return false end if not vocs[getPlayerVocation(cid)] then return false end startAura(cid) return true end function startAura(cid) local colors = {16, 161, 149, 251, 211, 200} if isCreature(cid) then if getPlayerSlotItem(cid, CONST_SLOT_RING).itemid == 7708 then doCreatureAddHealth(cid, vocs[getPlayerVocation(cid)].regenHp) doCreatureAddMana(cid, vocs[getPlayerVocation(cid)].regenMana) doSendMagicEffect(getCreaturePosition(cid), vocs[getPlayerVocation(cid)].effectTo) doSendAnimatedText(getCreaturePosition(cid), "RegenE !", colors[math.random(1, #colors)]) addEvent(startAura, vocs[getPlayerVocation(cid)].secsTo * 1000, cid) setPlayerStorageValue(cid, 10001, os.time() + 10) end end return false end
-
L3K0T's post in Crash da database was marked as the answerMude para Linux, preferencia ubuntu 12.04 iniciante uma firewall bem configurado isso resolve se for windows sem chance
-
L3K0T's post in (Resolvido)Teleportando summon para perto. was marked as the answereu uso assim https://tibiaking.com/forums/topic/71188-teleporte-summon-tfs-036
-
L3K0T's post in UPDATE 3: Moveitem + Antipush + Anti-Crash Elf Bot - Bug Fixes - TFS 0.4 11/04/2024 was marked as the answerfunction onMoveItem(moveItem, frompos, position, cid) if position.x == CONTAINER_POSITION then return true end local house = getHouseFromPos(frompos) or getHouseFromPos(position) --correção 100% if type(house) == "number" then local owner = getHouseOwner(house) if owner == 0 then return false, doPlayerSendCancel(cid, "Isso não é Possível.") end if owner ~= getPlayerGUID(cid) then local sub = getHouseAccessList(house, 0x101):explode("\n") local guest = getHouseAccessList(house, 0x100):explode("\n") local isInvited = false if (#sub > 0) and isInArray(sub, getCreatureName(cid)) then isInvited = true end if (#guest > 0) and isInArray(guest, getCreatureName(cid)) then isInvited = true end if not isInvited then return false, doPlayerSendCancel(cid, "Desculpe, você não está invitado.") end end end return true end
-
L3K0T's post in (Resolvido)Erro ao entrar no servidor OTServBR was marked as the answerImporta isso pro seu banco de dados Mysql;;
CREATE TABLE player_autoloot ( id int NOT NULL AUTO_INCREMENT, player_id int NOT NULL, autoloot_list blob, PRIMARY KEY (id) );
-
L3K0T's post in (Resolvido)Script Timer was marked as the answer20 horas
24 * 60 * 60 = 24 horas. em alguns tfs são usado assim 1 * 60 * 3600 = 24 horas
resumindo em cores.
tabela 1
24 = quantos hora tem 1 dia = 24
60 = quantos segundos tem 1 minuto? = 60
60 = quantos minuto tem 1 hora? = 60
tabela 2
1 quantas 24 horas tem num dia? = 1 x 24 né.
60 quantos segundos tem num minuto? = 60
3600 quantos segunos tem 1 hora? = 3600
acho que deve ser algo mais proximo que cheguei rsrs
-
L3K0T's post in (Resolvido)Erro MySql (Alguem me da uma luz kkk) was marked as the answerALTER TABLE killers ADD war INT NOT NULL DEFAULT 0 importa pro mysql
-
L3K0T's post in (Resolvido)[Pedido][ tfs 1.3] Anunciar para todos um boss que morreu e quem matou was marked as the answerresolvido @Faysal desculpe a demora tive que dar uma estudada rapidinha pra pegar o jeito novamente rsrs
script.lua
function onDeath(monster, corpse, killer, mostDamageKiller, unjustified, mostDamageUnjustified) local monstro = "Diablo" if monster:getName() == monstro then Game.broadcastMessage("O Jogador "..killer:getName().." matou o Boss " ..monster:getName().. "! ") end return true end
tag
<event type="death" name="teste" script="teste.lua"/>
xml do monstro
<script> <event name="teste" /> </script>
-
L3K0T's post in (Resolvido)Tela preta após compilar otclient was marked as the answerTENTA DA "REBUILD" PRA COMPILAR A SOURCE NÃO CLICA EM BUILDER OLHA A SETA NA IMAGEM DO CODEBLOCK
ou tenta por isso no game things do otclient em otclient-0.6.6\modules\game_things abre game_things.lua
ache
function load() local version = g_game.getClientVersion() em baixo coloca
g_game.enableFeature(GameSpritesU32) e salva abra o cliente e ve se tá normal.
-
L3K0T's post in (Resolvido)[AJUDA] VIPFREE SENDO GANHA A CADA CRIAÇÃO DE CHAR was marked as the answersim fiz pra testar, agora vo terminar e tbm fiz um sistema top deve servir para você.
ainda n tá aprovado.
-
L3K0T's post in (Resolvido)[GESIOR] NÃO DA PRA VISUALIZAR NENHUM CHAR Fatal error: Call to a member function fetch() on a non-object in was marked as the answerIsso "ativaEquips" tem no seu banco de dados? Na tabela player? Se não tiver remova
-
L3K0T's post in (Resolvido)Erro chão bugado map editor was marked as the answerData/item/item.otb joga nas pastas do RME da versões do cliente exemplo 860, 870, são essas pastas com numeros
-
L3K0T's post in (Resolvido)[OFF] Script de ao matar player anunciar was marked as the answertente usar a tag assim
<event type="kill" name="anunciarmorte" script="anunciar_morte.lua"/> -
L3K0T's post in (Resolvido)ERRO AO COMPILAR SOURCE DEV C++ was marked as the answerBom amigo infelizmente isso é falta de configurações no dev-cpp como por exemplo instalações das boosts - bibliotecas, estarei deixando uma relíquia já pré configurada pra vc usar
*Só abrir, importar a source e compilar.
Download: https://www.mediafire.com/file/l887ck4uc7zu082/Dev-Cpp.zip
Scan: https://www.virustotal.com/#/file/627f8580551adc000131d4f2a970c53fa492f1b68c642354f643e1180b9718b7/detection
Ajudei? REP+