Caronte1
if isBomb(ready) then cid:say("Alah AK bar") end
- Joined
- Dec 5, 2014
- Messages
- 47
- Reaction score
- 22
Hi there, this is a self-destruction spell! it creates 3 combat areas, and sacrifice the caster, in return it deals a high amount of damage around.
This spell was inspired in internet memes,
it is not a joke or anything against any religion.
Prints:
spells.xml tag:
This spell was inspired in internet memes,
it is not a joke or anything against any religion.
Prints:
Code:
local combat_arr = {
[1] = AREA_CROSS1X1,
[2] = AREA_CIRCLE2X2,
[3] = AREA_CIRCLE3X3
}
local dmin, dmax = 10, 10
local combat = {} -- keep empty
local monsters = true -- true or false
local suicidio = true -- true or false
for i = 1, 3 do
combat[i] = createCombatObject()
setCombatParam(combat[i], COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat[i], COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
_G['onGetFormulaValues'..i] = function () return - math.random(dmin, dmax) end
setCombatCallback(combat[i], CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues"..i)
area = createCombatArea(combat_arr[i])
setCombatArea(combat[i], area)
end
local function newCombat(uid, combat, var)
if isPlayer(uid) then
if not isPlayer(getThingFromPos(var.pos)) and not monsters then
dmin, dmax = 0, 0
end
var.pos = getThingPos(uid)
doCombat(uid, combat, var)
end
return true
end
function onCastSpell(cid, var)
print(dmin, dmax)
newCombat(cid, combat[1], var)
addEvent(newCombat, 500, cid, combat[2], var)
addEvent(newCombat, 1000, cid, combat[3], var)
if suicidio then
addEvent(doCreatureAddHealth, 1001, cid, -getCreatureHealth(cid))
end
return true
end
spells.xml tag:
Code:
<instant name="auto-destruicao" words="ALAH AKBAR!" event="script" value="alahakbar.lua"/>
Thanks to:
@Marcelo Druida
@Marcelo Druida
Last edited: