mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-05-02 18:49:21 +02:00
Update fluids
Slime fluid using CipSoft condition system. Can only use fluids on players (need further confirmation on the behavior done on monsters and NPCs)
This commit is contained in:
parent
a82933a526
commit
f9cff8fb05
@ -2,12 +2,7 @@ local drunk = Condition(CONDITION_DRUNK)
|
||||
drunk:setParameter(CONDITION_PARAM_TICKS, 60000)
|
||||
|
||||
local poison = Condition(CONDITION_POISON)
|
||||
poison:setParameter(CONDITION_PARAM_DELAYED, true)
|
||||
poison:setParameter(CONDITION_PARAM_MINVALUE, -50)
|
||||
poison:setParameter(CONDITION_PARAM_MAXVALUE, -120)
|
||||
poison:setParameter(CONDITION_PARAM_STARTVALUE, -5)
|
||||
poison:setParameter(CONDITION_PARAM_TICKINTERVAL, 5000)
|
||||
poison:setParameter(CONDITION_PARAM_FORCEUPDATE, true)
|
||||
poison:setTiming(100)
|
||||
|
||||
local messages = {
|
||||
[FLUID_WATER] = "Gulp.",
|
||||
@ -38,7 +33,7 @@ function onUse(player, item, fromPosition, target, toPosition)
|
||||
end
|
||||
end
|
||||
|
||||
if target:isCreature() then
|
||||
if target:isCreature() and target:getPlayer() ~= nil then
|
||||
if item:getFluidType() == FLUID_NONE then
|
||||
player:sendCancelMessage("It is empty.")
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user