First commit
This commit is contained in:
		
							
								
								
									
										15
									
								
								app/SabrehavenServer/data/talkactions/scripts/clean.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								app/SabrehavenServer/data/talkactions/scripts/clean.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
function onSay(player, words, param)
 | 
			
		||||
	if not player:getGroup():getAccess() then
 | 
			
		||||
		return true
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
	if player:getAccountType() < ACCOUNT_TYPE_GOD then
 | 
			
		||||
		return false
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
	local itemCount = cleanMap()
 | 
			
		||||
	if itemCount > 0 then
 | 
			
		||||
		player:sendTextMessage(MESSAGE_STATUS_WARNING, "Cleaned " .. itemCount .. " item" .. (itemCount > 1 and "s" or "") .. " from the map.")
 | 
			
		||||
	end
 | 
			
		||||
	return false
 | 
			
		||||
end
 | 
			
		||||
		Reference in New Issue
	
	Block a user