• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Last man standing

you should make the arena script right
and if u have it there maybe that u didnt use the pvp zone when u mapped it
 
Code:
local arena = {
  frompos = {x=266, y=246, z=11},
  topos = {x=275, y=251, z=11},
  exitpos = {x=278, y=249, z=10}
}
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
  if isPlayer(cid) then
  if isInArea(getPlayerPosition(cid), arena.frompos, arena.topos) then
  doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid), true)
    doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"[Arena]: You lost the duel.")
    doTeleportThing(cid, arena.exitpos)
  end
  end
  return true
end

register it in login and creaturescripts
 
Code:
local arena = {
  frompos = {x=266, y=246, z=11},
  topos = {x=275, y=251, z=11},
  exitpos = {x=278, y=249, z=10}
}
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
  if isPlayer(cid) then
  if isInArea(getPlayerPosition(cid), arena.frompos, arena.topos) then
  doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid), true)
    doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"[Arena]: You lost the duel.")
    doTeleportThing(cid, arena.exitpos)
  end
  end
  return true
end

register it in login and creaturescripts
What should it be in creaturescripts.xml?
 
Back
Top