• 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 [Chazorai]

Dankoo

Active Member
Joined
Sep 4, 2010
Messages
1,007
Reaction score
27
I do not want someone to do this for me, I don't want to give ppl work where I can do it myself... But, does someone have a template of a arena script that I can use to make an Zao arena?

The correct name is Chazorai Arena

Where:

5feohz.jpg


To start arena, it's needed 2 players [no level requirement]
Player talks to Chrak and gets access to the lever (this part I know how to do, ignore it)
They pull the lever and gets teleported to the arena

Lever position: {x="33079",y="31014",z="2"} (AID or UID 26840)
Player 1 start position: {x="33080",y="31014",z="2"}
Player 2 start position: {x="33081",y="31014",z="2"}

Where:
2cdcrhs.jpg


monster Baron Brute summoned at position 1 (black) {x="33061",y="31033",z="3"}
monster The Axeorcist summoned at position 2 (black) {x="33064",y="31035",z="3"}
IGNORE 2 BLUE
Player 1 teleported to {x="33059",y="31032",z="3"}
Player 2 teleported to {x="33057",y="31034",z="3"}

Ok, at this points two players are fighting the monsters... The next wave of boss will spawn in the same place after 90 seconds, even if the earlier bosses are still alive.

Now Menace and Fatality will spawn

Now on I can do the rest of the script I think, just repeat the script and adapt to other bosses, right? If I need support then I'll ask in support section, but don't want to give work to ppl lol

Thanks a lot, this will be a great contribution for otland community :]
 
Sorry I posted a wrong script, here is the right script:
Monster
XML:
<script>
<event name="Tirecz"/>
</script>

Creaturescripts
XML:
        <event type="kill" name="Tirecz" event="script" value="Tirecz.lua"/>

Tirecz.lua
Lua:
local t = {
    newPos = {x=33062, y=31029, z=7},
    msg = "You have won! As new champion take the ancient armor as reward before you leave.",
    area = {
        fromX = 33053, toX = 33073,
        fromY = 31024, toY = 31044,
        z = 3
    }
}
 
function getCreaturesInRange(position, radiusx, radiusy, showMonsters, showPlayers, showSummons)
    local creaturesList = {}
    for x = -radiusx, radiusx do
        for y = -radiusy, radiusy do
            if not (x == 0 and y == 0) then
                creature = getTopCreature({x = position.x+x, y = position.y+y, z = position.z, stackpos = 253})
                if (creature.type == 1 and showPlayers == TRUE) or (creature.type == 2 and showMonsters == TRUE and (showSummons == FALSE or (showSummons == TRUE and getCreatureMaster(creature.uid) == (creature.uid)))) then
                table.insert(creaturesList, creature.uid)
                end
            end
        end
    end
 
    local creature = getTopCreature(position)
    if(creature.type == 1 and showPlayers == TRUE) or (creature.type == 2 and showMonsters == TRUE and (showSummons == FALSE or (showSummons == TRUE and getCreatureMaster(creature.uid) == (creature.uid)))) then
              if not(table.find(creaturesList, creature.uid)) then
            table.insert(creaturesList, creature.uid)
        end
    end
    return creaturesList
end
 
function onKill(cid, target, damage, flags)
    local name = getCreatureName(target):lower()
    if name == 'Tirecz' then
        local players = getCreaturesInRange({x=33063, y=31035,z=3}, 10, 9, FALSE, TRUE)
        for i = 1, #players do
            doTeleportThing(players[i], t.newPos)
            doCreatureSay(players[i], t.msg, TALKTYPE_ORANGE_1, false, players[i], getCreaturePosition(players[i]))
        end
    end
return true
end

Login.lua
Lua:
        registerCreatureEvent(cid, "Tirecz")


I just don't understand this line:
Lua:
local players = getCreaturesInRange({x=33063, y=31035,z=3}, 10, 9, FALSE, TRUE)
 
Change
Lua:
    local name = getCreatureName(target):lower()
    if name == 'Tirecz' then

to:
Lua:
    local name = getCreatureName(target):lower()
    if name == 'tirecz' then
 
Lua:
local t = {
    newPos = {x=33062, y=31029, z=7},
    msg = "You have won! As new champion take the ancient armor as reward before you leave.",
    area = {
        fromX = 33053, toX = 33073,
        fromY = 31024, toY = 31044,
        z = 3
    }
}
 
function getCreaturesInRange(position, radiusx, radiusy, showMonsters, showPlayers, showSummons)
    local creaturesList = {}
    for x = -radiusx, radiusx do
        for y = -radiusy, radiusy do
            if not (x == 0 and y == 0) then
                creature = getTopCreature({x = position.x+x, y = position.y+y, z = position.z, stackpos = 253})
                if (creature.type == 1 and showPlayers == TRUE) or (creature.type == 2 and showMonsters == TRUE and (showSummons == FALSE or (showSummons == TRUE and getCreatureMaster(creature.uid) == (creature.uid)))) then
                table.insert(creaturesList, creature.uid)
                end
            end
        end
    end
 
    local creature = getTopCreature(position)
    if(creature.type == 1 and showPlayers == TRUE) or (creature.type == 2 and showMonsters == TRUE and (showSummons == FALSE or (showSummons == TRUE and getCreatureMaster(creature.uid) == (creature.uid)))) then
              if not(table.find(creaturesList, creature.uid)) then
            table.insert(creaturesList, creature.uid)
        end
    end
    return creaturesList
