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

Skull

Status
Not open for further replies.

Shawak

Intermediate OT User
Joined
Sep 11, 2008
Messages
1,984
Solutions
2
Reaction score
120
Location
Germany
GitHub
Shawak
If in the TFS 0.3 any funktion to remove white skulls?
I realy need it for my new arena script..
 
PHP:
function onStepIn(cid, item, pos)

local out_fight = createConditionObject(CONDITION_INFIGHT)
setConditionParam(out_fight, CONDITION_PARAM_TICKS, 0)

	doTargetCombatCondition(0, cid, out_fight, CONST_ME_NONE)
	
end
So Right?

And..
My Aena:
PHP:
-- Editet by Shawak
Arenas_Positions = {
{ 
startPosition = {x = 943,y=944,z=7}, 
endPosition = {x=979,y=954,z=7},
startPosition2 = {x= 949,y=955,z=7}, 
endPosition2 = {x= 979,y=960,z=7},  
position = {x=944,y=958,z=7}},
}

function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
	local tmp = getCreaturePosition(cid)
	for _, arena in ipairs(Arenas_Positions) do
		if(isInArea(tmp, arena.startPosition, arena.endPosition) == TRUE) then
			if getPlayerSex(cid) == 1 then
				doCreateItem(6080, 1, tmp)
			elseif getPlayerSex(cid) == 2 then
				doCreateItem(6081, 1, tmp)
			end 
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have been defeated by " .. getCreatureName(lastHitKiller) .. ".")
			doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid), TRUE)
			doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid), TRUE)
			doTeleportThing(cid, arena.position, TRUE)
			doSendMagicEffect(tmp, CONST_ME_POFF)
			doSendMagicEffect(arena.position,10)
			return FALSE
		elseif(isInArea(tmp, arena.startPosition2, arena.endPosition2) == TRUE) then
			if getPlayerSex(cid, 1) == TRUE then
				doCreateItem(tmp ,3128)
			elseif getPlayerSex(cid, 2) == TRUE then
				doCreateItem(tmp, 6081)
			end 
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have been defeated by " .. getCreatureName(lastHitKiller) .. ".")
			doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid), TRUE)
			doTeleportThing(cid, arena.position, TRUE)
			doSendMagicEffect(tmp, CONST_ME_POFF)
			doSendMagicEffect(arena.position, CONST_ME_TELEPORT)
			return FALSE
		end
	end
	return TRUE
end
Arena can be built by pvp tile in map editor
This is better?
 
Status
Not open for further replies.
Back
Top