[Spell] Spell De Telepatia

alacazan
em Lixeira Pública

alacazan

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 25/12/07Posts: 5

fis ese code mas esta dando erro alguem q entenda melhor poderia concertalo

 

lua Code:

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, TRUE)

setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_NONE)

function getSpellDamage(cid, weaponSkill, weaponAttack, attackStrength)

local attack = 15

local skill = getPlayerMagLevel(cid)

local maxWeaponDamage = (skill * attack) / 20 + attack

local damage = -((math.random(20, maxWeaponDamage) * attackStrength) / 100) * 0.8return damage, damage

end

 

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "getSpellDamage")

 

function onCastSpell(cid, var)

local allowedobjects = {1614, 1615, 1616, 1619, 1650, 1651, 1652, 1653, 1658, 1659, 1660, 1661, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1714, 1715, 1716, 1717, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1746, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1770, 1774, 1775, 2034, 2080, 2081, 2082, 2083, 2084, 2085, 2094, 2095, 2098, 2101, 2105, 2106, 3805, 3806, 3807, 3808, 3809, 3810, 3811, 3812, 3813, 3814, 3815, 3816, 3817, 3818, 3819, 3820, 3821, 6368, 6369, 6370, 6371}

local spot = getPlayerPosition(cid)

local nxp = spot.x - 2local pxp = spot.x + 2

local nyp = spot.y - 2local pyp = spot.y + 2

local target = getCreatureTarget(cid)for absice = nxp, pxp dofor coordinate = nyp, pyp do

local pos = {x = absice, y = coordinate, z = spot.z, stackpos = 255}

local thing = getThingfromPos(pos)

if thing.itemid > 0 then

if isInArray(allowedobjects, thing.itemid) == TRUE then

doSendMagicEffect(pos, CONST_ME_MAGIC_GREEN)

doSendMagicEffect(spot, CONST_ME_FIREWORK_BLUE)

doRemoveItem(thing.uid, 1)

tgtpos = getCreaturePosition(target)

doSendDistanceShoot(pos, tgtpos, CONST_ANI_SUDDENDEATH)

doSendMagicEffect(tgtpos, CONST_ME_POFF)

doCreateItem(2250, 1, tgtpos)

return doCombat(cid, combat, var)

end

end

end

 

 

 

local combat = createCombatObject()setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, TRUE)setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_NONE) function getSpellDamage(cid, weaponSkill, weaponAttack, attackStrength)local attack = 15local skill = getPlayerMagLevel(cid)local maxWeaponDamage = (skill * attack) / 20 + attacklocal damage = -((math.random(20, maxWeaponDamage) * attackStrength) / 100) * 0.8return damage, damageend setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "getSpellDamage") function onCastSpell(cid, var)local allowedobjects = {1614, 1615, 1616, 1619, 1650, 1651, 1652, 1653, 1658, 1659, 1660, 1661, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1714, 1715, 1716, 1717, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1746, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1770, 1774, 1775, 2034, 2080, 2081, 2082, 2083, 2084, 2085, 2094, 2095, 2098, 2101, 2105, 2106, 3805, 3806, 3807, 3808, 3809, 3810, 3811, 3812, 3813, 3814, 3815, 3816, 3817, 3818, 3819, 3820, 3821, 6368, 6369, 6370, 6371}local spot = getPlayerPosition(cid)local nxp = spot.x - 2local pxp = spot.x + 2local nyp = spot.y - 2local pyp = spot.y + 2local target = getCreatureTarget(cid)for absice = nxp, pxp dofor coordinate = nyp, pyp dolocal pos = {x = absice, y = coordinate, z = spot.z, stackpos = 255}local thing = getThingfromPos(pos)if thing.itemid > 0 thenif isInArray(allowedobjects, thing.itemid) == TRUE thendoSendMagicEffect(pos, CONST_ME_MAGIC_GREEN)doSendMagicEffect(spot, CONST_ME_FIREWORK_BLUE)doRemoveItem(thing.uid, 1)tgtpos = getCreaturePosition(target)doSendDistanceShoot(pos, tgtpos, CONST_ANI_SUDDENDEATH)doSendMagicEffect(tgtpos, CONST_ME_POFF)doCreateItem(2250, 1, tgtpos)return doCombat(cid, combat, var)endendendendend

 

 

Code:

<instant name="Telekinesis" words="chaos control" lvl="10" mana="80" blockwalls="1" needtarget="1" exhaustion="1000" needlearn="0" script="attack/Telekinesis.lua">

<vocation name="Sorcerer"/>

<vocation name="Druid"/>

<vocation name="Master Sorcerer"/>

<vocation name="Elder Druid"/>

paodequeijobh

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 14/03/08Posts: 40
fis ese code mas esta dando erro alguem q entenda melhor poderia concertalo

 

