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

Solved [solved thanks to cykotitan as usual]

Exmortis

Member
Joined
Jun 27, 2008
Messages
189
Reaction score
5
When someone shoots a firebomb, or creatures makes a firefields, no damage is taken when you walk onto it..
Anyone had a similiar problem?

Also, how does the damage made by for example exori gran work?
I dont understand the codes :p

Here's the code for my exori gran spell:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0.8, 0, 1.6, 0)

local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
Last edited:
Does it really matter? U loose like 20 hp walking on it.

Matters alot since it look alot more proffesional if the functions are like the original tibia.
Being trapped is not really longer possible if you cant use firebombs, since you can get pushed into the fires.
I mean, it matters alot in pvp.
 
Remove the following lines from movements.xml:
Code:
	<movevent event="StepIn" itemid="1487" function="onStepInField"/>
	<movevent event="StepIn" itemid="1488" function="onStepInField"/>
	<movevent event="StepIn" itemid="1489" function="onStepInField"/>
	<movevent event="StepIn" itemid="1492" function="onStepInField"/>
	<movevent event="StepIn" itemid="1493" function="onStepInField"/>
	<movevent event="StepIn" itemid="1494" function="onStepInField"/>
Add the following:
Code:
	<movevent event="StepIn" fromid="1487" toid="1488" script="firefield.lua"/>
	<movevent event="StepIn" fromid="1492" toid="1493" script="firefield.lua"/>
Create file ./data/movements/scripts/firefield.lua with the following contents:
Lua:
local condition = {}
for i = 1, 4 do
	table.insert(condition, createConditionObject(CONDITION_FIRE))
	addDamageCondition(condition[i], 1, 0, -(i == 1 and 20 or i==2 and 2 or i == 3 and 10 or i == 4 and 1))
	addDamageCondition(condition[i], isInArray({1,3},i)==TRUE and 7 or 2, 9000, -(isInArray({1,3},i)==TRUE and 10 or 1))
end

function onStepIn(cid, item, position, fromPosition)
	if isPlayer(cid) == FALSE or getPlayerFlagValue(cid, PlayerFlag_CannotBeAttacked) == FALSE then
		return doRemoveCondition(cid, CONDITION_FIRE), doAddCondition(cid, isInArray({1487,1492},item.itemid) == TRUE and condition[isPlayer(cid) == TRUE and getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid == 9932 and 2 or 1] or condition[isPlayer(cid) == TRUE and getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid == 9932 and 4 or 3])
	else
		doSendMagicEffect(position, CONST_ME_POFF)
	end
end

About pushing players into fire fields... you would have to use the old method if you want this fixed! Or a source edit.
 
maybe it wasnt possible from the start, i just thought that it would be possible since you didnt get any damage if you know what im saying :p
 
Back
Top