• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Spell Exorcium!

dragonlorde

New Member
Joined
Jan 2, 2010
Messages
14
Reaction score
0
Name: Exorcium!
Author: Dragonlorde
Version: TFS 0.3.6 - 8.54


I take a spell done by me a time ago ...
It is an attempt at a spell that was not edited or copied from another person:

Script - exorcium.lua
PHP:
function onCastSpell(cid, var)

function exorcium(dir)

min = -math.random(50,100) - getPlayerSkill(cid, magic) - getPlayerLevel(cid)
 max = -math.random(100,200) - getPlayerSkill(cid, magic) - getPlayerLevel(cid)
  
  doSendDistanceShoot(getCreaturePosition(cid), getPosByDir(getCreaturePosition(cid), dir), CONST_ANI_ENERGYBALL)
      doSendMagicEffect(getPosByDir(getCreaturePosition(cid), dir), 30)
          doAreaCombatHealth(cid, 2, getPosByDir(getCreaturePosition(cid), dir), AREA_SQUARE1X1 , min, max, 30)
        end

local dirs = {6,0,7,1,5,2,4,3,6,0,7,1,5,2,4,3,6,0,7,1,5,2,4,3,6,0,7,1,5,2,4,3,6}

for i,v in pairs(dirs) do
      
      addEvent(exorcium, 100*i, v)
    end  
  return 1
end

Tag - spells.xml
PHP:
<instant name="Exorcium" words="exorcium" lvl="33" mana="160" exhaustion="2000" needlearn="0" event="script" value="exorcium.lua">
	</instant>

Hope you enjoy it! ;)
asdasaw.jpg
 
Last edited:
I get the following error when I use it ingame:

[27/03/2010 14:47:42] [Error - Spell Interface]
[27/03/2010 14:47:42] data/spells/scripts/attack/exorcium.lua:eek:nCastSpell
[27/03/2010 14:47:42] Description:
[27/03/2010 14:47:42] data/spells/scripts/attack/exorcium.lua:13: bad argument #1 to 'pairs' (table expected, got nil)
[27/03/2010 14:47:42] stack traceback:
[27/03/2010 14:47:42] [C]: in function 'pairs'
[27/03/2010 14:47:42] data/spells/scripts/attack/exorcium.lua:13: in function <data/spells/scripts/attack/exorcium.lua:1>
 
Yes I can but it will be so huge XD...
like 100++ lines :S
To make the area bigger you just put an argument on the function:
getPosByDir(getCreaturePosition(cid), dir, 1)-- 1 = size = sqms in the direction :S
 
i tryed but it didnt work

Lua:
function onCastSpell(cid, var)

function exorcium(dir)

min = -math.random(500000, 8000000) - getPlayerSkill(cid, magic) - getPlayerLevel(cid)
max = -math.random(900000, 1100000) - getPlayerSkill(cid, magic) - getPlayerLevel(cid)
  
  doSendDistanceShoot(getCreaturePosition(cid), getPosByDir(getCreaturePosition(cid), dir), CONST_ANI_ENERGYBALL)
      doSendMagicEffect(getPosByDir(getCreaturePosition(cid), dir), 37)
          doAreaCombatHealth(cid, 2, getPosByDir(getCreaturePosition(cid), dir, 5), min, max, 37)
        end

local dirs = {6,0,7,1,5,2,4,3,6,0,7,1,5,2,4,3,6,0,7,1,5,2,4,3,6,0,7,1,5,2,4,3,6}

for i,v in pairs(dirs) do
      
      addEvent(exorcium, 100*i, v)
    end  
  return 1
end

I tryed to put 5 sqms and it didnt work =(
 
Try this one...
PHP:
function onCastSpell(cid, var)

function exorcium(dir)

min = -math.random(50,100) - getPlayerSkill(cid, magic) - getPlayerLevel(cid)
 max = -math.random(100,200) - getPlayerSkill(cid, magic) - getPlayerLevel(cid)
  
  doSendDistanceShoot(getCreaturePosition(cid), getPosByDir(getCreaturePosition(cid), dir), CONST_ANI_ENERGYBALL)
      doSendMagicEffect(getPosByDir(getCreaturePosition(cid), dir), 30)
          doAreaCombatHealth(cid, 2, getPosByDir(getCreaturePosition(cid), dir),{{1}} , min, max, 30)
  
  doSendDistanceShoot(getCreaturePosition(cid), getPosByDir(getCreaturePosition(cid), dir,2), CONST_ANI_ENERGYBALL)
      doSendMagicEffect(getPosByDir(getCreaturePosition(cid), dir,2), 30)
          doAreaCombatHealth(cid, 2, getPosByDir(getCreaturePosition(cid), dir,2), {{1}} , min, max, 30)
  
  doSendDistanceShoot(getCreaturePosition(cid), getPosByDir(getCreaturePosition(cid), dir,3), CONST_ANI_ENERGYBALL)
      doSendMagicEffect(getPosByDir(getCreaturePosition(cid), dir,3), 30)
          doAreaCombatHealth(cid, 2, getPosByDir(getCreaturePosition(cid), dir,3), {{1}} , min, max, 30)

        end

local dirs = {6,0,7,1,5,2,4,3,6,0,7,1,5,2,4,3,6,0,7,1,5,2,4,3,6,0,7,1,5,2,4,3,6}

for i,v in pairs(dirs) do
      
      addEvent(exorcium, 100*i, v)
    end  
  return 1
end
 
thiisss spelll give me errors in console when killing players :S whY??!
 
Back
Top