mirror of
				https://bitbucket.org/Ioncannon/project-meteor-server.git
				synced 2025-05-20 08:26:59 -04:00 
			
		
		
		
	- moved script object to wrapper class to catch and log exceptions - added loggers for basepacket/subpacket (todo: colour and use them in NLog.config) - finished up most commands (todo: !property and !property2) - todo: create and use mysql wrapper class to log exceptions
		
			
				
	
	
		
			32 lines
		
	
	
		
			885 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			885 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
| require("global");
 | |
| 
 | |
| properties = {
 | |
|     permissions = 0,
 | |
|     parameters = "s",
 | |
|     description = "reloads <zone>",
 | |
| }
 | |
| 
 | |
| function onTrigger(player, argc, zone)
 | |
|     if not player and not zone or tonumber(zone) == 0 then
 | |
|         printf("No valid zone specified!");
 | |
|         return;
 | |
|     end;
 | |
|     
 | |
|     local sender = "[reloadzones] ";
 | |
|     
 | |
|     zone = tonumber(zone);
 | |
|     
 | |
|     if player then
 | |
|         local messageID = MESSAGE_TYPE_SYSTEM_ERROR;
 | |
|         zone = zone or player:GetZoneID();
 | |
|         player:SendMessage(messageID, "[reloadzones] ", string.format("Reloading zone: %u", zone));
 | |
|     --[[ todo: get this working legit
 | |
|         player:GetZone():Clear();
 | |
|         player:GetZone():AddActorToZone(player);
 | |
|         player:SendInstanceUpdate();
 | |
|         ]]
 | |
|     end;
 | |
|     
 | |
|     GetWorldManager():ReloadZone(zone);
 | |
|     printf("%s reloaded zone %u", sender, zone);
 | |
| end; |