Postado Fevereiro 13, 2020 5 anos Eu gostaria que essas duas Spells fossem somente uma script, ou seja, o player fica invencível e tbm ganharia um Outfit temporário. TFS: 0.4 +REP Script 1: (imortal) local config = { storage = 3482101, cooldown = 30, --- tempo entre um uso e outro duration = 5, --- duração effect1 = 29 -- efeito que sai ao falar a spell } local outfit = createConditionObject(CONDITION_INVISIBLE, config.duration * 1000, false) function onCastSpell(cid, var) if os.time() - getPlayerStorageValue(cid, 55695) >= config.cooldown then setPlayerStorageValue(cid, 55695, os.time()) doSendMagicEffect(getCreaturePosition(cid), config.effect1) setPlayerStorageValue(cid, config.storage, os.time() + config.duration) doCreatureSay(cid,"UNTOUCHABLE!!!", 19) doAddCondition(cid, outfit) doPlayerSendTextMessage(cid, 27, "You have now ".. config.duration .." seconds of invulnerability.") else doPlayerSendCancel(cid, "Your skill is in cooldown, you must wait "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, 55695))).." seconds.") return false end return true end Script 2: (ganha outfit) local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_YELLOW) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -415.0, 0, -425.0, 0) arr1 = { {0, 3, 0} } local area1 = createCombatArea(arr1) setCombatArea(combat1, area1) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end function onCastSpell(cid, var) local outfit = {lookType = 607, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} local time = 20 -- segundos que ficará com a outfit local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+3, y=getThingPosition(getCreatureTarget(cid)).y+0, z=getThingPosition(getCreatureTarget(cid)).z} local parameters = { cid = cid, var = var, combat1 = combat1 } addEvent(onCastSpell1, 0, parameters) doSetCreatureOutfit(cid, outfit, time) doSendMagicEffect(position1, 83) return true end
Postado Fevereiro 15, 2020 5 anos local nighttowl = { storage = 3482101, cooldown = 30, --- tempo entre um uso e outro duration = 5, --- duração effect1 = 29, -- efeito que sai ao falar a spell effect2 = 83 -- efeito da segunda spell } local outfit = createConditionObject(CONDITION_INVISIBLE, nighttowl.duration * 1000, false) local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_YELLOW) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -415.0, 0, -425.0, 0) arr1 = { {0, 3, 0} } local area1 = createCombatArea(arr1) setCombatArea(combat1, area1) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end function onCastSpell(cid, var) local outfit = {lookType = 607, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} local time = 20 -- segundos que ficará com a outfit local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+3, y=getThingPosition(getCreatureTarget(cid)).y+0, z=getThingPosition(getCreatureTarget(cid)).z} local parameters = { cid = cid, var = var, combat1 = combat1 } if os.time() - getPlayerStorageValue(cid, 55695) >= nighttowl.cooldown then setPlayerStorageValue(cid, 55695, os.time()) doSendMagicEffect(getCreaturePosition(cid), nighttowl.effect1) setPlayerStorageValue(cid, nighttowl.storage, os.time() + nighttowl.duration) doCreatureSay(cid,"UNTOUCHABLE!!!", 19) doAddCondition(cid, outfit) doSetCreatureOutfit(cid, outfit, time) doSendMagicEffect(position1, nighttowl.effect2) addEvent(onCastSpell1, 0, parameters) doPlayerSendTextMessage(cid, 27, "You have now ".. nighttowl.duration .." seconds of invulnerability.") else doPlayerSendCancel(cid, "Your skill is in cooldown, you must wait "..(nighttowl.cooldown - (os.time() - getPlayerStorageValue(cid, 55695))).." seconds.") return false end return true end se te ajudei REP+ e marque como melhor resposta.
Postado Fevereiro 15, 2020 5 anos Autor 5 horas atrás, Nightowl disse: local nighttowl = { storage = 3482101, cooldown = 30, --- tempo entre um uso e outro duration = 5, --- duração effect1 = 29, -- efeito que sai ao falar a spell effect2 = 83 -- efeito da segunda spell } local outfit = createConditionObject(CONDITION_INVISIBLE, nighttowl.duration * 1000, false) local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_YELLOW) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -415.0, 0, -425.0, 0) arr1 = { {0, 3, 0} } local area1 = createCombatArea(arr1) setCombatArea(combat1, area1) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end function onCastSpell(cid, var) local outfit = {lookType = 607, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} local time = 20 -- segundos que ficará com a outfit local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+3, y=getThingPosition(getCreatureTarget(cid)).y+0, z=getThingPosition(getCreatureTarget(cid)).z} local parameters = { cid = cid, var = var, combat1 = combat1 } if os.time() - getPlayerStorageValue(cid, 55695) >= nighttowl.cooldown then setPlayerStorageValue(cid, 55695, os.time()) doSendMagicEffect(getCreaturePosition(cid), nighttowl.effect1) setPlayerStorageValue(cid, nighttowl.storage, os.time() + nighttowl.duration) doCreatureSay(cid,"UNTOUCHABLE!!!", 19) doAddCondition(cid, outfit) doSetCreatureOutfit(cid, outfit, time) doSendMagicEffect(position1, nighttowl.effect2) addEvent(onCastSpell1, 0, parameters) doPlayerSendTextMessage(cid, 27, "You have now ".. nighttowl.duration .." seconds of invulnerability.") else doPlayerSendCancel(cid, "Your skill is in cooldown, you must wait "..(nighttowl.cooldown - (os.time() - getPlayerStorageValue(cid, 55695))).." seconds.") return false end return true end se te ajudei REP+ e marque como melhor resposta.
Postado Fevereiro 15, 2020 5 anos local nighttowl = { storage = 3482101, cooldown = 30, --- tempo entre um uso e outro duration = 5, --- duração effect1 = 29, -- efeito que sai ao falar a spell effect2 = 83 -- efeito da segunda spell } local outfit = createConditionObject(CONDITION_INVISIBLE, nighttowl.duration * 1000, false) local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_YELLOW) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -415.0, 0, -425.0, 0) arr1 = { {0, 3, 0} } local area1 = createCombatArea(arr1) setCombatArea(combat1, area1) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end function onCastSpell(cid, var) local outfit = {lookType = 607, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} local time = 20 -- segundos que ficará com a outfit local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+3, y=getThingPosition(getCreatureTarget(cid)).y+0, z=getThingPosition(getCreatureTarget(cid)).z} local parameters = { cid = cid, var = var, combat1 = combat1 } if os.time() - getPlayerStorageValue(cid, 55695) >= nighttowl.cooldown then setPlayerStorageValue(cid, 55695, os.time()) doSendMagicEffect(getCreaturePosition(cid), nighttowl.effect1) setPlayerStorageValue(cid, nighttowl.storage, os.time() + nighttowl.duration) doCreatureSay(cid,"UNTOUCHABLE!!!", 19) doAddCondition(cid, outfit) addEvent(onCastSpell1, 0, parameters) doSetCreatureOutfit(cid, outfit, time) doSendMagicEffect(position1, nighttowl.effect2) doPlayerSendTextMessage(cid, 27, "You have now ".. nighttowl.duration .." seconds of invulnerability.") else doPlayerSendCancel(cid, "Your skill is in cooldown, you must wait "..(nighttowl.cooldown - (os.time() - getPlayerStorageValue(cid, 55695))).." seconds.") return false end return true end testa.
Postado Fevereiro 15, 2020 5 anos Autor 24 minutos atrás, Nightowl disse: local nighttowl = { storage = 3482101, cooldown = 30, --- tempo entre um uso e outro duration = 5, --- duração effect1 = 29, -- efeito que sai ao falar a spell effect2 = 83 -- efeito da segunda spell } local outfit = createConditionObject(CONDITION_INVISIBLE, nighttowl.duration * 1000, false) local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_YELLOW) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -415.0, 0, -425.0, 0) arr1 = { {0, 3, 0} } local area1 = createCombatArea(arr1) setCombatArea(combat1, area1) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end function onCastSpell(cid, var) local outfit = {lookType = 607, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} local time = 20 -- segundos que ficará com a outfit local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+3, y=getThingPosition(getCreatureTarget(cid)).y+0, z=getThingPosition(getCreatureTarget(cid)).z} local parameters = { cid = cid, var = var, combat1 = combat1 } if os.time() - getPlayerStorageValue(cid, 55695) >= nighttowl.cooldown then setPlayerStorageValue(cid, 55695, os.time()) doSendMagicEffect(getCreaturePosition(cid), nighttowl.effect1) setPlayerStorageValue(cid, nighttowl.storage, os.time() + nighttowl.duration) doCreatureSay(cid,"UNTOUCHABLE!!!", 19) doAddCondition(cid, outfit) addEvent(onCastSpell1, 0, parameters) doSetCreatureOutfit(cid, outfit, time) doSendMagicEffect(position1, nighttowl.effect2) doPlayerSendTextMessage(cid, 27, "You have now ".. nighttowl.duration .." seconds of invulnerability.") else doPlayerSendCancel(cid, "Your skill is in cooldown, you must wait "..(nighttowl.cooldown - (os.time() - getPlayerStorageValue(cid, 55695))).." seconds.") return false end return true end testa.
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.