Postado Setembro 21, 2017 7 anos Eu tenho essa spell Gostaria que ela funcionasse apena em creature monsters não nos players quem poder ajudar vlww local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 10) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -350.0, 0, -365.0, 0) function onCastSpell(cid, var) local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} local target = getCreatureTarget(cid) local enemypos = getCreaturePosition(target) if target == isMonster or isCreature then doTeleportThing(cid, enemypos) doSendMagicEffect(position1, 54) end return doCombat(cid, combat, var) end Desde cedo a mãe da gente fala assim: “Filho, por você jogar Tibia, você tem que ser duas vezes melhor.” Aí passado alguns anos eu pensei: Como fazer 2 vezes melhor, se você tá pelo menos 100 vezes atrasado pelos Nubs, pela história, pelos Items, pelas Guilds, pelos Reds… Por tudo que aconteceu? Duas vezes melhor como ? Ou melhora ou ser o melhor ou o pior de uma vez. E sempre foi assim. Você vai escolher o que tiver mais perto de você, o que tiver dentro da sua realidade. Você vai ser duas vezes melhor como? Quem inventou isso aí? Quem foi o pilantra que inventou isso aí ? Acorda pra vida rapaz. YanLoco Projetos: https://www.facebook.com/Dbo-Here-524519644549602/ 70%
Postado Setembro 21, 2017 7 anos Solução @yanloco70 Spoiler local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 10) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -350.0, 0, -365.0, 0) function onCastSpell(cid, var) local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} local target = getCreatureTarget(cid) local enemypos = getCreaturePosition(target) if target then if isMonster(target) then doTeleportThing(cid, enemypos) doSendMagicEffect(position1, 54) return doCombat(cid, combat, var) else return doPlayerSendCancel(cid, "Você só pode usar essa spell em monstros.") end else return false end end
Postado Setembro 21, 2017 7 anos Autor 2 minutos atrás, KotZletY disse: @yanloco70 Ocultar conteúdo local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 10) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -350.0, 0, -365.0, 0) function onCastSpell(cid, var) local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} local target = getCreatureTarget(cid) local enemypos = getCreaturePosition(target) if target then if isMonster(target) then doTeleportThing(cid, enemypos) doSendMagicEffect(position1, 54) return doCombat(cid, combat, var) else return doPlayerSendCancel(cid, "Você só pode usar essa spell em monstros.") end else return false end end Vlw Dmaiss Salvo minha vida Tenho essa aqui tbm teria como colocar so para monsters ? Vlww Spoiler local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 10) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -135.0, 0, -150.0, 0) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end function ms1(cid) local postarget = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} local target = getCreatureTarget(cid) if target == isMonster or isCreature then doTeleportThing(cid, postarget) doSendMagicEffect(postarget, 62) doSendMagicEffect(postarget, 10) end end function ms2(cid) local postarget = {x=getThingPosition(getCreatureTarget(cid)).x-1, y=getThingPosition(getCreatureTarget(cid)).y-1, z=getThingPosition(getCreatureTarget(cid)).z} local target = getCreatureTarget(cid) if target == isMonster or isCreature then doTeleportThing(cid, postarget) doSendMagicEffect(postarget, 10) end end function ms3(cid) local postarget = {x=getThingPosition(getCreatureTarget(cid)).x-1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} local target = getCreatureTarget(cid) if target == isMonster or isCreature then doTeleportThing(cid, postarget) doSendMagicEffect(postarget, 10) end end function ms4(cid) local postarget = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y-1, z=getThingPosition(getCreatureTarget(cid)).z} local target = getCreatureTarget(cid) if target == isMonster or isCreature then doTeleportThing(cid, postarget) doSendMagicEffect(postarget, 10) end end function onCastSpell(cid, var) local pos = {} table.insert(pos, getCreaturePosition(cid)) local parameters = { cid = cid, var = var, combat1 = combat1 } doSendMagicEffect(getCreaturePosition(cid), 98) doPlayerSay(cid, 'Aaaaaaaahhh!!!', TALKTYPE_ORANGE_1) for i = 1, 3 do addEvent(function() if isCreature(cid) then addEvent(onCastSpell1, 1, parameters) end end, 1 + ((i-1) * 150)) end addEvent(function() if isCreature(cid) and isCreature(getCreatureTarget(cid)) then ms1(cid) end end, 100 * 1) addEvent(function() if isCreature(cid) and isCreature(getCreatureTarget(cid)) then ms2(cid) end end, 200 * 1) addEvent(function() if isCreature(cid) and isCreature(getCreatureTarget(cid)) then ms3(cid) end end, 300 * 1) addEvent(function() if isCreature(cid) and isCreature(getCreatureTarget(cid)) then ms4(cid) end end, 400 * 1) addEvent(function() if isCreature(cid) then doTeleportThing(cid, pos[1]) doSendMagicEffect(pos[1], 10) table.remove(pos) end end, 500 * 1) return true end Desde cedo a mãe da gente fala assim: “Filho, por você jogar Tibia, você tem que ser duas vezes melhor.” Aí passado alguns anos eu pensei: Como fazer 2 vezes melhor, se você tá pelo menos 100 vezes atrasado pelos Nubs, pela história, pelos Items, pelas Guilds, pelos Reds… Por tudo que aconteceu? Duas vezes melhor como ? Ou melhora ou ser o melhor ou o pior de uma vez. E sempre foi assim. Você vai escolher o que tiver mais perto de você, o que tiver dentro da sua realidade. Você vai ser duas vezes melhor como? Quem inventou isso aí? Quem foi o pilantra que inventou isso aí ? Acorda pra vida rapaz. YanLoco Projetos: https://www.facebook.com/Dbo-Here-524519644549602/ 70%
Postado Setembro 22, 2017 7 anos @yanloco70 Spoiler local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 10) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -135.0, 0, -150.0, 0) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end function ms1(cid, target) local target = target if target and isCreature(target) then local postarget = {x=getThingPosition(target).x+1, y=getThingPosition(target).y+1, z=getThingPosition(target).z} doTeleportThing(cid, postarget) doSendMagicEffect(postarget, 62) doSendMagicEffect(postarget, 10) end end function ms2(cid, target) local target = target if target and isCreature(target) then local postarget = {x=getThingPosition(target).x-1, y=getThingPosition(target).y-1, z=getThingPosition(target).z} doTeleportThing(cid, postarget) doSendMagicEffect(postarget, 10) end end function ms3(cid, target) local target = target if target and isCreature(target) then local postarget = {x=getThingPosition(target).x-1, y=getThingPosition(target).y+1, z=getThingPosition(target).z} doTeleportThing(cid, postarget) doSendMagicEffect(postarget, 10) end end function ms4(cid, target) local target = target if target and isCreature(target) then local postarget = {x=getThingPosition(target).x+1, y=getThingPosition(target).y-1, z=getThingPosition(target).z} doTeleportThing(cid, postarget) doSendMagicEffect(postarget, 10) end end function onCastSpell(cid, var) local target = getCreatureTarget(cid) if target and isMonster(target) then local pos = {} table.insert(pos, getCreaturePosition(cid)) local parameters = { cid = cid, var = var, combat1 = combat1 } doSendMagicEffect(getCreaturePosition(cid), 98) doPlayerSay(cid, 'Aaaaaaaahhh!!!', TALKTYPE_ORANGE_1) for i = 1, 3 do addEvent(function() if isCreature(cid) then addEvent(onCastSpell1, 1, parameters) end end, 1 + ((i-1) * 150)) end addEvent(function() if isCreature(cid) then ms1(cid, target) end end, 100 * 1) addEvent(function() if isCreature(cid) then ms2(cid, target) end end, 200 * 1) addEvent(function() if isCreature(cid) then ms3(cid, target) end end, 300 * 1) addEvent(function() if isCreature(cid) then ms4(cid, target) end end, 400 * 1) addEvent(function() if isCreature(cid) then doTeleportThing(cid, pos[1]) doSendMagicEffect(pos[1], 10) table.remove(pos) end end, 500 * 1) return true else return doPlayerSendCancel(cid, "Você só pode usar essa spell em monstros.") end end
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.