Xanix
GHIII
This tutorial will show you how to create your own spells.
Instants.
If you want to make your own instant spell:
Locate Data\Spells\Instants
Now, there is a whole lot of different spells you can make, but I will explain how to make your own, custom, easy spell.
Find the exori.lua and copy it, and paste it inside the same folder and rename it to super exori.lua and open it by double clicking it.
What you see inside:
end
Now, we'll start from the top.
The large set of numbers (ones and zeros) tells you what square meter will be hit by the spell. Change this to however you like, I will give you an example of how you can change it (but there really is no limit, it's all up to you.)
Now below the numbers, you see:
tells you what other monsters will be imune to the spell. Nothing is imune to physical as far as I know, expept death slicers.
This is what you can choose from:
That means if you want your spell to shoot according to what direction your character is facing, this must be set true. Since exori is one sqm all around your character, it is set to false.
areaEffect:
This is how the spell will look like once it has hit something.
You can choose from:
As it says, what kind of Animation it will have.
Choose from:
Tells you how it will look when the spell is casted.
Choose from:
Shows how it will look when a creature has been hit by the spell.
Choose from the above, or:
This is the color of the damage that will appear above the character. Most spells are set to red, posion attacks are set to green, and ofcourse, mana damage is set to blue.
Thats the basic of making the spell, then ofcourse you can alter the damage if you look below.
Now when you made yoru own spell, save it, and close it.
Go to:
Data\Spells and open spells.xml
Copy and paste this text under Instants.
Words - What you must say to cast the spell.
Maglv - Required magic level to use the spell.
Mana - Amount of mana the spell will use.
Vocation id:
1,2,3,4 represents the vocations.
Now your spell should work, just make sure to save it!
Instants.
If you want to make your own instant spell:
Locate Data\Spells\Instants
Now, there is a whole lot of different spells you can make, but I will explain how to make your own, custom, easy spell.
Find the exori.lua and copy it, and paste it inside the same folder and rename it to super exori.lua and open it by double clicking it.
What you see inside:
return doAreaMagic(cid, centerpos, needDirection, areaEffect, area, UltimateExplosionObjectrdered())area = {
{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, 0, 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},
}
attackType = ATTACK_PHYSICAL
needDirection = false
areaEffect = NM_ME_HIT_AREA
animationEffect = NM_ANI_NONE
hitEffect = NM_ME_HIT_AREA
damageEffect = NM_ME_HIT_AREA
animationColor = RED
offensive = true
drawblood = true
UltimateExplosionObject = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0)
function onCast(cid, creaturePos, level, maglv, var)
centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z}
n = tonumber(var) -- try to convert it to a number
if n ~= nil then
-- bugged
-- ultimateExplosionObject.minDmg = var+0
-- UltimateExplosionObject.maxDmg = var+0
UltimateExplosionObject.minDmg = 0
UltimateExplosionObject.maxDmg = 0
else
-- UltimateExplosionObject.minDmg = (level * 5 + maglv * 6) * 2.3 - 30
-- UltimateExplosionObject.maxDmg = (level * 5 + maglv * 6) * 3.0
UltimateExplosionObject.minDmg = (level * 3 + maglv * 3) * 1.2
UltimateExplosionObject.maxDmg = (level * 3 + maglv * 3) * 2.3
end
end
Now, we'll start from the top.
The large set of numbers (ones and zeros) tells you what square meter will be hit by the spell. Change this to however you like, I will give you an example of how you can change it (but there really is no limit, it's all up to you.)
As you see, i made the exori radius twice as big.area = {
{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, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 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},
}
Now below the numbers, you see:
attackType:attackType = ATTACK_PHYSICAL
needDirection = false
areaEffect = NM_ME_HIT_AREA
animationEffect = NM_ANI_NONE
hitEffect = NM_ME_HIT_AREA
damageEffect = NM_ME_HIT_AREA
animationColor = RED
offensive = true
drawblood = true
tells you what other monsters will be imune to the spell. Nothing is imune to physical as far as I know, expept death slicers.
This is what you can choose from:
needDirection:ATTACK_NONE
ATTACK_ENERGY
ATTACK_BURST
ATTACK_FIRE
ATTACK_PHYSICAL
ATTACK_POISON
ATTACK_PARALYZE
ATTACK_DRUNKNESS
ATTACK_LIFEDRAIN
ATTACK_MANADRAIN
That means if you want your spell to shoot according to what direction your character is facing, this must be set true. Since exori is one sqm all around your character, it is set to false.
areaEffect:
This is how the spell will look like once it has hit something.
You can choose from:
animationEffect:NM_ME_DRAW_BLOOD
NM_ME_LOOSE_ENERGY
NM_ME_PUFF
NM_ME_BLOCKHIT
NM_ME_EXPLOSION_AREA
NM_ME_EXPLOSION_DAMAGE
NM_ME_FIRE_AREA
NM_ME_YELLOW_RINGS
NM_ME_POISEN_RINGS
NM_ME_HIT_AREA
NM_ME_ENERGY_AREA
NM_ME_ENERGY_DAMAGE
As it says, what kind of Animation it will have.
Choose from:
hitEffect:NM_ANI_BOLT
NM_ANI_ARROW
NM_ANI_FIRE
NM_ANI_ENERGY
NM_ANI_POISONARROW
NM_ANI_BURSTARROW
NM_ANI_THROWINGSTAR
NM_ANI_THROWINGKNIFE
NM_ANI_SMALLSTONE
NM_ANI_SUDDENDEATH
NM_ANI_LARGEROCK
NM_ANI_SNOWBALL
NM_ANI_POWERBOLT
Tells you how it will look when the spell is casted.
Choose from:
damageEffect:NM_ME_DRAW_BLOOD
NM_ME_LOOSE_ENERGY
NM_ME_PUFF
NM_ME_BLOCKHIT
NM_ME_EXPLOSION_AREA
NM_ME_EXPLOSION_DAMAGE
NM_ME_FIRE_AREA
NM_ME_YELLOW_RINGS
NM_ME_POISEN_RINGS
NM_ME_HIT_AREA
NM_ME_ENERGY_AREA
NM_ME_ENERGY_DAMAGE
Shows how it will look when a creature has been hit by the spell.
Choose from the above, or:
animationColor:NM_ME_MAGIC_ENERGIE
NM_ME_MAGIC_BLOOD
NM_ME_MAGIC_POISEN
NM_ME_HITBY_FIRE
NM_ME_POISEN
NM_ME_MORT_AREA
NM_ME_SOUND
NM_ME_SOUND_GREEN
NM_ME_SOUND_RED
NM_ME_POISONCLOUD
NM_ME_SOUND_YELLOW
NM_ME_SOUND_PURPLE
NM_ME_SOUND_BLUE
NM_ME_SOUND_WHITE
This is the color of the damage that will appear above the character. Most spells are set to red, posion attacks are set to green, and ofcourse, mana damage is set to blue.
Thats the basic of making the spell, then ofcourse you can alter the damage if you look below.
Now when you made yoru own spell, save it, and close it.
Go to:
Data\Spells and open spells.xml
Copy and paste this text under Instants.
Spell name - Name of the spell.<spell name="Super Exori" words="super exori" maglv="110" mana="10000" enabled="1"><vocation id="1" /></spell>
Words - What you must say to cast the spell.
Maglv - Required magic level to use the spell.
Mana - Amount of mana the spell will use.
Vocation id:
1,2,3,4 represents the vocations.
Now your spell should work, just make sure to save it!