• 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 Happy birthday!

PhoOwned

^_^
Joined
Nov 11, 2010
Messages
375
Reaction score
66
I made this spell for my friend :w00t:
spells.xml
PHP:
<instant name="Happy" words="happy" exhaustion="30000" selftarget="1" needlearn="0" event="script" value="phoowned/happy_birthday.lua" />
spell code:
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
happys.png
 
Last edited:
Yeah like, remove this:
Code:
arr = {
[B][COLOR="red"]{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},[/COLOR][/B]
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,3,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]}[B][COLOR="red"],
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}[/COLOR][/B]
}
using Lua:
Lua:
local s=[[arr = {
[B][COLOR="red"]{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},[/COLOR][/B]
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,3,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]}[B][COLOR="red"],
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}[/COLOR][/B]
}]]
print(s:gsub('%[COLOR="red"%].-%[/COLOR%]', ''):gsub('%[B%].-%[/B%]', ''))
=
Lua:
>lua -e "io.stdout:setvbuf 'no'" "weak.lua" 
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,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}
}	26
>Exit code: 0
 
Yeah like, remove this:

using Lua:
Lua:
local s=[[arr = {
[B][COLOR="red"]{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},[/COLOR][/B]
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,3,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]},
{[B][COLOR="red"]1,1,1,[/COLOR][/B]1,1,1,1,1,1,1,1,1,1,1,1,1[B][COLOR="red"],1,1,1,1[/COLOR][/B]}[B][COLOR="red"],
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}[/COLOR][/B]
}]]
print(s:gsub('%[COLOR="red"%].-%[/COLOR%]', ''):gsub('%[B%].-%[/B%]', ''))
=

failed hard
 
Back
Top