Much better! I'm not set up to test right now, so I'll give you a couple more easy fixes and try to look back into this later if someone doesn't beat me to it.
First off, define regions starting with 1 using contiguous numbers. The parser is kinda picky about skipping numbers, plus it will help with the next thing.
Code: Select all
-- The Afflictor System (RegionID, X, Radius, Z)
zone:registerRegion(1, -163, 10, -137, 0,0,0); -- 17379798 The Afflictor
zone:registerRegion(2, -209, 10, -131, 0,0,0); -- 17379799 The Afflictor
zone:registerRegion(3, -140, 10, 20, 0,0,0); -- 17379800 The Afflictor
zone:registerRegion(4, 261, 10, 140, 0,0,0); -- 17379801 The Afflictor
zone:registerRegion(5, 340, 10, 100, 0,0,0); -- 17379802 The Afflictor
zone:registerRegion(6, 380, 10, 60, 0,0,0); -- 17379803 The Afflictor
end;
Even though you are the only one defining regions so far in that zone, its best to filter any region logic by the region number.
Code: Select all
function onRegionEnter(player,region)
if(region <= 6)
if (player:hasStatusEffect(EFFECT_CURSE_I) == false and player:hasStatusEffect(EFFECT_SILENCE) == false) then
player:addStatusEffect(EFFECT_CURSE_I,50,0,300);
end
end
end;