arena.lua

main 22 lines · 618 bytes Raw
Alex Alex Commit Server upload 18/10/2026 23:38
1local Dmg, Cura = -500, 1000
2local function onContinuouDmg(cid, pos)
3 local player = Player(cid)
4 if player then
5 if player:getPosition() == pos then
6 doTargetCombat(0, player, COMBAT_PHYSICALDAMAGE, -Dmg, -Dmg, CONST_ME_NONE)
7 addEvent(onContinuouDmg, 1000, player.uid, pos)
8 end
9 end
10end
11function onStepIn(creature, item, position, fromPosition)
12 if creature:isPlayer() then
13 doTargetCombat(0, creature, COMBAT_PHYSICALDAMAGE, -Dmg, -Dmg, CONST_ME_NONE)
14 addEvent(onContinuouDmg, 1000, creature.uid, item:getPosition())
15 else
16 doTargetCombat(0, creature, COMBAT_HEALING, Cura, Cura)
17 end
18 return true
19end
20
21
22
Top