All pastes #620891 Raw Edit

Mine

public text v1 · immutable
·published 2007-07-15 20:00 UTC
rendered paste body
function DefenseRewards(blank)
	
		local players = { }
		local numplayers = g_arena:GetPlayersInArea(players, 18336, 10944, 850)
		if (numplayers > 0) then
			for i = 1, numplayers do
				local player = players[i]
				
				local pid = player:getVehicle():vehicletypeid()
				if (OCBL == 2) then
					if ((pid == 103)  
					or (pid == 100)   
					or (pid == 109)   
					or (pid == 107)   
					or (pid == 106)   
					or (pid == 105)) then
					local reward = (g_arena:numPlaying() * 1.5)
					player:modExperience(reward)
					player:modCash(reward)
					player:modPoints(reward)
					player:message("You have received " .. reward .. " reward for defending this Outpost.")
				    end 
				elseif (OCBL == 1) then
					if ((pid == 113)  
					or (pid == 112)   
					or (pid == 116)   
					or (pid == 117)   
					or (pid == 115)   
					or (pid == 12)) then
					local reward = (g_arena:numPlaying() * 1.5)
					player:modExperience(reward)
					player:modCash(reward)
					player:modPoints(reward)
					player:message("You have received " .. reward .. " reward for defending this Outpost.")
				    end 
			    end
			end
		end
		local players = { }
		local numplayers = g_arena:GetPlayersInArea(players, 15008, 10944, 850)
		if (numplayers > 0) then
			for i = 1, numplayers do
				local player = players[i]
				
				local pid = player:getVehicle():vehicletypeid()
				if (OCBR == 2) then
					if ((pid == 103)  
					or (pid == 100)   
					or (pid == 109)   
					or (pid == 107)   
					or (pid == 106)   
					or (pid == 105)) then
					local reward = (g_arena:numPlaying() * 1.5)
					player:modExperience(reward)
					player:modCash(reward)
					player:modPoints(reward)
					player:message("You have received " .. reward .. " reward for defending this Outpost.")
				    end 
				elseif (OCBR == 1) then
					if ((pid == 113)  
					or (pid == 112)   
					or (pid == 116)   
					or (pid == 117)   
					or (pid == 115)   
					or (pid == 12)) then
					local reward = (g_arena:numPlaying() * 1.5)
					player:modExperience(reward)
					player:modCash(reward)
					player:modPoints(reward)
					player:message("You have received " .. reward .. " reward for defending this Outpost.")
				    end 
			    end
			end
		end
		
		local players = { }
		local numplayers = g_arena:GetPlayersInArea(players, 15008, 6480, 850)
		if (numplayers > 0) then
			for i = 1, numplayers do
				local player = players[i]
				
				local pid = player:getVehicle():vehicletypeid()
				if (OCP == 2) then
					if ((pid == 103)  
					or (pid == 100)   
					or (pid == 109)   
					or (pid == 107)   
					or (pid == 106)   
					or (pid == 105)) then
					local reward = (g_arena:numPlaying() * 1.5)
					player:modExperience(reward)
					player:modCash(reward)
					player:modPoints(reward)
					player:message("You have received " .. reward .. " reward for defending this Outpost.")
				    end 
				elseif (OCP == 1) then
					if ((pid == 113)  
					or (pid == 112)   
					or (pid == 116)   
					or (pid == 117)   
					or (pid == 115)   
					or (pid == 12)) then
					local reward = (g_arena:numPlaying() * 1.5)
					player:modExperience(reward)
					player:modCash(reward)
					player:modPoints(reward)
					player:message("You have received " .. reward .. " reward for defending this Outpost.")
				    end 
			    end
			end
		end
		
		local players = { }
		local numplayers = g_arena:GetPlayersInArea(players, 18336, 6480, 850)
		if (numplayers > 0) then
			for i = 1, numplayers do
				local player = players[i]
				
				local pid = player:getVehicle():vehicletypeid()
				if (OCG == 2) then
					if ((pid == 103)  
					or (pid == 100)   
					or (pid == 109)   
					or (pid == 107)   
					or (pid == 106)   
					or (pid == 105)) then
					local reward = (g_arena:numPlaying() * 1.5)
					player:modExperience(reward)
					player:modCash(reward)
					player:modPoints(reward)
					player:message("You have received " .. reward .. " reward for defending this Outpost.")
				    end 
				elseif (OCG == 1) then
					if ((pid == 113)  
					or (pid == 112)   
					or (pid == 116)   
					or (pid == 117)   
					or (pid == 115)   
					or (pid == 12)) then
					local reward = (g_arena:numPlaying() * 1.5)
					player:modExperience(reward)
					player:modCash(reward)
					player:modPoints(reward)
					player:message("You have received " .. reward .. " reward for defending this Outpost.")
				    end 
			    end
			end
		end
		
		--Upper level
		local players = { }
		local numplayers = g_arena:GetPlayersInArea(players, 8448, 10944, 950)
		if (numplayers > 0) then
			for i = 1, numplayers do
				local player = players[i]
				
				local pid = player:getVehicle():vehicletypeid()
				if (OCBL == 2) then
					if ((pid == 103)  
					or (pid == 100)   
					or (pid == 109)   
					or (pid == 107)   
					or (pid == 106)   
					or (pid == 105)) then
					local reward = (g_arena:numPlaying() * 1.5)
					player:modExperience(reward)
					player:modCash(reward)
					player:modPoints(reward)
					player:message("You have received " .. reward .. " reward for defending this Outpost.")
				    end 
				elseif (OCBL == 1) then
					if ((pid == 113)  
					or (pid == 112)   
					or (pid == 116)   
					or (pid == 117)   
					or (pid == 115)   
					or (pid == 12)) then
					local reward = (g_arena:numPlaying() * 1.5)
					player:modExperience(reward)
					player:modCash(reward)
					player:modPoints(reward)
					player:message("You have received " .. reward .. " reward for defending this Outpost.")
				    end 
			    end
			end
		end
		
		local players = { }
		local numplayers = g_arena:GetPlayersInArea(players, 3552, 10944, 950)
		if (numplayers > 0) then
			for i = 1, numplayers do
				local player = players[i]
				
				local pid = player:getVehicle():vehicletypeid()
				if (OCBR == 2) then
					if ((pid == 103)  
					or (pid == 100)   
					or (pid == 109)   
					or (pid == 107)   
					or (pid == 106)   
					or (pid == 105)) then
					local reward = (g_arena:numPlaying() * 1.5)
					player:modExperience(reward)
					player:modCash(reward)
					player:modPoints(reward)
					player:message("You have received " .. reward .. " reward for defending this Outpost.")
				    end 
				elseif (OCBR == 1) then
					if ((pid == 113)  
					or (pid == 112)   
					or (pid == 116)   
					or (pid == 117)   
					or (pid == 115)   
					or (pid == 12)) then
					local reward = (g_arena:numPlaying() * 1.5)
					player:modExperience(reward)
					player:modCash(reward)
					player:modPoints(reward)
					player:message("You have received " .. reward .. " reward for defending this Outpost.")
				    end 
			    end
			end
		end
		
		local players = { }
		local numplayers = g_arena:GetPlayersInArea(players, 3552, 6480, 950)
		if (numplayers > 0) then
			for i = 1, numplayers do
				local player = players[i]
				
				local pid = player:getVehicle():vehicletypeid()
				if (OCP == 2) then
					if ((pid == 103)  
					or (pid == 100)   
					or (pid == 109)   
					or (pid == 107)   
					or (pid == 106)   
					or (pid == 105)) then
					local reward = (g_arena:numPlaying() * 1.5)
					player:modExperience(reward)
					player:modCash(reward)
					player:modPoints(reward)
					player:message("You have received " .. reward .. " reward for defending this Outpost.")
				    end 
				elseif (OCP == 1) then
					if ((pid == 113)  
					or (pid == 112)   
					or (pid == 116)   
					or (pid == 117)   
					or (pid == 115)   
					or (pid == 12)) then
					local reward = (g_arena:numPlaying() * 1.5)
					player:modExperience(reward)
					player:modCash(reward)
					player:modPoints(reward)
					player:message("You have received " .. reward .. " reward for defending this Outpost.")
				    end 
			    end
			end
		end
		
		local players = { }
		local numplayers = g_arena:GetPlayersInArea(players, 8448, 6480, 950)
		if (numplayers > 0) then
			for i = 1, numplayers do
				local player = players[i]
				
				local pid = player:getVehicle():vehicletypeid()
				if (OCG == 2) then
					if ((pid == 103)  
					or (pid == 100)   
					or (pid == 109)   
					or (pid == 107)   
					or (pid == 106)   
					or (pid == 105)) then
					local reward = (g_arena:numPlaying() * 1.5)
					player:modExperience(reward)
					player:modCash(reward)
					player:modPoints(reward)
					player:message("You have received " .. reward .. " reward for defending this Outpost.")
				    end 
				elseif (OCG == 1) then
					if ((pid == 113)  
					or (pid == 112)   
					or (pid == 116)   
					or (pid == 117)   
					or (pid == 115)   
					or (pid == 12)) then
					local reward = (g_arena:numPlaying() * 1.5)
					player:modExperience(reward)
					player:modCash(reward)
					player:modPoints(reward)
					player:message("You have received " .. reward .. " reward for defending this Outpost.")
				    end 
			    end
			end
		end
