Ir para conteúdo

139

Membro
  • Registro em

  • Última visita

  1. 139 reagiu a uma resposta no tópico: Básico de SQL via Lua
  2. 139 alterou sua foto pessoal
  3. 139 postou uma resposta no tópico em Formação de Equipe
    Te enviei PM.
  4. Doidodepeda reagiu a uma resposta no tópico: Adicionar Função Random
  5. sauryon reagiu a uma resposta no tópico: Script Criar ponte...
  6. local id_arma = 7707 --id da arma usada function onStatsChange(cid, attacker, type, combat, value) if isPlayer(target) and type == COMBAT_PHYSICALDAMAGE and (getPlayerSlotItem(attacker, CONST_SLOT_RIGHT).itemid == id_arma or getPlayerSlotItem(attacker, CONST_SLOT_LEFT).itemid == id_arma) then if math.random(1, 5) == 1 then doCreatureAddHealth(attacker, value) end end return true end
  7. 139 postou uma resposta no tópico em Suporte Tibia OTServer
    local function removeTileItemById(pos, itemId) for i = 0, 255 do pos.stackpos = i local item = getThingFromPos(pos) if item.itemid == itemId then doRemoveItem(item.uid, 1) return true end end return false end local tiles, var, ret = { {x = 1468, y = 947, z = 6}, {x = 1469, y = 947, z = 6} }, 5901, 9230 local duracao = 10 -- em segundos function onUse(cid, item, fromPosition, itemEx, toPosition) local t = getTileItemById(tiles[1], ret).uid if t > 0 then return true end if not doPlayerRemoveItem(cid, var, 4) then doPlayerSendCancel(cid, 'Você precisa de 4 madeiras para construir a ponte.') doSendMagicEffect(getThingPos(cid), 2) return true end for i = 1, #tiles do doCreateItem(ret, 1, tiles[i]) addEvent(removeTileItemById, duracao*1000, tiles[i], ret) doSendMagicEffect(tiles[i], CONST_ME_POFF) end return true end
  8. 139 postou uma resposta no tópico em Suporte Tibia OTServer
    É possível sim. Cria duas cópias desse script aí, nomeando como copia1.lua e copia2.lua por exemplo. Aí você abre eles e altera o dano ali no "local min, max = 870, 1000", conforme forem os danos originais das suas wands. local min, max = 870, 1000 local storage = 722656 local function getMinDamage(level, magLevel) local min = ((level * 1.05) + (magLevel * 1.00)) local naturalDamage = math.random(-30,45) min = min + naturalDamage if min < 870 then min = 870 end return math.floor(min) end local function getMaxDamage(level, magLevel) local max = ((level * 1.05) + (magLevel * 1.00)) local naturalDamage = math.random(-20,45) max = max + naturalDamage if max < 1000 then max = 1000 end return math.ceil(max) end Depois é só abrir o weapons.xml e designar os scripts copia1 e copia2 pras respectivas wands.
  9. Já tentou alterar para CONDITION_PHYSICAL?
  10. 139 postou uma resposta no tópico em Suporte Tibia OTServer
    É mais fácil colocar o damage dessa sua wand pra escalar com level e magic level do char (assim ninguém precisa usar outra) do que deixar todas as outras no mesmo molde. Posta o script da sua wand.
  11. 139 reagiu a uma resposta no tópico: Benedetta - A cidade lavada do pecado
  12. 139 postou uma resposta no tópico em Suporte OTServer Derivados
    local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, 13) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local combatHeal = createCombatObject() setCombatParam(combatHeal, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combatHeal, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combatHeal, COMBAT_PARAM_COLOR_BLUE, 23) setHealingFormula(combatHeal, COMBAT_FORMULA_LEVELMAGIC, 63, 62, 61, 60) arr = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } local area = createCombatArea(arr) setCombatArea(combat, area) function onTargetCreature(cid, target) if isPlayer(target) then doCombat(cid, combatHeal, numberToVariant(target)) end end setCombatCallback(combat, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") function onCastSpell(cid, var) return doCombat(cid, combat, var) end
  13. 139 reagiu a uma resposta no tópico: 3 Game Ui Design
  14. 139 reagiu a uma resposta no tópico: Teias de Aranha congeladas
  15. 139 reagiu a uma resposta no tópico: Itens e Tokens
  16. raphadoidera reagiu a uma resposta no tópico: Magia de Área com Delay.
  17. Enenra reagiu a uma resposta no tópico: Spell dando index a nil value
  18. O Dr. Frankestein ficaria orgulhoso desse código. Pelo que eu entendi deveria ser isso:
  19. @raphadoidera
  20. Fabi Marzan reagiu a uma resposta no tópico: Spell - Big Regeneration
  21. ZeeroBR reagiu a uma resposta no tópico: (Resolvido) Pedido Spell de invisibilidade
  22. elielder reagiu a uma resposta no tópico: Spell - Big Regeneration
  23. @Elieder Alterei o meu primeiro comentário lá em cima, ta com a correção pra valores acima de 99%. Testa e se estiver funcionando marca como solução pra encerrar o tópico.
  24. Mostra com as outras vocações que você diz que a cura não ta aumentando.
  25. Me mostra o que aparece na distro: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local voc_bonus = { -- valor da cura adicional, ex: 0%, 10%, 50%, 100%, 200% ["Tanque"] = 50, ["Suporte"] = 25, ["Dano"] = 0, } local table_vocs = { -- last_id é o último id da vocação, a tabela precisa estar em ordem crescente. [1] = {last_id = 10, voc = "Naruto", classe = "Dano"}, [2] = {last_id = 20, voc = "Sasuke", classe = "Dano"}, [3] = {last_id = 30, voc = "Chouji", classe = "Tanque"}, [4] = {last_id = 40, voc = "Hidan", classe = "Tanque"}, [5] = {last_id = 50, voc = "Hashirama", classe = "Suporte"}, [6] = {last_id = 60, voc = "Obito", classe = "Suporte"}, } local function getBonus(cid, base) local pvoc = getPlayerVocation(cid) for k, _ in ipairs(table_vocs) do if pvoc <= table_vocs[k].last_id then print("lastid: "..table_vocs[k].last_id) print("voc: "..table_vocs[k].voc) bonus = voc_bonus[table_vocs[k].classe]/100 if bonus < 1 then bonus = bonus + 1 end total = base * bonus print("total: "..total.."| base: "..base.." | bonus: "..bonus) print("") return total end end end function onGetPlayerMinMaxValues(cid, level, magLevel) local min = ((level*0)+(magLevel*0)+200) local max = ((level*0)+(magLevel*0)+250) return getBonus(cid, min), getBonus(cid, max) end setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetPlayerMinMaxValues") function onCastSpell(cid, var) return doCombat(cid, combat, var) end
  26. Msg de erro? Aqui ta funcionando certinho.
  27. @elielder Nesse caso é só alterar o "last_id" de 10 pra 12 mesmo. O "[1]" não tem nada a ver com os ids da vocação, é só pra organizar a tabela mesmo, tipo: 1ª vocação -> Naruto 2ª vocação -> Sasuke Etc. Ah, alterei uma linha do script, atualiza o seu aí.
  28. @raphadoidera local c = { trapId = 2718, -- id do trap trapTime = 4, -- tempo do trap em segundos exhaustStorage = 1060602, -- storage do exhausted exhaustTime = 20 -- tempo do exhausted em segundos } local trap = createCombatObject() setCombatArea(trap, createCombatArea({ {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,1,1,1,0,0}, {0,0,1,2,1,0,0}, {0,0,1,1,1,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0} })) function isWalkable(pos, creature, proj, pz)-- by Nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and pz then return false, true 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 onTargetTile(cid, pos) if isWalkable(pos, true, true, true) then doSendMagicEffect(pos, 111) doCreateItem(c.trapId, 1, pos) addEvent(function() local thing = getTileItemById(pos, c.trapId).uid if(thing ~= 0) then doRemoveItem(thing) end end, c.trapTime * 1000) end end setCombatCallback(trap, CALLBACK_PARAM_TARGETTILE, "onTargetTile") function onCastSpell(cid, var) local target = variantToNumber(var) if(isPlayer(cid)) then if(math.max(0, (exhaustion.get(cid, c.exhaustStorage) or 0)) > 0) then doPlayerSendCancel(cid, "You are exhausted. Wait " .. exhaustion.get(cid, c.exhaustStorage) .. " second" .. (exhaustion.get(cid, c.exhaustStorage) > 1 and "s" or "") .. ".") return false else exhaustion.set(cid, c.exhaustStorage, c.exhaustTime) end end doCombat(cid, trap, var) return true end

Informação Importante

Confirmação de Termo