• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Spell [Diffrent] Aftershock spell by andu

andu

Sold 649 scripts, 25 maps and 9 events!
Joined
Aug 7, 2009
Messages
969
Solutions
17
Reaction score
357
GitHub
olrios
Twitch
olrios
Hello otlanders!

This is another DIFFRENT spell.
Not another animated borring spell.


Name: Aftershock
Type: Fire/Death
Mana: 90
Level: 10+
Description: Best for killing others summons! It dealt fire damage like 'exori flam' to target.
If that target die by this spell, creature owner lose health (death damage).
If the target isn't a someone summon, this spell just dealt damage like exori flam.



Aftershock.lua
Lua:
function onCastSpell(cid, var)

local maxHp = getCreatureMaxHealth(getCreatureTarget(cid))
local lvl = getPlayerLevel(cid)

doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(getCreatureTarget(cid)), CONST_ANI_FIRE)

if getCreatureMaster(getCreatureTarget(cid)) ~= FALSE then
    if maxHp <= lvl*5 then
        doTargetCombatHealth(cid, getCreatureTarget(cid), COMBAT_FIREDAMAGE, -maxHp, -maxHp, CONST_ME_FIREAREA)
        doTargetCombatHealth(cid, getCreatureMaster(getCreatureTarget(cid)), COMBAT_DEATHDAMAGE, -(maxHp/4), -(maxHp/1.5), CONST_ME_MORTAREA)
    else
        doTargetCombatHealth(cid, getCreatureTarget(cid), COMBAT_FIREDAMAGE, -(lvl*1), -(lvl*3), CONST_ME_FIREAREA)
    end
else
    doTargetCombatHealth(cid, getCreatureTarget(cid), COMBAT_FIREDAMAGE, -(lvl*1), -(lvl*2), CONST_ME_FIREAREA)
end

return true
end

spells.xml
Code:
<instant name="Aftershock" words="utexa flam mort" lvl="10" mana="90" needtarget="1" aggressive="1" script="aftershock.lua">
 
Last edited:
oh i was trying it with people. it doesnt work then :\. i summoned a monster and attacked it but the owner didnt receive any damage. ur right it works with monsters how u said it would
 
Last edited:
Nice, very creative :)

I'll use the base idea for my server, thanks. Keep coming with those, and don't forget to notify me if I missed it!
 
Last edited:
It be better script.

PHP:
function onCastSpell(cid, var)

local maxHp = getCreatureMaxHealth(getCreatureTarget(cid))
local lvl = getPlayerLevel(cid)
local maglvl = getPlayerMagLevel(cid)
local summons = getCreatureSummons(getCreatureMaster(getCreatureTarget(cid)))

doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(getCreatureTarget(cid)), CONST_ANI_ICE)

if getCreatureMaster(getCreatureTarget(cid)) ~= nil then
	if maxHp <= lvl*5 then
		if table.maxn(summons) > 0 then
			doTargetCombatHealth(cid, getCreatureTarget(cid), COMBAT_ICEDAMAGE, -maxHp, -maxHp, CONST_ME_ICEATTACK)
			doTargetCombatHealth(cid, getCreatureMaster(getCreatureTarget(cid)), COMBAT_DEATHDAMAGE, -(maxHp*0.5), -(maxHp*0.5), CONST_ME_MORTAREA)
		else
			doTargetCombatHealth(cid, getCreatureTarget(cid), COMBAT_ICEDAMAGE, -(lvl*0.25+maglvl*0.4+20), -(lvl*0.4+maglvl*0.45+45), CONST_ME_ICEATTACK)
		end
	else
		doTargetCombatHealth(cid, getCreatureTarget(cid), COMBAT_ICEDAMAGE, -(lvl*0.25+maglvl*0.4+20), -(lvl*0.4+maglvl*0.45+45), CONST_ME_ICEATTACK)
	end
else
	doTargetCombatHealth(cid, getCreatureTarget(cid), COMBAT_ICEDAMAGE, -(lvl*0.25+maglvl*0.4+20), -(lvl*0.4+maglvl*0.45+45), CONST_ME_ICEATTACK)
end
return true
end
 
Back
Top