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

MoveEvent Simple Easy Underwater System

Exedion

Active Member
Joined
Jun 11, 2007
Messages
628
Reaction score
30
Well i coming again with my shorts but usefulls scripts for make more "rpg's" the otservers ^^ this time i release a simple and easy underwater system for TheforgottenServer

Here we go:

Make a lua file in moveevents named drown.lua and put this code inside:

Code:
local drowning = createConditionObject(CONDITION_DROWN)
addDamageCondition(drowning, 6, 2000, -50)

function onStepIn(cid, item, pos)	
	if isPlayer(cid) ~= FALSE then
	doTargetCombatCondition(0, cid, drowning, CONST_ME_NONE)
	end
	return TRUE
end

and in the movements.xml, put this:

Code:
	<!-- Underwater System by Exedion -->
	<movevent event="StepIn" itemid="5405" script="drown.lua"/>
	<movevent event="StepIn" itemid="5406" script="drown.lua"/>
	<movevent event="StepIn" itemid="5407" script="drown.lua"/>
	<movevent event="StepIn" itemid="5408" script="drown.lua"/>
	<movevent event="StepIn" itemid="5409" script="drown.lua"/>
	<movevent event="StepIn" itemid="5410" script="drown.lua"/>
	<movevent event="StepIn" itemid="5427" script="drown.lua"/>
	<movevent event="StepIn" itemid="5428" script="drown.lua"/>
	<movevent event="StepIn" itemid="5429" script="drown.lua"/>
	<movevent event="StepIn" itemid="5430" script="drown.lua"/>
	<movevent event="StepIn" itemid="5431" script="drown.lua"/>
	<movevent event="StepIn" itemid="5432" script="drown.lua"/>
	<movevent event="StepIn" itemid="5433" script="drown.lua"/>
	<movevent event="StepIn" itemid="5434" script="drown.lua"/>
	<movevent event="StepIn" itemid="5435" script="drown.lua"/>
	<movevent event="StepIn" itemid="5436" script="drown.lua"/>
	<movevent event="StepIn" itemid="5437" script="drown.lua"/>
	<movevent event="StepIn" itemid="5438" script="drown.lua"/>
	<movevent event="StepIn" itemid="5743" script="drown.lua"/>
	<movevent event="StepIn" itemid="5744" script="drown.lua"/>
	<movevent event="StepIn" itemid="5763" script="drown.lua"/>
	<movevent event="StepIn" itemid="5764" script="drown.lua"/>

now go to items.xml and search the "helmet of the deep" and put this tag attribute:

Code:
<attribute key="suppressDrown" value="1"/>

and the should be:

Code:
	<item id="5461" article="a" name="helmet of the deep">
		<attribute key="weight" value="21000"/>
		<attribute key="armor" value="2"/>
		<attribute key="slotType" value="head"/>
		<attribute key="suppressDrown" value="1"/>
	</item>

Credits to:
Ispiro: give me the script :p
Heliton: for make the patron script :D
Exedion : modify ^^

If anyone help this thread making a moveevent that check the player with the helmet, if the player have the helmet, can walk, but if no have, the player walkback... i will give credits and rep... Have fun! Exera Team ^^

PS: Sorry for my bad english...

NOBODY CONGRATULATE??? -.-
 
Last edited:
If this is partialy from the script I posted on OTF, then I shouldn't take credits cause I also mentioned that heliton was the one that made it, not me. :p

Anyways, rep++
 
this work as the original underwater system of tibia rl, when you are underwater without helmet of deeps you get hurt, and when you got the helmet you get normal state ^^
 
this atribute key:
<attribute key="suppressDrown" value="1"/>

could be use like supressPoison ? and value 1? so he will be never get poisoned?
never heard about that supress atribute key thing o_O
 
@Up: Me neither. Always nice to discover a new function. Perhaps make some 'Fire Boots' that suppress burns from walking over fire fields :D
 
@Up: Me neither. Always nice to discover a new function. Perhaps make some 'Fire Boots' that suppress burns from walking over fire fields :D

I had some Boots of Lavaburning. I will look into this "suppress" function. Maybe make a quest with all full firefields and you need these boots =), to stay safe!

@OnTopic: Thx for this quest.

@MODS: Sorry if it seems like im bumping old posts, im just now getting my 8.1 server up, and im actually thanking owners for there work for releaseing it. Unlike some ungrateful *****es that just steal and keep.
 
it dont work =/

[28/01/2008 14:57:22] Lua Script Error: [CreatureScript Interface]
[28/01/2008 14:57:22] data/creaturescripts/scripts/playerdeath.lua:eek:nDeath

[28/01/2008 14:57:22] luaGetCreatureName(). Creature not found

[28/01/2008 14:57:23] Lua Script Error: [CreatureScript Interface]
[28/01/2008 14:57:23] data/creaturescripts/scripts/playerdeath.lua:eek:nDeath

[28/01/2008 14:57:23] data/creaturescripts/scripts/playerdeath.lua:21: attempt to call method 'numrows' (a nil value)
 
Last edited by a moderator:
Good script, using it on my server. It would be good if it checks for the helmet so it doesn't constantly spam "You are drowning." also for those that the helmets not working for you need to add

<movevent event="Equip" itemid="5461" slot="head" function="onEquipItem"/>
<movevent event="DeEquip" itemid="5461" slot="head" function="onDeEquipItem"/>

to your movements.xml :)
 

Similar threads

Back
Top