end
 
function onKill(cid, target, damage, flags)
    local name = getCreatureName(target):lower()
    if name == 'tirecz' then
        local players = getCreaturesInRange({x=33063, y=31035,z=3}, 15, 15, FALSE, TRUE)
        for i = 1, #players do
            doTeleportThing(players[i], t.newPos)
            doCreatureSay(players[i], t.msg, TALKTYPE_ORANGE_1, false, players[i], getCreaturePosition(players[i]))
        end
    end
return true
end
Don't working.
 
Lua:
local t =
{
    newPos = {x=33062, y=31029, z=7},
    msg = "You have won! As new champion take the ancient armor as reward before you leave.",
    area =
	{
		from = {x = 33053, y = 31024, z = 3},
		to = {x = 33073, y = 31044, z = 3}
	}
}
 
function getCreaturesInRange(type, fromPos, toPos, get, countSummon)
 
	local types = 
	{
		[1] = isPlayer,
		[2] = isMonster,
		[3] = isNpc,
		[4] = isCreature
	}
	local tmp = {}
 
	local t = types[type]
	if not t then
		return print("[Warning - Function::getCreaturesInRange] Unknow type " .. (type or "(nil value)"))
	end
 
	local thing
	local pos
	for x = fromPos.x, toPos.x do
		for y = fromPos.y, toPos.y do
			for z = fromPos.z, toPos.z do
				pos = {x = x, y = y, z = z}
				thing = getTopCreature(pos)
				if t(thing.uid) then
					table.insert(tmp, thing.uid)
					if not countSummon and isSummon(thing.uid) then
						for i = 1, #tmp do
							if tmp[i] == thing.uid then
								table.remove(tmp, i)
								break
							end
						end
					end
				end
			end
		end
	end
	if(get == 1) then
		return table.maxn(tmp)
	elseif(get == 2) then
		return tmp
	else
		print("[Warning - Function::getCreaturesInRange] Unknow type to get " .. (get or "(nil value)"))
	end
end
 
function onKill(cid, target, damage, flags)
	local name = getCreatureName(target):lower()
	if name == 'tirecz' then
		local players = getCreaturesInRange(1, t.area.from, t.area.to, 2)
		for i = 1, #players do
			doTeleportThing(players[i], t.newPos)
			doCreatureSay(players[i], t.msg, TALKTYPE_MONSTER, false, players[i], getThingPos(players[i]))
		end
	end
	return true
end
 
Last edited:
When i add this script, my monster dpn't died and crash server.
Lua:
local t = {
    newPos = {x=33062, y=31029, z=7},
    msg = "You have won! As new champion take the ancient armor as reward before you leave.",
    area = {
        fromX = 33055, toX = 33072,
        fromY = 31033, toY = 31036,
        z = 3
    }
}
 
function getCreaturesInRange(position, radiusx, radiusy, showMonsters, showPlayers, showSummons)
    local creaturesList = {}
    for x = -radiusx, radiusx do
        for y = -radiusy, radiusy do
            if not (x == 0 and y == 0) then
                creature = getTopCreature({x = position.x+x, y = position.y+y, z = position.z, stackpos = 253})
                if (creature.type == 1 and showPlayers == TRUE) or (creature.type == 2 and showMonsters == TRUE and (showSummons == FALSE or (showSummons == TRUE and getCreatureMaster(creature.uid) == (creature.uid)))) then
                table.insert(creaturesList, creature.uid)
                end
            end
        end
    end
 
    local creature = getTopCreature(position)
    if(creature.type == 1 and showPlayers == TRUE) or (creature.type == 2 and showMonsters == TRUE and (showSummons == FALSE or (showSummons == TRUE and getCreatureMaster(creature.uid) == (creature.uid)))) then
              if not(table.find(creaturesList, creature.uid)) then
            table.insert(creaturesList, creature.uid)
        end
    end
    return creaturesList
end
 
function onKill(cid, target, damage, flags)
    local name = getCreatureName(target):lower()
    if name == 'tirecz' then
        local players = getCreaturesInRange({x=33062, y=31029,z=7}, 10, 9, FALSE, TRUE)
        for i = 1, #players do
            doTeleportThing(players[i], t.newPos)
            doCreatureSay(players[i], t.msg, TALKTYPE_ORANGE_1, false, players[i], getCreaturePosition(players[i]))
        end
        return true
    end
    end
 
When i add this script, my monster dpn't died and crash server.
Lua:
local t = {
    newPos = {x=33062, y=31029, z=7},
    msg = "You have won! As new champion take the ancient armor as reward before you leave.",
    area = {
        fromX = 33055, toX = 33072,
        fromY = 31033, toY = 31036,
        z = 3
    }
}
 
