Page 1 of 1

status effect

Posted: Thu Oct 01, 2015 10:29 am
by shadowuz
was wonder how would i go about makeing a status effect to be lost on zoning

Code: Select all

 ----------------------
-- func: buffs
-- auth: <Unknown>
-- desc: Just for fun.
------------------------

cmdprops =

{

    permission = 0,

    parameters = "iiii"

};

   function onTrigger(player) 
   player:addStatusEffect(EFFECT_REFRESH,7,0,0);
   player:addStatusEffect(EFFECT_REGEN,15,0,0);
   player:addStatusEffect(EFFECT_REGAIN,15,1,0);
   
end;                       
what would i need to add to make it take effect in a zone like abyssea when i exit out the effect is lost

Re: status effect

Posted: Thu Oct 01, 2015 6:17 pm
by kjLotus
table: status_effects
column: flags

search the code for EFFECTFLAG_ON_ZONE

Re: status effect

Posted: Thu Oct 01, 2015 7:21 pm
by shadowuz
thank you, that partly answer what i was wanted but my fault i posted (mislead) what i was tring to get to work it was this script which i'm not sure i even did right as i'm still in learn process

Code: Select all

-----------------------------------
-- Area: Abyssea
--  NPC: Atma_Infusionist
-- Type: ATMA_OF_THE_MINIKIN_MONSTROSITY
-----------------------------------
package.loaded["scripts/zones/Abyssea-La_Theine/TextIDs"] = nil;
-----------------------------------

require("scripts/globals/settings");
require("scripts/globals/status");
require("scripts/globals/keyitems");
require("scripts/globals/abyssea");
require("scripts/zones/Abyssea-La_Theine/TextIDs");

-----------------------------------
-- onTrade Action
-----------------------------------

function onTrade(player,npc,trade)
end;

-----------------------------------
-- onEffectGain Action
-----------------------------------

function onEffectGain(target,effect)
   target:addMod(MOD_INT, 50);
   target:addMod(MOD_REFRESH, 10);
-- Enmity -: Minor (+value ???) can't find a set value

end;

-----------------------------------
-- onEffectTick Action
-----------------------------------

function onEffectTick(target,effect)
end;

-----------------------------------
-- onEffectLose Action
-----------------------------------

function onEffectLose(target,effect)
target:delMod(MOD_INT, 50);
target:delMod(MOD_REFRESH, 10);
-- Enmity -: Minor (+value ???) can't find a set value

end;