• 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 New Year!

Joined
Apr 17, 2008
Messages
1,922
Solutions
1
Reaction score
188
Location
Venezuela
Hello today December 31 i made this script for celebrates the New Year 2009!

here is...

Code:
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 spellCallback(param)
	if param.count > 0 or math.random(0, 1) == 1 then
		doSendMagicEffect(param.pos, 28)
	end
end

function spellCallback2(param)
	if param.count > 0 or math.random(0, 1) == 1 then
		doSendMagicEffect(param.pos, 29)
	end
end

function spellCallback3(param)
	if param.count > 0 or math.random(0, 1) == 1 then
		doSendMagicEffect(param.pos, 30)
	end


	if(param.count < 5) then
		param.count = param.count + 1
		addEvent(spellCallback, math.random(1000, 4000), param)
		addEvent(spellCallback2, math.random(1500, 4000), param)
		addEvent(spellCallback3, math.random(1800, 4000), param)
	end
end

function onTargetTile(cid, pos)
	local param = {}
	param.cid = cid
	param.pos = pos
	param.count = 0
	spellCallback(param)
	spellCallback2(param)
	spellCallback3(param)
	doSetCreatureLight(cid, 9, math.random(1, 255), 1000 * 60)

end

setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

I've named this script "Happy New Year" but you can change it....

Code:
	[COLOR="Blue"]<instant name="[COLOR="DarkGreen"]Happy New Year[/COLOR]" words="[COLOR="DarkGreen"]happy new year[/COLOR]" lvl="[COLOR="DarkGreen"]1[/COLOR]" mana="[COLOR="DarkGreen"]0[/COLOR]" direction="0" aggressive="[COLOR="DarkGreen"]0[/COLOR]" exhaustion="2000" needlearn="0" script="[COLOR="DarkGreen"]custom/happy new year.lua[/COLOR]">
		<vocation name="[COLOR="DarkGreen"]Druid[/COLOR]"/>
		<vocation name="[COLOR="DarkGreen"]Elder Druid[/COLOR]"/>
		<vocation name="[COLOR="DarkGreen"]Paladin[/COLOR]"/>
		<vocation name="[COLOR="DarkGreen"]Royal Paladin[/COLOR]"/>
		<vocation name="[COLOR="DarkGreen"]Knight[/COLOR]"/>
		<vocation name="[COLOR="DarkGreen"]Elite Knight[/COLOR]"/>
		<vocation name="[COLOR="DarkGreen"]Sorcerer[/COLOR]"/>
		<vocation name="[COLOR="DarkGreen"]Master Sorcerer[/COLOR]"/>
	</instant>[/COLOR]
 
>.< it was me who made the color efex@otfans! xD
 
[16/02/2010 16:47:10] [Warning - Event::loadScript] Event onCastSpell not found (data/spells/scripts/happy new year.lua)

u.u somebody can help me?
 
Back
Top