Page 1 of 1
Beadeaux "The Mute" and "The Afflictor" Fix
Posted: Sun Jun 16, 2013 8:47 am
by santssoft
Fix call of luautils::OnEffectGain in status_effect_container.cpp to add modifiers before the apply of modifiers on PC
The Afflictor:
- When you are at a distance less than 10 CURSED state apply unless you have the status effect CURSED or SILENCED
- TODO: animation when you pass next to The Afflictor and you gain the CURSED status effect
The Mute:
- silenced status effect time is now between 10-15 minutes (ffxiclopedia)
- TODO: animation when you touch the The Muteand you gain the SILENCED status effect
Re: Beadeaux "The Mute" and "The Afflictor" Fix
Posted: Sun Jun 16, 2013 11:58 am
by bluekirby0
Good concept, but the performance impact is pretty large for a function that will rarely get used. It would be a better idea to use the new circular region declarations in the zone's script and script these OnRegionEnter since the NPCs themselves don't move.
Re: Beadeaux "The Mute" and "The Afflictor" Fix
Posted: Sun Jun 16, 2013 1:21 pm
by santssoft
Thanks for the information about circular regions, bluekirby0. I updated the path to use this regions and delete the OnRangePC function.
Re: Beadeaux "The Mute" and "The Afflictor" Fix
Posted: Mon Jun 17, 2013 2:38 am
by bluekirby0
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;
Re: Beadeaux "The Mute" and "The Afflictor" Fix
Posted: Mon Jun 17, 2013 3:20 am
by santssoft
Thanks bluekirby0, I will fix it.
Re: Beadeaux "The Mute" and "The Afflictor" Fix
Posted: Mon Jun 17, 2013 5:34 am
by santssoft
Fix TYPO in "if (region <= 6) then", correct "if (region:GetRegionID() <= 6) then"