Eduardo170
Well-Known Member
Hi, Otland Comunity, I am newbie in this of the scripts, this is my first script I hope you enjoy
Code:
--[[ Script by Pharos]]--
local area = {
fromPos = {x= 794, y= 796, z= 7}, -- Esquina superior izquierda de la zona.
toPos = {x= 815, y= 814, z= 7} -- Esquina inferior derecha de la zona.
}
function onThink (cid, interval, lastExecution, pos, frompos, topos)
for x = area.fromPos.x, area.toPos.x do
for y = area.fromPos.y, area.toPos.y do
local pos = {x = x, y = y, z = area.fromPos.z}
local player = getTopCreature(pos).uid
if isPlayer(player) then
doAreaCombatMana (COMBAT_MANADRIAN, pos, .0, 200, 300, CONST_ME_PURPLEENERGY);
doAreaCombatHealth (COMBAT_LIFEDRIAN, pos, .0, 200, 300, CONST_ME_YELLOWENERGY)
end
end
end
return true
end