• 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!

Simple Spell I made

mikebadeaux

Mapper
Joined
May 16, 2010
Messages
112
Reaction score
1
make a .LUA called
exevo gran mas mort
and put this in
---Created By Mikebadeaux On OTLand---
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, 2048)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 10)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat1, COMBAT_FORMULA_SKILL, 100 , 100 , 100 , 100)
--=======================================================================
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, 1024)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 15)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat2, COMBAT_FORMULA_SKILL, 100 , 100 , 100 , 100)
--=======================================================================
local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, 2)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 17)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat3, COMBAT_FORMULA_SKILL, 100 , 100 , 100 , 100)
--=======================================================================




local area1 = {
{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, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0},
{0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0},
{0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0},
{0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0},
{0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 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}}
--=======================================
local area2 = {
{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, 0, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 0, 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}}
--=======================================
local area3 = {
{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, 0, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 0, 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}}
--=======================================




setCombatArea(combat1, createCombatArea(area1))
setCombatArea(combat2, createCombatArea(area2))
setCombatArea(combat3, createCombatArea(area3))



function onCastSpell(cid, var)
addEvent(doCombat, 0, cid, combat1, var)
addEvent(doCombat, 0, cid, combat2, var)
addEvent(doCombat, 0, cid, combat3, var)
end





.XML
<instant name="Mas Mort" words="exevo gran mas Mort" lvl="1000" mana="1200" prem="0" exhaustion="1000" selftarget="1" needlearn="0" event="script" value="exevo gran mas mort.lua">
<vocation id="1"/> <vocation id="2"/> <vocation id="3"/>


<vocation id="4"/>
<vocation id="5"/>
</instant>





Edit vocs if u like
REP++
 
Last edited:
These days is it very simple to create a basic action/creaturescript/movement/weapon. You just have to copy and paste the file you can do anything with. For example, shovel.lua:
Lua:
local holes = {468, 481, 483, 7932, 8579}
local sand = {231, 9059}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(isInArray(holes, itemEx.itemid)) then
		local newId = itemEx.itemid + 1
		if(itemEx.itemid == 8579) then
			newId = 8585
		end

		doTransformItem(itemEx.uid, newId)
		doDecayItem(itemEx.uid)
	elseif(isInArray(sand, itemEx.itemid)) then
		local rand = math.random(1, 100)
		if(itemEx.actionid  == 100 and rand <= 20) then
			doTransformItem(itemEx.uid, 489)
			doDecayItem(itemEx.uid)
		elseif(rand >= 1 and rand <= 5) then
			doCreateItem(2159, 1, toPosition)
		elseif(rand > 85) then
			doCreateMonster("Scarab", toPosition, false)
		end

		doSendMagicEffect(toPosition, CONST_ME_POFF)
	end

	return true
end

Just remove the content:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)


	return true
end
And just start your own basic script. If you want help just go to "YOURSERVERFOLDER/doc/LUAFUNCTIONS" there are all functions you can use.

That was a quick tutorial, but topic:

Thanks for sharing and this was my first step too. To create my own spell using one spell template.
 
Back
Top