View Single Post
  #7  
Old 05-04-2016, 02:16 PM
daerath
Sarnak
 
Join Date: Jan 2011
Location: Northern VA
Posts: 91
Default Lua equivalent for global_player

I'm not sure if you can have both a global_player.pl and global_player.lua, but if you're using the .lua version here is the equivalent code that goes in event_enter_zone in global_player.lua.

Code:
-- Persistent Nimbus Plugin
function event_enter_zone(e)
  nlist = eq.get_entity_list();
  if (npc_list ~= nil) then
    for NPC in nlist.entries do
      local n = 0;
      if (NPC.GetEntityVariable("PersistentNimbus_" .. n) > 0) then
        while NPC.GetEntityVariable("PersistentNimbus_" .. n) > 0 do
          NPC.SpellEffect(NPC.GetEntityVariable("PersistentNimbus_" .. n), 500, 0, 1, 3000, 1, e);
          n = n + 1;
        end
      end
    end
  end
end
-- End Persistent Nimbus Plugin