-- world_motd_spawn - World-level logic for MOTD, including auto-spawn and display-on-login -- (MOTDcomponent) -- Template attachment: world -- Created by: Patrick Ferland -- Created on: 08/02/2008 -- Revision History -- 08/02/2008 P.Ferland - New script -- Constants MOTD_TEMPLATE = '13321:4' -- Script properties -- no properties -- Commands -- no commands -- Triggers Trigger attach() local st = self.singleton_tracker if (st ~= nil) then if (st['motd'] == nil) then local motd = CreateInContainerById(self, MOTD_TEMPLATE) PersistObject(motd) SaveToDb(motd) end end end Trigger login(connection_id, user_id, user_object) local st = self.singleton_tracker if (st ~= nil) then local motd = st['motd'] if (motd ~= nil) then SendTo(motd, 'motd_display', 0, user_object) end end end -- Local functions -- no functions