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
-
XGaduX's post in Como colocar cooldown nessa spell? was marked as the answerlocal scom1 = createCombatObject() local scom2 = createCombatObject() local scom3 = createCombatObject() local scom4 = createCombatObject() local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_LIGHTGREEN) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 850) function kiaiho(cid, level, maglevel) local min = -(level * 1.0 + maglevel * 1 + 0) local max = -(level * 1.0 + maglevel * 1 + 0) return min, max end setCombatCallback(combat1, CALLBACK_PARAM_LEVELMAGICVALUE, "kiaiho") local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_HITCOLOR, COLOR_LIGHTGREEN) setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 850) function kiaiho(cid, level, maglevel) local min = -(level * 1.0 + maglevel * 1 + 0) local max = -(level * 1.0 + maglevel * 1 + 0) return min, max end setCombatCallback(combat2, CALLBACK_PARAM_LEVELMAGICVALUE, "kiaiho") local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_HITCOLOR, COLOR_LIGHTGREEN) setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat3, COMBAT_PARAM_EFFECT, 850) function kiaiho(cid, level, maglevel) local min = -(level * 1.0 + maglevel * 1 + 0) local max = -(level * 1.0 + maglevel * 1 + 0) return min, max end setCombatCallback(combat3, CALLBACK_PARAM_LEVELMAGICVALUE, "kiaiho") local combat4 = createCombatObject() setCombatParam(combat4, COMBAT_PARAM_HITCOLOR, COLOR_LIGHTGREEN) setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat4, COMBAT_PARAM_EFFECT, 850) function kiaiho(cid, level, maglevel) local min = -(level * 1.0 + maglevel * 1 + 0) local max = -(level * 1.0 + maglevel * 1 + 0) return min, max end setCombatCallback(combat4, CALLBACK_PARAM_LEVELMAGICVALUE, "kiaiho") arr1 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } arr2 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } arr3 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } arr4 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) local area3 = createCombatArea(arr2) local area4 = createCombatArea(arr2) setCombatArea(scom1, area1) setCombatArea(scom2, area2) setCombatArea(scom3, area3) setCombatArea(scom4, area4) function onTargetTile(cid, pos) local p = getThingPos(cid) local basep = {x = p.x + 5, y = p.y - 5, z = p.z} doSendDistanceShoot(basep, pos, 55) doCombat(cid,combat1,positionToVariant(pos)) end function onTargetTile2(cid, pos) local p1 = getThingPos(cid) local basep1 = {x = p1.x - 5, y = p1.y + 5, z = p1.z} doSendDistanceShoot(basep1, pos, 55) doCombat(cid,combat2,positionToVariant(pos)) end function onTargetTile3(cid, pos) local p2 = getThingPos(cid) local basep2 = {x = p2.x - 5, y = p2.y + 5, z = p2.z} local baseep2 = {x = p2.x + 5, y = p2.y - 5, z = p2.z} doSendDistanceShoot(basep2, pos, 112) doSendDistanceShoot(baseep2, pos, 112) doCombat(cid,combat3,positionToVariant(pos)) end function onTargetTile4(cid, pos) local p3 = getThingPos(cid) local basep3 = {x = p3.x - 5, y = p3.y - 5, z = p3.z} local baseep3 = {x = p3.x + 5, y = p3.y + 5, z = p3.z} doSendDistanceShoot(basep3, pos, 112) doSendDistanceShoot(baseep3, pos, 112) doCombat(cid,combat4,positionToVariant(pos)) end setCombatCallback(scom1, CALLBACK_PARAM_TARGETTILE, "onTargetTile") setCombatCallback(scom2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2") setCombatCallback(scom3, CALLBACK_PARAM_TARGETTILE, "onTargetTile3") setCombatCallback(scom4, CALLBACK_PARAM_TARGETTILE, "onTargetTile4") local function onCastSpell1(parameters) doCombat(parameters.cid, scom1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, scom2, parameters.var) end local function onCastSpell3(parameters) doCombat(parameters.cid, scom3, parameters.var) end local function onCastSpell4(parameters) doCombat(parameters.cid, scom4, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var} addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 100, parameters) addEvent(onCastSpell3, 1200, parameters) addEvent(onCastSpell4, 1200, parameters) return TRUE end Como insiro essa função na spell? \/
function onCastSpell(cid, var) local parameters = { cid = cid, var = var} if exhaustion.get(cid, 5) then doPlayerSendCancel(cid, "Wait "..exhaustion.get(cid, 5).." seconds.") return false end
-
XGaduX's post in Alguém poderia me ajudar com esse "bug" ao clicar no tile o player não se move, porém usando as setas ele anda normalmente... was marked as the answeralguém poderia me ajudar com esse "bug" ao clicar no tile o player não se move, porém usando as setas ele anda normalmente...
2021-03-04 14-47-27.mp4