lua Code:

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, TRUE)

setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_NONE)

function getSpellDamage(cid, weaponSkill, weaponAttack, attackStrength)

local attack = 15

local skill = getPlayerMagLevel(cid)

local maxWeaponDamage = (skill * attack) / 20 + attack

local damage = -((math.random(20, maxWeaponDamage) * attackStrength) / 100) * 0.8return damage, damage

end

 

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "getSpellDamage")

 

function onCastSpell(cid, var)

local allowedobjects = {1614, 1615, 1616, 1619, 1650, 1651, 1652, 1653, 1658, 1659, 1660, 1661, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1714, 1715, 1716, 1717, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1746, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1770, 1774, 1775, 2034, 2080, 2081, 2082, 2083, 2084, 2085, 2094, 2095, 2098, 2101, 2105, 2106, 3805, 3806, 3807, 3808, 3809, 3810, 3811, 3812, 3813, 3814, 3815, 3816, 3817, 3818, 3819, 3820, 3821, 6368, 6369, 6370, 6371}

local spot = getPlayerPosition(cid)

local nxp = spot.x - 2local pxp = spot.x + 2

local nyp = spot.y - 2local pyp = spot.y + 2

local target = getCreatureTarget(cid)for absice = nxp, pxp dofor coordinate = nyp, pyp do

local pos = {x = absice, y = coordinate, z = spot.z, stackpos = 255}

local thing = getThingfromPos(pos)

if thing.itemid > 0 then

if isInArray(allowedobjects, thing.itemid) == TRUE then

doSendMagicEffect(pos, CONST_ME_MAGIC_GREEN)

doSendMagicEffect(spot, CONST_ME_FIREWORK_BLUE)

doRemoveItem(thing.uid, 1)

tgtpos = getCreaturePosition(target)

doSendDistanceShoot(pos, tgtpos, CONST_ANI_SUDDENDEATH)

doSendMagicEffect(tgtpos, CONST_ME_POFF)

doCreateItem(2250, 1, tgtpos)

return doCombat(cid, combat, var)

end

end

end

 

 

 

local combat = createCombatObject()setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, TRUE)setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_NONE) function getSpellDamage(cid, weaponSkill, weaponAttack, attackStrength)local attack = 15local skill = getPlayerMagLevel(cid)local maxWeaponDamage = (skill * attack) / 20 + attacklocal damage = -((math.random(20, maxWeaponDamage) * attackStrength) / 100) * 0.8return damage, damageend setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "getSpellDamage") function onCastSpell(cid, var)local allowedobjects = {1614, 1615, 1616, 1619, 1650, 1651, 1652, 1653, 1658, 1659, 1660, 1661, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1714, 1715, 1716, 1717, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1746, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1770, 1774, 1775, 2034, 2080, 2081, 2082, 2083, 2084, 2085, 2094, 2095, 2098, 2101, 2105, 2106, 3805, 3806, 3807, 3808, 3809, 3810, 3811, 3812, 3813, 3814, 3815, 3816, 3817, 3818, 3819, 3820, 3821, 6368, 6369, 6370, 6371}local spot = getPlayerPosition(cid)local nxp = spot.x - 2local pxp = spot.x + 2local nyp = spot.y - 2local pyp = spot.y + 2local target = getCreatureTarget(cid)for absice = nxp, pxp dofor coordinate = nyp, pyp dolocal pos = {x = absice, y = coordinate, z = spot.z, stackpos = 255}local thing = getThingfromPos(pos)if thing.itemid > 0 thenif isInArray(allowedobjects, thing.itemid) == TRUE thendoSendMagicEffect(pos, CONST_ME_MAGIC_GREEN)doSendMagicEffect(spot, CONST_ME_FIREWORK_BLUE)doRemoveItem(thing.uid, 1)tgtpos = getCreaturePosition(target)doSendDistanceShoot(pos, tgtpos, CONST_ANI_SUDDENDEATH)doSendMagicEffect(tgtpos, CONST_ME_POFF)doCreateItem(2250, 1, tgtpos)return doCombat(cid, combat, var)endendendendend

 

 

Code:

<instant name="Telekinesis" words="chaos control" lvl="10" mana="80" blockwalls="1" needtarget="1" exhaustion="1000" needlearn="0" script="attack/Telekinesis.lua">

<vocation name="Sorcerer"/>

<vocation name="Druid"/>

<vocation name="Master Sorcerer"/>

<vocation name="Elder Druid"/>

 

veio! arruma melhor esse topico! muito mal organizado!

EH MEU FAN?

fanbardopao.png

pinkfloydfan.png

 

~> [X]1post (NADA)

~> [X]5 posts (SERVO)

