• 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 Birthday spell

PhoOwned

^_^
Joined
Nov 11, 2010
Messages
375
Reaction score
66
As title says...
happyzp.jpg

spells.xml:
PHP:
<instant name="Happy" words="happy" exhaustion="30000" selftarget="1" needlearn="0" event="script" value="happy.lua" />
.lua script:
PHP:
local combat = createCombatObject()
arr = {
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
}

local area = createCombatArea(arr)
setCombatArea(combat, area)

function spellCallbackHappy(param)
		if param.count > 0 or math.random(0, 1) == 1 then
			doSendMagicEffect(param.pos, math.random(28,30))
			if math.random(0, 6) == 1 then
				doCreatureSay(param.cid, "HAPPY BIRTHDAY!", TALKTYPE_MONSTER, false, 0, param.pos)
			end
			param.count = param.count - 1
			addEvent(spellCallbackHappy, math.random(2000, 7000), param)
		end
end

function onTargetTileHappy(cid, pos)
	addEvent(spellCallbackHappy, math.random(1000, 3000), {["cid"] = cid, ["pos"] = pos, ["count"] = 20})
end

setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTileHappy")

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
Wow.. honestly i look sexy at this picture /ADM WANNIX/ Btw thanks for spell :)
 

Similar threads

Back
Top