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

Lua Yakchal tomb

WSouls

New Member
Joined
Aug 5, 2010
Messages
51
Reaction score
1
nothing happens and i dont get any errors

Lua:
local monsters = {
		[1] = {"ice golem", "crystal spider", "frost dragon"},
		[2] = {"ice golem", "ice witch", "frost dragon"},
		[3] = {"ice golem", "ice witch", "crystal spider"}
	}
local timer = 1000 --1sec
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(itemEx.itemid == 7361) then 
		if(getGlobalStorageValue(itemEx.uid) == -1) then
			if(math.random(1, 5) == 1) then
				doCreatureSay(cid, "The frozen starlight shattered, but you have awoken the icewitch Yakchal from her slumber! She seems not amused ...", TALKTYPE_ORANGE_1)
        		doPlayerRemoveItem(item.uid, 1)
			else
        		doCreatureSay(cid, "You have awoken the ice witch Yakchal from her slumber! She seems not amused ...", TALKTYPE_ORANGE_1)
			end
    		setGlobalStorageValue(itemEx.uid, 1)
    		addEvent(setGlobalStorageValue, 60 * 60 * 1000, itemEx.uid, -1) --1hr
			addEvent(doSummonCreature, 2 * 60 * 1000, "yakchal", fromPosition) --2mins
			for i = 1, 3 do
				--first wave spawns after 1 sec
				--2nd wave spawns after 31sec
				--3rd wave spawns after 61 sec
				for i2 = 1, 3 do
					addEvent(doSummonCreature, timer, monsters[i][i2], fromPosition)
					addEvent(doSendMagicEffect, timer, fromPosition, CONST_ME_TELEPORT)
				end
				timer = timer + 30000
			end
		else
			doPlayerSendCancel(cid,"You can not use this object.")
		end
	end
	return true
end
 
Back
Top