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

Need Arena Script (TFS 0.3.5)

nips

Da.Nb
Joined
Oct 15, 2009
Messages
152
Reaction score
0
Location
Germany
hi all,

i need a arena scipt for this arena:



player can enter arena a pos 1 and 2...
If player dies he will teleported to pos 3without dying... so that means he just kicked out of arena.
( with full HP and Mana )

Hope someone can help me.
 
Last edited:
creaturescripts/creaturescripts.xml
PHP:
<event type="preparedeath" name="Arena" script="arena.lua"/>

creaturescripts/scripts/login.lua
Lua:
registerCreatureEvent(cid, "Arena")

creaturescripts/scripts/arena.lua
Lua:
local arena = {
frompos = {x=100, y=100, z=7}, -- Top Left Corner
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
 
Last edited:
what exactly does ur scipt ??
do i have to add something more??
for example on creaturescipt.xml ??


my arena now:


i removed pvp zone tool... but i dont work :s
 
Back
Top