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

[8.54] PVP ARENA

Saper1995

Technologic
Joined
Jul 11, 2009
Messages
104
Reaction score
3
Location
Poland
Hello everyone! I found this script and trying edited but something doesn't work. Anyone can help me?
And how to make NOSKULL area in arena like PVPzone in RME. I don't want PVPzone because when player die then he was teleport to temple but i want teleport to X position.

*This script teleported only loser player to loser.pos but don't give him full HP and doesn't show "You have defeated ..." Player die and after relog he is in temple.


Code:
local arena = {
  frompos = {x=1543, y=1582, z=7},
  topos = {x=1552, y=1590, z=7},
  loser = {x=1554, y=1574, z=7},
  winer = {x=1551, y=1574, z=7}
}

function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
  if isPlayer(cid) == TRUE then
  if isInArea(getPlayerPosition(cid), arena.frompos, arena.topos) then
   doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
   doTeleportThing(cid, arena.loser)
   doSendMagicEffect(arena.loser, 10)
   doCreatureAddHealth(mostDamageKiller, getCreatureMaxHealth(cid))
   doTeleportThing(mostDamageKiller, arena.winer)
   doSendMagicEffect(arena.winer, 10)
   doPlayerSendTextMessage(mostDamageKiller,MESSAGE_STATUS_CONSOLE_BLUE,"You have defeated "..getPlayerName(cid).."!")
   doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"You were defeated by "..getPlayerName(mostDamageKiller).."!")
          return FALSE
        end
  end
  return TRUE
end

Code:
[17/07/2014 21:32:43] [Error - CreatureScript Interface]
[17/07/2014 21:32:43] data/creaturescripts/scripts/pvparena.lua:onPrepareDeath
[17/07/2014 21:32:43] Description:
[17/07/2014 21:32:43] (luaDoCreatureAddHealth) Creature not found

[17/07/2014 21:32:43] [Error - CreatureScript Interface]
[17/07/2014 21:32:43] data/creaturescripts/scripts/pvparena.lua:onPrepareDeath
[17/07/2014 21:32:43] Description:
[17/07/2014 21:32:43] (luaDoTeleportThing) Thing not found

[17/07/2014 21:32:43] [Error - CreatureScript Interface]
[17/07/2014 21:32:43] data/creaturescripts/scripts/pvparena.lua:onPrepareDeath
[17/07/2014 21:32:43] Description:
[17/07/2014 21:32:43] (luaDoPlayerSendTextMessage) Player not found

[17/07/2014 21:32:43] [Error - CreatureScript Interface]
[17/07/2014 21:32:43] data/creaturescripts/scripts/pvparena.lua:onPrepareDeath
[17/07/2014 21:32:43] Description:
[17/07/2014 21:32:43] (luaGetCreatureName) Creature not found

[17/07/2014 21:32:43] [Error - CreatureScript Interface]
[17/07/2014 21:32:43] data/creaturescripts/scripts/pvparena.lua:onPrepareDeath
[17/07/2014 21:32:43] Description:
[17/07/2014 21:32:43] data/creaturescripts/scripts/pvparena.lua:18: attempt to concatenate a boolean value
[17/07/2014 21:32:43] stack traceback:
[17/07/2014 21:32:43]     data/creaturescripts/scripts/pvparena.lua:18: in function <data/creaturescripts/scripts/pvparena.lua:8>
 
The function onPrepareDeath in TFS 0.3.6 works like this: function onPrepareDeath(cid, deathList)
First parameter is the creatureid of who dies, second parameter is a table of the killers.
You can use
Code:
deathList[1]
To get the killer
Or for more killers
Code:
for d = 1, #deathList do
     -- deathList[d]
end
 
Hello everyone! I found this script and trying edited but something doesn't work. Anyone can help me?
And how to make NOSKULL area in arena like PVPzone in RME. I don't want PVPzone because when player die then he was teleport to temple but i want teleport to X position.

*This script teleported only loser player to loser.pos but don't give him full HP and doesn't show "You have defeated ..." Player die and after relog he is in temple.


Code:
local arena = {
  frompos = {x=1543, y=1582, z=7},
  topos = {x=1552, y=1590, z=7},
  loser = {x=1554, y=1574, z=7},
  winer = {x=1551, y=1574, z=7}
}

function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
  if isPlayer(cid) == TRUE then
  if isInArea(getPlayerPosition(cid), arena.frompos, arena.topos) then
   doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
   doTeleportThing(cid, arena.loser)
   doSendMagicEffect(arena.loser, 10)
   doCreatureAddHealth(mostDamageKiller, getCreatureMaxHealth(cid))
   doTeleportThing(mostDamageKiller, arena.winer)
   doSendMagicEffect(arena.winer, 10)
   doPlayerSendTextMessage(mostDamageKiller,MESSAGE_STATUS_CONSOLE_BLUE,"You have defeated "..getPlayerName(cid).."!")
   doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"You were defeated by "..getPlayerName(mostDamageKiller).."!")
          return FALSE
        end
  end
  return TRUE
end

Code:
[17/07/2014 21:32:43] [Error - CreatureScript Interface]
[17/07/2014 21:32:43] data/creaturescripts/scripts/pvparena.lua:onPrepareDeath
[17/07/2014 21:32:43] Description:
[17/07/2014 21:32:43] (luaDoCreatureAddHealth) Creature not found

[17/07/2014 21:32:43] [Error - CreatureScript Interface]
[17/07/2014 21:32:43] data/creaturescripts/scripts/pvparena.lua:onPrepareDeath
[17/07/2014 21:32:43] Description:
[17/07/2014 21:32:43] (luaDoTeleportThing) Thing not found

[17/07/2014 21:32:43] [Error - CreatureScript Interface]
[17/07/2014 21:32:43] data/creaturescripts/scripts/pvparena.lua:onPrepareDeath
[17/07/2014 21:32:43] Description:
[17/07/2014 21:32:43] (luaDoPlayerSendTextMessage) Player not found

[17/07/2014 21:32:43] [Error - CreatureScript Interface]
[17/07/2014 21:32:43] data/creaturescripts/scripts/pvparena.lua:onPrepareDeath
[17/07/2014 21:32:43] Description:
[17/07/2014 21:32:43] (luaGetCreatureName) Creature not found

[17/07/2014 21:32:43] [Error - CreatureScript Interface]
[17/07/2014 21:32:43] data/creaturescripts/scripts/pvparena.lua:onPrepareDeath
[17/07/2014 21:32:43] Description:
[17/07/2014 21:32:43] data/creaturescripts/scripts/pvparena.lua:18: attempt to concatenate a boolean value
[17/07/2014 21:32:43] stack traceback:
[17/07/2014 21:32:43]     data/creaturescripts/scripts/pvparena.lua:18: in function <data/creaturescripts/scripts/pvparena.lua:8>
can u give me full script pls
 
Back
Top