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

When the player dies in arena has a penalty

Serene

Premium User
Premium User
Joined
Mar 3, 2016
Messages
40
Solutions
2
Reaction score
20
These days a friend (Xeraphus) here on the forum helped me to set up this script:


Code:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)



setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) *0.998)
setCreatureMaxMana(cid, getCreatureMaxMana(cid) *0.998)


end
return true
end

It works like this: When the player dies, he loses 0.02% of all life and mana.

But the script is running in the arena,
where should not have any kind of penalty, how I can modify it so that this penalty does not occur in arenas?
 
These days a friend (Xeraphus) here on the forum helped me to set up this script:


Code:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)



setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) *0.998)
setCreatureMaxMana(cid, getCreatureMaxMana(cid) *0.998)


end
return true
end

It works like this: When the player dies, he loses 0.02% of all life and mana.

But the script is running in the arena,
where should not have any kind of penalty, how I can modify it so that this penalty does not occur in arenas?
i think you can check tile flag (i dont know exactly what it is), these are the ones i have for 1.2
Code:
TILESTATE_NONE
TILESTATE_PROTECTIONZONE
TILESTATE_DEPRECATED_HOUSE
TILESTATE_NOPVPZONE
TILESTATE_NOLOGOUT
TILESTATE_PVPZONE
TILESTATE_REFRESH
TILESTATE_HOUSE
TILESTATE_FLOORCHANGE
TILESTATE_FLOORCHANGE_DOWN
TILESTATE_FLOORCHANGE_NORTH
TILESTATE_FLOORCHANGE_SOUTH
TILESTATE_FLOORCHANGE_EAST
TILESTATE_FLOORCHANGE_WEST
TILESTATE_TELEPORT
TILESTATE_MAGICFIELD
TILESTATE_MAILBOX
TILESTATE_TRASHHOLDER
TILESTATE_BED
TILESTATE_DEPOT
TILESTATE_BLOCKSOLID
TILESTATE_BLOCKPATH
TILESTATE_IMMOVABLEBLOCKSOLID
TILESTATE_IMMOVABLEBLOCKPATH
TILESTATE_IMMOVABLENOFIELDBLOCKPATH
TILESTATE_NOFIELDBLOCKPATH
TILESTATE_DYNAMIC_TILE
TILESTATE_FLOORCHANGE_SOUTH_ALT
TILESTATE_FLOORCHANGE_EAST_ALT
TILESTATE_SUPPORTS_HANGABLE
you can check the tile for whatever type of floor the arena is (i think arenas are pvpzone?)
if not you can use isInArea() to check if you're inside the arena and if not you dont get the penalty
 
Back
Top