Ir para conteúdo

L3K0T

Membro
  • Registro em

  • Última visita

Tudo que L3K0T postou

  1. 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
  2. expbuy local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local DEATH_TABLE = { before_exp = 0, after_exp = 0 } function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local msg = string.lower(msg) local itemid, count = 9020, 5 -- Edit the item id and count here if isInArray({"recover", "recuperar", "exp", "experience"}, msg) then npcHandler:say("Do you want to recover lost experience after your death for " .. count .. " " .. getItemNameById(itemid) .. "? {yes}", cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, DEATH_TABLE.before_exp) ~= -1 and getPlayerExperience(cid) < getPlayerStorageValue(cid, DEATH_TABLE.before_exp) then if doPlayerRemoveItem(cid, itemid, count) == TRUE then local expToRestore = getPlayerStorageValue(cid, DEATH_TABLE.before_exp) - getPlayerStorageValue(cid, DEATH_TABLE.after_exp) doPlayerAddExp(cid, expToRestore) npcHandler:say("Thank you! Here is your experience.", cid) else npcHandler:say("Sorry, you don't have enough " .. getItemNameById(itemid) .. "!", cid) end else npcHandler:say("Sorry, you didn't die or have already recovered your lost experience.", cid) end talkState[talkUser] = 0 elseif msg == "no" then npcHandler:say("Then not.", cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) expbuy otimizado local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local DEATH_TABLE = { before_exp = 0, after_exp = 0 } function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local msg = string.lower(msg) local itemid, count = 9020, 5 -- Edite o ID e a quantidade do item aqui if isInArray({"recover", "recuperar", "exp", "experience"}, msg) then npcHandler:say("Deseja recuperar a experiência perdida após sua morte por " .. count .. " " .. getItemNameById(itemid) .. "? {yes}", cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then local beforeExp = getPlayerStorageValue(cid, DEATH_TABLE.before_exp) local afterExp = getPlayerStorageValue(cid, DEATH_TABLE.after_exp) local playerExp = getPlayerExperience(cid) if beforeExp ~= -1 and playerExp < beforeExp then if doPlayerRemoveItem(cid, itemid, count) == TRUE then local expToRestore = beforeExp - afterExp doPlayerAddExp(cid, expToRestore) npcHandler:say("Obrigado! Aqui está sua experiência perdida de volta.", cid) else npcHandler:say("Desculpe, você não tem itens suficientes " .. getItemNameById(itemid) .. "!", cid) end else npcHandler:say("Desculpe, você não morreu ou já recuperou sua experiência perdida!", cid) end talkState[talkUser] = 0 elseif msg == "no" then npcHandler:say("Então, não.", cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  3. tentou? porque no seu so tem show atributes <attribute key="stopduration" value="1" /> <attribute key="showduration" value="1" />
  4. Exatato! cpp e .h sao todos da source! codigos .lua e .xml sao do servidor é diferente.
  5. sim, pela source! é bem complexo
  6. local stonesId = {8633,8634,8635,8636} -- ids dos diferentes tipos de stones. local timeRemove = 10 -- tempo para remover as pedras em segundos. local damageAmount = 50 -- Quantidade de dano que a magia causará. function createObject(cid, position, stonesPosition) if (isPlayer(cid)) then if getPlayerLookDir(cid) == 0 then positions = {x=position.x, y=position.y-1, z=position.z} elseif getPlayerLookDir(cid) == 1 then positions = {x=position.x+1, y=position.y, z=position.z} elseif getPlayerLookDir(cid) == 2 then positions = {x=position.x, y=position.y+1, z=position.z} elseif getPlayerLookDir(cid) == 3 then positions = {x=position.x-1, y=position.y, z=position.z} end if isWalkable(positions) then createStone(stonesPosition, positions, stonesId[math.random(1,#stonesId)], cid) addEvent(createObject, 500, cid, positions, stonesPosition) else addEvent(removeStones, timeRemove*1000, stonesPosition) causarDanoMagia(cid, position, damageAmount) -- Chama a função causarDanoMagia com o dano especificado end end end function createStone(stonesPosition, positions, stone, cid) doCreateItem(stone, 1, positions) stonesPosition[(#stonesPosition)+1] = {x=positions.x, y=positions.y, z=positions.z, stackpos=1} end function removeStones(stonesPosition) for i=1, #stonesPosition do for o=1, 2 do stonesPosition[i] = {x=stonesPosition[i].x, y=stonesPosition[i].y, z=stonesPosition[i].z, stackpos=o} if isInArray(stonesId, getThingfromPos(stonesPosition[i]).itemid) then doRemoveItem(getThingfromPos(stonesPosition[i]).uid) end end end end function isWalkable(pos, creature, pz, proj) -- nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end local creature = getTopCreature(pos) if creature.type > 0 then return false end if getTilePzInfo(pos) and not pz then return false end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function causarDanoMagia(cid, position, amount) local targetCreature = getTopCreature(position) if isPlayer(targetCreature) then doCreatureAddHealth(targetCreature, -amount) -- Isso causará dano ao jogador na posição end end function onCastSpell(cid, var) local stonesPosition = {} local position = getPlayerPosition(cid) createObject(cid, position, stonesPosition) return true end
  7. la no movements.xml vc precisa declarar o item tbm na xml, para que atributos e descrições apareçam querido membro 😁
  8. 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"
  9. 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 query = db.getResult("SHOW COLUMNS FROM `players` LIKE 'guild_id';") if (query and query:getID() ~= -1) then -- A coluna 'guild_id' existe na tabela 'players' query:free() 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
  10. que legal rapaz, vou usar no meu thp rsrs pra por as vocação e cor.
  11. Este tópico foi arquivado para que possamos fazer a manutenção dos conteúdos na seção onde ele ficava. Ele ficará disponível para consulta à aqueles que precisarem, no entanto permanecerá fechado. Se você precisar comentar sobre ou tirar alguma dúvida busque a seção coerente com o assunto desde tópico ou a de suporte.
  12. L3K0T postou uma resposta no tópico em Arquivo Público
    Este tópico foi arquivado para que possamos fazer a manutenção dos conteúdos na seção onde ele ficava. Ele ficará disponível para consulta à aqueles que precisarem, no entanto permanecerá fechado. Se você precisar comentar sobre ou tirar alguma dúvida busque a seção coerente com o assunto desde tópico ou a de suporte.
  13. se puder clique em reputação, ali nas reações
  14. 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
  15. isso é na source do servidor, se seu server nao tem source... ai nao tem como
  16. function onUseWeapon(cid, var) local damageTypes = { [COMBAT_PHYSICALDAMAGE] = {min = 50, max = 100}, [COMBAT_FIREDAMAGE] = {min = 30, max = 60}, [COMBAT_ICEDAMAGE] = {min = 40, max = 80}, [COMBAT_POISONDAMAGE] = {min = 20, max = 40}, [COMBAT_DEATHDAMAGE] = {min = 60, max = 120}, [COMBAT_ENERGYDAMAGE] = {min = 50, max = 100}, [COMBAT_HOLYDAMAGE] = {min = 70, max = 140}, [COMBAT_LIFEDRAIN] = {min = 30, max = 60}, [COMBAT_MANADRAIN] = {min = 30, max = 60}, [COMBAT_DROWNDAMAGE] = {min = 20, max = 40} } local combat = createCombatObject() for damageType, damageRange in pairs(damageTypes) do local randomDamage = math.random(damageRange.min, damageRange.max) setCombatParam(combat, COMBAT_PARAM_TYPE, damageType) setCombatFormula(combat, COMBAT_FORMULA_DAMAGE, -randomDamage, -randomDamage) local area = createCombatArea({ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1} }) setCombatArea(combat, area) doCombat(cid, combat, var) end end
  17. function onUseWeapon(cid, var) local damageTypes = { COMBAT_PHYSICALDAMAGE, COMBAT_FIREDAMAGE, COMBAT_ICEDAMAGE, COMBAT_POISONDAMAGE, COMBAT_DEATHDAMAGE, COMBAT_ENERGYDAMAGE, COMBAT_HOLYDAMAGE, COMBAT_LIFEDRAIN, COMBAT_MANADRAIN, COMBAT_DROWNDAMAGE } -- Escolha aleatoriamente um tipo de dano da lista local randomDamageType = damageTypes[math.random(1, #damageTypes)] local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, randomDamageType) -- Defina o mínimo e máximo de dano conforme necessário local minDamage = 100 local maxDamage = 200 -- Gere um valor de dano aleatório local randomDamage = math.random(minDamage, maxDamage) -- Configure o combate para causar o dano aleatório setCombatFormula(combat, COMBAT_FORMULA_DAMAGE, -randomDamage, -randomDamage) -- Execute o combate doCombat(cid, combat, var) end
  18. function onUseWeapon(cid, var) local damageTypes = { COMBAT_PHYSICALDAMAGE, COMBAT_FIREDAMAGE, COMBAT_ICEDAMAGE, COMBAT_POISONDAMAGE, COMBAT_DEATHDAMAGE, COMBAT_ENERGYDAMAGE, COMBAT_HOLYDAMAGE, COMBAT_LIFEDRAIN, COMBAT_MANADRAIN, COMBAT_DROWNDAMAGE } local combat = createCombatObject() local randomDamageType = damageTypes[math.random(1, #damageTypes)] setCombatParam(combat, COMBAT_PARAM_TYPE, randomDamageType) setCombatFormula(combat, COMBAT_FORMULA_DAMAGE, -100, -200) -- Ajuste os valores de dano mínimo e máximo conforme necessário local area = createCombatArea({ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1} }) setCombatArea(combat, area) doCombat(cid, combat, var) end
  19. -- Crie objetos de combate para cada tipo de dano local combatTypes = { COMBAT_PHYSICALDAMAGE, COMBAT_FIREDAMAGE, COMBAT_ICEDAMAGE, COMBAT_POISONDAMAGE, COMBAT_DEATHDAMAGE, COMBAT_ENERGYDAMAGE, COMBAT_HOLYDAMAGE, COMBAT_LIFEDRAIN, COMBAT_MANADRAIN, COMBAT_DROWNDAMAGE } -- Função que executa o combate para um tipo de dano específico local function doDamageCombat(cid, damageType) local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, damageType) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local area = createCombatArea({ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1} }) setCombatArea(combat, area) doCombat(cid, combat, var) end function onUseWeapon(cid, var) -- Execute todos os tipos de dano for _, damageType in ipairs(combatTypes) do doDamageCombat(cid, damageType) end end
  20. -- Crie um objeto de combate local combat = createCombatObject() -- Defina os tipos de dano que o combate causará local damageTypes = { COMBAT_PHYSICALDAMAGE, COMBAT_HOLYDAMAGE, COMBAT_FIREDAMAGE, COMBAT_ICEDAMAGE, COMBAT_POISONDAMAGE, COMBAT_DEATHDAMAGE, COMBAT_ENERGYDAMAGE, COMBAT_LIFEDRAIN, COMBAT_MANADRAIN, COMBAT_DROWNDAMAGE } -- Adicione cada tipo de dano ao combate for _, damageType in ipairs(damageTypes) do setCombatParam(combat, COMBAT_PARAM_TYPE, damageType) end -- Configure outros parâmetros do combate, como efeito e área setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) local area = createCombatArea({ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0} }) setCombatArea(combat, area) function onUseWeapon(cid, var) return doCombat(cid, combat, var) end
  21. o Demon é imune alguns combos sim
  22. é porque o demon é imune, vc precisa desativar a imunidade pelo arquivo da criatura
  23. -- Crie um objeto de combate local combat = createCombatObject() -- Defina os tipos de dano que o combate causará local damageTypes = { COMBAT_PHYSICALDAMAGE, COMBAT_FIREDAMAGE, COMBAT_ICEDAMAGE, COMBAT_POISONDAMAGE, COMBAT_DEATHDAMAGE, COMBAT_ENERGYDAMAGE, COMBAT_HOLYDAMAGE, COMBAT_LIFEDRAIN, COMBAT_MANADRAIN, COMBAT_DROWNDAMAGE } -- Adicione cada tipo de dano ao combate for _, damageType in ipairs(damageTypes) do setCombatParam(combat, COMBAT_PARAM_TYPE, damageType) end -- Configure outros parâmetros do combate, como área e fórmula local area = createCombatArea({{1, 1, 1}, {1, 3, 1}, {1, 1, 1}}) setCombatArea(combat, area) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) -- Função onUseWeapon permanece a mesma function onUseWeapon(cid, var) return doCombat(cid, combat, var) end

Informação Importante

Confirmação de Termo