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

Lua PvP Arena, need a fix :)

menfes

Sociopat
Joined
Feb 7, 2009
Messages
380
Reaction score
4
Location
Space
This is a script made by Ezzam, it works almost. The only things that doesn't work are the messages and that the winner doesn't get teleported to arena.exit.
I use tfs 0.3.5 pl1, plz fix it someone
Or give me some working pvp arena script

Creaturescripts\scripts\pvparena.lua
Code:
local arena = {
frompos = {x=xxx, y=xxx, z=x},
topos = {x=xxx, y=xxx, z=x},
exit = {x=xxx, y=xxx, z=x}
}

function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) == TRUE then
if isInArea(getPlayerPosition(cid), arena.frompos, arena.topos) then
if doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid), TRUE) == TRUE 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
end
return TRUE
end
 
If you can, plz post the perfect pvp script here xD
Also if you do that explain how to make it work, or give a link to the thread if there is any. :)
 
Hello,

my script works in this way:

zzzxq7.png
 
Ok. The I have some questions:
The tp is allways there?
Is there some limit for how many players can be in pvp arena at the same time?
When somebody winns the battle, he is still in the arena? or he gets tped out automatically?
If answers are YES for all the questions, then it is the perfect arena for me :)

I have pvp arena with limit so only 1x1 can battle, the killer is still in the arena, the looser get tped to temple with full hp and mana :)
 
Back
Top