• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

CreatureEvent PvP-Arena TFS 0.3 [RELEASE]

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.
 
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.

So remove it? :eek:

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
__________________
klekSu.png

You are welcome on kleksoria.com!
Please visit new open tibia forum with it's own ots list. otservers.net!
 
Last edited:
So remove it? :eek:

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

The player dies in the arena and back with FULL MANA.
 
Code:
[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>


It teleports you out of the arena but it kills you right after that.
Can anyone fix this?
 
Lua:
if isInArea(getPlayerPosition(cid), arena.frompos, arena.topos) then

I need a similar function for 0.2 anyone?
 
Hello :),

I'm thinking about to add this at our OT.

But some questions:

1.) The players fight and what happens after fight? Level lost? Kick positon?

2.) How many players can fight? like 1vs1?

3.) exit = kick postion? or just place of tp?


thanks! :)
 
Last edited:
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.
__________________
klekSu.png

You are welcome on kleksoria.com!
Please visit new open tibia forum with it's own ots list. otservers.net!
 
So remove it? :eek:

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
__________________
klekSu.png

You are welcome on kleksoria.com!
Please visit new open tibia forum with it's own ots list. otservers.net!

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.
__________________
klekSu.png

You are welcome on kleksoria.com!
Please visit new open tibia forum with it's own ots list. otservers.net!
Hello,

thanks for your wunderful answer!

1.) What you changed at the script? They will kicked out of arena after fight but mana still the same?

2.) How they enter? Do they go into the "arena area" and fight? Don't need to use a teleport or something?

3.) I forget how to set the "from" "to"-positions:w00t:

Just open edior and found the corners or? (north-west and south-east?)
 
Last edited:
When you die in the arena it teleports you out to the exit place but it also kills you? can anyone fix this?
 
Actually this script fails. What about players' summons? What about some configs of additional features?
 
Phoenix try this;
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
          doCreatureAddHealth(cid, 1000(cid), TRUE)
doSendMagicEffect(arena.exit, 10)
          return FALSE
        end
    end
 
Last edited:
:p My script is pretty old, and was the first? working when tft updated the script system.

Please update my script or make newer and better and release for the community.
 
This doesent work for TFS 0.3.5pl1?
I've heard that they removed onPrepareDeath from it :/
 
Back
Top