local blank = { }
event_createarg(DefenseRewards, 60000, g_arena, blank)
return true
end


function Player_OnJoin(plyr) -- player

plyr:setTicker(0,"**READ ZONE NEWS FOR HELP**")
if (OCG == 0) then
					if (OCP == 2) then
					plyr:setTicker(1,"Purple Outpost - Europa  |   Green Outpost - None  ")
					elseif (OCP == 1) then
					plyr:setTicker(1,"Purple Outpost - Titan    |   Green Outpost - None  ")
					elseif (OCP == 0) then
					plyr:setTicker(1,"Purple Outpost - None    |   Green Outpost - None  ")
					end
elseif (OCG == 1) then
					if (OCP == 2) then
					plyr:setTicker(1,"Purple Outpost - Europa  |   Green Outpost - Titan  ")
					elseif (OCP == 1) then
					plyr:setTicker(1,"Purple Outpost - Titan    |   Green Outpost - Titan  ")
					elseif (OCP == 0) then
					plyr:setTicker(1,"Purple Outpost - None    |   Green Outpost - Titan  ")
					end
elseif (OCG == 2) then
					if (OCP == 2) then
					plyr:setTicker(1,"Purple Outpost - Europa  |   Green Outpost - Europa")
					elseif (OCP == 1) then
					plyr:setTicker(1,"Purple Outpost - Titan    |   Green Outpost - Europa")
					elseif (OCP == 0) then
					plyr:setTicker(1,"Purple Outpost - None    |   Green Outpost - Europa")
					end	
