• 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 and script

narko

vertrauenswürdig ~
Joined
Oct 19, 2008
Messages
1,317
Solutions
2
Reaction score
132
Location
Unknown
i need a aol to less low level without blessings

and fix this script spell:



PHP:
local combat = createCombatObject() 
 
 
arr = { 
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, 
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, 
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, 
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, 
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, 
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, 
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, 
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, 
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, 
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, 
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, 
} 
 
local area = createCombatArea(arr) 
setCombatArea(combat, area) 
 
function spellCallbackLifeDrainArea(param) 
    if (isPlayer(param.cid)) == 1 then 
        if (param.hitmin == nil or param.hitmax == nil or param.healmin == nil or param.healmax == nil) then 
            param.hitmin = math.floor(-getPlayerLevel(param.cid) * 0.3 + -getPlayerMagLevel(param.cid) * 4.8) 
            param.hitmax = math.floor(-getPlayerLevel(param.cid) * 0.35 + -getPlayerMagLevel(param.cid) * 5.8) 
            param.healmin = -param.hitmin 
            param.healmax = -param.hitmax 
        end 
        local onPos = param.pos 
        if param.count > 0 or math.random(0, 1) == 1 then 
            local creatureToHit = getThingfromPos({x=onPos.x,y=onPos.y,z=onPos.z,stackpos=STACKPOS_TOP_CREATURE}) 
            if isCreature(creatureToHit.uid) == 1 and creatureToHit.uid ~= param.cid then 
                doCreatureAddMana(param.cid, math.random(param.healmin, param.healmax+1)) 
                doCreatureAddHealth(param.cid, COMBAT_LIFEDRAIN, param.pos, 0, param.hitmin, param.hitmax, CONST_ME_BUBBLES)
            end 
        end 
 
        if(param.count < 30) then 
            param.count = param.count + 1 
            addEvent(spellCallbackLifeDrainArea, 500, param) 
        end 
    end 
end 
 
function onTargetTileLifeDrainArea(cid, pos) 
    local param = {} 
    param.cid = cid 
    param.pos = pos 
    param.count = 0 
    spellCallbackLifeDrainArea(param) 
end 
 
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTileLifeDrainArea") 
 
function onCastSpell(cid, var) 
    return doCombat(cid, combat, var) 
end
 
Back
Top