Blazera 8.60
blazera.net
SOBRE O BLAZERA
Um fresh start em um servidor 8.6 clássico, com real map, focado na experiência raiz do Tibia. | Classic Real Map • Fresh Start • Client 8.6 • Old School Gameplay • Active Community
Inicia em:
--
Participar
Solutions
-
Yamili's post in (Resolvido)Colocar posição de efeito nesse action was marked as the answerEm:
function efeitosAura(i,tm,cid) if(isCreature(cid)) then local atual = getCreaturePosition(cid) Muda para:
function efeitosAura(i,tm,cid) if(isCreature(cid)) then local atual = {x = getPlayerPosition(cid).x + 1, y = getPlayerPosition(cid).y + 0, z = getPlayerPosition(cid).z}
-
Yamili's post in (Resolvido)Spell de cura em area was marked as the answerNão sei se entendi direito o que você queria.
Mas acho que eu tinha uma spell assim, que usei a um tempo atrás.
Não testei atualmente (mas quando usei funcionava perfeitamente).
Só funciona em party.
local config = { tempo = 20, --- tempo que vai durar a spell intervalo = 1, --- intervalo que leva pra recuperar X de mana/vida (em segundos) hp = 5000, -- quanto de hp ganha a cada intervalo mana = 5000, -- quanto de mana ganha a cada intervalo } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, 349) -- efeito setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE) CROSS5X5 = { {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, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 2, 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}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, } local area = createCombatArea(CROSS5X5) setCombatArea(combat, area) local condition = createConditionObject(CONDITION_FOOD) setConditionParam(condition, CONDITION_PARAM_TICKS, config.tempo*1000) setConditionParam(condition, CONDITION_PARAM_BUFF, true) setConditionParam(condition, CONDITION_PARAM_MANAGAIN, config.mana) setConditionParam(condition, CONDITION_PARAM_MANATICKS, config.intervalo*1000) setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, config.hp) setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, config.intervalo*1000) local baseMana = 120 function onCastSpell(cid, var) local waittime = 30 -- Tempo de exhaustion local storage = 115826 if exhaustion.check(cid, storage) then doPlayerSendCancel(cid, "Podera usar novamente dentro de 30 segundos.") return false end local pos = getCreaturePosition(cid) local membersList = getPartyMembers(cid) if(membersList == nil or type(membersList) ~= 'table' or table.maxn(membersList) <= 1) then doPlayerSendDefaultCancel(cid, RETURNVALUE_NOPARTYMEMBERSINRANGE) doSendMagicEffect(pos, CONST_ME_POFF) return LUA_ERROR end local affectedList = {} for _, pid in ipairs(membersList) do if(getDistanceBetween(getCreaturePosition(pid), pos) <= 36) then table.insert(affectedList, pid) end end local tmp = table.maxn(affectedList) if(tmp <= 1) then doPlayerSendDefaultCancel(cid, RETURNVALUE_NOPARTYMEMBERSINRANGE) doSendMagicEffect(pos, CONST_ME_POFF) return LUA_ERROR end local mana = math.ceil((0.9 ^ (tmp - 1) * baseMana) * tmp) if(getCreatureMana(cid) < mana) then doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHMANA) doSendMagicEffect(pos, CONST_ME_POFF) return LUA_ERROR end if(doCombat(cid, combat, var) ~= LUA_NO_ERROR) then doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) doSendMagicEffect(pos, CONST_ME_POFF) return LUA_ERROR end doCreatureAddMana(cid, -(mana - baseMana), FALSE) doPlayerAddSpentMana(cid, (mana - baseMana)) for _, pid in ipairs(affectedList) do doAddCondition(pid, condition) end exhaustion.set(cid, storage, waittime) return LUA_NO_ERROR end