end
if (OCBL == 0) then
					if (OCBR == 2) then
					plyr:setTicker(2,"Brown Outpost - Europa  |      Blue Outpost - None  ")
					elseif (OCBR == 1) then
					plyr:setTicker(2,"Brown Outpost - Titan    |      Blue Outpost - None  ")
					elseif (OCBR == 0) then
					plyr:setTicker(2,"Brown Outpost - None    |      Blue Outpost - None  ")
					end
elseif (OCBL == 1) then
					if (OCBR == 2) then
					plyr:setTicker(2,"Brown Outpost - Europa  |      Blue Outpost - Titan  ")
					elseif (OCBR == 1) then
					plyr:setTicker(2,"Brown Outpost - Titan    |      Blue Outpost - Titan  ")
					elseif (OCBR == 0) then
					plyr:setTicker(2,"Brown Outpost - None    |      Blue Outpost - Titan  ")
					end
elseif (OCBL == 2) then
					if (OCBR == 2) then
					plyr:setTicker(2,"Brown Outpost - Europa  |      Blue Outpost - Europa")
					elseif (OCBR == 1) then
					plyr:setTicker(2,"Brown Outpost - Titan    |      Blue Outpost - Europa")
					elseif (OCBR == 0) then
					plyr:setTicker(2,"Brown Outpost - None    |      Blue Outpost - Europa")
					end
end

if (DefenseStart == 0) then
	blank = { }
	DefenseStart = 1
	event_createarg(DefenseRewards, 60000, g_arena, blank)
end

end