function getCreaturesInRange(position, radiusx, radiusy, showMonsters, showPlayers, showSummons)
    local creaturesList = {}
    for x = -radiusx, radiusx do
        for y = -radiusy, radiusy do
            if not (x == 0 and y == 0) then
                creature = getTopCreature({x = position.x+x, y = position.y+y, z = position.z, stackpos = 253})
                if (creature.type == 1 and showPlayers == TRUE) or (creature.type == 2 and showMonsters == TRUE and (showSummons == FALSE or (showSummons == TRUE and getCreatureMaster(creature.uid) == (creature.uid)))) then
                table.insert(creaturesList, creature.uid)
                end
            end
        end
    end
 
    local creature = getTopCreature(position)
    if(creature.type == 1 and showPlayers == TRUE) or (creature.type == 2 and showMonsters == TRUE and (showSummons == FALSE or (showSummons == TRUE and getCreatureMaster(creature.uid) == (creature.uid)))) then
              if not(table.find(creaturesList, creature.uid)) then
            table.insert(creaturesList, creature.uid)
        end
    end
    return creaturesList
end
 
function onKill(cid, target, damage, flags)
    local name = getCreatureName(target):lower()
    if name == 'tirecz' then
        local players = getCreaturesInRange({x=33062, y=31029,z=7}, 10, 9, FALSE, TRUE)
        for i = 1, #players do
            doTeleportThing(players[i], t.newPos)
            doCreatureSay(players[i], t.msg, TALKTYPE_ORANGE_1, false, players[i], getCreaturePosition(players[i]))
        end
        return true
    end
    end

>>Use the darkhaos script<<, work like a charms, also if give you an error of 'isSummon' null only need to put

HTML:
function isSummon(cid)
	return getCreatureMaster(cid) ~= cid or false
end

in 050-function.lua

@Dankoo How can be fix that if a player drop field/bomb over the place respawn monster will not respawn and make error in console.

Example:
[24/7/2011 11:19:35] [Error - Action Interface]
[24/7/2011 11:19:35] In a timer event called from:
[24/7/2011 11:19:35] data/actions/scripts/quests/mortalkombat.lua:eek:nUse
[24/7/2011 11:19:35] Description:
[24/7/2011 11:19:35] (luaDoCreateMonster) Cannot create monster: Menace

[24/7/2011 11:19:35] [Error - Action Interface]
[24/7/2011 11:19:35] In a timer event called from:
[24/7/2011 11:19:35] data/actions/scripts/quests/mortalkombat.lua:eek:nUse
[24/7/2011 11:19:35] Description:
[24/7/2011 11:19:35] (luaGetThingPosition) Thing not found

[24/7/2011 11:19:35] [Error - Action Interface]
[24/7/2011 11:19:35] In a timer event called from:
[24/7/2011 11:19:35] data/actions/scripts/quests/mortalkombat.lua:eek:nUse
[24/7/2011 11:19:35] Description:
[24/7/2011 11:19:35] (luaDoCreateMonster) Cannot create monster: Fatality
 
Darkhos script don't working T.T
I use TFS 0.3.6. I just changed positions. Someone can help me?
Lua:
local t =
{
     newPos = {x=2678, y=2344, z=12},
    msg = "You have won! As new champion take the ancient armor as reward before you leave.",
    area =
	{
		from = {x = 2685, y = 2303, z = 13},
		to = {x = 2699, y = 2303, z = 13}
	}
}
 
 function getCreaturesInRange(type, fromPos, toPos, get, countSummon)
 
	local types = 
	{
		[1] = isPlayer,
		[2] = isMonster,
		[3] = isNpc,
		[4] = isCreature
	}
	local tmp = {}
 
	local t = types[type]
	if not t then
		return print("[Warning - Function::getCreaturesInRange] Unknow type " .. (type or "(nil value)"))
	end
 
	local thing
	local pos
	for x = fromPos.x, toPos.x do
		for y = fromPos.y, toPos.y do
			for z = fromPos.z, toPos.z do
				pos = {x = x, y = y, z = z}
				thing = getTopCreature(pos)
				if t(thing.uid) then
					table.insert(tmp, thing.uid)
					if not countSummon and isSummon(thing.uid) then
						for i = 1, #tmp do
							if tmp[i] == thing.uid then
								table.remove(tmp, i)
								break
							end
						end
					end
				end
			end
		end
	end
	if(get == 1) then
		return table.maxn(tmp)
	elseif(get == 2) then
		return tmp
	else
		print("[Warning - Function::getCreaturesInRange] Unknow type to get " .. (get or "(nil value)"))
	end
end
 
function onKill(cid, target, damage, flags)
	local name = getCreatureName(target):lower()
	if name == 'tirecz' then
		local players = getCreaturesInRange(1, t.area.from, t.area.to, 2)
		for i = 1, #players do
			doTeleportThing(players[i], t.newPos)
			doCreatureSay(players[i], t.msg, TALKTYPE_MONSTER, false, players[i], getThingPos(players[i]))
		end
	end
	return true
end
When I killing Tirecz, happens nothing ;P
 
Back
Top