status effect

Post Reply
shadowuz
Posts: 26
Joined: Mon May 18, 2015 9:46 am

status effect

Post by shadowuz » Thu Oct 01, 2015 10:29 am

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

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: status effect

Post by kjLotus » Thu Oct 01, 2015 6:17 pm

table: status_effects
column: flags

search the code for EFFECTFLAG_ON_ZONE

shadowuz
Posts: 26
Joined: Mon May 18, 2015 9:46 am

Re: status effect

Post by shadowuz » Thu Oct 01, 2015 7:21 pm

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;  

Post Reply