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

Lua Forever Amulet - Player Dosen't Die In PvP Arena

Alyhide

Banned User
Joined
Aug 21, 2010
Messages
1,945
Reaction score
55
Location
Switzerland
Hey, I have a problem, whenever a player has a forever amulet, the player doesn't die in the arena, it's just.. like
At 0 hp, but that player walks around, but his dead body spawns all over the place lol


Forever Amulet.lua
LUA:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
    if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196) then 
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
        doCreatureSay(cid, "Forever Amulet!", TALKTYPE_ORANGE_1)
    elseif (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196) and (getCreatureSkullType(cid) < 4) then 
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
        doCreatureSay(cid, "Skull Amulet!", TALKTYPE_ORANGE_1)
 
    end
    return true
    end

in creaturescripts.xml
LUA:
<event type="preparedeath" name="forever amulet" event="script" value="forever amulet.lua"/>
 
Back
Top