• 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 Alah Akbar! * BOOMMMM

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:
cKq4PoH.png
3q34Nxi.png


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
 
Last edited:
Hahahaha, this is the most wtf?-spell I have ever seen on otland.
gj :)
 
Spell updatede, to be serious to any server (global too o_O)

Added

Code:
local dmin, dmax = 10, 10 -- damage min and max
local monsters = true -- true or false
local suicidio = true -- true or false

false to don't attack monsters
false to no suicide

i don't know if the spell give no damage case monsters in the screen, if someone want to test, ill fix
 
how can i do this spell get damage for the caster i mean 70% hp of the caster and make damage apart
 
how can i change that line? i'm noob on this bussines xd
i get this error when i use the spell words
sni6mt.jpg
 
Line 39 will probably be like this:
Code:
addEvent(doCreatureAddHealth, 1001, cid, -getCreatureHealth(cid) / 100 * 70)
Didn't test it and I don't know Lua.
 
Back
Top