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

Zao arena {request}

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,857
Reaction score
96
Location
Brazil
Can someone help me with my Zao Arena? I made myself but using around 6 scripts.

Is possible using only one script?
 
@up
Tibia have Mortal Combat arena mate :)

I give you leaver and onKill last boss from my server.
If you know the LUA you know what you can change there.


Action:
LUA:
local from = {x=1767, y=100, z=3}
local to = {x=1789, y=121, z=3}
 
local monsters = {
	{{x=1784, y=110, z=3}, 'Baron Brute'},
	{{x=1784, y=110, z=3}, 'The Axeorcist'}
}
 
local players = {
	{{x=1794, y=90, z=2}, {x=1776, y=103, z=3}},
	{{x=1795, y=90, z=2}, {x=1778, y=103, z=3}}
}
 
local level = 110

local statue_pos = {x = 1779, y = 110, z = 3}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local t = {}
	if item.itemid == 1945 then
		for i = 1, #players do
			t[i] = getTopCreature(players[i][1]).uid
			if not isPlayer(t[i]) then
				return doCreatureSay(cid, 'You need ' .. #players .. ' players to do this quest.', TALKTYPE_ORANGE_1, false, cid)
			elseif getPlayerLevel(cid) < level then
				return doCreatureSay(cid, 'All players have to be level ' .. level .. ' to do this quest.', TALKTYPE_ORANGE_1, false, cid)
			end
		end
		for i = 1, #t do
			doTeleportThing(t[i], players[i][2])
			doSendMagicEffect(players[i][1], CONST_ME_TELEPORT)
			doSendMagicEffect(players[i][2], CONST_ME_TELEPORT)
		end
	doCreateMonster('Xyz', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
	doCreateMonster('Tirecz', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
			addEvent(Potwory2, 60 * 1000)
	else
		for x = from.x, to.x do
			for y = from.y, to.y do
				local v = getTopCreature({x=x, y=y, z=from.z}).uid
				if isPlayer(v) then
					return doCreatureSay(cid, 'There is already a team in the battle room.', TALKTYPE_ORANGE_1, false, cid)
				elseif isMonster(v) then
					table.insert(t, v)
				end
			end
		end
		for i = 1, #t do
			doRemoveCreature(t[i])
		end
	end
 
	return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end

function Potwory2()
doCreateMonster('Menace', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doCreateMonster('Fatality', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
addEvent(Potwory4, 60 * 1000)
return true
end
function Potwory4()
doCreateMonster('Incineron', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doCreateMonster('Coldheart', {x = statue_pos.x+1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
addEvent(Potwory5, 60 * 1000)
return true
end
function Potwory5()
doCreateMonster('Dreadwing', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doCreateMonster('Doomhowl', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
addEvent(Potwory6, 60 * 1000)
return true
end
function Potwory6()
doCreateMonster('Haunter', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doCreateMonster('The Dreadorian', {x = statue_pos.x, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
addEvent(Potwory7, 60 * 1000)
return true
end
function Potwory7()
doCreateMonster('Tremorak', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rocko', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
addEvent(Potwory8, 60 * 1000)
return true
end
function Potwory8()
doCreateMonster('Tirecz', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
return true
end

Creaturescripts:


onKill - Tirecz

LUA:
local t = {
	bosses	= { -- Monster Name,	Teleport To Position,	 	Teleport Position
		["Tirecz"] = {ttp={x=1767,	y=98,	z=7},	tp={x=1778,	y=110,	z=3,	stackpos=1}}
	}
}
 
function onKill(cid, target, lastHit)
	local k = t.bosses[getCreatureName(target)]
	if(not isPlayer(target)) and isPlayer(cid) and k and not(getCreatureMaster(target)) then		
		doPlayerSendTextMessage(cid,22,"Take you prizez and outfit then you can may leave the reward room now!")
for x = 1767, 1789 do
			for y = 100, 121 do
				pos = {x = x, y = y, z = getCreaturePosition(cid).z}
				if(isPlayer(getTopCreature(pos).uid)) then
					doTeleportThing(getTopCreature(pos).uid, {x=1776, y=105, z=7})
					doSendMagicEffect({x=1776, y=105, z=7}, CONST_ME_TELEPORT)
				end
			end	
end		
end
	return true
end
 
Back
Top