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

Solved doubt about water damage

Thorn

Spriting since 2013
Joined
Sep 24, 2012
Messages
2,203
Solutions
1
Reaction score
923
Location
Chile
hii, i need to know how to edit the damage that deals the posion, or fire, or water..because when my players go to underwater the water keeps damaging them until they die, it's eternal D: and i can't find where to edit that :/ plz helpp :(
 
oooh and could you help me to edit this? to see the error? D: here is the drown script
LUA:
local condition = createConditionObject(CONDITION_DROWN)
setConditionParam(condition, CONDITION_PARAM_PERIODICDAMAGE, -20)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition, CONDITION_PARAM_TICKINTERVAL, 2000)

function onStepIn(cid, item, position, fromPosition)
	if(isPlayer(cid)) then
		doAddCondition(cid, condition)
	end
	return true
end

function onStepOut(cid, item, position, fromPosition)
	doRemoveCondition(cid, CONDITION_DROWN)
	return true
end

- - - Updated - - -

plz?? bump :C
 
no, it keeps damaging them :/ for a loong long time, maybe forever if they don't die or get kiked
 
What do you expect? The player suddenly transforming into a fishman and thus not suffering the pain of drowning anylonger?
Ofc they take damage until they die, they will drown..
 
Check movements.xml, make sure you have both of theses lines:

XML:
	<movevent type="StepIn" fromid="5405" toid="5410" event="script" value="drown.lua"/>
	<movevent type="StepOut" fromid="5405" toid="5410" event="script" value="drown.lua"/>
 
Back
Top