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

Helmet of the deep, update 8.6 (Solved)

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,858
Reaction score
96
Location
Brazil
I have this script of Helmet of the deep.
Now only when you eat Coconut Shrimp Bake you have +300 speed for 6 hours.
Can someone show me how?

XML:
	<movevent type="StepIn" itemid="5405" event="script" value="water.lua" />
	<movevent type="StepIn" itemid="5406" event="script" value="water.lua" />
	<movevent type="StepIn" itemid="5407" event="script" value="water.lua" />
	<movevent type="StepIn" itemid="5408" event="script" value="water.lua" />
	<movevent type="StepIn" itemid="5409" event="script" value="water.lua" />
	<movevent type="StepIn" itemid="5410" event="script" value="water.lua" />
Lua:
local condition = createConditionObject(CONDITION_DROWN)
setConditionParam(condition, CONDITION_PARAM_PERIODICDAMAGE, -50)
setConditionParam(condition, CONDITION_PARAM_TICKS, -3)
setConditionParam(condition, CONDITION_PARAM_TICKINTERVAL, 2000)

function onStepIn(cid, item, pos)
	if isPlayer(cid) == TRUE then
		doAddCondition(cid, condition)
	end
end

function onStepOut(cid, item, pos)
	doRemoveCondition(cid, CONDITION_DROWN)
end
 
cyko this script need compilation w/o this what may be happening?
and if we remove this line which function we depriving?
 
Compilation error
sasas.jpg
 
Last edited:
cyko this script need compilation w/o this what may be happening?
and if we remove this line which function we depriving?
removing the 2 lines will actually fix a bug which makes onEquip get executed twice, and the crash when an item with a scripted onEquip gets added into one of player's item slots
 
It'll crash if someone buys this helmet, without wearing a helmet at that time. Or if you use '/i helmet of the deep' and it appears on head slot :p. It's highly recommended that you apply the patch, because i haven't even tested what else may be wrong if you don't have it.
 
I compiled and it's not crashing :DD

I've found a bug:
If player get out of underwater his Helmet of the Deep still give +300 speed.
Explain: If player getout of underwater his Helmet must transform to 5461.

Edit: Sorry Double Post :/
 
Last edited:
I've found a bug:
If player get out of underwater his Helmet of the Deep still give +300 speed.
Explain: If player getout of underwater his Helmet must transform to 5461.
If you edited items.xml properly and added line with DeEquip, it has to work. It worked for me :p
 
It's working but if player go out of underwater the Helmet must transform back to 5461 or players will abuse of speed.

It's not beeing transformed to 5461 when go out.
 
It's not beeing transformed to 5461 when go out.
it is. or you don't have the onStepOut event registered.

remove all old references to drown.lua, and add this instead:
Code:
	<movevent type="StepIn" fromid="5405" toid="5410" event="script" value="drowning.lua"/>
	<movevent type="StepOut" fromid="5405" toid="5410" event="script" value="drowning.lua"/>
	<movevent type="StepIn" fromid="5743" toid="5744" event="script" value="drowning.lua"/>
	<movevent type="StepOut" fromid="5743" toid="5744" event="script" value="drowning.lua"/>
	<movevent type="StepIn" itemid="5764" event="script" value="drowning.lua"/>
	<movevent type="StepOut" itemid="5764" event="script" value="drowning.lua"/>
	<movevent type="StepIn" fromid="9671" toid="9673" event="script" value="drowning.lua"/>
	<movevent type="StepOut" fromid="9671" toid="9673" event="script" value="drowning.lua"/>
 
Ok, it's working now BUT if player is underwater and remove helmet it will not transform to 5461, so another player without storage can use helmet with +300 speed
Explain: If player is underwater and remove helmet it must transform to 5461
 
Back
Top