mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-11-28 07:36:50 +01:00
proper drowning implementation
This commit is contained in:
@@ -24447,27 +24447,27 @@ Attributes = {Waypoints=500}
|
||||
|
||||
TypeID = 5405
|
||||
Name = "ocean floor"
|
||||
Flags = {Bank,Unmove}
|
||||
Flags = {Bank,Unmove,CollisionEvent}
|
||||
Attributes = {Waypoints=500}
|
||||
|
||||
TypeID = 5406
|
||||
Name = "ocean floor"
|
||||
Flags = {Bank,Unmove}
|
||||
Flags = {Bank,Unmove,CollisionEvent}
|
||||
Attributes = {Waypoints=500}
|
||||
|
||||
TypeID = 5407
|
||||
Name = "ocean floor"
|
||||
Flags = {Bank,Unmove}
|
||||
Flags = {Bank,Unmove,CollisionEvent}
|
||||
Attributes = {Waypoints=500}
|
||||
|
||||
TypeID = 5408
|
||||
Name = "ocean floor"
|
||||
Flags = {Bank,Unmove}
|
||||
Flags = {Bank,Unmove,CollisionEvent}
|
||||
Attributes = {Waypoints=500}
|
||||
|
||||
TypeID = 5409
|
||||
Name = "ocean floor"
|
||||
Flags = {Bank,Unmove}
|
||||
Flags = {Bank,Unmove,CollisionEvent}
|
||||
Attributes = {Waypoints=500}
|
||||
|
||||
TypeID = 5410
|
||||
@@ -25925,12 +25925,12 @@ Name = "" # this is nothing in client
|
||||
|
||||
TypeID = 5743
|
||||
Name = "wooden floor"
|
||||
Flags = {Bank,Unmove}
|
||||
Flags = {Bank,Unmove,CollisionEvent}
|
||||
Attributes = {Waypoints=500}
|
||||
|
||||
TypeID = 5744
|
||||
Name = "wooden floor"
|
||||
Flags = {Bank,Unmove}
|
||||
Flags = {Bank,Unmove,CollisionEvent}
|
||||
Attributes = {Waypoints=500}
|
||||
|
||||
TypeID = 5745
|
||||
@@ -26017,7 +26017,7 @@ Attributes = {Waypoints=110}
|
||||
|
||||
TypeID = 5764
|
||||
Name = "a ventilation grille"
|
||||
Flags = {Bank,Unmove}
|
||||
Flags = {Bank,Unmove,CollisionEvent}
|
||||
Attributes = {Waypoints=500}
|
||||
|
||||
TypeID = 5765
|
||||
|
||||
@@ -388,8 +388,12 @@
|
||||
<movevent event="StepIn" movementid="237" script="nostalrius/237.lua" />
|
||||
|
||||
<!-- Nostalrius Default Movements -->
|
||||
<movevent event="StepIn" itemid="5404" script="misc/drowning.lua" />
|
||||
<movevent event="StepOut" itemid="5404" script="misc/drowning.lua"/>
|
||||
<movevent event="StepIn" fromid="5404" toid="5409" script="misc/drowning.lua" />
|
||||
<movevent event="StepOut" fromid="5404" toid="5409" script="misc/drowning.lua"/>
|
||||
<movevent event="StepIn" fromid="5743" toid="5744" script="misc/drowning.lua" />
|
||||
<movevent event="StepOut" fromid="5743" toid="5744" script="misc/drowning.lua"/>
|
||||
<movevent event="StepIn" itemid="5764" script="misc/drowning.lua" />
|
||||
<movevent event="StepOut" itemid="5764" script="misc/drowning.lua"/>
|
||||
|
||||
<!-- Floorchange -->
|
||||
<movevent event="StepIn" itemid="293" script="misc/floorchange.lua" />
|
||||
@@ -666,6 +670,10 @@
|
||||
<movevent event="StepIn" itemid="2151" function="onStepInField" />
|
||||
<movevent event="AddItem" itemid="2151" function="onAddField" />
|
||||
|
||||
<!-- Helmets -->
|
||||
<movevent event="Equip" itemid="5460" slot="head" function="onEquipItem" script="misc/helmet_of_the_deep.lua" />
|
||||
<movevent event="DeEquip" itemid="5460" slot="head" function="onDeEquipItem" />
|
||||
|
||||
<!-- Boots -->
|
||||
<movevent event="Equip" itemid="3079" slot="feet" function="onEquipItem" />
|
||||
<movevent event="DeEquip" itemid="3079" slot="feet" function="onDeEquipItem" />
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
local condition = Condition(CONDITION_DROWN)
|
||||
condition:setParameter(CONDITION_PARAM_HIT_DAMAGE, 20)
|
||||
condition:setTiming(9999)
|
||||
condition:setTiming(5)
|
||||
|
||||
|
||||
function onStepIn(creature, item, position, fromPosition)
|
||||
@@ -8,7 +7,12 @@ function onStepIn(creature, item, position, fromPosition)
|
||||
if player == nil then
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
local helmet = player:getSlotItem(CONST_SLOT_HEAD)
|
||||
if helmet ~= nil and helmet:getId() == 5460 then
|
||||
return true
|
||||
end
|
||||
|
||||
if math.random(1, 10) == 1 then
|
||||
position:sendMagicEffect(CONST_ME_BUBBLES)
|
||||
end
|
||||
|
||||
4
data/movements/scripts/misc/helmet_of_the_deep.lua
Normal file
4
data/movements/scripts/misc/helmet_of_the_deep.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
function onEquip(player, item, slot)
|
||||
player:removeCondition(CONDITION_DROWN)
|
||||
return true
|
||||
end
|
||||
Reference in New Issue
Block a user