The script works, but the player ends up being teleporter to the Temple and return to the Full Mana, the players can abuse the arena to up magic level.
local arena = {
frompos = {x=31950, y=32068, z=0},
topos = {x=32192, y=32256, z=15},
exit = {x=32097, y=32219, z=7}
}
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) == TRUE then
if isInArea(getPlayerPosition(cid), arena.frompos, arena.topos) then
if doTeleportThing(cid, arena.exit) == TRUE then
doSendMagicEffect(arena.exit, 10)
doPlayerSendTextMessage(mostDamageKiller,MESSAGE_STATUS_CONSOLE_BLUE,'[ARENA] You have defeated '..getPlayerName(cid)..'!')
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,'[ARENA] You where defeated by '..getPlayerName(mostDamageKiller)..'!')
return FALSE
end
end
end
return TRUE
So remove it?
Lua:local arena = { frompos = {x=31950, y=32068, z=0}, topos = {x=32192, y=32256, z=15}, exit = {x=32097, y=32219, z=7} } function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if isPlayer(cid) == TRUE then if isInArea(getPlayerPosition(cid), arena.frompos, arena.topos) then if doTeleportThing(cid, arena.exit) == TRUE then doSendMagicEffect(arena.exit, 10) doPlayerSendTextMessage(mostDamageKiller,MESSAGE_STATUS_CONSOLE_BLUE,'[ARENA] You have defeated '..getPlayerName(cid)..'!') doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,'[ARENA] You where defeated by '..getPlayerName(mostDamageKiller)..'!') return FALSE end end end return TRUE
[28/09/2009 20:26:15] data/creaturescripts/scripts/arena.lua:13: attempt to concatenate a boolean value
[28/09/2009 20:26:15] stack traceback:
[28/09/2009 20:26:15] data/creaturescripts/scripts/arena.lua:13: in function <data/creaturescripts/scripts/arena.lua:7>
if isInArea(getPlayerPosition(cid), arena.frompos, arena.topos) then
So remove it?
__________________Lua:local arena = { frompos = {x=31950, y=32068, z=0}, topos = {x=32192, y=32256, z=15}, exit = {x=32097, y=32219, z=7} } function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if isPlayer(cid) == TRUE then if isInArea(getPlayerPosition(cid), arena.frompos, arena.topos) then if doTeleportThing(cid, arena.exit) == TRUE then doSendMagicEffect(arena.exit, 10) doPlayerSendTextMessage(mostDamageKiller,MESSAGE_STATUS_CONSOLE_BLUE,'[ARENA] You have defeated '..getPlayerName(cid)..'!') doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,'[ARENA] You where defeated by '..getPlayerName(mostDamageKiller)..'!') return FALSE end end end return TRUE
You are welcome on kleksoria.com!
Please visit new open tibia forum with it's own ots list. otservers.net!
Hello,1. Player does not lose any level and "exit" is kick position.
2. Numbers of players are not set so many players can walk in, correct me if i'm wrong?
3. Yes, exit is the kick position.
__________________
You are welcome on kleksoria.com!
Please visit new open tibia forum with it's own ots list. otservers.net!
local arena = {
frompos = {x=31950, y=32068, z=0},
topos = {x=32192, y=32256, z=15},
exit = {x=32097, y=32219, z=7}
}
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) == TRUE then
if isInArea(getPlayerPosition(cid), arena.frompos, arena.topos) then
if doTeleportThing(cid, arena.exit) == TRUE then
doCreatureAddHealth(cid, 1000(cid), TRUE)
doSendMagicEffect(arena.exit, 10)
return FALSE
end
end