Level im Ankündigungschat

10/28/2013 00:29 .Weekend#16
Warum so umständlich?

Da müsste man für jedes Level ein neues Levelup Event machen.

So ist es etwas einfacher zu verwalten:

Code:
quest levelup_notice begin
	state start begin
		when login or levelup begin
			local gm_allowed = true -- Ob bei GMs die Meldung auch kommt
			if not gm_allowed and pc.is_gm() then return end
			local level_list = {
				10,20,30,40,50,60,70,80,90,99
			}
			table.foreach(level_list, function(i)
				if pc.get_level() == level_list[i] then
					notice_all(string.format("Der Spieler %s hat soeben das Level %d erreicht!", pc.get_name(), level_list[i])) break
				end
			end)
		end
	end
end
10/28/2013 05:37 Xijezu#17
#closed [as requested]