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

Arena script working but tping into temple :( little help needed

Wiw3K

New Member
Joined
Apr 16, 2008
Messages
371
Reaction score
3
dam , here is script , take a look
Lua:
  local arena = {
  frompos = { x = 168, y = 657, z = 7 },
  topos = { x = 177, y = 666, z = 7 },
  exit = { x = 169, y = 668, z = 6 }
}

local function exitArena(p)
local mana = (getCreatureMaxMana(p.cid)  * 0.8)
    doCreatureAddHealth(p.cid, getCreatureMaxHealth(p.cid))
    doCreatureAddMana(p.cid, -mana)
    doRemoveCondition(p.cid, CONDITION_INFIGHT)
    doSendMagicEffect(p.exit, 10)
    doTeleportThing(p.cid, p.exit, FALSE)
return TRUE
  end

function onPrepareDeath(cid, killer)
arenastatus = getPlayerStorageValue(cid,74859)
if arenastatus == -1 then
doCreatureAddHealth(cid, 1)
    if isInArea(getPlayerPosition(cid), arena.frompos, arena.topos) then
        doCreatureAddHealth(cid, 1)
        setPlayerStorageValue(cid, 74859, 0)
        addEvent(exitArena, 1, {cid=cid, exit=arena.exit})
        end
    else
        return TRUE
   end 
end

function isInArea(pos, fromPos, toPos)
    if pos.x >= fromPos.x and pos.x <= toPos.x then
        if pos.y >= fromPos.y and pos.y <= toPos.y then
            if pos.z >= fromPos.z and pos.z <= toPos.z then
                return true
            end
        end
    end
    return false
end
 
arena tiles :O?? wtfs that , i made PVP Zone on these tiles & using that script , can you help its wery important
 
If player dies on PVP zones (from map editor) then he is deffinitely teleported to temple.

I don't know how to solve this now : f
 
Back
Top