~> [X]10 posts (CAMPONÊS)

~> [X]25 posts (CAÇADOR)

~> [ ]50 posts (CAVALEIRO)

~> [ ]100 posts (BARONETE)

~> [ ]200 posts (BARÃO)

~> [ ]300 posts (VISCONDE)

~> [ ]400 posts (DUQUE)

~> [ ]600 posts (ARQUEDUQUE)

~> [ ]800 posts (ARISTOCRATA)

~> [ ]1000 posts (REGENTE)

~> [ ]1400 posts (SÁBIO)

~> [ ]1800 posts (SACERDOTE)

~> [ ]2500 posts (PRÍNCIPE)

alacazan

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 25/12/07Posts: 5

alguem poderia consertar esa script pra min?

jennao

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 31/01/08Posts: 91

Topico 0/10

 

---

 

Magia 0/10

 

Pow Não Entendo Nada No Topico

Que Isso Esse Tanto De Numero :o

lucasjockey

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 30/07/07Posts: 101

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, TRUE)

setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_NONE)

 

function getSpellDamage(cid, weaponSkill, weaponAttack, attackStrength)

local attack = 15

local skill = getPlayerMagLevel(cid)

local maxWeaponDamage = (skill * attack) / 20 + attack

local damage = -((math.random(20, maxWeaponDamage) * attackStrength) / 100) * 0.8

return damage, damage

end

 

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "getSpellDamage")

 

function onCastSpell(cid, var)

local allowedobjects = {1614, 1615, 1616, 1619, 1650, 1651, 1652, 1653, 1658, 1659, 1660, 1661, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1714, 1715, 1716, 1717, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1746, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1770, 1774, 1775, 2034, 2080, 2081, 2082, 2083, 2084, 2085, 2094, 2095, 2098, 2101, 2105, 2106, 3805, 3806, 3807, 3808, 3809, 3810, 3811, 3812, 3813, 3814, 3815, 3816, 3817, 3818, 3819, 3820, 3821, 6368, 6369, 6370, 6371}

local spot = getPlayerPosition(cid)

local nxp = spot.x - 2

local pxp = spot.x + 2

local nyp = spot.y - 2

local pyp = spot.y + 2

 

local target = getCreatureTarget(cid)

for absice = nxp, pxp do

for coordinate = nyp, pyp do

local pos = {x = absice, y = coordinate, z = spot.z, stackpos = 255}

local thing = getThingfromPos(pos)

end

end

if thing.itemid > 0 then

if isInArray(allowedobjects, thing.itemid) == TRUE then

doSendMagicEffect(pos, CONST_ME_MAGIC_GREEN)

doSendMagicEffect(spot, CONST_ME_FIREWORK_BLUE)

doRemoveItem(thing.uid, 1)

tgtpos = getCreaturePosition(target)

doSendDistanceShoot(pos, tgtpos, CONST_ANI_SUDDENDEATH)

doSendMagicEffect(tgtpos, CONST_ME_POFF)

doCreateItem(2250, 1, tgtpos)

return doCombat(cid, combat, var)

else

return 0

end

else

return 0

end

return 0

end

x[sup]2[/sup]=-1
x=i
:D

paodequeijobh

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 14/03/08Posts: 40

ainda continuo sem entender...que que essa spell faz?

EH MEU FAN?

fanbardopao.png

pinkfloydfan.png

 

~> [X]1post (NADA)

~> [X]5 posts (SERVO)

~> [X]10 posts (CAMPONÊS)

~> [X]25 posts (CAÇADOR)

~> [ ]50 posts (CAVALEIRO)

~> [ ]100 posts (BARONETE)

~> [ ]200 posts (BARÃO)

~> [ ]300 posts (VISCONDE)

~> [ ]400 posts (DUQUE)

~> [ ]600 posts (ARQUEDUQUE)

~> [ ]800 posts (ARISTOCRATA)

~> [ ]1000 posts (REGENTE)

~> [ ]1400 posts (SÁBIO)

~> [ ]1800 posts (SACERDOTE)

~> [ ]2500 posts (PRÍNCIPE)

DaNDaNrOxX

oi mosso
avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 18/01/08Posts: 1455Char no Tibia: Saint Claire

Por favor, quem não está querendo ajudar e nem vai tentar, não vamos comentar nada aqui.

 

~> Tópico Movido para Dúvidas <~

Mais atenção aonde posta amigo.

 

Abraços

 

 

Entrada na equipe: 23/10/2008 Cargo: Estagiário

Promoção: 25/11/2008 Cargo: Moderador

Promoção: 21/10/2009 Cargo: Coordenador

Remoção: 09/05/2010 Motivo: Estudos

Retorno: 15/11/2010 Cargo: Moderador

Remoção: 20/12/2012.