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

Garndalf

New Member
Joined
Jul 31, 2008
Messages
89
Reaction score
0
topos = {x=100, y=100, z=7}, -- Bottom Right Corner
exit = {x=100, y=100, z=7} -- Exit
}

function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) == TRUE then
if isInArea(getCreaturePosition(cid), arena.frompos, arena.topos) then
doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid), TRUE)
doTeleportThing(cid, arena.exit)
doSendMagicEffect(arena.exit, 10)
doPlayerSendTextMessage(mostDamageKiller,MESSAGE_STATUS_CONSOLE_ORANGE,'[ARENA] You have defeated '..getCreatureName(cid)..'!')
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_RED,'[ARENA] You where defeated by '..getCreatureName(mostDamageKiller)..'!')
end
return true
end
end


How can I modify it to when a player dies appear at temple with 0 mana

i got it working perfectly but i want that when a player dies there the player get 0 mana
 
Lua:
topos = {x=100, y=100, z=7}, -- Bottom Right Corner
exit = {x=100, y=100, z=7} -- Exit
}

function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) == TRUE then
if isInArea(getCreaturePosition(cid), arena.frompos, arena.topos) then
doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid), TRUE)
doPlayerAddMana(cid, -getPlayerMana(cid))
doTeleportThing(cid, arena.exit)
doSendMagicEffect(arena.exit, 10)
doPlayerSendTextMessage(mostDamageKiller,MESSAGE_S TATUS_CONSOLE_ORANGE,'[ARENA] You have defeated '..getCreatureName(cid)..'!')
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE _RED,'[ARENA] You were defeated by '..getCreatureName(mostDamageKiller)..'!')
end
return true
end
end
 
Doesnt Worked

It Doesnt Worked But I Got Another Script Can Someone Help Me To Make it That when a Player Dies in arena get 0 Mana

function onPrepareDeath(cid)

-- CONFIG --
local a = {
l = {x=1273,y=1087,z=7}, -- top left pos of arena
r = {x=1310,y=1107,z=7}, -- bot right pos of arena
e = {x=1256,y=1026,z=7} -- loser 'll be teleported in this pos when dies
}
-- CONFIG --
local p = getCreaturePosition(cid) -- don't touch

if isInRange(p, a.l, a.r) then
doSendMagicEffect(p, CONST_ME_TELEPORT)
doTeleportThing(cid, a.e)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doCreatureAddMana(cid, getCreatureMaxMana(cid)-getCreatureMana(cid))
return FALSE
end
return true
end

Can Someone Tell Me What i got to do for when a player dies in arena inmediatly get 0 mana
 
Back
Top