How do I make the damage increase instead of decreasing?
Lua:
local condition = Condition(CONDITION_CURSED, CONDITIONID_COMBAT)
condition:setParameter(CONDITION_PARAM_DELAYED, true)
condition:setParameter(CONDITION_PARAM_MINVALUE, -1)
condition:setParameter(CONDITION_PARAM_MAXVALUE, -1000)
condition:setParameter(CONDITION_PARAM_STARTVALUE, 50)
condition:setParameter(CONDITION_PARAM_TICKINTERVAL, 2000)
condition:setParameter(CONDITION_PARAM_FORCEUPDATE, true)
local deathin = MoveEvent()
function deathin.onStepIn(player, creature, target, item, pos, fromPosition)
local cid = player:getId()
if player:isPlayer() then
if player:getCondition(CONDITION_CURSED,CONDITIONID_COMBAT) == nil then
player:addCondition(condition)
end
if player:getStorageValue(17100) > os.time() then
if player:getStorageValue(17101) < 1 then
player:setStorageValue(17101,1)
end
end
end
return true
end
deathin:type("stepin")
deathin:id(37449)
deathin:register()
local tile = {37449}
local deathing = MoveEvent()
function deathing.onStepOut(player, item, pos)
local cid = player:getId()
if player:isPlayer() then
local ppos = player:getPosition()
if(isInArray(tile, getThingfromPos({x = ppos.x, y = ppos.y, z = ppos.z, stackpos = 0}).itemid)) then
return true
else
doRemoveCondition(player, CONDITION_CURSED)
if player:getStorageValue(17101) == 1 then
player:setStorageValue(17101,0)
end
end
end
return true
end
deathing:type("stepOut")
deathing:id(37449)
deathing:register()