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

Action PVP Arena lever!

I like it, but if someone can do this things it can be much more interesting.

For exemple,
1. if someone player get 0hp, teleport he for position x,y,z.
2. the map can be configurated to 'arena' with the extreme points. Like, {1,1,7} ; {10,10,7}, forming one square.
3. dont need to be an pushed item, can be one teleport. When player enter, he is in 'arena'.
4. the kills dont get frags.
5. the dies dont be registers on 'kill'.

Its my ideas for it. :p
 
It was already somewhere released, but here you have:
Code:
local arenas =
{
	{ --Arena 1 - enigma city
		fromPosition = {x = 2241, y = 1285, z = 9},
		toPosition = {x = 2252, y = 1291, z = 9},
		exitPosition = {x = 2239, y = 1288, z = 8}
	},
--[[
	{ --Arenatest - enigma city
		fromPosition = {x = 2197, y = 1304, z = 7},
		toPosition = {x = 2202, y = 1307, z = 7},
		exitPosition = {x = 2200, y = 1298, z = 7}
	},]]--
}

function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
	local tmp = getCreaturePosition(cid)
	for _, arena in ipairs(arenas) do
		if(isInRange(tmp, arena.fromPosition, arena.toPosition) == TRUE) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[PVPArena] You have been defeated by " .. getCreatureName(lastHitKiller) .. ".")
			doCreatureAddHealth(cid, getCreatureMaxHealth(cid), TRUE)
			doRemoveCondition(cid, CONDITION_INFIGHT)
			--doPlayerSetPzLocked(cid, FALSE)
			doTeleportThing(cid, arena.exitPosition)
			doSendMagicEffect(tmp, CONST_ME_POFF)
			doSendMagicEffect(arena.exitPosition, CONST_ME_TELEPORT)
			return FALSE
		end
	end

	return TRUE
end

I get stuck with 1 hp and get errors in console. Is there any other script?
 
Back
Top